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/viewer-static.min.js')
-rw-r--r--src/main/webapp/js/viewer-static.min.js2961
1 files changed, 1486 insertions, 1475 deletions
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 236fe501..608b6531 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",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]"!==
@@ -2006,104 +2006,104 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!=
b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,C,p,F,K,P,d,f){var g=P?57:0,x=k,y=m,u=P?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=J+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";D+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var W=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;W.style.width=k+"px";W.style.height=m+"px";W.style.left=D+"px";W.style.top=G+"px";W.style.zIndex=this.zIndex;W.appendChild(e);document.body.appendChild(W);!K&&e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){T=!0}),null,mxUtils.bind(this,function(Z){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Z=d();
-null!=Z&&(x=k=Z.w,y=m=Z.h)}Z=mxUtils.getDocumentSize();J=Z.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Z.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(y,J-u);Z=this.getPosition(D,G,k,m);D=Z.x;G=Z.y;W.style.left=D+"px";W.style.top=G+"px";W.style.width=k+"px";W.style.height=m+"px";!K&&
-e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=W;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,m,C,p,F,L,P,d,f){var g=P?57:0,x=k,y=m,t=P?0:64,G=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(G.height=window.innerHeight);var D=G.height,I=Math.max(1,Math.round((G.width-k-t)/2)),H=Math.max(1,Math.round((D-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-t):k;m=Math.min(m,D-t);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));G=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=G.x+"px";this.bg.style.top=G.y+"px";I+=G.x;H+=G.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+H+=b.embedViewport.y,I+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var S=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(I,H,k,m);I=C.x;H=C.y;S.style.width=k+"px";S.style.height=m+"px";S.style.left=I+"px";S.style.top=H+"px";S.style.zIndex=this.zIndex;S.appendChild(e);document.body.appendChild(S);!L&&e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=H+14+"px",p.style.left=I+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(M){T=!0}),null,mxUtils.bind(this,function(M){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var M=d();
+null!=M&&(x=k=M.w,y=m=M.h)}M=mxUtils.getDocumentSize();D=M.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");I=Math.max(1,Math.round((M.width-k-t)/2));H=Math.max(1,Math.round((D-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-t):x;m=Math.min(y,D-t);M=this.getPosition(I,H,k,m);I=M.x;H=M.y;S.style.left=I+"px";S.style.top=H+"px";S.style.width=k+"px";S.style.height=m+"px";!L&&
+e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=I+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=S;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,C,p,F,K,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
+var ErrorDialog=function(b,e,k,m,C,p,F,L,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()});
-y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(y){var u=F.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=F.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var W=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,W-=H.y*J.height):
-u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,W,u);u.open();y&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
-K.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");K.appendChild(P);mxEvent.addListener(P,
-"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
-K.style.paddingTop="20px";K.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&K.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst||
-K.appendChild(P);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(P){K.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
+y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(y){var t=F.checked||d.checked,G=parseInt(g.value)/100;isNaN(G)&&(G=1,g.value="100%");G*=.75;var D=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/k.pageScale;if(t){var H=F.checked?1:parseInt(f.value);isNaN(H)||(I=mxUtils.getScaleForPageCount(H,k,D))}k.getGraphBounds();var S=H=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*G);D.height=Math.ceil(D.height*G);I*=G;!t&&k.pageVisible?(G=k.getPageLayout(),H-=G.x*D.width,S-=G.y*D.height):
+t=!0;t=PrintDialog.createPrintPreview(k,I,D,0,H,S,t);t.open();y&&PrintDialog.printPreview(t)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
+L.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(L);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");L.appendChild(P);mxEvent.addListener(P,
+"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);C.appendChild(p);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);C.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
+L.style.paddingTop="20px";L.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&L.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
+L.appendChild(P);p.appendChild(L);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(P){L.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(y.setAttribute("src",J.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
-"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");F.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");
-mxUtils.write(K,mxResources.get("background")+":");F.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});F.appendChild(K);p.appendChild(F);F=document.createElement("tr");
-K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");F.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
-"60px";y.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(y,"click",H);k();K.appendChild(y);K.appendChild(x);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,P.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn";
-K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);F.appendChild(K);p.appendChild(F);C.appendChild(p);this.container=C};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Z,N,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Z=!1;for(N=0;N<u.length;N++)qa=u[N],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,Z=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,Z=F.checked=!0));Z?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),K.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px";
+var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var D=t;null!=D&&Graph.isPageLink(D.src)&&(D=b.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(y.setAttribute("src",D.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
+"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");F.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");
+mxUtils.write(L,mxResources.get("background")+":");F.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
+"click",function(D){b.pickColor(f||"none",function(I){f=I;e()});mxEvent.consume(D)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var D=parseInt(g.value);g.value=Math.max(1,isNaN(D)?m.getGridSize():D)});F.appendChild(L);p.appendChild(F);F=document.createElement("tr");
+L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");F.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
+"60px";y.style.padding="4px";var t=m.backgroundImage,G=function(D){b.showBackgroundImageDialog(function(I,H){H||(t=I,k())},t);mxEvent.consume(D)};mxEvent.addListener(x,"click",G);mxEvent.addListener(y,"click",G);k();L.appendChild(y);L.appendChild(x);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
+b.editor.cancelFirst&&L.appendChild(x);G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var D=parseInt(g.value);isNaN(D)||m.gridSize===D||m.setGridSize(D);D=new ChangePageSetup(b,f,t,P.get());D.ignoreColor=m.background==f;D.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=t?t.src:null);m.pageFormat.width==D.previousFormat.width&&m.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||m.model.execute(D)});G.className="geBtn gePrimaryBtn";
+L.appendChild(G);b.editor.cancelFirst||L.appendChild(x);F.appendChild(L);p.appendChild(F);C.appendChild(p);this.container=C};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(M,fa,la){if(la||g!=document.activeElement&&x!=document.activeElement){M=!1;for(fa=0;fa<t.length;fa++)la=t[fa],H?"custom"==la.key&&(L.value=la.key,H=!1):null!=la.format&&("a4"==la.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==la.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+k.width==la.format.width&&k.height==la.format.height?(L.value=la.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,M=!0):k.width==la.format.height&&k.height==la.format.width&&(L.value=la.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,M=F.checked=!0));M?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
+"checked"),L.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];y[J.key]=J;var D=document.createElement("option");D.setAttribute("value",
-J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var W=k,T=function(Z,N){Z=y[K.value];null!=Z.format?(g.value=Z.format.width/100,x.value=Z.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");Z=parseFloat(g.value);if(isNaN(Z)||0>=Z)g.value=k.width/100;Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=k.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&F.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));N&&G||Z.width==W.width&&Z.height==W.height||(W=Z,null!=m&&m(W))};mxEvent.addListener(e,"click",function(Z){p.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(d,"click",function(Z){F.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);mxEvent.addListener(p,
-"change",T);mxEvent.addListener(K,"change",function(Z){G="custom"==K.value;T(Z,!0)});T();return{set:function(Z){k=Z;C(null,null,!0)},get:function(){return W},widthInput:g,heightInput:x}};
+"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},t=PageSetupDialog.getFormats(),G=0;G<t.length;G++){var D=t[G];y[D.key]=D;var I=document.createElement("option");I.setAttribute("value",
+D.key);mxUtils.write(I,D.title);L.appendChild(I)}var H=!1;C();b.appendChild(L);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var S=k,T=function(M,fa){M=y[L.value];null!=M.format?(g.value=M.format.width/100,x.value=M.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");M=parseFloat(g.value);if(isNaN(M)||0>=M)g.value=k.width/100;M=parseFloat(x.value);if(isNaN(M)||0>=M)x.value=k.height/100;M=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
+Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&F.checked&&(M=new mxRectangle(0,0,M.height,M.width));fa&&H||M.width==S.width&&M.height==S.height||(S=M,null!=m&&m(S))};mxEvent.addListener(e,"click",function(M){p.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(d,"click",function(M){F.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);
+mxEvent.addListener(p,"change",T);mxEvent.addListener(L,"change",function(M){H="custom"==L.value;T(M,!0)});T();return{set:function(M){k=M;C(null,null,!0)},get:function(){return S},widthInput:g,heightInput:x}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,C,p,F,K,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),u=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D=
-document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))P&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var W=y.parentNode;if(null!=W){var T=null;mxEvent.addListener(W,"dragleave",
-function(Z){null!=T&&(T.style.backgroundColor="",T=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(W,"dragover",mxUtils.bind(this,function(Z){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=D,T.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(W,"drop",mxUtils.bind(this,function(Z){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
-G.click());Z.stopPropagation();Z.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==F)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+
-":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=F&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(F),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan=
-2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(W){13==W.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f);
-H.appendChild(J);u.appendChild(H);y.appendChild(u);this.container=y};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(b,e,k,m,C,p,F,L,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),t=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var G=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(x?x+15:100)+"px";D.style.fontSize="10pt";D.style.width=(x?x:84)+"px";mxUtils.write(D,(C||mxResources.get("filename"))+":");G.appendChild(D);var I=
+document.createElement("input");I.setAttribute("value",e||"");I.style.marginLeft="4px";I.style.width=null!=g?g+"px":"180px";var H=mxUtils.button(k,function(){if(null==p||p(I.value))P&&b.hideDialog(),m(I.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=y.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave",
+function(M){null!=T&&(T.style.backgroundColor="",T=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(M){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=I,T.style.backgroundColor="#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(M){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(I.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),
+H.click());M.stopPropagation();M.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(I);G.appendChild(D);if(null!=C||null==F)t.appendChild(G),null!=f&&(D.appendChild(FilenameDialog.createTypeHint(b,I,f)),null!=b.editor.diagramFileTypes&&(G=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
+":"),G.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",G.appendChild(D),e=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",D.appendChild(e),I.style.width=null!=g?g-40+"px":"190px",G.appendChild(D),t.appendChild(G)));null!=F&&(G=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(F),G.appendChild(D),t.appendChild(G));G=document.createElement("tr");D=document.createElement("td");D.colSpan=
+2;D.style.paddingTop=null!=f?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&D.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",D.appendChild(g));mxEvent.addListener(I,"keypress",function(S){13==S.keyCode&&H.click()});D.appendChild(H);b.editor.cancelFirst||D.appendChild(f);
+G.appendChild(D);t.appendChild(G);y.appendChild(t);this.container=y};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
C();return m};
FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,K=0;K<k.length;K++){var P=k[K].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=K;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,C,p,F){var K=b.createSidebarContainer();F(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,L=0;L<k.length;L++){var P=k[L].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=L;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+var WrapperWindow=function(b,e,k,m,C,p,F){var L=b.createSidebarContainer();F(L);this.window=new mxWindow(e,L,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,K=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=K,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var P=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
-" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
-K=y.width;P=y.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(F=F&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(P/u.height)-1:0,J=F?Math.ceil(K/u.width)-1:0,D=y.x+K,G=y.y+P;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(W){if(null!=W){for(var T=W==this.horizontalPageBreaks?H:J,Z=0;Z<=T;Z++){var N=W==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
-Math.round(y.y+(Z+1)*u.height)),new mxPoint(Math.round(D),Math.round(y.y+(Z+1)*u.height))]:[new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(G))];null!=W[Z]?(W[Z].points=N,W[Z].redraw()):(N=new mxPolyline(N,this.pageBreakColor),N.dialect=this.dialect,N.isDashed=this.pageBreakDashed,N.pointerEvents=!1,N.init(this.view.backgroundPane),N.redraw(),W[Z]=N)}for(Z=T;Z<W.length;Z++)W[Z].destroy();W.splice(T,W.length-T)}});F(this.horizontalPageBreaks);
-F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,K,P){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
-k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(K,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),K=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,K,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,K,P){var d=this.graph.model.getParent(F);if(K){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var K=this.graph.getModel(),P=K.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(K.isVertex(P)||K.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=K.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var X=C.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,ka=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ca.x+ja.x)*ka,(ca.y+ja.y)*ka,ja.width*ka,ja.height*ka))}return X};m.useCssTransforms&&
-(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(X,ja){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(X){return!mxEvent.isPopupTrigger(X.getEvent())});this.actions=new Actions(this);this.menus=
+F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,L=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
+")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=
+F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=L,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var P=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
+" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
+L=y.width;P=y.height;var t=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),G=(F=F&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(P/t.height)-1:0,D=F?Math.ceil(L/t.width)-1:0,I=y.x+L,H=y.y+P;null==this.horizontalPageBreaks&&0<G&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(S){if(null!=S){for(var T=S==this.horizontalPageBreaks?G:D,M=0;M<=T;M++){var fa=S==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
+Math.round(y.y+(M+1)*t.height)),new mxPoint(Math.round(I),Math.round(y.y+(M+1)*t.height))]:[new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(H))];null!=S[M]?(S[M].points=fa,S[M].redraw()):(fa=new mxPolyline(fa,this.pageBreakColor),fa.dialect=this.dialect,fa.isDashed=this.pageBreakDashed,fa.pointerEvents=!1,fa.init(this.view.backgroundPane),fa.redraw(),S[M]=fa)}for(M=T;M<S.length;M++)S[M].destroy();S.splice(T,S.length-T)}});F(this.horizontalPageBreaks);
+F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,L,P){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
+k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(L,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),L=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
+f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,L,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(F,L,P){var d=this.graph.model.getParent(F);if(L){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
+this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var L=this.graph.getModel(),P=L.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(L.isVertex(P)||L.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=L.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var V=C.apply(this,arguments),ha=this.backgroundImage;if(null!=ha&&null!=ha.width&&null!=ha.height){var X=this.view.translate,ia=this.view.scale;V=mxRectangle.fromRectangle(V);V.add(new mxRectangle((X.x+ha.x)*ia,(X.y+ha.y)*ia,ha.width*ia,ha.height*ia))}return V};m.useCssTransforms&&
+(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(V,ha){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(V){return!mxEvent.isPopupTrigger(V.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(X){try{m.getModel().isEdge(X)?d=!1:P=!1;var ja=m.getCellStyle(X,!1),ca=[],ka=[],q;for(q in ja)ca.push(ja[q]),ka.push(q);m.getModel().isEdge(X)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ca,"cells",[X]));m.getModel().isEdge(X)?d=!0:P=!0}catch(E){this.handleError(E)}};
-this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize",
-"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(X,ja,ca,ka,q,E,Q){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;ca=null!=ca?ca:m.getModel();if(Q){Q=[];for(var Y=0;Y<X.length;Y++)Q=Q.concat(ca.getDescendants(X[Y]));X=Q}ca.beginUpdate();
-try{for(Y=0;Y<X.length;Y++){var R=X[Y];if(ja)var ba=["fontSize","fontFamily","fontColor"];else{var ea=ca.getStyle(R),ra=null!=ea?ea.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var la=ra[ta],pa=la.indexOf("=");if(0<=pa){var xa=la.substring(0,pa),Ca=mxUtils.indexOf(ba,xa);0<=Ca&&ba.splice(Ca,1);for(Q=0;Q<x.length;Q++){var Ia=x[Q];if(0<=mxUtils.indexOf(Ia,xa))for(var Aa=0;Aa<Ia.length;Aa++){var La=mxUtils.indexOf(ba,Ia[Aa]);0<=La&&ba.splice(La,1)}}}}}var Da=ca.isEdge(R);Q=Da?q:ka;var Sa=
-ca.getStyle(R);for(ta=0;ta<ba.length;ta++){xa=ba[ta];var Ra=Q[xa];null!=Ra&&"edgeStyle"!=xa&&("shape"!=xa||Da)&&(!Da||E||0>mxUtils.indexOf(K,xa))&&(Sa=mxUtils.setStyle(Sa,xa,Ra))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));ca.setStyle(R,Sa)}}finally{ca.endUpdate()}return X};m.addListener("cellsInserted",function(X,ja){y(ja.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(X,ja){y(ja.getProperty("cells"),!0)});
-this.insertHandler=y;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(X){null==X&&(X=window.event);return m.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown=
-u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ja=mxEvent.getSource(X);if("A"==ja.nodeName)for(;null!=ja;){if("geHint"==ja.className)return!0;ja=ja.parentNode}}return u(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(X){var ja=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ja.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ja.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ja){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){32!=X.which||m.isEditing()?
-mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(X)!=m.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(X){return G.apply(this,
-arguments)||J||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var W=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(X){return W.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var T=m.isZoomWheelEvent;
-m.isZoomWheelEvent=function(){return J||T.apply(this,arguments)};var Z=!1,N=null,qa=null,oa=null,S=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=m.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ja=[];null!=X;){var ca=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ja.push(X));X=ca}X=this.toolbar.fontMenu;ca=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]);
-this.toolbar.fontMenu=N;this.toolbar.sizeMenu=qa}Z=m.cellEditor.isContentEditing();N=X;qa=ca;oa=ja}}),fa=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);S();if(m.cellEditor.isContentEditing()){var X=!1,ja=function(){X||(X=!0,window.setTimeout(function(){var ca=m.getSelectedEditingElement();null!=ca&&(ca=mxUtils.getCurrentStyle(ca),null!=ca&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(ca.fontFamily)),fa.toolbar.setFontSize(parseInt(ca.fontSize))));
-X=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ja);mxEvent.addListener(m.cellEditor.textarea,"touchend",ja);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ja);mxEvent.addListener(m.cellEditor.textarea,"keyup",ja);ja()}};var M=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(X,ja){try{M.apply(this,arguments),S()}catch(ca){fa.handleError(ca)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(X){}var aa=
-m.fireMouseEvent;m.fireMouseEvent=function(X,ja,ca){X==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ja,ca){this.menus.createPopupMenu(X,ja,ca)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
-function(X,ja){var ca=[ja.getProperty("cell")];ja.getProperty("terminalInserted")&&(ca.push(ja.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(m.view.getState(ca[ca.length-1]))},0));y(ca)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ja){var ca=ja.getProperty("cells"),ka=X=!1;if(0<ca.length)for(var q=0;q<ca.length&&(X=m.getModel().isVertex(ca[q])||X,!(ka=m.getModel().isEdge(ca[q])||ka)||!X);q++);else ka=X=!0;X=X&&!P;ka=ka&&!d;ca=ja.getProperty("keys");
-ja=ja.getProperty("values");for(q=0;q<ca.length;q++){var E=0<=mxUtils.indexOf(f,ca[q]);if("strokeColor"!=ca[q]||null!=ja[q]&&"none"!=ja[q])if(0<=mxUtils.indexOf(F,ca[q]))ka||0<=mxUtils.indexOf(g,ca[q])?null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]:X&&0<=mxUtils.indexOf(p,ca[q])&&(null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=ja[q]);else if(0<=mxUtils.indexOf(p,ca[q])){if(X||E)null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=
-ja[q];if(ka||E||0<=mxUtils.indexOf(g,ca[q]))null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
+L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(V){try{m.getModel().isEdge(V)?d=!1:P=!1;var ha=m.getCellStyle(V,!1),X=[],ia=[],q;for(q in ha)X.push(ha[q]),ia.push(q);m.getModel().isEdge(V)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",X,"cells",[V]));m.getModel().isEdge(V)?d=!0:P=!0}catch(E){this.handleError(E)}};this.clearDefaultStyle=
+function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(V,ha,X,ia,q,E,Q){ia=null!=ia?ia:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;X=null!=X?X:m.getModel();if(Q){Q=[];for(var Y=0;Y<V.length;Y++)Q=Q.concat(X.getDescendants(V[Y]));V=Q}X.beginUpdate();try{for(Y=0;Y<V.length;Y++){var R=V[Y];if(ha)var Z=
+["fontSize","fontFamily","fontColor"];else{var da=X.getStyle(R),qa=null!=da?da.split(";"):[];Z=p.slice();for(var va=0;va<qa.length;va++){var ja=qa[va],sa=ja.indexOf("=");if(0<=sa){var ya=ja.substring(0,sa),Aa=mxUtils.indexOf(Z,ya);0<=Aa&&Z.splice(Aa,1);for(Q=0;Q<x.length;Q++){var Ea=x[Q];if(0<=mxUtils.indexOf(Ea,ya))for(var za=0;za<Ea.length;za++){var Ia=mxUtils.indexOf(Z,Ea[za]);0<=Ia&&Z.splice(Ia,1)}}}}}var Ca=X.isEdge(R);Q=Ca?q:ia;var Sa=X.getStyle(R);for(va=0;va<Z.length;va++){ya=Z[va];var Pa=
+Q[ya];null!=Pa&&"edgeStyle"!=ya&&("shape"!=ya||Ca)&&(!Ca||E||0>mxUtils.indexOf(L,ya))&&(Sa=mxUtils.setStyle(Sa,ya,Pa))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));X.setStyle(R,Sa)}}finally{X.endUpdate()}return V};m.addListener("cellsInserted",function(V,ha){y(ha.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(V,ha){y(ha.getProperty("cells"),!0)});this.insertHandler=y;this.createDivs();this.createUi();this.refresh();
+var t=mxUtils.bind(this,function(V){null==V&&(V=window.event);return m.isEditing()||null!=V&&this.isSelectionAllowed(V)});this.container==document.body&&(this.menubarContainer.onselectstart=t,this.menubarContainer.onmousedown=t,this.toolbarContainer.onselectstart=t,this.toolbarContainer.onmousedown=t,this.diagramContainer.onselectstart=t,this.diagramContainer.onmousedown=t,this.sidebarContainer.onselectstart=t,this.sidebarContainer.onmousedown=t,this.formatContainer.onselectstart=t,this.formatContainer.onmousedown=
+t,this.footerContainer.onselectstart=t,this.footerContainer.onmousedown=t,null!=this.tabContainer&&(this.tabContainer.onselectstart=t));!this.editor.chromeless||this.editor.editable?(e=function(V){if(null!=V){var ha=mxEvent.getSource(V);if("A"==ha.nodeName)for(;null!=ha;){if("geHint"==ha.className)return!0;ha=ha.parentNode}}return t(V)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=
+e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var G=m.graphHandler.start;m.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();G.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(V){var ha=mxUtils.getOffset(this.diagramContainer);
+0<mxEvent.getClientX(V)-ha.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(V)-ha.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(V,ha){return D||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(V){32!=V.which||m.isEditing()?mxEvent.isConsumed(V)||27!=V.keyCode||this.hideDialog(null,
+!0):(D=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(V)!=m.container||mxEvent.consume(V))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(V){m.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(V){return H.apply(this,arguments)||D||mxEvent.isMouseEvent(V.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(V.getEvent()))&&(!mxEvent.isControlDown(V.getEvent())&&mxEvent.isRightMouseButton(V.getEvent())||mxEvent.isMiddleMouseButton(V.getEvent()))};var S=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(V){return S.apply(this,arguments)||13==V.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(V)||mxClient.IS_MAC&&mxEvent.isMetaDown(V)||mxClient.IS_SF&&mxEvent.isShiftDown(V))};var T=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return D||T.apply(this,arguments)};
+var M=!1,fa=null,la=null,ra=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&M!=m.cellEditor.isContentEditing()){for(var V=this.toolbar.container.firstChild,ha=[];null!=V;){var X=V.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,V)&&(V.parentNode.removeChild(V),ha.push(V));V=X}V=this.toolbar.fontMenu;X=this.toolbar.sizeMenu;if(null==ra)this.toolbar.createTextToolbar();else{for(var ia=0;ia<ra.length;ia++)this.toolbar.container.appendChild(ra[ia]);this.toolbar.fontMenu=fa;this.toolbar.sizeMenu=
+la}M=m.cellEditor.isContentEditing();fa=V;la=X;ra=ha}}),oa=this,na=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){na.apply(this,arguments);ba();if(m.cellEditor.isContentEditing()){var V=!1,ha=function(){V||(V=!0,window.setTimeout(function(){var X=m.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(X.fontFamily)),oa.toolbar.setFontSize(parseInt(X.fontSize))));V=!1},0))};mxEvent.addListener(m.cellEditor.textarea,
+"input",ha);mxEvent.addListener(m.cellEditor.textarea,"touchend",ha);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ha);mxEvent.addListener(m.cellEditor.textarea,"keyup",ha);ha()}};var N=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(V,ha){try{N.apply(this,arguments),ba()}catch(X){oa.handleError(X)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(V){}var aa=m.fireMouseEvent;
+m.fireMouseEvent=function(V,ha,X){V==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(V,ha,X){this.menus.createPopupMenu(V,ha,X)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(V){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
+function(V,ha){var X=[ha.getProperty("cell")];ha.getProperty("terminalInserted")&&(X.push(ha.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(m.view.getState(X[X.length-1]))},0));y(X)});this.addListener("styleChanged",mxUtils.bind(this,function(V,ha){var X=ha.getProperty("cells"),ia=V=!1;if(0<X.length)for(var q=0;q<X.length&&(V=m.getModel().isVertex(X[q])||V,!(ia=m.getModel().isEdge(X[q])||ia)||!V);q++);else ia=V=!0;V=V&&!P;ia=ia&&!d;X=ha.getProperty("keys");
+ha=ha.getProperty("values");for(q=0;q<X.length;q++){var E=0<=mxUtils.indexOf(f,X[q]);if("strokeColor"!=X[q]||null!=ha[q]&&"none"!=ha[q])if(0<=mxUtils.indexOf(F,X[q]))ia||0<=mxUtils.indexOf(g,X[q])?null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]:V&&0<=mxUtils.indexOf(p,X[q])&&(null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=ha[q]);else if(0<=mxUtils.indexOf(p,X[q])){if(V||E)null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=
+ha[q];if(ia||E||0<=mxUtils.indexOf(g,X[q]))null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
"geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=m.currentVertexStyle.fontFamily||"Helvetica",
-ja=String(m.currentVertexStyle.fontSize||"12"),ca=m.getView().getState(m.getSelectionCell());null!=ca&&(X=ca.style[mxConstants.STYLE_FONTFAMILY]||X,ja=ca.style[mxConstants.STYLE_FONTSIZE]||ja,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ja)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(X,ja){X=ja.getProperty("cells");ja=ja.getProperty("parent");null!=ja&&
-m.getModel().isLayer(ja)&&!m.isCellVisible(ja)&&null!=X&&0<X.length&&m.getModel().setVisible(ja,!0)});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);
-this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
-function(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(K,P){var d=p;p+=P;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var V=m.currentVertexStyle.fontFamily||"Helvetica",
+ha=String(m.currentVertexStyle.fontSize||"12"),X=m.getView().getState(m.getSelectionCell());null!=X&&(V=X.style[mxConstants.STYLE_FONTFAMILY]||V,ha=X.style[mxConstants.STYLE_FONTSIZE]||ha,10<V.length&&(V=V.substring(0,8)+"..."));this.toolbar.setFontName(V);this.toolbar.setFontSize(ha)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(V,ha){V=ha.getProperty("cells");ha=ha.getProperty("parent");null!=ha&&m.getModel().isLayer(ha)&&
+!m.isCellVisible(ha)&&null!=V&&0<V.length&&m.getModel().setVisible(ha,!0)});this.gestureHandler=mxUtils.bind(this,function(V){null!=this.currentMenu&&mxEvent.getSource(V)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));
+this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,e,k){function m(L,P){var d=p;p+=P;return L.substring(d,p)}function C(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2111,23 +2111,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),K=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&P!=K||(K=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),L=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&P!=L||(L=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,u){var H=b.getCompositeParent(P.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell=
-H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,y,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,W,T){T(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))},
-function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,y,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K)}))}};
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,t){var G=b.getCompositeParent(P.cell);x=b.getCellGeometry(G);for(f.consume();null!=G&&b.model.isVertex(G)&&null!=x&&x.relative;)cell=
+G,G=b.model.getParent(cell),x=b.getCellGeometry(G);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),G,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
+d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),t=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var G=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,y,G,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(G,g,b.defaultEdgeLength,x,!0,!0,function(H,S,T){T(I);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(I))},
+function(H){b.selectCellsForConnectVertex(H)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(D,f,t,y,g);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,K){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u);
-f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
+EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,L){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var t=f.cloneCell(x);if(null!=m)m(t);else{t.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);t.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(t)}finally{f.model.endUpdate()}f.setSelectionCell(t);
+f.scrollCellToVisible(t);f.startEditingAtCell(t);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(t))}null!=p&&p()})});for(C=0;C<(L?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2142,45 +2142,45 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.
"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var K={},P=p.createCellLookup(F),d=p.cloneCells(F,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(u.offset=null,u.relative=!1,u.x=y.x/y.view.scale-y.view.translate.x,u.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var L={},P=p.createCellLookup(F),d=p.cloneCells(F,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var t=p.getCellGeometry(d[x]);null!=t&&t.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(t.offset=null,t.relative=!1,t.x=y.x/y.view.scale-y.view.translate.x,t.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*ka.width),this.scale*(this.translate.y+ca.y*ka.height),this.scale*ca.width*
-ka.width,this.scale*ca.height*ka.height)};b.getPreferredPageSize=function(ca,ka,q){ca=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,ca.width*ka.width,ca.height*ka.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(ca,ka,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,
-ba=b.view.scale,ea=mxRectangle.fromRectangle(Q);ea.x=ea.x/ba-R.x;ea.y=ea.y/ba-R.y;ea.width/=ba;ea.height/=ba;R=b.container.scrollTop;var ra=b.container.scrollLeft,ta=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ta+=3;var la=b.container.offsetWidth-ta;ta=b.container.offsetHeight-ta;ca=ca?Math.max(.3,Math.min(ka||1,la/ea.width)):ba;ka=(la-ca*ea.width)/2/ca;var pa=0==this.lightboxVerticalDivider?0:(ta-ca*ea.height)/this.lightboxVerticalDivider/ca;Y&&(ka=Math.max(ka,
-0),pa=Math.max(pa,0));if(Y||Q.width<la||Q.height<ta)b.view.scaleAndTranslate(ca,Math.floor(ka-ea.x),Math.floor(pa-ea.y)),b.container.scrollTop=R*ca/ba,b.container.scrollLeft=ra*ca/ba;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/ba),Math.floor(Q.y+E/ba))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ca){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ca){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var X=this.graph.getPageLayout(),ia=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+X.x*ia.width),this.scale*(this.translate.y+X.y*ia.height),this.scale*X.width*ia.width,
+this.scale*X.height*ia.height)};b.getPreferredPageSize=function(X,ia,q){X=this.getPageLayout();ia=this.getPageSize();return new mxRectangle(0,0,X.width*ia.width,X.height*ia.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(X,ia,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,Z=b.view.scale,
+da=mxRectangle.fromRectangle(Q);da.x=da.x/Z-R.x;da.y=da.y/Z-R.y;da.width/=Z;da.height/=Z;R=b.container.scrollTop;var qa=b.container.scrollLeft,va=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)va+=3;var ja=b.container.offsetWidth-va;va=b.container.offsetHeight-va;X=X?Math.max(.3,Math.min(ia||1,ja/da.width)):Z;ia=(ja-X*da.width)/2/X;var sa=0==this.lightboxVerticalDivider?0:(va-X*da.height)/this.lightboxVerticalDivider/X;Y&&(ia=Math.max(ia,0),sa=Math.max(sa,0));
+if(Y||Q.width<ja||Q.height<va)b.view.scaleAndTranslate(X,Math.floor(ia-da.x),Math.floor(sa-da.y)),b.container.scrollTop=R*X/Z,b.container.scrollLeft=qa*X/Z;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/Z),Math.floor(Q.y+E/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(X){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(X){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var ca=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ca?parseInt(ca["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(ca,ka,
-q){F++;var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",ca);null!=q&&E.setAttribute("title",q);ca=document.createElement("img");ca.setAttribute("border","0");ca.setAttribute("src",ka);ca.style.width="36px";ca.style.filter="invert(100%)";E.appendChild(ca);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var K=Graph.sanitizeLink(C.backBtn.url);null!=K&&p(mxUtils.bind(this,function(ca){window.location.href=
-K;mxEvent.consume(ca)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(ca){this.actions.get("previousPage").funct();mxEvent.consume(ca)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(ca){this.actions.get("nextPage").funct();mxEvent.consume(ca)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
-"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(ca){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,u=null,H=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);y=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),ca||200)}),J=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=p(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=D.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){D.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,
-function(ca){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ca)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var W=this.lightboxToolbarActions[x];W.elem=p(W.fn,W.icon,W.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
-p(mxUtils.bind(this,function(ca){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(ca)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(ca){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(ca)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(ca){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(ca))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(ca){mxEvent.isTouchEvent(ca)||(mxEvent.isShiftDown(ca)||J(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ca){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ca)?H():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ca){mxEvent.isShiftDown(ca)?H():
-J(100);mxEvent.consume(ca)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||J(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(ca,ka){},mouseUp:function(ca,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-
-b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&Math.abs(this.startX-ka.getGraphX())<Z&&Math.abs(this.startY-ka.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?H():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var N=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var ca=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x=
-ca.x-(this.x0||0)*ka.width;this.translate.y=ca.y-(this.y0||0)*ka.height}N.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var ca=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ka.x+ca.width*q.width),Q=Math.ceil(2*ka.y+ca.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ka.x-ca.x*q.width;ka=
-ka.y-ca.y*q.height;this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ka?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=ca.x,this.view.y0=ca.y,ca=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ka),b.container.scrollLeft+=Math.round((E-ca)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var oa=b.view.getBackgroundPane(),S=b.view.getDrawPane();
-b.cumulativeZoomFactor=1;var fa=null,ia=null,M=null,aa=null,X=null,ja=function(ca){null!=fa&&window.clearTimeout(fa);0<=ca&&window.setTimeout(function(){if(!b.isMouseDown||aa)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),S.style.transformOrigin=
-"",oa.style.transformOrigin="",mxClient.IS_SF?(S.style.transform="scale(1)",oa.style.transform="scale(1)",window.setTimeout(function(){S.style.transform="";oa.style.transform=""},0)):(S.style.transform="",oa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=ia&&(Q=b.container.offsetWidth/2-ia.x+q.x,Y=b.container.offsetHeight/
-2-ia.y+q.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=M&&(Q+=ka.x-M.x,Y+=ka.y-M.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=X&&S.setAttribute("filter",X);b.cumulativeZoomFactor=1;X=aa=ia=M=fa=null}),null!=ca?ca:b.isFastZoomEnabled()?k.wheelZoomDelay:
-k.lazyZoomDelay)},0)};b.lazyZoom=function(ca,ka,q,E){E=null!=E?E:this.zoomFactor;(ka=ka||!b.scrollbars)&&(ia=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));ca?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?
-this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==X&&""!=S.getAttribute("filter")&&(X=S.getAttribute("filter"),S.removeAttribute("filter")),M=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ca=ka||null==
-ia?b.container.scrollLeft+b.container.clientWidth/2:ia.x+b.container.scrollLeft-b.container.offsetLeft,E=ka||null==ia?b.container.scrollTop+b.container.clientHeight/2:ia.y+b.container.scrollTop-b.container.offsetTop,S.style.transformOrigin=ca+"px "+E+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",oa.style.transformOrigin=ca+"px "+E+"px",oa.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(ca=b.view.backgroundPageShape.node,
-mxUtils.setPrefixedStyle(ca.style,"transform-origin",(ka||null==ia?b.container.clientWidth/2+b.container.scrollLeft-ca.offsetLeft+"px":ia.x+b.container.scrollLeft-ca.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==ia?b.container.clientHeight/2+b.container.scrollTop-ca.offsetTop+"px":ia.y+b.container.scrollTop-ca.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ca.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity=
-"0",null!=k.hoverIcons&&k.hoverIcons.reset());ja(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(ca){null!=fa&&window.clearTimeout(fa)},null,function(ca){1!=b.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(b.container,"scroll",function(ca){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ca,ka,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&
-!q&&b.isScrollWheelEvent(ca))q=b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(ca)?b.view.setTranslate(q.x+(ka?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ka?E:-E));else if(q||b.isZoomWheelEvent(ca))for(var Y=mxEvent.getSource(ca);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),ia=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),aa=q,q=b.zoomFactor,E=null,ca.ctrlKey&&null!=ca.deltaY&&40>Math.abs(ca.deltaY)&&Math.round(ca.deltaY)!=
-ca.deltaY?q=1+Math.abs(ca.deltaY)/20*(q-1):null!=ca.movementY&&"pointermove"==ca.type&&(q=1+Math.max(1,Math.abs(ca.movementY))/20*(q-1),E=-1),b.lazyZoom(ka,null,E,q),mxEvent.consume(ca),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(ca){b.cumulativeZoomFactor=ca.scale;b.lazyZoom(0<ca.scale,!0);mxEvent.consume(ca)}};
-EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var X=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=X?parseInt(X["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(X,ia,q){F++;
+var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",X);null!=q&&E.setAttribute("title",q);X=document.createElement("img");X.setAttribute("border","0");X.setAttribute("src",ia);X.style.width="36px";X.style.filter="invert(100%)";E.appendChild(X);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var L=Graph.sanitizeLink(C.backBtn.url);null!=L&&p(mxUtils.bind(this,function(X){window.location.href=
+L;mxEvent.consume(X)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(X){this.actions.get("previousPage").funct();mxEvent.consume(X)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(X){this.actions.get("nextPage").funct();mxEvent.consume(X)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
+"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(X){this.actions.get("zoomOut").funct();mxEvent.consume(X)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+function(X){this.actions.get("zoomIn").funct();mxEvent.consume(X)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(X){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(X)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,t=null,G=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);y=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),X||200)}),D=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,X||30)});if("1"==urlParams.layers){this.layersDialog=null;var I=p(mxUtils.bind(this,function(X){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ia=I.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=ia.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ia=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=ia.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(X)}),Editor.layersImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){I.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(X){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(X)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=p(S.fn,S.icon,S.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
+p(mxUtils.bind(this,function(X){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(X)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(X){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(X)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(X){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(X))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(X){mxEvent.isTouchEvent(X)||(mxEvent.isShiftDown(X)||D(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(X){mxEvent.consume(X)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(X){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(X)?G():D(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(X){mxEvent.isShiftDown(X)?G():D(100);
+mxEvent.consume(X)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(X){mxEvent.isTouchEvent(X)||D(30)}));var M=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(X,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(X,ia){},mouseUp:function(X,ia){mxEvent.isTouchEvent(ia.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+M&&Math.abs(this.scrollTop-b.container.scrollTop)<M&&Math.abs(this.startX-ia.getGraphX())<M&&Math.abs(this.startY-ia.getGraphY())<M&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?G():D(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var X=this.graph.getPagePadding(),ia=this.graph.getPageSize();this.translate.x=X.x-(this.x0||
+0)*ia.width;this.translate.y=X.y-(this.y0||0)*ia.height}fa.apply(this,arguments)};if(!b.isViewer()){var la=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var X=this.getPageLayout(),ia=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ia.x+X.width*q.width),Q=Math.ceil(2*ia.y+X.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ia.x-X.x*q.width;ia=ia.y-X.y*q.height;
+this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ia?la.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=X.x,this.view.y0=X.y,X=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ia),b.container.scrollLeft+=Math.round((E-X)*b.view.scale),b.container.scrollTop+=Math.round((ia-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ra=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=
+1;var oa=null,na=null,N=null,aa=null,V=null,ha=function(X){null!=oa&&window.clearTimeout(oa);0<=X&&window.setTimeout(function(){if(!b.isMouseDown||aa)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ba.style.transformOrigin="",ra.style.transformOrigin=
+"",mxClient.IS_SF?(ba.style.transform="scale(1)",ra.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ra.style.transform=""},0)):(ba.style.transform="",ra.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=na&&(Q=b.container.offsetWidth/2-na.x+q.x,Y=b.container.offsetHeight/2-na.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=N&&(Q+=ia.x-N.x,Y+=ia.y-N.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=V&&ba.setAttribute("filter",V);b.cumulativeZoomFactor=1;V=aa=na=N=oa=null}),null!=X?X:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(X,ia,q,E){E=null!=E?E:this.zoomFactor;(ia=ia||!b.scrollbars)&&(na=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));X?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==V&&""!=ba.getAttribute("filter")&&(V=ba.getAttribute("filter"),ba.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=ia||null==na?b.container.scrollLeft+
+b.container.clientWidth/2:na.x+b.container.scrollLeft-b.container.offsetLeft,E=ia||null==na?b.container.scrollTop+b.container.clientHeight/2:na.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=X+"px "+E+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ra.style.transformOrigin=X+"px "+E+"px",ra.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(X=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(X.style,
+"transform-origin",(ia||null==na?b.container.clientWidth/2+b.container.scrollLeft-X.offsetLeft+"px":na.x+b.container.scrollLeft-X.offsetLeft-b.container.offsetLeft+"px")+" "+(ia||null==na?b.container.clientHeight/2+b.container.scrollTop-X.offsetTop+"px":na.y+b.container.scrollTop-X.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(X.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ha(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(X){null!=oa&&window.clearTimeout(oa)},null,function(X){1!=b.cumulativeZoomFactor&&ha(0)});mxEvent.addListener(b.container,"scroll",function(X){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ha(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(X,ia,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(X))q=
+b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(X)?b.view.setTranslate(q.x+(ia?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ia?E:-E));else if(q||b.isZoomWheelEvent(X))for(var Y=mxEvent.getSource(X);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),na=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(X),mxEvent.getClientY(X)),aa=q,q=b.zoomFactor,E=null,X.ctrlKey&&null!=X.deltaY&&40>Math.abs(X.deltaY)&&Math.round(X.deltaY)!=X.deltaY?q=1+Math.abs(X.deltaY)/20*(q-
+1):null!=X.movementY&&"pointermove"==X.type&&(q=1+Math.max(1,Math.abs(X.movementY))/20*(q-1),E=-1),b.lazyZoom(ia,null,E,q),mxEvent.consume(X),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(X){b.cumulativeZoomFactor=X.scale;b.lazyZoom(0<X.scale,!0);mxEvent.consume(X)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
@@ -2196,7 +2196,7 @@ b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Ma
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,L-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
@@ -2206,19 +2206,20 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,K){p.apply(this,arguments);m()};m()};
+this.editor.graph.cellEditor.stopEditing=function(F,L){p.apply(this,arguments);m()};m()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
-e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
+e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,
-e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
-this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(b){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);
+var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
+this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=
+k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
+m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");
+b&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2229,19 +2230,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);K!=f()&&(P=!0,d=null)}}function p(g){C(g);F=K=null}var F=null,K=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));K=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);L!=f()&&(P=!0,d=null)}}function p(g){C(g);F=L=null}var F=null,L=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
+mxEvent.getClientY(g));L=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,C,p,F,K,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,K,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,K,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,K,P,d);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,m,C,p,F,L,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,L,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,L,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,L,P,d);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=F.lastIndexOf("%3E");
-0<=K&&K<F.length-3&&(F=F.substring(0,K+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=F.lastIndexOf("%3E");
+0<=L&&L<F.length-3&&(F=F.substring(0,L+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2257,13 +2258,13 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(y){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H],
-J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(y=m.layoutManager.getLayout(J));if(null!=y&&y.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
-g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=G.first){var W=G.roundLength(G.currentDx/D),T=G.roundLength(G.currentDy/D);G.moveCells(G.cells,W,T);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),K[g.keyCode],
+EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var t=m.getCompositeParents(m.getSelectionCells()),G=0<t.length?t[0]:null;if(null!=G)if(y){m.getModel().beginUpdate();try{for(G=0;G<t.length;G++)if(m.getModel().isVertex(t[G])&&m.isCellResizable(t[G])){var D=m.getCellGeometry(t[G]);null!=D&&(D=D.clone(),37==g?D.width=Math.max(0,D.width-x):38==g?D.height=Math.max(0,D.height-x):39==g?D.width+=x:40==g&&(D.height+=x),m.getModel().setGeometry(t[G],
+D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(G);var I=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(G)&&null!=m.layoutManager&&!m.isCellLocked(G)&&(y=m.layoutManager.getLayout(D));if(null!=y&&y.constructor==mxStackLayout)x=D.getIndex(G),37==g||38==g?m.model.add(D,G,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(D,G,Math.min(m.model.getChildCount(D),x+1));else{var H=m.graphHandler;null!=H&&(null==H.first&&H.start(G,0,0,t),null!=H.first&&(G=t=0,37==g?t=-x:38==
+g?G=-x:39==g?t=x:40==g&&(G=x),H.currentDx+=t*I,H.currentDy+=G*I,H.checkPreview(),H.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=H.first){var S=H.roundLength(H.currentDx/I),T=H.roundLength(H.currentDy/I);H.moveCells(H.cells,S,T);H.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
+89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
-function(g,x,y,u){var H=this.actions.get(y);null!=H&&(y=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):u?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
+function(g,x,y,t){var G=this.actions.get(y);null!=G&&(y=function(){G.isEnabled()&&G.funct.apply(this,arguments)},x?t?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):t?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0),
@@ -2274,41 +2275,41 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var P=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=K;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var L=Number(C.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var P=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=L;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
-return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,K=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var X=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=X)if(this.model.isEdge(X.cell))if(F=new mxPoint(M.getGraphX(),M.getGraphY()),f=this.isCellSelected(X.cell),P=X,K=M,null!=X.text&&
-null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,M.getGraphX(),M.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ja=this.selectionCellsHandler.getHandler(X.cell);null!=ja&&null!=ja.bends&&0<ja.bends.length&&(d=ja.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(ja=this.selectionCellsHandler.getHandler(X.cell),null==ja||null==ja.getHandleForEvent(M))){var ca=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),ka=mxEvent.isTouchEvent(M.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ja=ka+2;ca.grow(ka);if(this.isTableCell(X.cell)&&!this.isCellSelected(X.cell)&&!(mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()-ja)&&mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()-ja))){var q=this.model.getParent(X.cell);ja=this.model.getParent(q);if(!this.isCellSelected(ja)){ka*=aa;var E=2*ka;if(this.model.getChildAt(ja,
-0)!=q&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y-ka,X.width,E))||this.model.getChildAt(q,0)!=X.cell&&mxUtils.intersects(ca,new mxRectangle(X.x-ka,X.y,E,X.height))||mxUtils.intersects(ca,new mxRectangle(X.x,X.y+X.height-ka,X.width,E))||mxUtils.intersects(ca,new mxRectangle(X.x+X.width-ka,X.y,E,X.height)))q=this.selectionCellsHandler.isHandled(ja),this.selectCellForEvent(ja,M.getEvent()),ja=this.selectionCellsHandler.getHandler(ja),null!=ja&&(ka=ja.getHandleForEvent(M),null!=ka&&(ja.start(M.getGraphX(),
-M.getGraphY(),ka),ja.blockDelayedSelection=!q,M.consume()))}}for(;!M.isConsumed()&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&(ja=this.getActualStartSize(X.cell),(0<ja.x||0<ja.width)&&mxUtils.intersects(ca,new mxRectangle(X.x+(ja.x-ja.width-1)*aa+(0==ja.x?X.width:0),X.y,1,X.height))||(0<ja.y||0<ja.height)&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y+(ja.y-ja.height-1)*aa+(0==ja.y?X.height:0),X.width,1)))&&(this.selectCellForEvent(X.cell,
-M.getEvent()),ja=this.selectionCellsHandler.getHandler(X.cell),null!=ja&&(ka=mxEvent.CUSTOM_HANDLE-ja.customHandles.length+1,ja.start(M.getGraphX(),M.getGraphY(),ka),M.consume())),X=this.view.getState(this.model.getParent(X.cell))}}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var X in M)if(null!=M[X].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ja=
-this.tolerance;if(null!=F&&null!=P&&null!=K){if(X=P,Math.abs(F.x-aa.getGraphX())>ja||Math.abs(F.y-aa.getGraphY())>ja){var ca=this.selectionCellsHandler.getHandler(X.cell);null==ca&&this.model.isEdge(X.cell)&&(ca=this.createHandler(X));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){M=ca.getHandleForEvent(K);var ka=this.view.getEdgeStyle(X);ja=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(M=d);if(ja&&0!=M&&M!=ca.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!ja||null==X.visibleSourceState&&
-null==X.visibleTargetState||(this.graphHandler.reset(),aa.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=X.visibleSourceState||M==ca.bends.length-1||null!=X.visibleTargetState)ja||M==mxEvent.LABEL_HANDLE||(ja=X.absolutePoints,null!=ja&&(null==ka&&null==M||ka==mxEdgeStyle.OrthConnector)&&(M=d,null==M&&(M=new mxRectangle(F.x,F.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,ja[0].x,ja[0].y)?M=0:mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y)?M=ca.bends.length-
-1:null!=ka&&(2==ja.length||3==ja.length&&(0==Math.round(ja[0].x-ja[1].x)&&0==Math.round(ja[1].x-ja[2].x)||0==Math.round(ja[0].y-ja[1].y)&&0==Math.round(ja[1].y-ja[2].y)))?M=2:(M=mxUtils.findNearestSegment(X,F.x,F.y),M=null==ka?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ca.start(aa.getGraphX(),aa.getGraphX(),M),aa.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(X.cell)||(this.selectionCellsHandler.handlers.put(X.cell,
-ca),this.selectCellForEvent(X.cell,aa.getEvent())):this.isCellSelected(X.cell)||ca.destroy());f=!1;F=K=P=d=null}}else if(X=aa.getState(),null!=X&&this.isCellEditable(X.cell)){ca=null;if(this.model.isEdge(X.cell)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),ja=X.absolutePoints,null!=ja)if(null!=X.text&&null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,aa.getGraphX(),aa.getGraphY()))ca="move";else if(mxUtils.contains(M,ja[0].x,
-ja[0].y)||mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y))ca="pointer";else if(null!=X.visibleSourceState||null!=X.visibleTargetState)M=this.view.getEdgeStyle(X),ca="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(X)&&(aa=mxUtils.findNearestSegment(X,aa.getGraphX(),aa.getGraphY()),aa<ja.length-1&&0<=aa&&(ca=0==Math.round(ja[aa].x-ja[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ja=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(),
-aa.getGraphY());M.grow(ja);if(this.isTableCell(X.cell)&&(aa=this.model.getParent(X.cell),ja=this.model.getParent(aa),!this.isCellSelected(ja)))if(mxUtils.intersects(M,new mxRectangle(X.x,X.y-2,X.width,4))&&this.model.getChildAt(ja,0)!=aa||mxUtils.intersects(M,new mxRectangle(X.x,X.y+X.height-2,X.width,4)))ca="row-resize";else if(mxUtils.intersects(M,new mxRectangle(X.x-2,X.y,4,X.height))&&this.model.getChildAt(aa,0)!=X.cell||mxUtils.intersects(M,new mxRectangle(X.x+X.width-2,X.y,4,X.height)))ca="col-resize";
-for(aa=X;null==ca&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ja=this.getActualStartSize(aa.cell),ka=this.view.scale,(0<ja.x||0<ja.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(ja.x-ja.width-1)*ka+(0==ja.x?aa.width*ka:0),aa.y,1,aa.height))?ca="col-resize":(0<ja.y||0<ja.height)&&mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(ja.y-ja.height-1)*ka+(0==ja.y?aa.height:0),aa.width,1))&&(ca="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=
-ca&&X.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(M,aa){d=F=K=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(aa=1!=M.style.html?mxUtils.htmlEntities(aa,!1):M.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);
-this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(M,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=g.apply(this,arguments);
-if(this.graph.pageVisible){var aa=[],X=this.graph.pageFormat,ja=this.graph.pageScale,ca=X.width*ja;X=X.height*ja;ja=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*ca+ja.x)*ka,(q.y*X+ja.y)*ka,ca*ka,X*ka));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*ca+ja.x)*ka,((q.y+E)*X+ja.y)*ka,ca*ka,X*ka));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(M,aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=x.apply(this,arguments),X=new mxDictionary,ja=[],ca=0;ca<aa.length;ca++){var ka=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[ca])&&
-this.graph.isCellSelected(aa[ca])?this.graph.model.getParent(aa[ca]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[ca])&&this.graph.isCellSelected(aa[ca])?aa[ca]:this.graph.getCompositeParent(aa[ca]);null==ka||X.get(ka)||(X.put(ka,!0),ja.push(ka))}return ja};var y=this.graphHandler.start;this.graphHandler.start=function(M,aa,X,ja){var ca=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ca=!0:M=this.graph.model.getParent(M));ca||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||
-(M=this.graph.getCompositeParent(M));y.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;D.apply(this,arguments);M!=this.currentState?(H=(new Date).getTime(),
-J=0):J=(new Date).getTime()-H};var G=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var W=this.isToggleEvent;this.isToggleEvent=function(M){return W.apply(this,arguments)||!mxClient.IS_CHROMEOS&&
-mxEvent.isShiftDown(M)};var T=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(M){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
-mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var X=aa?M.sourceState.cell:M.getCell();null!=X&&(X=this.getClickableLinkForCell(X),null!=X&&(this.isCustomLink(X)?
-this.customLinkClicked(X):this.openLink(X)));this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};
-this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(M,aa){var X=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x,
-M.y,M.width,M.height,null,null,X,function(ja){return"1"==mxUtils.getValue(ja.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(X=0;X<M.length;X++)this.selectCellForEvent(M[X],aa);else this.selectCellsForEvent(M,aa);return M};var S=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,X){return this.graph.isCellSelected(M)?!1:S.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),
-"locked","0"))return!0;M=this.model.getParent(M)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),fa=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var X=aa.getProperty("cell");null==X?(M=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(M),mxEvent.getClientY(M)),u.start(M.x,M.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(X)&&this.removeSelectionCell(X);fa=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var X=M.view.graph;return aa&&(X.isCellSelected(M.cell)||X.isTableRow(M.cell)&&X.selectionCellsHandler.isHandled(X.model.getParent(M.cell)))};
-this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ia.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0,
+Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(N){N=this.getCurrentCellStyle(N);
+return null!=N?"1"==N.html||"wrap"==N[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,L=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){N=aa.getProperty("event");var V=N.getState();aa=this.view.scale;if(!mxEvent.isAltDown(N.getEvent())&&null!=V)if(this.model.isEdge(V.cell))if(F=new mxPoint(N.getGraphX(),N.getGraphY()),f=this.isCellSelected(V.cell),P=V,L=N,null!=V.text&&
+null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,N.getGraphX(),N.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ha=this.selectionCellsHandler.getHandler(V.cell);null!=ha&&null!=ha.bends&&0<ha.bends.length&&(d=ha.getHandleForEvent(N))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(N.getEvent())&&(ha=this.selectionCellsHandler.getHandler(V.cell),null==ha||null==ha.getHandleForEvent(N))){var X=new mxRectangle(N.getGraphX()-1,N.getGraphY()-1),ia=mxEvent.isTouchEvent(N.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ha=ia+2;X.grow(ia);if(this.isTableCell(V.cell)&&!this.isCellSelected(V.cell)&&!(mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()-ha)&&mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()-ha))){var q=this.model.getParent(V.cell);ha=this.model.getParent(q);if(!this.isCellSelected(ha)){ia*=aa;var E=2*ia;if(this.model.getChildAt(ha,
+0)!=q&&mxUtils.intersects(X,new mxRectangle(V.x,V.y-ia,V.width,E))||this.model.getChildAt(q,0)!=V.cell&&mxUtils.intersects(X,new mxRectangle(V.x-ia,V.y,E,V.height))||mxUtils.intersects(X,new mxRectangle(V.x,V.y+V.height-ia,V.width,E))||mxUtils.intersects(X,new mxRectangle(V.x+V.width-ia,V.y,E,V.height)))q=this.selectionCellsHandler.isHandled(ha),this.selectCellForEvent(ha,N.getEvent()),ha=this.selectionCellsHandler.getHandler(ha),null!=ha&&(ia=ha.getHandleForEvent(N),null!=ia&&(ha.start(N.getGraphX(),
+N.getGraphY(),ia),ha.blockDelayedSelection=!q,N.consume()))}}for(;!N.isConsumed()&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ha=this.getActualStartSize(V.cell),(0<ha.x||0<ha.width)&&mxUtils.intersects(X,new mxRectangle(V.x+(ha.x-ha.width-1)*aa+(0==ha.x?V.width:0),V.y,1,V.height))||(0<ha.y||0<ha.height)&&mxUtils.intersects(X,new mxRectangle(V.x,V.y+(ha.y-ha.height-1)*aa+(0==ha.y?V.height:0),V.width,1)))&&(this.selectCellForEvent(V.cell,
+N.getEvent()),ha=this.selectionCellsHandler.getHandler(V.cell),null!=ha&&(ia=mxEvent.CUSTOM_HANDLE-ha.customHandles.length+1,ha.start(N.getGraphX(),N.getGraphY(),ia),N.consume())),V=this.view.getState(this.model.getParent(V.cell))}}}));this.addMouseListener({mouseDown:function(N,aa){},mouseMove:mxUtils.bind(this,function(N,aa){N=this.selectionCellsHandler.handlers.map;for(var V in N)if(null!=N[V].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ha=
+this.tolerance;if(null!=F&&null!=P&&null!=L){if(V=P,Math.abs(F.x-aa.getGraphX())>ha||Math.abs(F.y-aa.getGraphY())>ha){var X=this.selectionCellsHandler.getHandler(V.cell);null==X&&this.model.isEdge(V.cell)&&(X=this.createHandler(V));if(null!=X&&null!=X.bends&&0<X.bends.length){N=X.getHandleForEvent(L);var ia=this.view.getEdgeStyle(V);ha=ia==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(N=d);if(ha&&0!=N&&N!=X.bends.length-1&&N!=mxEvent.LABEL_HANDLE)!ha||null==V.visibleSourceState&&null==V.visibleTargetState||
+(this.graphHandler.reset(),aa.consume());else if(N==mxEvent.LABEL_HANDLE||0==N||null!=V.visibleSourceState||N==X.bends.length-1||null!=V.visibleTargetState)ha||N==mxEvent.LABEL_HANDLE||(ha=V.absolutePoints,null!=ha&&(null==ia&&null==N||ia==mxEdgeStyle.OrthConnector)&&(N=d,null==N&&(N=new mxRectangle(F.x,F.y),N.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(N,ha[0].x,ha[0].y)?N=0:mxUtils.contains(N,ha[ha.length-1].x,ha[ha.length-1].y)?N=X.bends.length-1:null!=ia&&(2==ha.length||
+3==ha.length&&(0==Math.round(ha[0].x-ha[1].x)&&0==Math.round(ha[1].x-ha[2].x)||0==Math.round(ha[0].y-ha[1].y)&&0==Math.round(ha[1].y-ha[2].y)))?N=2:(N=mxUtils.findNearestSegment(V,F.x,F.y),N=null==ia?mxEvent.VIRTUAL_HANDLE-N:N+1))),null==N&&(N=mxEvent.VIRTUAL_HANDLE)),X.start(aa.getGraphX(),aa.getGraphX(),N),aa.consume(),this.graphHandler.reset()}null!=X&&(this.selectionCellsHandler.isHandlerActive(X)?this.isCellSelected(V.cell)||(this.selectionCellsHandler.handlers.put(V.cell,X),this.selectCellForEvent(V.cell,
+aa.getEvent())):this.isCellSelected(V.cell)||X.destroy());f=!1;F=L=P=d=null}}else if(V=aa.getState(),null!=V&&this.isCellEditable(V.cell)){X=null;if(this.model.isEdge(V.cell)){if(N=new mxRectangle(aa.getGraphX(),aa.getGraphY()),N.grow(mxEdgeHandler.prototype.handleImage.width/2),ha=V.absolutePoints,null!=ha)if(null!=V.text&&null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,aa.getGraphX(),aa.getGraphY()))X="move";else if(mxUtils.contains(N,ha[0].x,ha[0].y)||mxUtils.contains(N,ha[ha.length-
+1].x,ha[ha.length-1].y))X="pointer";else if(null!=V.visibleSourceState||null!=V.visibleTargetState)N=this.view.getEdgeStyle(V),X="crosshair",N!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(V)&&(aa=mxUtils.findNearestSegment(V,aa.getGraphX(),aa.getGraphY()),aa<ha.length-1&&0<=aa&&(X=0==Math.round(ha[aa].x-ha[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ha=mxShape.prototype.svgStrokeTolerance/2;N=new mxRectangle(aa.getGraphX(),aa.getGraphY());N.grow(ha);if(this.isTableCell(V.cell)&&
+(aa=this.model.getParent(V.cell),ha=this.model.getParent(aa),!this.isCellSelected(ha)))if(mxUtils.intersects(N,new mxRectangle(V.x,V.y-2,V.width,4))&&this.model.getChildAt(ha,0)!=aa||mxUtils.intersects(N,new mxRectangle(V.x,V.y+V.height-2,V.width,4)))X="row-resize";else if(mxUtils.intersects(N,new mxRectangle(V.x-2,V.y,4,V.height))&&this.model.getChildAt(aa,0)!=V.cell||mxUtils.intersects(N,new mxRectangle(V.x+V.width-2,V.y,4,V.height)))X="col-resize";for(aa=V;null==X&&null!=aa&&(this.isTableCell(aa.cell)||
+this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ha=this.getActualStartSize(aa.cell),ia=this.view.scale,(0<ha.x||0<ha.width)&&mxUtils.intersects(N,new mxRectangle(aa.x+(ha.x-ha.width-1)*ia+(0==ha.x?aa.width*ia:0),aa.y,1,aa.height))?X="col-resize":(0<ha.y||0<ha.height)&&mxUtils.intersects(N,new mxRectangle(aa.x,aa.y+(ha.y-ha.height-1)*ia+(0==ha.y?aa.height:0),aa.width,1))&&(X="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=X&&V.setCursor(X)}}}),
+mouseUp:mxUtils.bind(this,function(N,aa){d=F=L=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(N){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);N.view.graph.isHtmlLabel(N.cell)&&(aa=1!=N.style.html?mxUtils.htmlEntities(aa,!1):N.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=
+!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(N,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var N=g.apply(this,arguments);if(this.graph.pageVisible){var aa=
+[],V=this.graph.pageFormat,ha=this.graph.pageScale,X=V.width*ha;V=V.height*ha;ha=this.graph.view.translate;for(var ia=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*X+ha.x)*ia,(q.y*V+ha.y)*ia,X*ia,V*ia));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*X+ha.x)*ia,((q.y+E)*V+ha.y)*ia,X*ia,V*ia));N=aa.concat(N)}return N};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(N,aa){return null==
+N.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(N){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(N){for(var aa=x.apply(this,arguments),V=new mxDictionary,ha=[],X=0;X<aa.length;X++){var ia=this.graph.isTableCell(N)&&this.graph.isTableCell(aa[X])&&this.graph.isCellSelected(aa[X])?
+this.graph.model.getParent(aa[X]):this.graph.isTableRow(N)&&this.graph.isTableRow(aa[X])&&this.graph.isCellSelected(aa[X])?aa[X]:this.graph.getCompositeParent(aa[X]);null==ia||V.get(ia)||(V.put(ia,!0),ha.push(ia))}return ha};var y=this.graphHandler.start;this.graphHandler.start=function(N,aa,V,ha){var X=!1;this.graph.isTableCell(N)&&(this.graph.isCellSelected(N)?X=!0:N=this.graph.model.getParent(N));X||this.graph.isTableRow(N)&&this.graph.isCellSelected(N)||(N=this.graph.getCompositeParent(N));y.apply(this,
+arguments)};this.connectionHandler.createTargetVertex=function(N,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var G=(new Date).getTime(),D=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var N=this.currentState;I.apply(this,arguments);N!=this.currentState?(G=(new Date).getTime(),D=0):D=(new Date).getTime()-G};var H=this.connectionHandler.isOutlineConnectEvent;
+this.connectionHandler.isOutlineConnectEvent=function(N){return mxEvent.isShiftDown(N.getEvent())&&mxEvent.isAltDown(N.getEvent())?!1:null!=this.currentState&&N.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(N){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N)};var T=t.isForceRubberbandEvent;t.isForceRubberbandEvent=
+function(N){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==N.getState()&&mxEvent.isTouchEvent(N.getEvent())};var M=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(M=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&
+(this.container.style.cursor=M)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(N){return mxEvent.isMouseEvent(N.getEvent())};var fa=this.click;this.click=function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);if(this.isEnabled()&&!aa||N.isConsumed())return fa.apply(this,arguments);var V=aa?N.sourceState.cell:N.getCell();null!=V&&(V=this.getClickableLinkForCell(V),null!=V&&(this.isCustomLink(V)?this.customLinkClicked(V):this.openLink(V)));
+this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};var la=this.tooltipHandler.show;this.tooltipHandler.show=function(){la.apply(this,arguments);if(null!=this.div)for(var N=this.div.getElementsByTagName("a"),aa=0;aa<N.length;aa++)null!=N[aa].getAttribute("href")&&null==N[aa].getAttribute("target")&&N[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};this.getCursorForMouseEvent=
+function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);return this.getCursorForCell(aa?N.sourceState.cell:N.getCell())};var ra=this.getCursorForCell;this.getCursorForCell=function(N){if(!this.isEnabled()||this.isCellLocked(N)){if(null!=this.getClickableLinkForCell(N))return"pointer";if(this.isCellLocked(N))return"default"}return ra.apply(this,arguments)};this.selectRegion=function(N,aa){var V=mxEvent.isAltDown(aa)?N:null;N=this.getCells(N.x,N.y,N.width,N.height,
+null,null,V,function(ha){return"1"==mxUtils.getValue(ha.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(V=0;V<N.length;V++)this.selectCellForEvent(N[V],aa);else this.selectCellsForEvent(N,aa);return N};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(N,aa,V){return this.graph.isCellSelected(N)?!1:ba.apply(this,arguments)};this.isCellLocked=function(N){for(;null!=N;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(N),"locked","0"))return!0;
+N=this.model.getParent(N)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){"mouseDown"==aa.getProperty("eventName")&&(N=aa.getProperty("event").getState(),oa=null==N||this.isSelectionEmpty()||this.isCellSelected(N.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(N,aa){if(!mxEvent.isMultiTouchEvent(aa)){N=aa.getProperty("event");var V=aa.getProperty("cell");null==V?(N=mxUtils.convertPoint(this.container,
+mxEvent.getClientX(N),mxEvent.getClientY(N)),t.start(N.x,N.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(V)&&this.removeSelectionCell(V);oa=null;aa.consume()}}));this.connectionHandler.selectCells=function(N,aa){this.graph.setSelectionCell(aa||N)};this.connectionHandler.constraintHandler.isStateIgnored=function(N,aa){var V=N.view.graph;return aa&&(V.isCellSelected(N.cell)||V.isTableRow(N.cell)&&V.selectionCellsHandler.isHandled(V.model.getParent(N.cell)))};
+this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var N=this.connectionHandler.constraintHandler;null!=N.currentFocus&&N.isStateIgnored(N.currentFocus,!0)&&(N.currentFocus=null,N.constraints=null,N.destroyIcons());N.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var na=this.updateMouseEvent;this.updateMouseEvent=function(N){N=na.apply(this,arguments);null!=N.state&&this.isCellLocked(N.getCell())&&(N.state=null);return N}}this.currentTranslate=new mxPoint(0,
0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;
Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2327,33 +2328,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var F=p[0].getAttribute("width"),K=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(K)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+1;var F=p[0].getAttribute("width"),L=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(L)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,K=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,L=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
+g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||
-"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var K=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(F){return"1"==
-mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,K){F=null!=F?F:!0;K=null!=K?K:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||K&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
-function(F){for(var K={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,K,0==P)}return K};Graph.prototype.mergeStyle=function(F,K,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==K[f]&&P?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(F,K){K=this.getCellStyle(F);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&
-0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),K=this.getCellStyle(F),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(K=0;K<this.model.getChildCount(F);K++){var P=this.model.getChildAt(F,K);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,K,P){P=null!=P?P:Graph.pasteStyles;
-Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,K)};Graph.prototype.updateCellStyles=function(F,K){this.model.beginUpdate();try{for(var P=0;P<K.length;P++)if(this.model.isVertex(K[P])||this.model.isEdge(K[P])){var d=this.getCellStyle(K[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[K[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
-(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,K,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,K,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),u=this.getScaledCellAt(F,K,y,d,f,g);if(null!=u)return u;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(u=this.view.getState(y),null!=u&&(null==g||!g(u,F,K))&&this.intersects(u,F,K)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
-!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var K=this.getCellGeometry(F);null!=K&&K.relative;)F=this.getModel().getParent(F),K=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var K=
-new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var K=this.model.getParent(F);if(!this.model.isVertex(K))break;F=K}return F};Graph.prototype.filterSelectionCells=function(F){var K=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<K.length;d++)F(K[d])||
-P.push(K[d]);K=P}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var K=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*K-P.x,(F.y+2*P.y)*K-P.y,F.width*K,F.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
-if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+K.x)*P,(F.y+K.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var K=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
-"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,K=this.scale,P=this.translate;
-F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=K,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
+"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var L=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(F){return"1"==
+mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,L){F=null!=F?F:!0;L=null!=L?L:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||L&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
+function(F){for(var L={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,L,0==P)}return L};Graph.prototype.mergeStyle=function(F,L,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==L[f]&&P?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(F,L){L=this.getCellStyle(F);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&
+0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),L=this.getCellStyle(F),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(L=0;L<this.model.getChildCount(F);L++){var P=this.model.getChildAt(F,L);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,L,P){P=null!=P?P:Graph.pasteStyles;
+Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,L)};Graph.prototype.updateCellStyles=function(F,L){this.model.beginUpdate();try{for(var P=0;P<L.length;P++)if(this.model.isVertex(L[P])||this.model.isEdge(L[P])){var d=this.getCellStyle(L[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[L[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
+(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,L,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,L,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
+null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),t=this.getScaledCellAt(F,L,y,d,f,g);if(null!=t)return t;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(t=this.view.getState(y),null!=t&&(null==g||!g(t,F,L))&&this.intersects(t,F,L)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
+!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var L=this.getCellGeometry(F);null!=L&&L.relative;)F=this.getModel().getParent(F),L=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var L=
+new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var L=this.model.getParent(F);if(!this.model.isVertex(L))break;F=L}return F};Graph.prototype.filterSelectionCells=function(F){var L=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<L.length;d++)F(L[d])||
+P.push(L[d]);L=P}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var L=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*L-P.x,(F.y+2*P.y)*L-P.y,F.width*L,F.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
+if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+L.x)*P,(F.y+L.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};var m=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var L=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
+"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,L=this.scale,P=this.translate;
+F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=L,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2367,10 +2368,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,K){if(null!=b.shape){var P=[k[0]];K=F/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,L){if(null!=b.shape){var P=[k[0]];L=F/L;e||(L=1-L);for(var d=C*L,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(F,m);F()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});C=window.setInterval(F,m);F()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2380,28 +2381,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",P=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),y=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:u,ss:F(u),l:F(K,3),L:F(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1,
-D.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function K(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(I,H){I=String(I);for(H=H||2;I.length<H;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",P=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),y=b[L+"Minutes"](),t=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var G=k?0:b.getTimezoneOffset(),D={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:t,ss:F(t),l:F(L,3),L:F(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<G?"-":"+")+F(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in D?D[I]:I.slice(1,
+I.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function L(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));K();null!=b&&b(F)});K()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)F=b.id;else if(0>K.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(K+"_"+Graph.diagramLanguage)),
-null==F&&(F=P.hasAttribute(K)?null!=P.getAttribute(K)?P.getAttribute(K):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(K));null==F&&null!=k&&(F=k[K])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
+mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));L();null!=b&&b(F)});L()})(m.getChildAt(m.root,p));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)F=b.id;else if(0>L.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(L+"_"+Graph.diagramLanguage)),
+null==F&&(F=P.hasAttribute(L)?null!=P.getAttribute(L)?P.getAttribute(L):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(L));null==F&&null!=k&&(F=k[L])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(K,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),L=C.getIndex(p);p=Math.max(m,L);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(L,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m,
C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
+Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==y||p[H]==this.model.getParent(b)))y=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],W=u;u=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==u&&P){this.model.beginUpdate();try{if(null==W&&D){var Z=this.getAbsoluteParent(null!=T?T:b);Z=P?b:this.getCompositeParent(Z);W=null!=T?T:this.duplicateCells([Z],
-!1)[0];null!=T&&this.addCells([W],this.model.getParent(b),null,null,null,!0);var N=this.getCellGeometry(W);null!=N&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=N.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=N.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-N.width/2:f.x+N.width/2),N.x=f.x-N.width/2,N.y=f.y-N.height/2);null!=y?(this.addCells([W],y,null,null,null,!0),u=null):D&&!P&&this.addCells([W],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&D||null==u&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,W,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=qa.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==qa.parent&&(oa=T.parent.getIndex(T),this.model.add(T.parent,qa,oa))}null==u&&null!=W&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent,
-W,oa));null!=qa&&G.push(qa);null==u&&null!=W&&G.push(W);null==W&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==F||null!=W||!D||null==u&&P)return C(W);F(d+f.x*k,x+f.y*k,C)};
+this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,t=null;if(null!=p){p=p.reverse();for(var G=0;G<p.length;G++)if(!this.isCellLocked(p[G])&&!this.model.isEdge(p[G])&&p[G]!=b)if(!this.model.isAncestor(b,p[G])&&this.isContainer(p[G])&&(null==y||p[G]==this.model.getParent(b)))y=p[G];else if(null==t&&this.isCellConnectable(p[G])&&!this.model.isAncestor(p[G],b)&&!this.isSwimlane(p[G])){var D=this.view.getState(p[G]);null==g||null==D||mxUtils.intersects(g,D)||(t=p[G])}}var I=
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;I&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var H=[],S=t;t=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==t&&P){this.model.beginUpdate();try{if(null==S&&I){var M=this.getAbsoluteParent(null!=T?T:b);M=P?b:this.getCompositeParent(M);S=null!=T?T:this.duplicateCells([M],
+!1)[0];null!=T&&this.addCells([S],this.model.getParent(b),null,null,null,!0);var fa=this.getCellGeometry(S);null!=fa&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=fa.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=fa.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-fa.width/2:f.x+fa.width/2),fa.x=f.x-fa.width/2,fa.y=f.y-fa.height/2);null!=y?(this.addCells([S],y,null,null,null,!0),t=null):I&&!P&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var la=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&I||null==t&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,S,this.createCurrentEdgeStyle());if(null!=la&&this.connectionHandler.insertBeforeSource){var ra=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=la.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==la.parent&&(ra=T.parent.getIndex(T),this.model.add(T.parent,la,ra))}null==t&&null!=S&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(ra=b.parent.getIndex(b),this.model.add(b.parent,
+S,ra));null!=la&&H.push(la);null==t&&null!=S&&H.push(S);null==S&&null!=la&&la.geometry.setTerminalPoint(f,!1);null!=la&&this.fireEvent(new mxEventObject("cellsInserted","cells",[la]))}finally{this.model.endUpdate()}}if(null!=L)L(H);else return H});if(null==F||null!=S||!I||null==t&&P)return C(S);F(d+f.x*k,x+f.y*k,C)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2410,7 +2411,7 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=F&&null!=K){var P=Math.round(K.width-F.width/this.view.scale),d=Math.round(K.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
+Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=F&&null!=L){var P=Math.round(L.width-F.width/this.view.scale),d=Math.round(L.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b,
@@ -2448,201 +2449,201 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,P,d){if(null!=k){var f=new mxRectangle(P,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?P+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(P-=f.x+f.width-k.x))}K.style.left=P+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,P,d){if(null!=k){var f=new mxRectangle(P,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?P+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(P-=f.x+f.width-k.x))}L.style.left=P+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(K,P){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K,
-this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(L,P){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
+this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),K=this.getCellGeometry(F);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),L=this.getCellGeometry(F);null!=L&&(L.x+=p*m,L.y+=p*C);b.insert(F)}return b};
+Graph.prototype.createTable=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null,
-null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
-m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,K,P,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
+null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
+Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),L=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
+m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,L,P,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(F,b);if(K<F.length-1){var P=F[K+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var K=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(F,b);if(L<F.length-1){var P=F[L+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var L=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
+g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),C.setGeometry(p[P],d))}return K};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),K=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
-f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(J),J=C||m?J+y.height:J+y.height/x*P,y.height=Math.round(J)-y.y,F.setGeometry(f[g],y)),K=Math.max(K,this.layoutRow(f[g],u,y.height,d,H));m&&P<x&&(k=k.clone(),k.height=J+e.height,F.setGeometry(b,
-k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){F.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
+TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
+0,d.width,d.height),C.setGeometry(p[P],d))}return L};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),L=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
+f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var t=p?null:this.getRowLayout(f[0],d),G=[],D=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(D),D=C||m?D+y.height:D+y.height/x*P,y.height=Math.round(D)-y.y,F.setGeometry(f[g],y)),L=Math.max(L,this.layoutRow(f[g],t,y.height,d,G));m&&P<x&&(k=k.clone(),k.height=D+e.height,F.setGeometry(b,
+k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){F.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=H.width}I.actual.col==I.col&&(H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=H.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
!1)}finally{F.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(fa,ia,M){var aa=new mxPoint(ia,M);aa.type=fa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
-fa||aa.x!=ia||aa.y!=M},H=.5*this.scale;x=!1;y=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],W=[],T=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,T.x,T.y,D.x,D.y)<1*this.scale*this.scale;)D=T,J++,T=g[J+2];x=u(0,G.x,G.y)||x;for(var Z=0;Z<this.validEdges.length;Z++){var N=this.validEdges[Z],qa=N.absolutePoints;if(null!=qa&&mxUtils.intersects(f,N)&&"1"!=N.style.noJump)for(N=0;N<qa.length-1;N++){var oa=qa[N+1],S=qa[N];for(T=qa[N+2];N<qa.length-2&&mxUtils.ptSegDistSq(S.x,S.y,T.x,T.y,oa.x,
-oa.y)<1*this.scale*this.scale;)oa=T,N++,T=qa[N+2];T=mxUtils.intersection(G.x,G.y,D.x,D.y,S.x,S.y,oa.x,oa.y);if(null!=T&&(Math.abs(T.x-G.x)>H||Math.abs(T.y-G.y)>H)&&(Math.abs(T.x-D.x)>H||Math.abs(T.y-D.y)>H)&&(Math.abs(T.x-S.x)>H||Math.abs(T.y-S.y)>H)&&(Math.abs(T.x-oa.x)>H||Math.abs(T.y-oa.y)>H)){oa=T.x-G.x;S=T.y-G.y;T={distSq:oa*oa+S*S,x:T.x,y:T.y};for(oa=0;oa<W.length;oa++)if(W[oa].distSq>T.distSq){W.splice(oa,0,T);T=null;break}null==T||0!=W.length&&W[W.length-1].x===T.x&&W[W.length-1].y===T.y||
-W.push(T)}}}for(N=0;N<W.length;N++)x=u(1,W[N].x,W[N].y)||x}T=g[g.length-1];x=u(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,W=[],T=null;f.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var N=this.state.routedPoints[Z],qa=new mxPoint(N.x/this.scale,N.y/this.scale);0==Z?qa=g[0]:Z==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==N.type){var S=this.state.routedPoints[Z+1];N=S.x/this.scale-qa.x;S=S.y/this.scale-qa.y;N=
-N*N+S*S;null==T&&(T=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(T.x*T.x+T.y*T.y),0<G?(T.x=T.x*u/G,T.y=T.y*u/G):T=null);N>u*u&&0<G&&(N=D.x-qa.x,S=D.y-qa.y,N=N*N+S*S,N>u*u&&(oa=new mxPoint(qa.x-T.x,qa.y-T.y),N=new mxPoint(qa.x+T.x,qa.y+T.y),W.push(oa),this.addPoints(f,W,x,y,!1,null,J),W=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-T.y*W,oa.y+T.x*W),f.lineTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x,N.y)):"line"==H?(f.moveTo(oa.x+T.y*W,oa.y-T.x*W),f.lineTo(oa.x-
-T.y*W,oa.y+T.x*W),f.moveTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x+T.y*W,N.y-T.x*W),f.moveTo(N.x,N.y)):"arc"==H?(W*=1.3,f.curveTo(oa.x-T.y*W,oa.y+T.x*W,N.x-T.y*W,N.y+T.x*W,N.x,N.y)):(f.moveTo(N.x,N.y),J=!0),W=[N],oa=!0))}else T=null;oa||(W.push(qa),D=qa)}this.addPoints(f,W,x,y,!1,null,J);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
-g.getCenterY()):F.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var u=this.getNextPoint(f,x,y),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),W=
-Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,W,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),W=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,W,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,u),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,y,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
-y=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==y||D<y)x=J,y=D}}null!=x&&(u=x)}return u};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
-mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
+function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var t=function(oa,na,N){var aa=new mxPoint(na,N);aa.type=oa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
+oa||aa.x!=na||aa.y!=N},G=.5*this.scale;x=!1;y=[];for(var D=0;D<g.length-1;D++){for(var I=g[D+1],H=g[D],S=[],T=g[D+2];D<g.length-2&&mxUtils.ptSegDistSq(H.x,H.y,T.x,T.y,I.x,I.y)<1*this.scale*this.scale;)I=T,D++,T=g[D+2];x=t(0,H.x,H.y)||x;for(var M=0;M<this.validEdges.length;M++){var fa=this.validEdges[M],la=fa.absolutePoints;if(null!=la&&mxUtils.intersects(f,fa)&&"1"!=fa.style.noJump)for(fa=0;fa<la.length-1;fa++){var ra=la[fa+1],ba=la[fa];for(T=la[fa+2];fa<la.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,
+T.x,T.y,ra.x,ra.y)<1*this.scale*this.scale;)ra=T,fa++,T=la[fa+2];T=mxUtils.intersection(H.x,H.y,I.x,I.y,ba.x,ba.y,ra.x,ra.y);if(null!=T&&(Math.abs(T.x-H.x)>G||Math.abs(T.y-H.y)>G)&&(Math.abs(T.x-I.x)>G||Math.abs(T.y-I.y)>G)&&(Math.abs(T.x-ba.x)>G||Math.abs(T.y-ba.y)>G)&&(Math.abs(T.x-ra.x)>G||Math.abs(T.y-ra.y)>G)){ra=T.x-H.x;ba=T.y-H.y;T={distSq:ra*ra+ba*ba,x:T.x,y:T.y};for(ra=0;ra<S.length;ra++)if(S[ra].distSq>T.distSq){S.splice(ra,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&
+S[S.length-1].y===T.y||S.push(T)}}}for(fa=0;fa<S.length;fa++)x=t(1,S[fa].x,S[fa].y)||x}T=g[g.length-1];x=t(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,I=null,H=null,S=[],T=null;f.begin();for(var M=0;M<this.state.routedPoints.length;M++){var fa=this.state.routedPoints[M],la=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==M?la=g[0]:M==this.state.routedPoints.length-1&&(la=g[g.length-1]);var ra=!1;if(null!=I&&1==fa.type){var ba=this.state.routedPoints[M+1];fa=ba.x/this.scale-
+la.x;ba=ba.y/this.scale-la.y;fa=fa*fa+ba*ba;null==T&&(T=new mxPoint(la.x-I.x,la.y-I.y),H=Math.sqrt(T.x*T.x+T.y*T.y),0<H?(T.x=T.x*t/H,T.y=T.y*t/H):T=null);fa>t*t&&0<H&&(fa=I.x-la.x,ba=I.y-la.y,fa=fa*fa+ba*ba,fa>t*t&&(ra=new mxPoint(la.x-T.x,la.y-T.y),fa=new mxPoint(la.x+T.x,la.y+T.y),S.push(ra),this.addPoints(f,S,x,y,!1,null,D),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,D=!1,"sharp"==G?(f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.lineTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x,fa.y)):"line"==
+G?(f.moveTo(ra.x+T.y*S,ra.y-T.x*S),f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.moveTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x+T.y*S,fa.y-T.x*S),f.moveTo(fa.x,fa.y)):"arc"==G?(S*=1.3,f.curveTo(ra.x-T.y*S,ra.y+T.x*S,fa.x-T.y*S,fa.y+T.x*S,fa.x,fa.y)):(f.moveTo(fa.x,fa.y),D=!0),S=[fa],ra=!0))}else T=null;ra||(S.push(la),I=la)}this.addPoints(f,S,x,y,!1,null,D);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==
+g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):F.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var t=this.getNextPoint(f,x,y),G=this.graph.isOrthogonal(f),D=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(g.getCenterX(),
+g.getCenterY());if(0!=D){var H=Math.cos(-D),S=Math.sin(-D);t=mxUtils.getRotatedPoint(t,H,S,I)}H=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(g,t,0==D&&G,H);0!=D&&(H=Math.cos(D),S=Math.sin(D),t=mxUtils.getRotatedPoint(t,H,S,I));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,t),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,
+x,y,t){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);y=x=null;if(null!=f)for(var G=0;G<f.length;G++){var D=this.graph.getConnectionPoint(g,f[G]);if(null!=D){var I=(D.x-t.x)*(D.x-t.x)+(D.y-t.y)*(D.y-t.y);if(null==y||I<y)x=D,y=I}}null!=x&&(t=x)}return t};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,
+y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return d.apply(this,arguments)}})();
+mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!=
C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"),
-K=m.getAttribute("h");F=null==F?80:parseInt(F,10);K=null==K?80:parseInt(K,10);e(C,p,b,F,K)}}m=m.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+L=m.getAttribute("h");F=null==F?80:parseInt(F,10);L=null==L?80:parseInt(L,10);e(C,p,b,F,L)}}m=m.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,J){switch(J){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(O){var V=L.apply(this,arguments);this.error=null;return V});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<L.length;O++)null!=this.currentEdgeStyle[L[O]]&&(z+=L[O]+"="+this.currentEdgeStyle[L[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var J in this.graph.currentEdgeStyle)z.style[J]=this.graph.currentEdgeStyle[J];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),J=z.getCell;z.getCell=mxUtils.bind(this,function(O){var U=J.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",J="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<J.length;O++)null!=this.currentEdgeStyle[J[O]]&&(z+=J[O]+"="+this.currentEdgeStyle[J[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var O=0;O<z.length;O++){var V=z[O];L[mxObjectIdentity.get(V)]=V.getId();for(var U=this.model.getChildCount(V),
-ha=0;ha<U;ha++)this.createCellLookup([this.model.getChildAt(V,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,O){O=null!=O?O:{};for(var V in z){var U=L[V];null==O[U]&&(O[U]=z[V].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,L,O,V){L=null!=L?L:0;O=null!=O?O:0;var U=new mxCodec(z.ownerDocument),ha=new mxGraphModel;U.decode(z,ha);z=[];U={};var ma={},wa=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),U));if(null!=wa){var sa=this.createCellLookup([ha.root]);
-wa=wa.slice();this.model.beginUpdate();try{if(1!=wa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<wa.length;ha++)ya=this.model.getChildren(this.moveCells([wa[ha]],L,O,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ha.getChildren(wa[0]);null!=ya&&(z=this.moveCells(ya,L,O,!1,this.getDefaultParent()),ma[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(U,sa,ma),this.updateCustomLinks(ma,z),V)){this.isGridEnabled()&&
-(L=this.snap(L),O=this.snap(O));var Ha=this.getBoundingBoxFromGeometry(z,!0);null!=Ha&&this.moveCells(z,L-Ha.x,O-Ha.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},O=this.cloneCells(z,null,L),V=new mxDictionary,U=0;U<z.length;U++)V.put(z[U],!0);var ha=new mxCodec,ma=new mxGraphModel,wa=ma.getChildAt(ma.getRoot(),0);for(U=0;U<O.length;U++){ma.add(wa,O[U]);var sa=this.view.getState(z[U]);if(null!=sa){var ya=this.getCellGeometry(O[U]);null!=ya&&ya.relative&&
-!this.model.isEdge(z[U])&&null==V.get(this.model.getParent(z[U]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),O);return ha.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
-"table"==O||"tableRow"==O};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var O=this.getCurrentCellStyle(L);if(null!=O.expand)return"0"!=O.expand}return K.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,O,V,U,ha,ma,wa){null==wa&&(wa=this.model.getParent(z),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ha,ma,null,!0,!1));O=null;this.model.beginUpdate();
-try{O=P.apply(this,[z,L,O,V,U,ha,ma,wa]);this.model.setValue(O,"");var sa=this.getChildCells(O,!0);for(L=0;L<sa.length;L++){var ya=this.getCellGeometry(sa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[L])}var Ha=this.getChildCells(z,!0);for(L=0;L<Ha.length;L++)ya=this.getCellGeometry(Ha[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ha[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Qa=this.model.getTerminal(O,!1);if(null!=Qa){var ua=this.getCurrentCellStyle(Qa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,L,O){if(L||O)d.apply(this,arguments);else{var V=this.getSelectionCell(),U=null,ha=[],ma=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(ha.push(wa),wa==V)U=ha.length-1;else if(z&&null==V&&0<ha.length||null!=U&&z&&ha.length>U||!z&&0<U)return;for(var sa=0;sa<this.model.getChildCount(wa);sa++)ma(this.model.getChildAt(wa,sa))});ma(this.model.root);0<ha.length&&(U=null!=U?mxUtils.mod(U+(z?1:-1),ha.length):0,this.setSelectionCell(ha[U]))}};
-Graph.prototype.swapShapes=function(z,L,O,V,U,ha,ma){L=!1;if(!V&&null!=U&&1==z.length&&(V=this.view.getState(U),O=this.view.getState(z[0]),null!=V&&null!=O&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==V.style.shape&&"umlLifeline"==O.style.shape)&&(V=this.getCellGeometry(U),ha=this.getCellGeometry(z[0]),null!=V&&null!=ha))){L=V.clone();V=ha.clone();V.x=L.x;V.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();try{this.model.setGeometry(U,L),this.model.setGeometry(z[0],V)}finally{this.model.endUpdate()}L=
-!0}return L};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,O,V,U,ha,ma){if(this.swapShapes(z,L,O,V,U,ha,ma))return z;ma=null!=ma?ma:{};if(this.isTable(U)){for(var wa=[],sa=0;sa<z.length;sa++)this.isTable(z[sa])?wa=wa.concat(this.model.getChildCells(z[sa],!0).reverse()):wa.push(z[sa]);z=wa}this.model.beginUpdate();try{wa=[];for(sa=0;sa<z.length;sa++)if(null!=U&&this.isTableRow(z[sa])){var ya=this.model.getParent(z[sa]),Ha=this.getCellGeometry(z[sa]);this.isTable(ya)&&wa.push(ya);
-if(null!=ya&&null!=Ha&&this.isTable(ya)&&this.isTable(U)&&(V||ya!=U)){if(!V){var Qa=this.getCellGeometry(ya);null!=Qa&&(Qa=Qa.clone(),Qa.height-=Ha.height,this.model.setGeometry(ya,Qa))}Qa=this.getCellGeometry(U);null!=Qa&&(Qa=Qa.clone(),Qa.height+=Ha.height,this.model.setGeometry(U,Qa));var ua=this.model.getChildCells(U,!0);if(0<ua.length){z[sa]=V?this.cloneCell(z[sa]):z[sa];var za=this.model.getChildCells(z[sa],!0),Fa=this.model.getChildCells(ua[0],!0),Ba=Fa.length-za.length;if(0<Ba)for(var Ea=
-0;Ea<Ba;Ea++){var Oa=this.cloneCell(za[za.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[sa],Oa))}else if(0>Ba)for(Ea=0;Ea>Ba;Ea--)this.model.remove(za[za.length+Ea-1]);za=this.model.getChildCells(z[sa],!0);for(Ea=0;Ea<Fa.length;Ea++){var Pa=this.getCellGeometry(Fa[Ea]),bb=this.getCellGeometry(za[Ea]);null!=Pa&&null!=bb&&(bb=bb.clone(),bb.width=Pa.width,this.model.setGeometry(za[Ea],bb))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<wa.length;sa++)!V&&this.model.contains(wa[sa])&&0==this.model.getChildCount(wa[sa])&&
-this.model.remove(wa[sa]);V&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var O=[];this.model.beginUpdate();try{for(var V=0;V<z.length;V++)if(this.isTableCell(z[V])){var U=this.model.getParent(z[V]),ha=this.model.getParent(U);1==this.model.getChildCount(U)&&1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha)&&O.push(ha):
-this.labelChanged(z[V],"")}else{if(this.isTableRow(z[V])&&(ha=this.model.getParent(z[V]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha))){for(var ma=this.model.getChildCells(ha,!0),wa=0,sa=0;sa<ma.length;sa++)0<=mxUtils.indexOf(z,ma[sa])&&wa++;wa==ma.length&&O.push(ha)}O.push(z[V])}O=g.apply(this,[O,L])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,L,O){O=null!=O?O:new Graph;for(var V=0;V<L.length;V++)null!=L[V]&&O.updateCustomLinksForCell(z,L[V],O)};Graph.prototype.updateCustomLinksForCell=
-function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var O=this.model.getChildCount(L),V=0;V<O;V++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,V))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var O=JSON.parse(L);for(L=0;L<O.length;L++){var V=O[L];z.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?
-V[3]:0,4<V.length?V[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){V=z.shape.direction;L=z.shape.bounds;var U=z.shape.scale;O=L.width/U;L=L.height/U;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=O,O=L,L=V;L=z.shape.getConstraints(z.style,O,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),O=0,V=0;V<L;V++){var U=this.model.getChildAt(z,V);this.model.isVertex(U)&&(U=this.getCellGeometry(U),null==U||U.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,L,O){for(var V=this.getCurrentCellStyle(z),U=!0,ha=!0,ma=0;ma<L.length&&ha;ma++)U=U&&this.isTable(L[ma]),ha=ha&&this.isTableRow(L[ma]);return(1==L.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||U))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var O=this.getModel(),V=[];O.beginUpdate();try{for(var U=0;U<z.length;U++){var ha=z[U];if(O.isEdge(ha)){var ma=O.getTerminal(ha,!0),wa=O.getTerminal(ha,!1);O.setTerminal(ha,wa,!0);O.setTerminal(ha,ma,!1);var sa=O.getGeometry(ha);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Ha=sa.getTerminalPoint(!1);
-sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Ha,!0);O.setGeometry(ha,sa);var Qa=this.view.getState(ha),ua=this.view.getState(ma),za=this.view.getState(wa);if(null!=Qa){var Fa=null!=ua?this.getConnectionConstraint(Qa,ua,!0):null,Ba=null!=za?this.getConnectionConstraint(Qa,za,!1):null;this.setConnectionConstraint(ha,ma,!0,Ba);this.setConnectionConstraint(ha,wa,!1,Fa);var Ea=mxUtils.getValue(Qa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Qa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[ha])}V.push(ha)}}else if(O.isVertex(ha)&&(sa=this.getCellGeometry(ha),null!=sa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Oa=sa.width;sa.width=sa.height;sa.height=Oa;O.setGeometry(ha,sa)}var Pa=this.view.getState(ha);if(null!=Pa){var bb=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Pa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,eb)+(L?-1:1),bb.length)],[ha])}V.push(ha)}}}finally{O.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var O=this.view.getState(L);null!=O&&null!=O.shape&&(this.view.invalidate(L),O.shape.bounds=null)}x.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var O=this.view.getState(z[L]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};
-Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)L(z[O])}};Graph.prototype.updateLabelElements=function(z,L,O){z=null!=z?z:this.getSelectionCells();for(var V=document.createElement("div"),
-U=0;U<z.length;U++)if(this.isHtmlLabel(z[U])){var ha=this.convertValueToString(z[U]);if(null!=ha&&0<ha.length){V.innerHTML=ha;for(var ma=V.getElementsByTagName(null!=O?O:"*"),wa=0;wa<ma.length;wa++)L(ma[wa]);V.innerHTML!=ha&&this.cellLabelChanged(z[U],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,O){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var V=z.getAttribute("placeholder"),
-U=z;null!=U;){if(U==this.model.getRoot()||null!=U.value&&"object"==typeof U.value&&U.hasAttribute(V)){this.setAttributeForCell(U,V,L);break}U=this.model.getParent(U)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var L=new mxDictionary,O=0;O<z.length;O++)L.put(z[O],!0);var V=[];for(O=0;O<z.length;O++){var U=this.model.getParent(z[O]);null==U||L.get(U)||(L.put(U,!0),V.push(U))}for(O=0;O<V.length;O++)if(U=this.view.getState(V[O]),null!=U&&(this.model.isEdge(U.cell)||this.model.isVertex(U.cell))&&this.isCellDeletable(U.cell)&&this.isTransparentState(U)){for(var ha=!0,ma=0;ma<this.model.getChildCount(U.cell)&&ha;ma++)L.get(this.model.getChildAt(U.cell,ma))||(ha=!1);ha&&z.push(U.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&L.push(z[O]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,L)};Graph.prototype.getAttributeForCell=function(z,L,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,L,O){if(null!=z.value&&"object"==typeof z.value)var V=z.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),V.setAttribute("label",z.value||"");null!=O?V.setAttribute(L,O):V.removeAttribute(L);
-this.model.setValue(z,V)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,O,V){this.getModel();if(mxEvent.isAltDown(L))return null;for(var U=0;U<z.length;U++){var ha=this.model.getParent(z[U]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=y.apply(this,arguments);var ma=!0;for(U=0;U<z.length&&ma;U++)ma=ma&&this.isTableRow(z[U]);ma&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)||
-(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,z,L))};Graph.prototype.insertTextForEvent=function(z,L){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var V=this.model.isEdge(L)?this.view.getState(L):
-null,U=mxEvent.getSource(z);this.firstClickState!=V||this.firstClickSource!=U||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&(mxUtils.contains(V.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(z)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&U==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(O.x,O.y))),L=this.addText(O.x,O.y,V))}return L};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),U=this.getPageSize();L=Math.max(L,V.x*U.width);O=Math.max(O,V.y*U.height)}return new mxPoint(this.snap(L+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),O=this.getInsertPoint(),V=this.snap(Math.round(Math.max(O.x,
-L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(V,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,L,O){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){V.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-V.geometry.relative=!0;V.connectable=!1;var U=this.view.getRelativePoint(O,z,L);V.geometry.x=Math.round(1E4*U.x)/1E4;V.geometry.y=Math.round(U.y);V.geometry.offset=new mxPoint(0,0);U=this.view.getPoint(O,V.geometry);var ha=this.view.scale;V.geometry.offset=new mxPoint(Math.round((z-U.x)/ha),Math.round((L-U.y)/ha))}else U=this.view.translate,V.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(z/this.view.scale)-
-U.x-(null!=O?O.origin.x:0),V.geometry.y=Math.round(L/this.view.scale)-U.y-(null!=O?O.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(z,L,O){var V=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Ha=
-this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Ha&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Ha),null!=L&&mxEvent.addGestureListeners(sa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,V);V();var U=this.container.style.cursor,ha=this.getTolerance(),ma=this,wa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya=
-sa.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))sa=ma.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Ha,Qa,ua){return null==ma.getLinkForCell(Ha.cell)}),ya=null==ya||ma.model.isAncestor(sa,ya.cell)?ma.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft;
-this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(ma.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>ha||ya>ha)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Ha=ya.getSource();for(sa=ya.getEvent();null!=Ha&&"a"!=Ha.nodeName.toLowerCase();)Ha=Ha.parentNode;null==Ha&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&(null==ya.sourceState||
-!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Ha=ma.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ha||null==L||L(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Ha?ma.linkTarget:"_top",ma.openLink(this.currentLink,sa),ya.consume())):null!=O&&!ya.isConsumed()&&
-Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&Math.abs(this.startX-ya.getGraphX())<ha&&Math.abs(this.startY-ya.getGraphY())<ha&&O(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(sa.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=ma.container&&
-(ma.container.style.cursor=U);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(sa){};ma.addMouseListener(wa);mxEvent.addListener(document,"mouseleave",function(sa){wa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
-var V=this.getModel(),U=this.gridSize,ha=[];V.beginUpdate();try{var ma={},wa=this.createCellLookup(z),sa=this.cloneCells(z,!1,ma,!0);for(O=0;O<z.length;O++){var ya=V.getParent(z[O]);if(null!=ya){var Ha=this.moveCells([sa[O]],U,U,!1)[0];ha.push(Ha);if(L)V.add(ya,sa[O]);else{var Qa=ya.getIndex(z[O]);V.add(ya,sa[O],Qa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[O]),za=this.getCellGeometry(ya);null!=ua&&null!=za&&(za=za.clone(),za.height+=ua.height,V.setGeometry(ya,za))}}else ha.push(sa[O])}this.updateCustomLinks(this.createCellMapping(ma,
-wa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{V.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,O){if(null!=z&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),U=[],ha=0;ha<V.length;ha++)U.push(V[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==U.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=U[ha-1]){z[ha].setAttribute("width",
-L);z[ha].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),O=[],V=0;V<L.length;V++)O.push(L[V]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==O.length+1)for(V=L.length-1;0<=V;V--)if(L[V]!=O[V-1]){for(L=L[V].getElementsByTagName("a");0<L.length;){for(O=
-L[0].parentNode;null!=L[0].firstChild;)O.insertBefore(L[0].firstChild,L[0]);O.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==
-L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var O=[],V=null,U=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var ma=this.view.getState(L[ha]);if(null!=ma){var wa=z?ma.getCenterX():ma.getCenterY();V=null!=V?Math.max(V,wa):wa;U=null!=U?Math.min(U,wa):wa;O.push(ma)}}if(2<O.length){O.sort(function(Qa,ua){return z?Qa.x-ua.x:Qa.y-ua.y});ma=this.view.translate;wa=this.view.scale;U=U/wa-(z?ma.x:ma.y);V=V/wa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var sa=(V-U)/(O.length-
-1);V=U;for(ha=1;ha<O.length-1;ha++){var ya=this.view.getState(this.model.getParent(O[ha].cell)),Ha=this.getCellGeometry(O[ha].cell);V+=sa;null!=Ha&&null!=ya&&(Ha=Ha.clone(),z?Ha.x=Math.round(V-Ha.width/2)-ya.origin.x:Ha.y=Math.round(V-Ha.height/2)-ya.origin.y,this.getModel().setGeometry(O[ha].cell,Ha))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,O){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,O,V,U,ha,ma,wa,sa,ya,Ha,Qa,ua,za){var Fa=null;if(null!=za)for(Fa=new mxDictionary,Ha=0;Ha<za.length;Ha++)Fa.put(za[Ha],
-!0);if(za=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;O=null!=O?O:0;U=null!=U?U:!0;ha=null!=ha?ha:!0;ma=null!=ma?ma:!0;ya=null!=ya?ya:!1;var Ba="page"==ua?this.view.getBackgroundPageBounds():ha&&null==Fa||V||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.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==Ba)throw Error(mxResources.get("drawingEmpty"));V=L/Ea;ua=U?-.5:0;var Oa=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ba.width*V)+2*O)+(ya&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*V)+2*O)+(ya&&0==O?5:0),z),Pa=Oa.ownerDocument,bb=null!=Pa.createElementNS?Pa.createElementNS(mxConstants.NS_SVG,"g"):Pa.createElement("g");Oa.appendChild(bb);var eb=this.createSvgCanvas(bb);eb.foOffset=
-U?-.5:0;eb.textOffset=U?-.5:0;eb.imageOffset=U?-.5:0;eb.translate(Math.floor(O/L-Ba.x/Ea),Math.floor(O/L-Ba.y/Ea));var db=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(db.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
-if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ea/L;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(V);eb.textEnabled=
-ma;wa=null!=wa?wa:this.createSvgImageExport();var lb=wa.drawCellState,$a=wa.getLinkForCellState;wa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};wa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};wa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Fa?Fa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ha&&null==Fa||qb)&&null!=nb;)qb=null!=
-Fa?Fa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ha&&null==Fa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};wa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,sa,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var O=
-z.createElement("switch"),V=z.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var U=z.createElement("a");U.setAttribute("transform","translate(0,-5)");null==U.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(U.setAttribute("xlink:href",Graph.foreignObjectWarningLink),U.setAttribute("target","_blank")):(U.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),U.setAttributeNS(mxConstants.NS_XLINK,
-"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(V);U.appendChild(z);O.appendChild(U);L.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,L,O){z=z.getElementsByTagName("a");for(var V=0;V<z.length;V++)if(null==z[V].getAttribute("target")){var U=z[V].getAttribute("href");null==U&&(U=z[V].getAttribute("xlink:href"));
-null!=U&&(null!=L&&/^https?:\/\//.test(U)?z[V].setAttribute("target",L):O&&this.isCustomLink(U)&&z[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,O){for(;null!=z&&z.nodeName!=
-L;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,O){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var O=document.createRange();O.selectNode(z);L.removeAllRanges();L.addRange(O)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),O=L.createRange(),
-O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,L,O){var V=this.getCellGeometry(z);if(null!=V){V=V.clone();if(null!=V.points)for(var U=0;U<V.points.length;U++)L?V.points[U].x=O+(O-V.points[U].x):V.points[U].y=O+(O-V.points[U].y);U=function(ha){null!=ha&&(L?ha.x=O+(O-ha.x):ha.y=O+(O-ha.y))};U(V.getTerminalPoint(!0));U(V.getTerminalPoint(!1));this.model.setGeometry(z,V)}};Graph.prototype.flipChildren=function(z,L,O){this.model.beginUpdate();try{for(var V=this.model.getChildCount(z),
-U=0;U<V;U++){var ha=this.model.getChildAt(z,U);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,O);else{var ma=this.getCellGeometry(ha);null!=ma&&(ma=ma.clone(),L?ma.x=O+(O-ma.x-ma.width):ma.y=O+(O-ma.y-ma.height),this.model.setGeometry(ha,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],V=0;V<z.length;V++)if(this.model.isEdge(z[V])){var U=this.view.getState(z[V]);null!=U&&this.flipEdgePoints(z[V],
-L,(L?U.getCenterX():U.getCenterY())/this.view.scale-(L?U.origin.x:U.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[V]);null!=ha&&this.flipChildren(z[V],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);O.push(z[V])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var V=0;V<z.length;V++){var U=
-this.model.getParent(z[V]);if(this.isTable(U)){var ha=this.getCellGeometry(z[V]),ma=this.getCellGeometry(U);null!=ha&&null!=ma&&(ma=ma.clone(),ma.height-=ha.height,this.model.setGeometry(U,ma))}}var wa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=wa)for(O=[],V=0;V<wa.length;V++)this.model.contains(wa[V])&&(this.model.isVertex(wa[V])||this.model.isEdge(wa[V]))&&O.push(wa[V])}return O};Graph.prototype.insertTableColumn=function(z,
-L){var O=this.getModel();O.beginUpdate();try{var V=z,U=0;if(this.isTableCell(z)){var ha=O.getParent(z);V=O.getParent(ha);U=mxUtils.indexOf(O.getChildCells(ha,!0),z)}else this.isTableRow(z)?V=O.getParent(z):z=O.getChildCells(V,!0)[0],L||(U=O.getChildCells(z,!0).length-1);var ma=O.getChildCells(V,!0),wa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var sa=O.getChildCells(ma[z],!0)[U],ya=O.cloneCell(sa,!1),Ha=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,
-"rowspan",null),"colspan",null);if(null!=Ha){null!=Ha.alternateBounds&&(Ha.width=Ha.alternateBounds.width,Ha.height=Ha.alternateBounds.height,Ha.alternateBounds=null);wa=Ha.width;var Qa=this.getCellGeometry(ma[z]);null!=Qa&&(Ha.height=Qa.height)}O.add(ma[z],ya,U+(L?0:1))}var ua=this.getCellGeometry(V);null!=ua&&(ua=ua.clone(),ua.width+=wa,O.setGeometry(V,ua))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
-z:L.getParent(z);var V=L.getChildCells(O,!0);0==V.length?L.remove(O):(O==z&&(z=V[V.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var O=this.getModel();O.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){V=z;var U=O.getChildCells(V,!0);z=U[L?0:U.length-1]}else V=O.getParent(z);var ha=V.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(V,z,ha+(L?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var O=
-this.getModel();O.beginUpdate();try{var V=z,U=z;if(this.isTableCell(z))U=O.getParent(z),V=O.getParent(U);else if(this.isTableRow(z))V=O.getParent(z);else{var ha=O.getChildCells(V,!0);U=ha[L?0:ha.length-1]}var ma=O.getChildCells(U,!0),wa=V.getIndex(U);U=O.cloneCell(U,!1);U.value=null;var sa=this.getCellGeometry(U);if(null!=sa){for(ha=0;ha<ma.length;ha++){z=O.cloneCell(ma[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);
-null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);U.insert(z)}O.add(V,U,wa+(L?0:1));var Ha=this.getCellGeometry(V);null!=Ha&&(Ha=Ha.clone(),Ha.height+=sa.height,O.setGeometry(V,Ha))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(V=L.getParent(z));this.isTableRow(V)&&(O=L.getParent(V));var U=L.getChildCells(O,
-!0);if(0==U.length)L.remove(O);else{this.isTableRow(V)||(V=U[0]);var ha=L.getChildCells(V,!0);if(1>=ha.length)L.remove(O);else{var ma=ha.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ha,z));for(V=z=0;V<U.length;V++){var wa=L.getChildCells(U[V],!0)[ma];L.remove(wa);var sa=this.getCellGeometry(wa);null!=sa&&(z=Math.max(z,sa.width))}var ya=this.getCellGeometry(O);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(O,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();
-L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(z=V=L.getParent(z));this.isTableRow(z)&&(O=L.getParent(V));var U=L.getChildCells(O,!0);if(1>=U.length)L.remove(O);else{this.isTableRow(V)||(V=U[U.length-1]);L.remove(V);z=0;var ha=this.getCellGeometry(V);null!=ha&&(z=ha.height);var ma=this.getCellGeometry(O);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(O,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var O=z.tBodies[0],V=O.rows[0].cells,U=z=0;U<V.length;U++){var ha=
-V[U].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=O.insertRow(L);for(U=0;U<z;U++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var O=z.tHead;if(null!=O)for(var V=0;V<O.rows.length;V++){var U=document.createElement("th");O.rows[V].appendChild(U);mxUtils.br(U)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)V=z.rows[O].insertCell(L),mxUtils.br(V);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-
-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>L&&z[O].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var V;V=O.firstChild;)lastNode=z.appendChild(V);L.insertNode(z)}}else(L=document.selection)&&"Control"!=
-L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function O(U,ha){U.length>ha&&(U=U.substring(0,Math.round(ha/2))+"..."+U.substring(U.length-Math.round(ha/4)));return U}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var V=document.createElement("a");V.setAttribute("rel",this.linkRelation);V.setAttribute("href",this.getAbsoluteUrl(z));V.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
-null!=this.linkTarget&&V.setAttribute("target",this.linkTarget);mxUtils.write(V,O(L,40));this.isCustomLink(z)&&mxEvent.addListener(V,"click",mxUtils.bind(this,function(U){this.customLinkClicked(z);mxEvent.consume(U)}));return V};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
-function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var ma=this.getCellAt(ha.graphX,ha.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ha.graphX,ha.graphY)||(ha.state=this.view.getState(ma),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,O=!1,V=!1,U=this.fireMouseEvent;this.fireMouseEvent=
-function(ha,ma,wa){ha==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),O=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());U.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ha,ma){var wa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!wa&&(O&&null==ma.getCell()&&
-this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));wa=!L||wa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,sa,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,ma,wa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
-z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),O=L.getRangeAt(0),
-V="\t";if(null!=z)for(V="";0<z;)V+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(V));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);L.removeAllRanges();L.addRange(O)};mxCellEditor.prototype.alignText=function(z,L){var O=null!=L&&mxEvent.isShiftDown(L);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var V=!0;this.graph.processElements(this.textarea,function(U){O||window.getSelection().containsNode(U,!0)?(U.removeAttribute("align"),
-U.style.textAlign=null):V=!1});V&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],O=0,V=z.rangeCount;O<V;++O)L.push(z.getRangeAt(O));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var L=0,O=z.length;L<O;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(V){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
-H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);J.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var V=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=V&&V.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(U,ha){ha.originalNode=U;U=U.firstChild;
-for(var ma=ha.firstChild;null!=U&&null!=ma;)L(U,ma),U=U.nextSibling,ma=ma.nextSibling;return ha}function O(U,ha){if(null!=U)if(ha.originalNode!=U)V(U);else for(U=U.firstChild,ha=ha.firstChild;null!=U;){var ma=U.nextSibling;null==ha?V(U):(O(U,ha),ha=ha.nextSibling);U=ma}}function V(U){for(var ha=U.firstChild;null!=ha;){var ma=ha.nextSibling;V(ha);ha=ma}1==U.nodeType&&("BR"===U.nodeName||null!=U.firstChild)||3==U.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(U)).length?(3==U.nodeType&&mxUtils.setTextContent(U,
-mxUtils.getTextContent(U).replace(/\n|\r/g,"")),1==U.nodeType&&(U.removeAttribute("style"),U.removeAttribute("class"),U.removeAttribute("width"),U.removeAttribute("cellpadding"),U.removeAttribute("cellspacing"),U.removeAttribute("border"))):U.parentNode.removeChild(U)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(U){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
-function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){wa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<wa.length&&"\n"==wa.charAt(wa.length-1)&&(wa=wa.substring(0,wa.length-1));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"<br/>"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),U=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=ma.join(" ");this.textarea.style.fontWeight=U?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
-0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var wa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(wa=mxUtils.replaceTrailingNewlines(wa,"<div><br></div>"));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE;
-this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=
-wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
-60*O;var V=null!=z.text?z.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,J){J=null!=J?J:{};for(var O=0;O<z.length;O++){var U=z[O];J[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
+ea=0;ea<W;ea++)this.createCellLookup([this.model.getChildAt(U,ea)],J)}return J};Graph.prototype.createCellMapping=function(z,J,O){O=null!=O?O:{};for(var U in z){var W=J[U];null==O[W]&&(O[W]=z[U].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,J,O,U){J=null!=J?J:0;O=null!=O?O:0;var W=new mxCodec(z.ownerDocument),ea=new mxGraphModel;W.decode(z,ea);z=[];W={};var ka={},xa=ea.getChildren(this.cloneCell(ea.root,this.isCloneInvalidEdges(),W));if(null!=xa){var ta=this.createCellLookup([ea.root]);
+xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ea=0;ea<xa.length;ea++)pa=this.model.getChildren(this.moveCells([xa[ea]],J,O,!1,this.model.getRoot())[0]),null!=pa&&(z=z.concat(pa));else{var pa=ea.getChildren(xa[0]);null!=pa&&(z=this.moveCells(pa,J,O,!1,this.getDefaultParent()),ka[ea.getChildAt(ea.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,ta,ka),this.updateCustomLinks(ka,z),U)){this.isGridEnabled()&&
+(J=this.snap(J),O=this.snap(O));var ua=this.getBoundingBoxFromGeometry(z,!0);null!=ua&&this.moveCells(z,J-ua.x,O-ua.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var J={},O=this.cloneCells(z,null,J),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ea=new mxCodec,ka=new mxGraphModel,xa=ka.getChildAt(ka.getRoot(),0);for(W=0;W<O.length;W++){ka.add(xa,O[W]);var ta=this.view.getState(z[W]);if(null!=ta){var pa=this.getCellGeometry(O[W]);null!=pa&&pa.relative&&
+!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(pa.offset=null,pa.relative=!1,pa.x=ta.x/ta.view.scale-ta.view.translate.x,pa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(J,this.createCellLookup(z)),O);return ea.encode(ka)};Graph.prototype.isSwimlane=function(z,J){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,J)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
+"table"==O||"tableRow"==O};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var J=this.model.getParent(z);if(null!=J){var O=this.getCurrentCellStyle(J);if(null!=O.expand)return"0"!=O.expand}return L.apply(this,arguments)&&(null==J||!this.isTable(J))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,J,O,U,W,ea,ka,xa){null==xa&&(xa=this.model.getParent(z),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ea,ka,null,!0,!1));O=null;this.model.beginUpdate();
+try{O=P.apply(this,[z,J,O,U,W,ea,ka,xa]);this.model.setValue(O,"");var ta=this.getChildCells(O,!0);for(J=0;J<ta.length;J++){var pa=this.getCellGeometry(ta[J]);null!=pa&&pa.relative&&0<pa.x&&this.model.remove(ta[J])}var ua=this.getChildCells(z,!0);for(J=0;J<ua.length;J++)pa=this.getCellGeometry(ua[J]),null!=pa&&pa.relative&&0>=pa.x&&this.model.remove(ua[J]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Da=this.model.getTerminal(O,!1);if(null!=Da){var Fa=this.getCurrentCellStyle(Da);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(z,J,O){if(J||O)d.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ea=[],ka=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ea.push(xa),xa==U)W=ea.length-1;else if(z&&null==U&&0<ea.length||null!=W&&z&&ea.length>W||!z&&0<W)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)ka(this.model.getChildAt(xa,ta))});ka(this.model.root);0<ea.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ea.length):0,this.setSelectionCell(ea[W]))}};
+Graph.prototype.swapShapes=function(z,J,O,U,W,ea,ka){J=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),O=this.view.getState(z[0]),null!=U&&null!=O&&(null!=ea&&mxEvent.isShiftDown(ea)||"umlLifeline"==U.style.shape&&"umlLifeline"==O.style.shape)&&(U=this.getCellGeometry(W),ea=this.getCellGeometry(z[0]),null!=U&&null!=ea))){J=U.clone();U=ea.clone();U.x=J.x;U.y=J.y;J.x=ea.x;J.y=ea.y;this.model.beginUpdate();try{this.model.setGeometry(W,J),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}J=
+!0}return J};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,J,O,U,W,ea,ka){if(this.swapShapes(z,J,O,U,W,ea,ka))return z;ka=null!=ka?ka:{};if(this.isTable(W)){for(var xa=[],ta=0;ta<z.length;ta++)this.isTable(z[ta])?xa=xa.concat(this.model.getChildCells(z[ta],!0).reverse()):xa.push(z[ta]);z=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<z.length;ta++)if(null!=W&&this.isTableRow(z[ta])){var pa=this.model.getParent(z[ta]),ua=this.getCellGeometry(z[ta]);this.isTable(pa)&&xa.push(pa);
+if(null!=pa&&null!=ua&&this.isTable(pa)&&this.isTable(W)&&(U||pa!=W)){if(!U){var Da=this.getCellGeometry(pa);null!=Da&&(Da=Da.clone(),Da.height-=ua.height,this.model.setGeometry(pa,Da))}Da=this.getCellGeometry(W);null!=Da&&(Da=Da.clone(),Da.height+=ua.height,this.model.setGeometry(W,Da));var Fa=this.model.getChildCells(W,!0);if(0<Fa.length){z[ta]=U?this.cloneCell(z[ta]):z[ta];var Ma=this.model.getChildCells(z[ta],!0),Qa=this.model.getChildCells(Fa[0],!0),Ba=Qa.length-Ma.length;if(0<Ba)for(var Ka=
+0;Ka<Ba;Ka++){var Oa=this.cloneCell(Ma[Ma.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[ta],Oa))}else if(0>Ba)for(Ka=0;Ka>Ba;Ka--)this.model.remove(Ma[Ma.length+Ka-1]);Ma=this.model.getChildCells(z[ta],!0);for(Ka=0;Ka<Qa.length;Ka++){var Ya=this.getCellGeometry(Qa[Ka]),db=this.getCellGeometry(Ma[Ka]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(Ma[Ka],db))}}}}var eb=f.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!U&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&
+this.model.remove(xa[ta]);U&&this.updateCustomLinks(this.createCellMapping(ka,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,J){var O=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ea=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ea)?0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea)&&O.push(ea):
+this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ea=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea))){for(var ka=this.model.getChildCells(ea,!0),xa=0,ta=0;ta<ka.length;ta++)0<=mxUtils.indexOf(z,ka[ta])&&xa++;xa==ka.length&&O.push(ea)}O.push(z[U])}O=g.apply(this,[O,J])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,J,O){O=null!=O?O:new Graph;for(var U=0;U<J.length;U++)null!=J[U]&&O.updateCustomLinksForCell(z,J[U],O)};Graph.prototype.updateCustomLinksForCell=
+function(z,J){this.doUpdateCustomLinksForCell(z,J);for(var O=this.model.getChildCount(J),U=0;U<O;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(J,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,J){};Graph.prototype.getAllConnectionConstraints=function(z,J){if(null!=z){J=mxUtils.getValue(z.style,"points",null);if(null!=J){z=[];try{var O=JSON.parse(J);for(J=0;J<O.length;J++){var U=O[J];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
+U[3]:0,4<U.length?U[4]:0))}}catch(ea){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;J=z.shape.bounds;var W=z.shape.scale;O=J.width/W;J=J.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=O,O=J,J=U;J=z.shape.getConstraints(z.style,O,J);if(null!=J)return J;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
+z){var J=this.getCurrentCellStyle(z);J=mxUtils.getValue(J,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,J,[z])}};Graph.prototype.isValidRoot=function(z){for(var J=this.model.getChildCount(z),O=0,U=0;U<J;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
+function(z,J,O){for(var U=this.getCurrentCellStyle(z),W=!0,ea=!0,ka=0;ka<J.length&&ea;ka++)W=W&&this.isTable(J[ka]),ea=ea&&this.isTableRow(J[ka]);return(1==J.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ea||W))&&!this.isCellLocked(z)};
+Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var J=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(J&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(J=!1))}return J};Graph.prototype.getPreferredSizeForCell=function(z){var J=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=J&&(J.width+=10,J.height+=4,this.gridEnabled&&(J.width=this.snap(J.width),J.height=this.snap(J.height)));return J};Graph.prototype.turnShapes=function(z,J){var O=this.getModel(),U=[];O.beginUpdate();try{for(var W=0;W<z.length;W++){var ea=z[W];if(O.isEdge(ea)){var ka=O.getTerminal(ea,!0),xa=O.getTerminal(ea,!1);O.setTerminal(ea,xa,!0);O.setTerminal(ea,ka,!1);var ta=O.getGeometry(ea);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var pa=ta.getTerminalPoint(!0),ua=ta.getTerminalPoint(!1);
+ta.setTerminalPoint(pa,!1);ta.setTerminalPoint(ua,!0);O.setGeometry(ea,ta);var Da=this.view.getState(ea),Fa=this.view.getState(ka),Ma=this.view.getState(xa);if(null!=Da){var Qa=null!=Fa?this.getConnectionConstraint(Da,Fa,!0):null,Ba=null!=Ma?this.getConnectionConstraint(Da,Ma,!1):null;this.setConnectionConstraint(ea,ka,!0,Ba);this.setConnectionConstraint(ea,xa,!1,Qa);var Ka=mxUtils.getValue(Da.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Da.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ea]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[ea])}U.push(ea)}}else if(O.isVertex(ea)&&(ta=this.getCellGeometry(ea),null!=ta)){if(!(this.isTable(ea)||this.isTableRow(ea)||this.isTableCell(ea)||this.isSwimlane(ea))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var Oa=ta.width;ta.width=ta.height;ta.height=Oa;O.setGeometry(ea,ta)}var Ya=this.view.getState(ea);if(null!=Ya){var db=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(J?-1:1),db.length)],[ea])}U.push(ea)}}}finally{O.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
+z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var J=z.cell;this.isTableCell(J)&&(J=this.model.getParent(J));this.isTableRow(J)&&(J=this.model.getParent(J));var O=this.view.getState(J);null!=O&&null!=O.shape&&(this.view.invalidate(J),O.shape.bounds=null)}x.apply(this,arguments);
+z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var J=0;J<z.length;J++){var O=this.view.getState(z[J]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[J]):this.isReplacePlaceholders(z[J])&&this.view.invalidate(z[J],!1,!1)}};
+Graph.prototype.replaceElement=function(z,J){J=z.ownerDocument.createElement(null!=J?J:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)J.setAttribute(attr.nodeName,attr.nodeValue);J.innerHTML=z.innerHTML;z.parentNode.replaceChild(J,z)};Graph.prototype.processElements=function(z,J){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)J(z[O])}};Graph.prototype.updateLabelElements=function(z,J,O){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
+W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ea=this.convertValueToString(z[W]);if(null!=ea&&0<ea.length){U.innerHTML=ea;for(var ka=U.getElementsByTagName(null!=O?O:"*"),xa=0;xa<ka.length;xa++)J(ka[xa]);U.innerHTML!=ea&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,J,O){J=Graph.zapGremlins(J);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
+W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,J);break}W=this.model.getParent(W)}var ea=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ea.hasAttribute("label_"+Graph.diagramLanguage)?ea.setAttribute("label_"+Graph.diagramLanguage,J):ea.setAttribute("label",J);J=ea}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
+z){for(var J=new mxDictionary,O=0;O<z.length;O++)J.put(z[O],!0);var U=[];for(O=0;O<z.length;O++){var W=this.model.getParent(z[O]);null==W||J.get(W)||(J.put(W,!0),U.push(W))}for(O=0;O<U.length;O++)if(W=this.view.getState(U[O]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ea=!0,ka=0;ka<this.model.getChildCount(W.cell)&&ea;ka++)J.get(this.model.getChildAt(W.cell,ka))||(ea=!1);ea&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var J=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&J.push(z[O]);z=J;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,J){this.setAttributeForCell(z,"link",J)};Graph.prototype.setTooltipForCell=function(z,J){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,J)};Graph.prototype.getAttributeForCell=function(z,J,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(J):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,J,O){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=O?U.setAttribute(J,O):U.removeAttribute(J);
+this.model.setValue(z,U)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,J,O,U){this.getModel();if(mxEvent.isAltDown(J))return null;for(var W=0;W<z.length;W++){var ea=this.model.getParent(z[W]);if(this.model.isEdge(ea)&&0>mxUtils.indexOf(z,ea))return null}ea=y.apply(this,arguments);var ka=!0;for(W=0;W<z.length&&ka;W++)ka=ka&&this.isTableRow(z[W]);ka&&(this.isTableCell(ea)&&(ea=this.model.getParent(ea)),this.isTableRow(ea)&&(ea=this.model.getParent(ea)),this.isTable(ea)||
+(ea=null));return ea};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,J){this.isEnabled()&&(J=this.insertTextForEvent(z,J),mxGraph.prototype.dblClick.call(this,z,J))};Graph.prototype.insertTextForEvent=function(z,J){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(J)){var U=this.model.isEdge(J)?this.view.getState(J):
+null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(O.x,O.y))),J=this.addText(O.x,O.y,U))}return J};
+Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),J=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();J=Math.max(J,U.x*W.width);O=Math.max(O,U.y*W.height)}return new mxPoint(this.snap(J+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,J=this.getGraphBounds(),O=this.getInsertPoint(),U=this.snap(Math.round(Math.max(O.x,
+J.x/z.scale-z.translate.x+(0==J.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(J.y+J.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,J,O){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(O,z,J);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(O,U.geometry);var ea=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ea),Math.round((J-W.y)/ea))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
+W.x-(null!=O?O.origin.x:0),U.geometry.y=Math.round(J/this.view.scale)-W.y-(null!=O?O.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,J,O){var U=mxUtils.bind(this,function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var pa=0;pa<ta.length;pa++){var ua=
+this.getAbsoluteUrl(ta[pa].getAttribute("href"));null!=ua&&(ta[pa].setAttribute("rel",this.linkRelation),ta[pa].setAttribute("href",ua),null!=J&&mxEvent.addGestureListeners(ta[pa],null,null,J))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ea=this.getTolerance(),ka=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ka,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var pa=
+ta.sourceState;if(null==pa||null==ka.getLinkForCell(pa.cell))ta=ka.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(ua,Da,Fa){return null==ka.getLinkForCell(ua.cell)}),pa=null==pa||ka.model.isAncestor(ta,pa.cell)?ka.view.getState(ta):null;pa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=pa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,pa){this.startX=pa.getGraphX();this.startY=pa.getGraphY();this.scrollLeft=ka.container.scrollLeft;
+this.scrollTop=ka.container.scrollTop;null==this.currentLink&&"auto"==ka.container.style.overflow&&(ka.container.style.cursor="move");this.updateCurrentState(pa)},mouseMove:function(ta,pa){if(ka.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-pa.getGraphX()),pa=Math.abs(this.startY-pa.getGraphY()),(ta>ea||pa>ea)&&this.clear());else{for(ta=pa.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=ka.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&ka.tooltipHandler.reset(pa,!0,this.currentState),(null==this.currentState||pa.getState()!=this.currentState&&null!=pa.sourceState||!ka.intersects(this.currentState,pa.getGraphX(),pa.getGraphY()))&&this.updateCurrentState(pa))}},mouseUp:function(ta,pa){var ua=pa.getSource();for(ta=pa.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&(null==pa.sourceState||
+!pa.isSource(pa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(ua=ka.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==J||J(ta,this.currentLink),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":ua?ka.linkTarget:"_top",ka.openLink(this.currentLink,ta),pa.consume())):null!=O&&!pa.isConsumed()&&
+Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&Math.abs(this.startX-pa.getGraphX())<ea&&Math.abs(this.startY-pa.getGraphY())<ea&&O(pa.getEvent()));this.clear()},activate:function(ta){this.currentLink=ka.getAbsoluteUrl(ka.getLinkForCell(ta.cell));null!=this.currentLink&&(this.currentTarget=ka.getLinkTargetForCell(ta.cell),ka.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=ka.container&&
+(ka.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ka.tooltipHandler&&ka.tooltipHandler.hide()}};ka.click=function(ta){};ka.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=function(z,J){z=null!=z?z:this.getSelectionCells();J=null!=J?J:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
+var U=this.getModel(),W=this.gridSize,ea=[];U.beginUpdate();try{var ka={},xa=this.createCellLookup(z),ta=this.cloneCells(z,!1,ka,!0);for(O=0;O<z.length;O++){var pa=U.getParent(z[O]);if(null!=pa){var ua=this.moveCells([ta[O]],W,W,!1)[0];ea.push(ua);if(J)U.add(pa,ta[O]);else{var Da=pa.getIndex(z[O]);U.add(pa,ta[O],Da+1)}if(this.isTable(pa)){var Fa=this.getCellGeometry(ta[O]),Ma=this.getCellGeometry(pa);null!=Fa&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,U.setGeometry(pa,Ma))}}else ea.push(ta[O])}this.updateCustomLinks(this.createCellMapping(ka,
+xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{U.endUpdate()}return ea};Graph.prototype.insertImage=function(z,J,O){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ea=0;ea<U.length;ea++)W.push(U[ea]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ea=z.length-1;0<=ea;ea--)if(0==ea||z[ea]!=W[ea-1]){z[ea].setAttribute("width",
+J);z[ea].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var J=this.cellEditor.textarea.getElementsByTagName("a"),O=[],U=0;U<J.length;U++)O.push(J[U]);document.execCommand("createlink",!1,mxUtils.trim(z));J=this.cellEditor.textarea.getElementsByTagName("a");if(J.length==O.length+1)for(U=J.length-1;0<=U;U--)if(J[U]!=O[U-1]){for(J=J[U].getElementsByTagName("a");0<J.length;){for(O=
+J[0].parentNode;null!=J[0].firstChild;)O.insertBefore(J[0].firstChild,J[0]);O.removeChild(J[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var J=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(J||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,J){null==
+J&&(J=this.getSelectionCells());if(null!=J&&1<J.length){for(var O=[],U=null,W=null,ea=0;ea<J.length;ea++)if(this.getModel().isVertex(J[ea])){var ka=this.view.getState(J[ea]);if(null!=ka){var xa=z?ka.getCenterX():ka.getCenterY();U=null!=U?Math.max(U,xa):xa;W=null!=W?Math.min(W,xa):xa;O.push(ka)}}if(2<O.length){O.sort(function(Da,Fa){return z?Da.x-Fa.x:Da.y-Fa.y});ka=this.view.translate;xa=this.view.scale;W=W/xa-(z?ka.x:ka.y);U=U/xa-(z?ka.x:ka.y);this.getModel().beginUpdate();try{var ta=(U-W)/(O.length-
+1);U=W;for(ea=1;ea<O.length-1;ea++){var pa=this.view.getState(this.model.getParent(O[ea].cell)),ua=this.getCellGeometry(O[ea].cell);U+=ta;null!=ua&&null!=pa&&(ua=ua.clone(),z?ua.x=Math.round(U-ua.width/2)-pa.origin.x:ua.y=Math.round(U-ua.height/2)-pa.origin.y,this.getModel().setGeometry(O[ea].cell,ua))}}finally{this.getModel().endUpdate()}}}return J};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
+function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(J,O){return this.getLinkForCell(J.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var J=null;null!=z&&0<z.length&&(z=JSON.parse(z),J=new mxImage(z.src,z.width,z.height));return J};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,J,O,U,W,ea,ka,xa,ta,pa,ua,Da,Fa,Ma){var Qa=null;if(null!=Ma)for(Qa=new mxDictionary,ua=0;ua<Ma.length;ua++)Qa.put(Ma[ua],
+!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{J=null!=J?J:1;O=null!=O?O:0;W=null!=W?W:!0;ea=null!=ea?ea:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!1;var Ba="page"==Fa?this.view.getBackgroundPageBounds():ea&&null==Qa||U||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));U=J/Ka;Fa=W?-.5:0;var Oa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ba.width*U)+2*O)+(pa&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*U)+2*O)+(pa&&0==O?5:0),z),Ya=Oa.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Oa.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset=
+W?-.5:0;eb.textOffset=W?-.5:0;eb.imageOffset=W?-.5:0;eb.translate(Math.floor(O/J-Ba.x/Ka),Math.floor(O/J-Ba.y/Ka));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
+if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ka/J;var pb=this.view.translate;Fa=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,Fa)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(U);eb.textEnabled=
+ka;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Qa?Qa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ea&&null==Qa||qb)&&null!=nb;)qb=null!=
+Qa?Qa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ea&&null==Qa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,ta,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,J){if("0"!=urlParams["svg-warning"]&&0<J.getElementsByTagName("foreignObject").length){var O=
+z.createElement("switch"),U=z.createElement("g");U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||J.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,
+"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(U);W.appendChild(z);O.appendChild(W);J.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,J,O){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));
+null!=W&&(null!=J&&/^https?:\/\//.test(W)?z[U].setAttribute("target",J):O&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var J=window.getSelection();J.getRangeAt&&J.rangeCount&&(z=J.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,J,O){for(;null!=z&&z.nodeName!=
+J;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,J,O){for(;null!=z&&!(0<=mxUtils.indexOf(J,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var J=null;if(window.getSelection){if(J=window.getSelection(),J.getRangeAt&&J.rangeCount){var O=document.createRange();O.selectNode(z);J.removeAllRanges();J.addRange(O)}}else(J=document.selection)&&"Control"!=J.type&&(z=J.createRange(),z.collapse(!0),O=J.createRange(),
+O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,J,O){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)J?U.points[W].x=O+(O-U.points[W].x):U.points[W].y=O+(O-U.points[W].y);W=function(ea){null!=ea&&(J?ea.x=O+(O-ea.x):ea.y=O+(O-ea.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,J,O){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),
+W=0;W<U;W++){var ea=this.model.getChildAt(z,W);if(this.model.isEdge(ea))this.flipEdgePoints(ea,J,O);else{var ka=this.getCellGeometry(ea);null!=ka&&(ka=ka.clone(),J?ka.x=O+(O-ka.x-ka.width):ka.y=O+(O-ka.y-ka.height),this.model.setGeometry(ea,ka))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,J){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],
+J,(J?W.getCenterX():W.getCenterY())/this.view.scale-(J?W.origin.x:W.origin.y)-(J?this.view.translate.x:this.view.translate.y))}else{var ea=this.getCellGeometry(z[U]);null!=ea&&this.flipChildren(z[U],J,J?ea.getCenterX()-ea.x:ea.getCenterY()-ea.y);O.push(z[U])}this.toggleCellStyles(J?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,J){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=
+this.model.getParent(z[U]);if(this.isTable(W)){var ea=this.getCellGeometry(z[U]),ka=this.getCellGeometry(W);null!=ea&&null!=ka&&(ka=ka.clone(),ka.height-=ea.height,this.model.setGeometry(W,ka))}}var xa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,J)}finally{this.model.endUpdate()}if(null!=xa)for(O=[],U=0;U<xa.length;U++)this.model.contains(xa[U])&&(this.model.isVertex(xa[U])||this.model.isEdge(xa[U]))&&O.push(xa[U])}return O};Graph.prototype.insertTableColumn=function(z,
+J){var O=this.getModel();O.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ea=O.getParent(z);U=O.getParent(ea);W=mxUtils.indexOf(O.getChildCells(ea,!0),z)}else this.isTableRow(z)?U=O.getParent(z):z=O.getChildCells(U,!0)[0],J||(W=O.getChildCells(z,!0).length-1);var ka=O.getChildCells(U,!0),xa=Graph.minTableColumnWidth;for(z=0;z<ka.length;z++){var ta=O.getChildCells(ka[z],!0)[W],pa=O.cloneCell(ta,!1),ua=this.getCellGeometry(pa);pa.value=null;pa.style=mxUtils.setStyle(mxUtils.setStyle(pa.style,
+"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);xa=ua.width;var Da=this.getCellGeometry(ka[z]);null!=Da&&(ua.height=Da.height)}O.add(ka[z],pa,W+(J?0:1))}var Fa=this.getCellGeometry(U);null!=Fa&&(Fa=Fa.clone(),Fa.width+=xa,O.setGeometry(U,Fa))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var J=this.getModel();J.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
+z:J.getParent(z);var U=J.getChildCells(O,!0);0==U.length?J.remove(O):(O==z&&(z=U[U.length-1]),J.remove(z))}finally{J.endUpdate()}};Graph.prototype.insertLane=function(z,J){var O=this.getModel();O.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=O.getChildCells(U,!0);z=W[J?0:W.length-1]}else U=O.getParent(z);var ea=U.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(U,z,ea+(J?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,J){var O=
+this.getModel();O.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=O.getParent(z),U=O.getParent(W);else if(this.isTableRow(z))U=O.getParent(z);else{var ea=O.getChildCells(U,!0);W=ea[J?0:ea.length-1]}var ka=O.getChildCells(W,!0),xa=U.getIndex(W);W=O.cloneCell(W,!1);W.value=null;var ta=this.getCellGeometry(W);if(null!=ta){for(ea=0;ea<ka.length;ea++){z=O.cloneCell(ka[ea],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var pa=this.getCellGeometry(z);
+null!=pa&&(null!=pa.alternateBounds&&(pa.width=pa.alternateBounds.width,pa.height=pa.alternateBounds.height,pa.alternateBounds=null),pa.height=ta.height);W.insert(z)}O.add(U,W,xa+(J?0:1));var ua=this.getCellGeometry(U);null!=ua&&(ua=ua.clone(),ua.height+=ta.height,O.setGeometry(U,ua))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var J=this.getModel();J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(U=J.getParent(z));this.isTableRow(U)&&(O=J.getParent(U));var W=J.getChildCells(O,
+!0);if(0==W.length)J.remove(O);else{this.isTableRow(U)||(U=W[0]);var ea=J.getChildCells(U,!0);if(1>=ea.length)J.remove(O);else{var ka=ea.length-1;this.isTableCell(z)&&(ka=mxUtils.indexOf(ea,z));for(U=z=0;U<W.length;U++){var xa=J.getChildCells(W[U],!0)[ka];J.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(z=Math.max(z,ta.width))}var pa=this.getCellGeometry(O);null!=pa&&(pa=pa.clone(),pa.width-=z,J.setGeometry(O,pa))}}}finally{J.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var J=this.getModel();
+J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(z=U=J.getParent(z));this.isTableRow(z)&&(O=J.getParent(U));var W=J.getChildCells(O,!0);if(1>=W.length)J.remove(O);else{this.isTableRow(U)||(U=W[W.length-1]);J.remove(U);z=0;var ea=this.getCellGeometry(U);null!=ea&&(z=ea.height);var ka=this.getCellGeometry(O);null!=ka&&(ka=ka.clone(),ka.height-=z,J.setGeometry(O,ka))}}finally{J.endUpdate()}};Graph.prototype.insertRow=function(z,J){for(var O=z.tBodies[0],U=O.rows[0].cells,W=z=0;W<U.length;W++){var ea=
+U[W].getAttribute("colspan");z+=null!=ea?parseInt(ea):1}J=O.insertRow(J);for(W=0;W<z;W++)mxUtils.br(J.insertCell(-1));return J.cells[0]};Graph.prototype.deleteRow=function(z,J){z.tBodies[0].deleteRow(J)};Graph.prototype.insertColumn=function(z,J){var O=z.tHead;if(null!=O)for(var U=0;U<O.rows.length;U++){var W=document.createElement("th");O.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)U=z.rows[O].insertCell(J),mxUtils.br(U);return z.rows[0].cells[0<=J?J:z.rows[0].cells.length-
+1]};Graph.prototype.deleteColumn=function(z,J){if(0<=J){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>J&&z[O].deleteCell(J)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount){J=J.getRangeAt(0);J.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var U;U=O.firstChild;)lastNode=z.appendChild(U);J.insertNode(z)}}else(J=document.selection)&&"Control"!=
+J.type&&J.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,J){function O(W,ea){W.length>ea&&(W=W.substring(0,Math.round(ea/2))+"..."+W.substring(W.length-Math.round(ea/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==J||0==J.length)J=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
+null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,O(J,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ea,ka){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
+function(ea){ea=z.apply(this,arguments);if(mxEvent.isTouchEvent(ea.getEvent())&&null==ea.getState()){var ka=this.getCellAt(ea.graphX,ea.graphY);null!=ka&&this.isSwimlane(ka)&&this.hitsSwimlaneContent(ka,ea.graphX,ea.graphY)||(ea.state=this.view.getState(ka),null!=ea.state&&null!=ea.state.shape&&(this.container.style.cursor=ea.state.shape.node.style.cursor))}null==ea.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ea};var J=!1,O=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=
+function(ea,ka,xa){ea==mxEvent.MOUSE_DOWN&&(ka=this.updateMouseEvent(ka),J=this.isCellSelected(ka.getCell()),O=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ea,ka){var xa=mxEvent.isMouseEvent(ka.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ka.getState()||!ka.isSource(ka.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!xa&&(O&&null==ka.getCell()&&
+this.isSelectionEmpty()||J&&this.isCellSelected(ka.getCell())));xa=!J||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var pa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ka.getX()+pa.x+1,ka.getY()+pa.y+1,ta,ka.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ea,ka,xa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
+z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var J=this.textarea.ownerDocument.defaultView.getSelection(),O=J.getRangeAt(0),
+U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);J.removeAllRanges();J.addRange(O)};mxCellEditor.prototype.alignText=function(z,J){var O=null!=J&&mxEvent.isShiftDown(J);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){O||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),
+W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var J=[],O=0,U=z.rangeCount;O<U;++O)J.push(z.getRangeAt(O));return J}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
+window.getSelection();sel.removeAllRanges();for(var J=0,O=z.length;J<O;++J)sel.addRange(z[J])}else document.selection&&z.select&&z.select()}catch(U){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));t.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,J){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
+G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,J){z=this.graph.getStartEditingCell(z,J);D.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var I=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function J(W,ea){ea.originalNode=W;W=W.firstChild;
+for(var ka=ea.firstChild;null!=W&&null!=ka;)J(W,ka),W=W.nextSibling,ka=ka.nextSibling;return ea}function O(W,ea){if(null!=W)if(ea.originalNode!=W)U(W);else for(W=W.firstChild,ea=ea.firstChild;null!=W;){var ka=W.nextSibling;null==ea?U(W):(O(W,ea),ea=ea.nextSibling);W=ka}}function U(W){for(var ea=W.firstChild;null!=ea;){var ka=ea.nextSibling;U(ea);ea=ka}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,
+mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}I.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ea=J(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
+function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var J=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);J=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ea=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ka=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ka.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ka.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration=ka.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=J;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
+0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;
+this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=
+xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,J){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
+60*O;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br",
-"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var W=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();W.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
-this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
-null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=
-function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){Z.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var V=this.graph.model.getParent(z),U=null!=V?this.graph.getCellGeometry(V):null;if(null!=U&&(O=this.graph.getCellStyle(V),"stackLayout"==O.childLayout)){var ha=parseFloat(mxUtils.getValue(O,
-"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ma=this.graph.getActualStartSize(V);U=U.clone();O?U.height=L.height+ma.y+ma.height+2*ha:U.width=L.width+ma.x+ma.width+2*ha;this.graph.model.setGeometry(V,U)}}};var N=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(wa){O.get(wa)||(O.put(wa,!0),U.push(wa))}for(var L=N.apply(this,arguments),O=new mxDictionary,V=
-this.graph.model,U=[],ha=0;ha<L.length;ha++){var ma=L[ha];this.graph.isTableCell(ma)?z(V.getParent(V.getParent(ma))):this.graph.isTableRow(ma)&&z(V.getParent(ma));z(ma)}return U};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=qa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=
-oa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var S=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return S.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
-this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=X.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var L=function(Fa,Ba,Ea){for(var Oa=[],Pa=0;Pa<Fa.length;Pa++){var bb=Fa[Pa];Oa.push(null==bb?null:new mxPoint((sa+bb.x+Ba)*ha,(ya+bb.y+Ea)*ha))}return Oa},O=this,V=this.graph,U=V.model,ha=V.view.scale,ma=this.state,wa=this.selectionBorder,sa=this.state.origin.x+V.view.translate.x,ya=this.state.origin.y+V.view.translate.y;null==z&&(z=[]);var Ha=V.view.getCellStates(U.getChildCells(this.state.cell,!0));if(0<Ha.length){var Qa=U.getChildCells(Ha[0].cell,!0),ua=
-V.getTableLines(this.state.cell,!1,!0),za=V.getTableLines(this.state.cell,!0,!1);for(U=0;U<Ha.length;U++)mxUtils.bind(this,function(Fa){var Ba=Ha[Fa],Ea=Fa<Ha.length-1?Ha[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea.cell):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=za[Fa]?new aa(za[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ea);Ba.tableHandle=!0;var Pa=
-0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(za[Fa],0,Pa),this.shape.updateBoundsFromLine();else{var eb=V.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Pa*ha;this.shape.bounds.x=ma.x+(Fa==Ha.length-1?0:eb.x*ha);this.shape.bounds.width=ma.width-(Fa==Ha.length-
-1?0:eb.width+eb.x+ha)}this.shape.redraw()}};var bb=!1;Ba.setPosition=function(eb,db,ub){Pa=Math.max(Graph.minTableRowHeight-eb.height,db.y-eb.y-eb.height);bb=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&bb&&(Pa=Math.min(Pa,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Pa)V.setTableRowHeight(this.state.cell,Pa,!bb);else if(!O.blockDelayedSelection){var db=V.getCellAt(eb.getGraphX(),eb.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(db,eb)}Pa=0};Ba.reset=function(){Pa=0};
-z.push(Ba)})(U);for(U=0;U<Qa.length;U++)mxUtils.bind(this,function(Fa){var Ba=V.view.getState(Qa[Fa]),Ea=V.getCellGeometry(Qa[Fa]),Oa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ba&&(Ba=new mxCellState(V.view,Qa[Fa],V.getCellStyle(Qa[Fa])),Ba.x=ma.x+Ea.x*ha,Ba.y=ma.y+Ea.y*ha,Ba.width=Oa.width*ha,Ba.height=Oa.height*ha,Ba.updateCachedBounds());Ea=Fa<Qa.length-1?Qa[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea):null;var Pa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=ua[Fa]?
-new aa(ua[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ea);Ba.tableHandle=!0;var bb=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(ua[Fa],bb,0),this.shape.updateBoundsFromLine();else{var db=V.getActualStartSize(ma.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+bb)*ha;this.shape.bounds.y=ma.y+(Fa==Qa.length-1?0:db.y*ha);this.shape.bounds.height=ma.height-(Fa==Qa.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(db,ub,fb){bb=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-db.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Pa||eb||(bb=Math.min(bb,Pa.width-Graph.minTableColumnWidth))};Ba.execute=function(db){if(0!=bb)V.setTableColumnWidth(this.state.cell,
-bb,eb);else if(!O.blockDelayedSelection){var ub=V.getCellAt(db.getGraphX(),db.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(ub,db)}bb=0};Ba.positionChanged=function(){};Ba.reset=function(){bb=0};z.push(Ba)})(U)}}return null!=z?z.reverse():null};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ja.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";
-if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var V=mxUtils.createImage(Editor.rowMoveImage);
-V.style.position="absolute";V.style.cursor="pointer";V.style.width="7px";V.style.height="4px";V.style.padding="4px 2px 4px 2px";V.rowState=O;mxEvent.addGestureListeners(V,mxUtils.bind(this,function(U){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(U)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,U);mxEvent.isPopupTrigger(U)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(U),mxEvent.getClientY(U),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(U),this.graph.isMouseDown=!0);mxEvent.consume(U)}),null,mxUtils.bind(this,function(U){mxEvent.isPopupTrigger(U)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(U),mxEvent.getClientY(U),O.cell,U),mxEvent.consume(U))}));this.moveHandles.push(V);this.graph.container.appendChild(V)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
-0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ca=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var U=this.customHandles[V].shape.bounds,ha=U.getCenterX(),ma=U.getCenterY();if(Math.abs(this.state.x-ha)<U.width/2||Math.abs(this.state.y-ma)<U.height/2||Math.abs(this.state.x+this.state.width-ha)<U.width/2||Math.abs(this.state.y+this.state.height-ma)<U.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=
-2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ca.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,V=this.graph.view.scale,U=this.roundLength(L.x/V-O.x);O=this.roundLength(L.y/V-O.y);V=this.graph.view.unit;this.hint.innerHTML=e(U,V)+", "+e(O,V);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(U=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*U.x)+"%, "+Math.round(100*U.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,J){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,J);"1"==mxUtils.getValue(z.style,"nl2Br",
+"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var J=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return J="1"==mxUtils.getValue(z.style,"nl2Br","1")?J.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):J.replace(/\r\n/g,"").replace(/\n/g,"")};var S=
+mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,J){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==J&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
+this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
+null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getBorderColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getMinimumSize=
+function(z){var J=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*J+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,J){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(J.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var J=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-J.x);J=this.roundLength((this.bounds.y+this.currentDy)/O-J.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(J,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var M=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,J){M.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,
+"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ka=this.graph.getActualStartSize(U);W=W.clone();O?W.height=J.height+ka.y+ka.height+2*ea:W.width=J.width+ka.x+ka.width+2*ea;this.graph.model.setGeometry(U,W)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(xa){O.get(xa)||(O.put(xa,!0),W.push(xa))}for(var J=fa.apply(this,arguments),O=new mxDictionary,
+U=this.graph.model,W=[],ea=0;ea<J.length;ea++){var ka=J[ea];this.graph.isTableCell(ka)?z(U.getParent(U.getParent(ka))):this.graph.isTableRow(ka)&&z(U.getParent(ka));z(ka)}return W};var la=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var J=la.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};var ra=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var J=
+ra.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,J){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(J.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
+function(z,J){return mxEvent.isControlDown(J.getEvent())||mxEvent.isMetaDown(J.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.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 oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var na=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||na.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,V=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=V.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var J=function(Qa,Ba,Ka){for(var Oa=[],Ya=0;Ya<Qa.length;Ya++){var db=Qa[Ya];Oa.push(null==db?null:new mxPoint((ta+db.x+Ba)*ea,(pa+db.y+Ka)*ea))}return Oa},O=this,U=this.graph,W=U.model,ea=U.view.scale,ka=this.state,xa=this.selectionBorder,ta=this.state.origin.x+U.view.translate.x,pa=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var ua=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<ua.length){var Da=W.getChildCells(ua[0].cell,!0),Fa=
+U.getTableLines(this.state.cell,!1,!0),Ma=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<ua.length;W++)mxUtils.bind(this,function(Qa){var Ba=ua[Qa],Ka=Qa<ua.length-1?ua[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka.cell):null;var Oa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new aa(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ka);Ba.tableHandle=!0;var Ya=
+0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Ma[Qa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=U.getActualStartSize(ka.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*ea;this.shape.bounds.x=ka.x+(Qa==ua.length-1?0:eb.x*ea);this.shape.bounds.width=ka.width-(Qa==ua.length-
+1?0:eb.width+eb.x+ea)}this.shape.redraw()}};var db=!1;Ba.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&db&&(Ya=Math.min(Ya,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Ya)U.setTableRowHeight(this.state.cell,Ya,!db);else if(!O.blockDelayedSelection){var cb=U.getCellAt(eb.getGraphX(),eb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ba.reset=function(){Ya=0};
+z.push(Ba)})(W);for(W=0;W<Da.length;W++)mxUtils.bind(this,function(Qa){var Ba=U.view.getState(Da[Qa]),Ka=U.getCellGeometry(Da[Qa]),Oa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ba&&(Ba=new mxCellState(U.view,Da[Qa],U.getCellStyle(Da[Qa])),Ba.x=ka.x+Ka.x*ea,Ba.y=ka.y+Ka.y*ea,Ba.width=Oa.width*ea,Ba.height=Oa.height*ea,Ba.updateCachedBounds());Ka=Qa<Da.length-1?Da[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka):null;var Ya=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Fa[Qa]?
+new aa(Fa[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ka);Ba.tableHandle=!0;var db=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Fa[Qa],db,0),this.shape.updateBoundsFromLine();else{var cb=U.getActualStartSize(ka.cell,
+!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+db)*ea;this.shape.bounds.y=ka.y+(Qa==Da.length-1?0:cb.y*ea);this.shape.bounds.height=ka.height-(Qa==Da.length-1?0:(cb.height+cb.y)*ea)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-cb.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ba.execute=function(cb){if(0!=db)U.setTableColumnWidth(this.state.cell,
+db,eb);else if(!O.blockDelayedSelection){var ub=U.getCellAt(cb.getGraphX(),cb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(ub,cb)}db=0};Ba.positionChanged=function(){};Ba.reset=function(){db=0};z.push(Ba)})(W)}}return null!=z?z.reverse():null};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ha.apply(this,arguments);if(null!=this.moveHandles)for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].style.visibility=z?"":"hidden";
+if(null!=this.cornerHandles)for(J=0;J<this.cornerHandles.length;J++)this.cornerHandles[J].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].parentNode.removeChild(this.moveHandles[J]);this.moveHandles=null}this.moveHandles=[];for(J=0;J<z.getChildCount(this.state.cell);J++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
+U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),O.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,J)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
+0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),J=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=this.customHandles[U].shape.bounds,ea=W.getCenterX(),ka=W.getCenterY();if(Math.abs(this.state.x-ea)<W.width/2||Math.abs(this.state.y-ka)<W.height/2||Math.abs(this.state.x+this.state.width-ea)<W.width/2||Math.abs(this.state.y+this.state.height-ka)<W.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(J/=
+2,this.graph.isTable(this.state.cell)&&(J+=7),z.x=this.sizers[0].bounds.width+J,z.y=this.sizers[0].bounds.height+J):z=X.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var J=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
+z),J)+" x "+e(this.roundLength(this.bounds.height/z),J)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.display="")};var ia=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,J){ia.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,J){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
+"")};mxEdgeHandler.prototype.updateHint=function(z,J){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(J.x/U-O.x);O=this.roundLength(J.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,
+this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),J.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2652,318 +2653,318 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,L){E.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,V=null,U=null,ha=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,U=this.first.y,z=(this.currentX-V)/this.graph.view.scale,ha=(this.currentY-U)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(O){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(V,U,this.graph.getDefaultParent(),
-!0,!0);for(O=0;O<ma.length;O++)if(this.graph.isCellMovable(ma[O])){var wa=this.graph.view.getState(ma[O]),sa=this.graph.getCellGeometry(ma[O]);null!=wa&&null!=sa&&(sa=sa.clone(),sa.translate(z,ha),this.graph.model.setGeometry(ma[O],sa))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=L.getX()+O.x;O=L.getY()+O.y;var V=this.first.x-z,U=this.first.y-O,ha=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ha||Math.abs(U)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(L)?(z=this.x+this.width,O=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(J)||mxEvent.isPopupTrigger(J)&&(null==z.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(z,J){E.apply(this,arguments);mxEvent.isTouchEvent(J.getEvent())&&this.graph.isCellSelected(J.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return mxEvent.isLeftMouseButton(J)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(J)&&!mxEvent.isShiftDown(J))||this.usePopupTrigger&&mxEvent.isPopupTrigger(J)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,J){if(this.cancelled)this.cancelled=!1,J.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ea=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ea=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(z=this.graph.snap(z),ea=this.graph.snap(ea),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ea)<this.graph.tolerance&&(ea=0))));this.reset();if(O){if(this.isSpaceEvent(J)){this.graph.model.beginUpdate();try{var ka=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
+!0,!0);for(O=0;O<ka.length;O++)if(this.graph.isCellMovable(ka[O])){var xa=this.graph.view.getState(ka[O]),ta=this.graph.getCellGeometry(ka[O]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(z,ea),this.graph.model.setGeometry(ka[O],ta))}}finally{this.graph.model.endUpdate()}}else ka=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ka,J.getEvent());J.consume()}}};mxRubberband.prototype.mouseMove=function(z,J){if(!J.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=J.getX()+O.x;O=J.getY()+O.y;var U=this.first.x-z,W=this.first.y-O,ea=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ea||Math.abs(W)>ea)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(J)?(z=this.x+this.width,O=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,this.graph.isGridEnabled()||
(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=O-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,O,V){ba.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
-R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,L,O){L=null!=z&&0==z;var V=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,V,L):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=V?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
-new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,O){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),O=L.getParent(z[0]),V=this.graph.getCellGeometry(z[0]);if(L.isEdge(O)&&null!=V&&V.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return ta.apply(this,arguments)};var la=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=la.apply(this,arguments),L=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&L.push(z[O]);return L};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),O=L.getParent(z.cell),V=this.graph.getCellGeometry(z.cell);return L.isEdge(O)&&null!=V&&V.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):pa.apply(this,arguments)};var xa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var O=this.graph.getModel(),V=O.getParent(this.state.cell),U=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!O.isEdge(V)||null==U||!U.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&xa.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ca.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 Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Ia.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 Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var z=!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 L=0;4>L;L++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var V=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(U,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));V()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(U,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-L=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(L,O);if(null!=L||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),J.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,Z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,J,O,U){Z.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
+R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,J,O){J=null!=z&&0==z;var U=this.state.getVisibleTerminalState(J);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,J):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(J),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
+new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,J,O){this.handleImage=J==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:J==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var J=this.graph.getModel(),O=J.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(J.isEdge(O)&&null!=U&&U.relative&&(J=this.graph.view.getState(z[0]),null!=J&&2>J.width&&2>J.height&&null!=J.text&&null!=J.text.boundingBox))return mxRectangle.fromRectangle(J.text.boundingBox)}return va.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=ja.apply(this,arguments),J=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&J.push(z[O]);return J};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var J=this.graph.getModel(),O=J.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return J.isEdge(O)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(J=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(J.x),Math.round(J.y),Math.round(J.width),Math.round(J.height))):sa.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,J){var O=this.graph.getModel(),U=O.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(J)==mxEvent.ROTATION_HANDLE||!O.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),J=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&J==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,J){Aa.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 Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,J){Ea.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 za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!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 J=0;4>J;J++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var U=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(W,ea){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ea){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+J=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(J,O);if(null!=J||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,J){try{if(null==z&&(null==J||0==J.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=J&&0<J.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage);
-O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var V=O.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-V.style.marginLeft="4px";this.linkHint.appendChild(V);mxEvent.addListener(V,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(O=0;O<L.length;O++){var U=document.createElement("div");U.style.marginTop=null!=z||0<O?"6px":"0px";U.appendChild(this.graph.createLinkForHint(L[O].getAttribute("href"),mxUtils.getTextContent(L[O])));this.linkHint.appendChild(U)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=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(V,U){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=L||null!=O&&0<O.length)this.updateLinkHint(L,
-O),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,O=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-O+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x=
-L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].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":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=L&&(O=Math.max(O,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ea){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ea)}));var U=O.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ea){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ea)}))}if(null!=J)for(O=0;O<J.length;O++){var W=document.createElement("div");W.style.marginTop=null!=z||0<O?"6px":"0px";W.appendChild(this.graph.createLinkForHint(J[O].getAttribute("href"),mxUtils.getTextContent(J[O])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ea){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var Ia=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=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(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var J=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=J||null!=O&&0<O.length)this.updateLinkHint(J,
+O),this.redrawHandles()};var Ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
+5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var J=this.cornerHandles,O=J[0].bounds.height/2;J[0].bounds.x=this.state.x-J[0].bounds.width/2+z;J[0].bounds.y=this.state.y-O+z;J[0].redraw();J[1].bounds.x=J[0].bounds.x+this.state.width-2*z;J[1].bounds.y=J[0].bounds.y;J[1].redraw();J[2].bounds.x=J[0].bounds.x;J[2].bounds.y=this.state.y+this.state.height-2*z;J[2].redraw();J[3].bounds.x=
+J[1].bounds.x;J[3].bounds.y=J[2].bounds.y;J[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].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":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+J=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(J,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,J=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=J&&(O=Math.max(O,J.y+J.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Pa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Pa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].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 Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ia(){mxActor.call(this)}function M(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ja(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function la(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function xa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Da(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ha(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}
-function ya(){mxRhombus.call(this)}function Ha(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Pa(){mxConnector.call(this)}
-function bb(c,l,v,n,t,A,B,da,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,v,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var t=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==t?c.moveTo(B.x+v,B.y+n):null!=t&&c.lineTo(B.x+v,B.y+n));t=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var t=this.line[n];null!=t&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
-v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?ua.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&da<t||!B&&da<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=A;A=B;B=da}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
-s;this.paintTableForeground(c,l,v,n,t)}};e.prototype.paintTableForeground=function(c,l,v,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=da&&(c.setFillAlpha(Math.abs(da)),c.setFillColor(0>da?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),db=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
-mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*
-t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
-15;x.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1;
-u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(I*=Math.min(n,t));
-I=Math.min(I,.5*n,.5*(t-v));l=Math.max(l,I);l=Math.min(n-I,l);B||(I=0);c.begin();"left"==A?(c.moveTo(Math.max(I,0),v),c.lineTo(Math.max(I,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(I,0),0),c.lineTo(n-Math.max(I,0),v));B?(c.moveTo(0,I+v),c.arcTo(I,I,0,0,1,I,v),c.lineTo(n-I,v),c.arcTo(I,I,0,0,1,n,I+v),c.lineTo(n,t-I),c.arcTo(I,I,0,0,1,n-I,t),c.lineTo(I,t),c.arcTo(I,I,0,0,1,0,t-I)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,t));l=Math.min(l,.5*n,.5*t);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,t-l);c.arcTo(l,l,0,0,1,n-l,t);c.lineTo(A+l,t);c.arcTo(l,l,0,0,1,A,t-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=
-function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",J);mxUtils.extend(D,mxActor);D.prototype.size=.4;D.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};D.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",D);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};G.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",G);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(W,mxActor);W.prototype.size=.2;W.prototype.fixedSize=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",W);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null);
-l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",N);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.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)};
-qa.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};qa.prototype.curveTo=function(c,l,v,n,t,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=A};qa.prototype.arcTo=function(c,l,v,n,t,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};qa.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},
-n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),da=this.defaultVariation;5>B&&(B=5,da/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*da;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};qa.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 fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new qa(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=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"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=qa)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
-"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(t/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
-A,t*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+t-A),c.quadTo(l+n,v+t,l+n-A,v+t),c.lineTo(l+A,v+t),c.quadTo(l,v+t,l,v+t-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+t),c.lineTo(l,v+t),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-oa.prototype.paintForeground=function(c,l,v,n,t){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,t*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(S,mxRectangleShape);S.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};S.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",S);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),da=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+da),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,
-l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(0,t),new mxPoint(l,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-ia);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(X,mxRectangleShape);X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};X.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var da=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Ya=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Ya,cb=this.style["symbol"+A+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Ya+=cb,jb+=cb);cb=l;var Ga=v;cb=da==mxConstants.ALIGN_CENTER?cb+(n-va)/2:da==mxConstants.ALIGN_RIGHT?cb+(n-va-Ya):cb+Ya;Ga=I==mxConstants.ALIGN_MIDDLE?Ga+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ga+(t-na-jb):Ga+jb;c.save();da=new B;da.style=this.style;B.prototype.paintVertexShape.call(da,c,cb,Ga,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",X);mxUtils.extend(ja,mxCylinder);ja.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ja);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);
-c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",
-E);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);
-Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t,
-A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),da=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,da-1.5*A));c.lineTo(l+Math.max(0,B-A),v+da);c.lineTo(l,v+da);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+da);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
+function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function t(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function D(){mxActor.call(this)}function I(){mxActor.call(this)}function H(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,la.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,la.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,la.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,la.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,la.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,la.prototype.arcTo)}function ra(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function na(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ha(){mxCylinder.call(this)}function X(){mxShape.call(this)}function ia(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
+function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function Z(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxShape.call(this)}function ja(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);this.spacing=0}function Ia(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Pa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}
+function pa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)}
+function db(c,l,v,n,u,A,B,ca,K,wa){B+=K;var ma=n.clone();n.x-=u*(2*B+K);n.y-=A*(2*B+K);u*=B+K;A*=B+K;return function(){c.ellipse(ma.x-u-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,l,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var u=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==u?c.moveTo(B.x+v,B.y+n):null!=u&&c.lineTo(B.x+v,B.y+n));u=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var u=this.line[n];null!=u&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
+v,u));v=u}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ca=this.getTitleSize();0==ca||this.outline?Fa.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ca<u||!B&&ca<n)||this.paintForeground(c,l,v,n,u)};e.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ca=A;A=B;B=ca}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+u/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
+s;this.paintTableForeground(c,l,v,n,u)}};e.prototype.paintTableForeground=function(c,l,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ca&&(c.setFillAlpha(Math.abs(ca)),c.setFillColor(0>ca?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
+mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/eb);c.translate((n-l)/2,(u-l)/2+l/4);c.moveTo(0,
+.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(n,u/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(u-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
+l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
+-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,u-l),c.curveTo(n,u+l/3,0,u+l/3,0,u-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*
+u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
+15;x.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(t,mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;
+t.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ca=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ca||(K*=Math.min(n,u));
+K=Math.min(K,.5*n,.5*(u-v));l=Math.max(l,K);l=Math.min(n-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));B?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
+l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,u));l=Math.min(l,.5*n,.5*u);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
+l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,u-l);c.arcTo(l,l,0,0,1,n-l,u);c.lineTo(A+l,u);c.arcTo(l,l,0,0,1,A,u-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
+function(c,l,v,n,u){l=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(I,mxActor);I.prototype.size=.4;I.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};I.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
+n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",I);mxUtils.extend(H,mxActor);H.prototype.size=.3;H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};H.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",H);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(M,mxActor);M.prototype.size=.5;M.prototype.redrawPath=function(c,l,v,n,u){c.setFillColor(null);
+l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,u/2),new mxPoint(0,u/2),new mxPoint(l,u/2),new mxPoint(l,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",M);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(c,l,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+l=n/5;c.rect(0,0,l,u);c.fillAndStroke();c.rect(2*l,0,l,u);c.fillAndStroke();c.rect(4*l,0,l,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);la.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};la.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)};
+la.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};la.prototype.curveTo=function(c,l,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};la.prototype.arcTo=function(c,l,v,n,u,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};la.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),u=Math.abs(l-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ca=this.defaultVariation;5>B&&(B=5,ca/=3);var K=v(c-this.lastX)*n/B;v=v(l-this.lastY)*u/B;n/=A;u/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ca;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=l};la.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 fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new la(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=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"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=la)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(u/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
+A,u*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+u-A),c.quadTo(l+n,v+u,l+n-A,v+u),c.lineTo(l+A,v+u),c.quadTo(l,v+u,l,v+u-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+u),c.lineTo(l,v+u),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=.1;ra.prototype.fixedSize=!1;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ra.prototype.paintForeground=function(c,l,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,u*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ra);mxCellRenderer.registerShape("process2",ra);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,l,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};ba.prototype.paintForeground=function(c,l,v,n,u){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,v,n,u){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ca=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ca),u-v),new mxPoint(B,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,
+l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(0,u),new mxPoint(l,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
+na);mxUtils.extend(N,mxHexagon);N.prototype.size=.25;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(n-l,0),new mxPoint(n,.5*u),new mxPoint(n-l,u),new mxPoint(l,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",N);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+u-A);c.moveTo(l+A,v+u/2);c.lineTo(l+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,u){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,u]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ca=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ga=v;bb=ca==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ca==mxConstants.ALIGN_RIGHT?bb+(n-wa-Xa):bb+Xa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ca=new B;ca.style=this.style;B.prototype.paintVertexShape.call(ca,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",V);mxUtils.extend(ha,mxCylinder);ha.prototype.redrawPath=function(c,l,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",ha);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
+2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",X);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ia);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+u);c.lineTo(l+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",E);mxUtils.extend(Q,mxShape);
+Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=
+40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
+v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+u),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(u,
+A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,u){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ca=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,u),c.setGradient(this.fill,this.gradient,l,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ca-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ca);c.lineTo(l,v+ca);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+u);c.lineTo(l,v+u);c.lineTo(l,v+ca);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",fa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?W.prototype.fixedSize:W.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da+t),new mxPoint(B+
-I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=t?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va),new mxPoint(B+
-t,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(B+I,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+
-I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=
-c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,c),new mxPoint(B,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,
-A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,c),new mxPoint(B+I,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va),new mxPoint(na,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(na,da+
-t),new mxPoint(B+I,da),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=
-c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t),new mxPoint(na,da)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,
-Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke();
-c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(la,mxCylinder);la.prototype.jettyWidth=20;la.prototype.jettyHeight=10;la.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=B/2;B=v+B/2;var da=Math.min(l,t-l),I=Math.min(da+2*l,t-l);A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("module",la);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=
-32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var da=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,
-I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(xa,mxRectangleShape);xa.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,da,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",xa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ia,Ca);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector);
-Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=10;La.prototype.defaultArrowWidth=20;La.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
-new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
-mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-
-l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(c,
-l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(U,mxActor);U.prototype.size=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
-.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",U);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
-t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n,
-v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ha);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,da=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,da);c.lineTo(l+A+B,da-B/2);c.moveTo(l+A,da);c.lineTo(l+A+B,da+B/2);c.moveTo(l+A,da);c.lineTo(l+n-A,da);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,da);c.lineTo(l+n-B-A,da-B/2);c.moveTo(l+
-n-A,da);c.lineTo(l+n-B-A,da+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Qa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style,
-"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||da||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||da?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(Fa,mxActor);Fa.prototype.redrawPath=function(c,
-l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Fa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
-c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Oa,
+c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",oa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?S.prototype.fixedSize:S.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca+u),new mxPoint(B+
+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var u="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=u?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+
+u,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+
+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?na.prototype.fixedSize:na.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
+c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,c),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,c),new mxPoint(B+K,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa),new mxPoint(ma,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(ma,ca+
+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?N.prototype.fixedSize:N.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
+c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u),new mxPoint(ma,ca)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Z,mxShape);Z.prototype.size=10;Z.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Z);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,u);c.end();c.stroke();
+c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(ja,mxCylinder);ja.prototype.jettyWidth=20;ja.prototype.jettyHeight=10;ja.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));v=B/2;B=v+B/2;var ca=Math.min(l,u-l),K=Math.min(ca+2*l,u-l);A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("module",ja);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
+32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ca=.3*u-l/2,K=.7*u-l/2;A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,
+K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(ya,mxRectangleShape);ya.prototype.paintForeground=function(c,l,v,n,u){var A=n/2,B=u/2,ca=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+u),new mxPoint(l,v+B)],this.isRounded,ca,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",ya);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(l+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(za,mxArrowConnector);
+za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ia,mxArrowConnector);Ia.prototype.defaultWidth=10;Ia.prototype.defaultArrowWidth=20;Ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ia);mxUtils.extend(Ca,mxActor);Ca.prototype.size=30;Ca.prototype.isRoundable=function(){return!0};Ca.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ca);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,u*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
+mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
+new mxPoint(l,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,u),new mxPoint((n-l)/2,u),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
+mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-
+l,u),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,u)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(J,mxActor);J.prototype.size=.1;J.prototype.fixedSize=20;J.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,u/2,n,u);c.lineTo(l,u);c.quadTo(l-2*l,u/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",J);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
+l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
+.8*l),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
+u-l),new mxPoint(n/2,u),new mxPoint(0,u-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+u);c.lineTo(l+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*u);c.lineTo(l+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*u);c.lineTo(l+.145*n,
+v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(pa,mxRhombus);pa.prototype.paintVertexShape=function(c,l,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,v,n,u){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,v+u);c.lineTo(l+n,v+u);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,v,n,u){var A=c.state.strokeWidth/2,B=10+2*A,ca=v+u-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+u);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca-B/2);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca+B/2);c.moveTo(l+A,ca);c.lineTo(l+n-A,ca);c.moveTo(l+n,v);c.lineTo(l+n,v+u);c.moveTo(l+n-A,ca);c.lineTo(l+n-B-A,ca-B/2);c.moveTo(l+
+n-A,ca);c.lineTo(l+n-B-A,ca+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,l,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ca="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ca||wa||ma||K?(c.rect(l,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ca?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||wa?c.lineTo(l+n,v+u):c.moveTo(l+n,v+u),this.outline||ma?c.lineTo(l,v+u):c.moveTo(l,v+u),(this.outline||K)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+u)):(c.moveTo(l,v+u/2),c.lineTo(l+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
+l,v,n,u){l=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(u-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
+c.lineTo(A,v);c.lineTo(A,u);c.lineTo(B,u);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Oa,
mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.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"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,
-v);this.strictDrawShape(c,0,0,n,t)};Oa.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
-A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ya=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ma=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ka=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ja=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ua=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Xa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+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"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,
+v);this.strictDrawShape(c,0,0,n,u)};Oa.prototype.strictDrawShape=function(c,l,v,n,u,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ca=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,I));A=Oa.prototype;c.setDashed(Ya);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);da||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));da||(na=Math.min(cb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ga||Ma||Ka||Ja)&&"frame"!=va&&(c.begin(),Ga?A.moveNW(c,l,v,n,t,B,Ua,I,Ja):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),Ma&&A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),Ka&&
-A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),Ja&&A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Ya=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Ya=0),c.setGradient(Db,Eb,0,0,n,t,Hb,da,Ya),c.begin(),Ga?A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),Ja&&Ka&&A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),Ka&&Ma&&A.paintSEInner(c,
-l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),Ma&&Ga&&A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),Ga&&Ja&&A.paintNWInner(c,l,v,n,t,B,Ua,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Ua,Va,Wa,Xa,I,Ga,Ma,Ka,Ja),c.stroke()));Ga||Ma||Ka||!Ja?Ga||Ma||!Ka||Ja?!Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==
-va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),
-c.fillAndStroke()):Ga||!Ma||Ka||Ja?!Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,
-I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,
-l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&
-Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga||Ma||Ka||Ja?
-Ga&&!Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,
-l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,
-I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,
-I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,
-v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,
-l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,
-l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,
-l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,
-t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,
-l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):
-Ga&&Ma&&Ka&&Ja&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,
-B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),
-A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,
-l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),
-A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Ua,Va,
-Wa,Xa,I,Ga,Ma,Ka,Ja);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,da)};Oa.prototype.moveNE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-da,0)};Oa.prototype.moveSE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-da)};Oa.prototype.moveSW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,
-t):c.moveTo(da,t)};Oa.prototype.paintNW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,da,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(da,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-da,0)};Oa.prototype.paintNE=
-function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n,da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,da);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-da)};Oa.prototype.paintLeft=function(c,l,v,n,t,A,B,da,I){"square"==
-B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,da)};Oa.prototype.paintSE=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n-da,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-da,t);else c.lineTo(n,t)};Oa.prototype.paintBottom=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0,
-t):c.lineTo(da,t)};Oa.prototype.paintSW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,0,t-da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-da);else c.lineTo(0,t)};Oa.prototype.paintNWInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,I,.5*I+da);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,I,I+da);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+da);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,I+da),c.lineTo(I,I+da)};Oa.prototype.paintTopInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(da+.5*I,I):c.lineTo(da+I,I):c.lineTo(0,
-I):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-da-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-da-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-da-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,da+I),c.lineTo(n-da-I,I)};Oa.prototype.paintRightInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n,
-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):c.lineTo(n-I,da+I):c.lineTo(n-I,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):c.lineTo(I,t-da-I):
-c.lineTo(I,t):c.lineTo(0,t)};Oa.prototype.paintSEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-I,t-da-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-I,t-da-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-da-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,t-da-I),c.lineTo(n-I,t-da-I)};Oa.prototype.paintBottomInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n,
-t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-da-.5*I,t-I):c.lineTo(n-da-I,t-I):c.lineTo(n,t)};Oa.prototype.paintSWInner=function(c,l,v,n,t,A,B,da,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,da+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(da+I,da+I,0,0,1,da+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(da+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,t-da-I),c.lineTo(I+da,t-I)};Oa.prototype.moveSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-da-I):
-c.moveTo(0,t-I)};Oa.prototype.lineSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-da-I):c.lineTo(0,t-I)};Oa.prototype.moveSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-da-I):c.moveTo(n-I,t)};Oa.prototype.lineSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-da-I):
-c.lineTo(n-I,t)};Oa.prototype.moveNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,da+I):c.moveTo(n,I)};Oa.prototype.lineNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,da+I):c.lineTo(n,I)};Oa.prototype.moveNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(I,da+I):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,da+I):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,t,A,B,da,I,va,na,Ya,jb,cb,Ga){if("fold"==
-A||"fold"==B||"fold"==da||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Ya&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==da||"default"==da&&"fold"==A)&&Ya&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&cb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&cb&&Ga&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
-Oa.prototype.constraints=null;mxUtils.extend(Pa,mxConnector);Pa.prototype.origPaintEdgeShape=Pa.prototype.paintEdgeShape;Pa.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Pa.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Pa.prototype.origPaintEdgeShape.apply(this,
-[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Pa);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();
-c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.x+na/2,cb=n.y+Ya/2;n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb-na/2-Ya/2,cb-Ya/2+na/2);c.lineTo(jb-na/2+Ya/2,cb-Ya/2-na/2);c.lineTo(jb+Ya/2-3*na/2,cb-3*Ya/2-na/2);c.lineTo(jb-Ya/2-3*na/2,cb-3*Ya/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,da,I,
-va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.moveTo(n.x-na/2+Ya/2,n.y-Ya/2-na/2);c.lineTo(n.x-Ya/2-3*na/2,n.y-3*Ya/2+na/2);c.stroke()}});mxMarker.addMarker("circle",bb);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,da,I,va){var na=n.clone(),Ya=bb.apply(this,arguments),jb=t*(B+2*I),cb=A*(B+2*I);return function(){Ya.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+
-t*I,na.y-2*cb+A*I);c.moveTo(na.x-jb-cb+A*I,na.y-cb+jb-t*I);c.lineTo(na.x+cb-jb-A*I,na.y-cb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb.x-Ya,jb.y+na);c.quadTo(n.x-Ya,n.y+na,n.x,n.y);c.quadTo(n.x+Ya,n.y-na,jb.x+Ya,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,da,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-=
-v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);da?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,da,I,va,na){A*=da+va;B*=da+va;var Ya=t.clone();return function(){l.begin();l.moveTo(Ya.x,Ya.y);I?l.lineTo(Ya.x-A-B/c,Ya.y-B+A/c):l.lineTo(Ya.x+B/c-A,Ya.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
-function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,da){da=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,da=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[da];B=v?B[1]:B[da-1];da=B.x-va.x;var na=B.y-va.y,Ya=Math.sqrt(da*da+na*na);va=
-n.call(this,Ya,da/Ya,na/Ya,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,da){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Ya=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Ya.x;var jb=I.y-Ya.y,cb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,cb,va/cb,jb/cb,Ya,I,B,da)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,da){da=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
-t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var t=[hb(n,["size"],
-function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(da){var I=null!=t?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,va*(I?1:da.width))),da.getCenterY())},function(da,I,va){da=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-da.x:Math.max(0,Math.min(v,(I.x-da.x)/da.width));this.state.style.size=da},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"],
-function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,da*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb=
-function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,t),v.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*t),v.y+n)},function(v,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
-t,A,B){var da=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};da.getPosition=v;da.setPosition=n;da.ignoreGrid=null!=t?t:!0;if(A){var I=da.positionChanged;da.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return da},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
-B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,
-I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;
-c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,t))):new mxPoint(n.x+Math.max(0,Math.min(n.width,t)),n.getCenterY())},function(n,t){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,t.y-n.y))):Math.round(Math.max(0,Math.min(n.width,t.x-n.x)))},!1,null,function(n){var t=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(t.isTableRow(c.cell)||t.isTableCell(c.cell))){n=
-t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],da=0;da<A.length;da++)A[da]!=c.cell&&t.isSwimlane(A[da])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[da]))==n&&B.push(A[da]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
+Jb=Math.max(0,Math.min(50,K));A=Oa.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ca||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ca||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||La||Ja||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,l,v,n,u,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),La&&A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),Ja&&
+A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),Ha&&A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ca=Ib,"none"==Db&&(ca=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ca,Xa),c.begin(),Ga?A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),Ja&&La&&A.paintSEInner(c,
+l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),La&&Ga&&A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,u,B,Ra,Ua,Va,Wa,K,Ga,La,Ja,Ha),c.stroke()));Ga||La||Ja||!Ha?Ga||La||!Ja||Ha?!Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==
+wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),
+c.fillAndStroke()):Ga||!La||Ja||Ha?!Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,
+K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,
+l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&
+La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga||La||Ja||Ha?
+Ga&&!La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,
+l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,
+K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,
+K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,
+v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
+l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,
+l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,
+l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,
+u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,
+l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&La&&Ja&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,
+B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),
+A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
+l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),
+A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,u,B,Ra,Ua,
+Va,Wa,K,Ga,La,Ja,Ha);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ca)};Oa.prototype.moveNE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ca,0)};Oa.prototype.moveSE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ca)};Oa.prototype.moveSW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+u):c.moveTo(ca,u)};Oa.prototype.paintNW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,ca,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ca,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ca,0)};Oa.prototype.paintNE=
+function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n,ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ca);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ca)};Oa.prototype.paintLeft=function(c,l,v,n,u,A,B,ca,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ca)};Oa.prototype.paintSE=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n-ca,u)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ca,u);else c.lineTo(n,u)};Oa.prototype.paintBottom=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+u):c.lineTo(ca,u)};Oa.prototype.paintSW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,0,u-ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,u-ca);else c.lineTo(0,u)};Oa.prototype.paintNWInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,K,.5*K+ca);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,K,K+ca);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ca);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,K+ca),c.lineTo(K,K+ca)};Oa.prototype.paintTopInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ca+.5*K,K):c.lineTo(ca+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-ca-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-ca-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ca-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,ca+K),c.lineTo(n-ca-K,K)};Oa.prototype.paintRightInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
+K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):c.lineTo(n-K,ca+K):c.lineTo(n-K,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):c.lineTo(K,u-ca-K):
+c.lineTo(K,u):c.lineTo(0,u)};Oa.prototype.paintSEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-K,u-ca-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-K,u-ca-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-K,u-ca-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,u-ca-K),c.lineTo(n-K,u-ca-K)};Oa.prototype.paintBottomInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
+u-K):wa&&!ma?c.lineTo(n-K,u):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ca-.5*K,u-K):c.lineTo(n-ca-K,u-K):c.lineTo(n,u)};Oa.prototype.paintSWInner=function(c,l,v,n,u,A,B,ca,K,wa){if(!wa)c.lineTo(K,u);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,u-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,ca+.5*K,u-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ca+K,ca+K,0,0,1,ca+K,u-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ca+.5*K,u-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,u-ca-K),c.lineTo(K+ca,u-K)};Oa.prototype.moveSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,u-ca-K):
+c.moveTo(0,u-K)};Oa.prototype.lineSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,u-ca-K):c.lineTo(0,u-K)};Oa.prototype.moveSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,u-ca-K):c.moveTo(n-K,u)};Oa.prototype.lineSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,u-ca-K):
+c.lineTo(n-K,u)};Oa.prototype.moveNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,ca+K):c.moveTo(n,K)};Oa.prototype.lineNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,ca+K):c.lineTo(n,K)};Oa.prototype.moveNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ca+K):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ca+K):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,u,A,B,ca,K,wa,ma,Xa,jb,bb,Ga){if("fold"==
+A||"fold"==B||"fold"==ca||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ca||"default"==ca&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
+Oa.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],u=0;u<l.length;u++)n.push(mxUtils.clone(l[u]));u=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),Ya.prototype.origPaintEdgeShape.apply(this,
+[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.x+ma/2,bb=n.y+Xa/2;n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb-ma/2-Xa/2,bb-Xa/2+ma/2);c.lineTo(jb-ma/2+Xa/2,bb-Xa/2-ma/2);c.lineTo(jb+Xa/2-3*ma/2,bb-3*Xa/2-ma/2);c.lineTo(jb-Xa/2-3*ma/2,bb-3*Xa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,u,A,B,ca,K,
+wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.moveTo(n.x-ma/2+Xa/2,n.y-Xa/2-ma/2);c.lineTo(n.x-Xa/2-3*ma/2,n.y-3*Xa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,u,A,B,ca,K,wa){var ma=n.clone(),Xa=db.apply(this,arguments),jb=u*(B+2*K),bb=A*(B+2*K);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.clone();n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+ma);c.quadTo(n.x-Xa,n.y+ma,n.x,n.y);c.quadTo(n.x+Xa,n.y-ma,jb.x+Xa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,u,A,B,ca,K,wa){l=u*K*1.118;v=A*K*1.118;u*=B+K;A*=B+K;var ma=n.clone();ma.x-=l;ma.y-=
+v;n.x+=-u-l;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ca?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,u,A,B,ca,K,wa,ma){A*=ca+wa;B*=ca+wa;var Xa=u.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);K?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
+function(c,l,v){return gb(c,["width"],l,function(n,u,A,B,ca){ca=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,u){return hb(c,l,function(A){var B=c.absolutePoints,ca=B.length-1;A=c.view.translate;var K=c.view.scale,wa=v?B[0]:B[ca];B=v?B[1]:B[ca-1];ca=B.x-wa.x;var ma=B.y-wa.y,Xa=Math.sqrt(ca*ca+ma*ma);wa=
+n.call(this,Xa,ca/Xa,ma/Xa,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ca){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Xa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Xa.x;var jb=K.y-Xa.y,bb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Xa,K,B,ca)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,u,A,B,ca){ca=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
+2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var u=[hb(n,["size"],
+function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},wb=function(c,l,v,n,u){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ca){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ca.x+Math.max(0,Math.min(.5*ca.width,wa*(K?1:ca.width))),ca.getCenterY())},function(ca,K,wa){ca=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ca.x:Math.max(0,Math.min(v,(K.x-ca.x)/ca.width));this.state.style.size=ca},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var u=[hb(n,["size"],
+function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ca*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},vb=
+function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
+u,A,B){var ca=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ca.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};ca.getPosition=v;ca.setPosition=n;ca.ignoreGrid=null!=u?u:!0;if(A){var K=ca.positionChanged;ca.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ca},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
+B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,
+K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
+c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
+parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,u))):new mxPoint(n.x+Math.max(0,Math.min(n.width,u)),n.getCenterY())},function(n,u){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,u.y-n.y))):Math.round(Math.max(0,Math.min(n.width,u.x-n.x)))},!1,null,function(n){var u=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(u.isTableRow(c.cell)||u.isTableCell(c.cell))){n=
+u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var B=[],ca=0;ca<A.length;ca++)A[ca]!=c.cell&&u.isSwimlane(A[ca])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ca]))==n&&B.push(A[ca]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l,
-v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
+v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size=
Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v=
-Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?L.prototype.fixedSize:L.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,"base",fa.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",la.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",la.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
-2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
+Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?J.prototype.fixedSize:J.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));mxUtils.getValue(this.state.style,"base",oa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
+n)},function(v,n){mxUtils.getValue(this.state.style,"base",oa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",oa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",oa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ja.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
+2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Pa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Pa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",u.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",u.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",G.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
-["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
+Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
+["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:wb(Z.prototype.size,!1),display:wb(Ea.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,U.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,W.prototype.size,W.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(na.prototype.size,!0,null,!0,na.prototype.fixedSize),hexagon:wb(N.prototype.size,!0,.5,!0,N.prototype.fixedSize),curlyBracket:wb(M.prototype.size,!1),display:wb(Ka.prototype.size,!1),cube:Bb(1,
+m.prototype.size,!1),card:Bb(.5,D.prototype.size,!0),loopLimit:Bb(.5,W.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,da=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
-null==da&&null!=l&&(da=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Ya=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=da){c=function(Ga,Ma,Ka){Ga-=cb.x;var Ja=Ma-cb.y;Ma=(Ya*Ga-na*Ja)/(I*Ya-va*na);Ga=(va*Ga-I*Ja)/(va*na-I*Ya);jb?(Ka&&(cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma),t.push(cb)),cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga)):(Ka&&(cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga),t.push(cb)),
-cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma));t.push(cb)};var cb=da;null==n&&(n=new mxPoint(da.x+(B.x-da.x)/2,da.y+(B.y-da.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ca=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
+null==ca&&null!=l&&(ca=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ca){c=function(Ga,La,Ja){Ga-=bb.x;var Ha=La-bb.y;La=(Xa*Ga-ma*Ha)/(K*Xa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+K*La,bb.y+wa*La),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga)):(Ja&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga),u.push(bb)),
+bb=new mxPoint(bb.x+K*La,bb.y+wa*La));u.push(bb)};var bb=ca;null==n&&(n=new mxPoint(ca.x+(B.x-ca.x)/2,ca.y+(B.y-ca.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};fa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};oa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=l*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];ua.prototype.constraints=mxRectangleShape.prototype.constraints;
+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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};D.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};u.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;
-sa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};la.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",la.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",la.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,
+0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};t.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;
+ta.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),u=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ja.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,l),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(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};U.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};W.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];W.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;G.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(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ra.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;H.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(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(l+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};Pa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};Ta.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)];Na.prototype.getConstraints=
-function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ba.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.min(v,l),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-t)/2;var A=n+t,B=(l-t)/2;t=B+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ba.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.min(v,l),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,B=(l-u)/2;u=B+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.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)];V.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)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];U.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)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var u=y.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,y.getModel().setGeometry(d,
-u));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
+Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var t=y.getCellGeometry(d);null!=t&&g&&x&&(g/=x,t=t.clone(),1<g?t.height=t.width/g:t.width=t.height*g,y.getModel().setGeometry(d,
+t));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));
window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,u=0;u<
-x.length&&y;u++)y=y&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&y){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,y);null!=H&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,y-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,t=0;t<
+x.length&&y;t++)y=y&&p.model.isEdge(x[t]);var G=p.view.translate;t=p.view.scale;var D=G.x,I=G.y;G=null;if(1==x.length&&y){var H=p.getCellGeometry(x[0]);null!=H&&(G=H.getTerminalPoint(!0))}G=null!=G?G:p.getBoundingBoxFromGeometry(x,y);null!=G&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/t-D)),t=Math.round(p.snap(p.popupMenuHandler.triggerY/t-I)),p.cellsMoved(x,y-G.x,t-G.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var J=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==J||isNaN(J.nodeType)||H.setAttribute("placeholders",J.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
+null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(t,G){var D=x.getValue(t);G=t.cloneValue(G);G.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||G.setAttribute("placeholders",D.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||G.setAttribute("label",p.convertValueToString(t));x.setValue(t,G)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
@@ -2978,25 +2979,25 @@ x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T")
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl,
y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f,
!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"),
-y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
-try{for(var f=0;f<d.length;f++){var g=d[f];0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g)}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=p.getEditableCells(p.getSelectionCells()),
-g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;
-d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*
-Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-
-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/
-p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid",
-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
-K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled});
-K.isEnabled=F;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=F;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=F;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(y,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<y.length;u++)0==p.model.getChildCount(y[u])&&p.autoSizeCell(y[u],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var t=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(G){p.cellEditor.restoreSelection(t);null!=G&&p.insertLink(G)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
+try{for(var f=0;f<d.length;f++){var g=d[f];p.getModel().isVertex(g)&&(0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=
+p.getEditableCells(p.getSelectionCells()),g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var t=document.createElement("div");t.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(t.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==
+x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&
+(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);
+m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,
+g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,
+f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&
+0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,
+300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);
+L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});
+L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});L.isEnabled=F;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
+m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=F;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=F;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?p.updateLabelElements(y,function(G){G.style.fontWeight=null;"B"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(G){G.style.fontStyle=null;"I"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(G){G.style.textDecoration=null;"U"==G.nodeName&&p.replaceElement(G)});for(var t=0;t<y.length;t++)0==p.model.getChildCount(y[t])&&p.autoSizeCell(y[t],
+!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
@@ -3005,17 +3006,17 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl
g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)y+=u.x,g+=u.y,d=
-p.getModel().getParent(d),u=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var u=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(y,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,W){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(u,H,J);else{var T=p.getSelectionCells();if(null!=u&&(0<u.length||0<T.length)){var Z=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var N=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=N.x;T[0].geometry.y=N.y;null!=D&&k(T[0],D,G,W,p);Z=T;p.fireEvent(new mxEventObject("cellsInserted","cells",Z))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,T);var qa=p.getCurrentCellStyle(T[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,T);if(null!=H&&null!=J)for(u=0;u<T.length;u++){var oa=T[u];if("0"!=p.getCurrentCellStyle(oa).expand){var S=p.getModel().getGeometry(oa);null!=S&&(S=S.clone(),S.width=H,S.height=J,p.getModel().setGeometry(oa,S))}null!=D&&k(oa,D,G,W,p)}}finally{p.getModel().endUpdate()}null!=Z&&(p.setSelectionCells(Z),p.scrollCellToVisible(Z[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,u,H){k(d,y,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var t=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=t;)y+=t.x,g+=t.y,d=
+p.getModel().getParent(d),t=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
+0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var t=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=t&&(t=t.clone(),t.points=null,t.x=0,t.y=0,t.offset=null,p.getModel().setGeometry(y,t))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
+g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(t,G,D,I,H,S){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(t,G,D);else{var T=p.getSelectionCells();if(null!=t&&(0<t.length||0<T.length)){var M=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,G,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var fa=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=fa.x;T[0].geometry.y=fa.y;null!=I&&k(T[0],I,H,S,p);M=T;p.fireEvent(new mxEventObject("cellsInserted","cells",M))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,T);var la=p.getCurrentCellStyle(T[0]);"image"!=la[mxConstants.STYLE_SHAPE]&&"label"!=la[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==t.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==I&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,T);if(null!=G&&null!=D)for(t=0;t<T.length;t++){var ra=T[t];if("0"!=p.getCurrentCellStyle(ra).expand){var ba=p.getModel().getGeometry(ra);null!=ba&&(ba=ba.clone(),ba.width=G,ba.height=D,p.getModel().setGeometry(ra,ba))}null!=I&&k(ra,I,H,S,p)}}finally{p.getModel().endUpdate()}null!=M&&(p.setSelectionCells(M),p.scrollCellToVisible(M[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,t,G){k(d,y,t,G,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
@@ -3024,25 +3025,25 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b,
e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var K=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(K);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(W){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(W);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,W);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,W)}}catch(T){}}};
+DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var L=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(L);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
+m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),t=this.ui.hashValue(b.getCurrentEtag()),G=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+t+"\nTo: "+G+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var D=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==D||mxUtils.isEmptyObject(D)||L.push(D)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(S){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(S);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,S);else{var I=this.getCurrentUser(),H=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),H,S)}}catch(T){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)),
-25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
-u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=K?
-"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),K=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+K+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(G){var D=this.compressReportData(JSON.stringify(e,null,2));G=null==G?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(G.data)),
+25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+D+(null!=G?"\n\nRemote:\n"+G:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(G){null!=G&&G.getCurrentEtag()==m?d(G):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,t=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
+t=JSON.stringify(e);t=null!=t&&250>t.length?Graph.compress(t):null}this.getLatestVersion(mxUtils.bind(this,function(G){try{var D=null!=t?"Report":"Error",I=this.ui.getHashValueForPages(G.getShadowPages());EditorUi.logError("Checksum "+D+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=t?"-json_"+t:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=L?
+"-rev_"+this.ui.hashValue(L):"")+(null!=I?"-latest_"+I:"")+(null!=G?"-latestRev_"+this.ui.hashValue(G.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(H){}}),b)}}catch(G){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),L=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+L+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3089,7 +3090,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),K=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),L=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -3098,10 +3099,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(F,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var G=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,G,L,f);this.removeDraft()}catch(D){f(D)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.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"},
@@ -3151,45 +3152,45 @@ type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",t
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&&
E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var ba=Y[R];switch(ba.type){case "path":null!=Q.stroke&&this._drawToContext(q,ba,Q);break;case "fillPath":this._drawToContext(q,ba,Q);break;case "fillSketch":this.fillSketch(q,ba,Q)}}};E.fillSketch=function(Q,Y,R){var ba=q.state.strokeColor,ea=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,la=
-R.fillWeight;0>la&&(la=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(la);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(ta);q.setStrokeWidth(ea);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};E._drawToContext=function(Q,Y,R){Q.begin();for(var ba=0;ba<Y.ops.length;ba++){var ea=Y.ops[ba],ra=ea.data;switch(ea.op){case "move":Q.moveTo(ra[0],ra[1]);break;case "bcurveTo":Q.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":Q.lineTo(ra[0],
-ra[1])}}Q.end();"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(ba,ea,ra){this.canvas=ba;this.rc=ea;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
-this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
-mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ea){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var la=0;la<ta.length;la++)ra=(ra<<5)-ra+ta.charCodeAt(la)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ea)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ea?-1:ea;ra.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",ea);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=ra.fill&&(null!=ba||null!=ea&&ra.fill==ea)?"solid":
-ta.fillStyle);ra.fillStyle=ea;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-q.prototype.lineTo=function(ba,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ea),this.lastX=ba,this.lastY=ea)};q.prototype.moveTo=function(ba,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ea),this.lastX=ba,this.lastY=ea,this.firstX=ba,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba,
-ea,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ea,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ea,ra,ta,la,pa),this.lastX=la,this.lastY=pa)};q.prototype.arcTo=function(ba,ea,ra,ta,la,pa,xa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,
-ba,ea,ra,ta,la,pa,xa);if(null!=Ca)for(var Ia=0;Ia<Ca.length;Ia+=6)this.curveTo(Ca[Ia],Ca[Ia+1],Ca[Ia+2],Ca[Ia+3],Ca[Ia+4],Ca[Ia+5]);this.lastX=pa;this.lastY=xa}};q.prototype.rect=function(ba,ea,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ea,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ea,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+
-ra/2,ea+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+la,ea),this.lineTo(ba+ra-la,ea),this.quadTo(ba+ra,ea,ba+ra,ea+pa),this.lineTo(ba+ra,ea+ta-pa),this.quadTo(ba+ra,ea+ta,ba+ra-la,ea+ta),this.lineTo(ba+la,ea+ta),this.quadTo(ba,ea+ta,ba,ea+ta-pa),this.lineTo(ba,ea+pa),this.quadTo(ba,ea,ba+la,ea))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough=
-!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ba)this.nextShape.options[ea]=ba[ea];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
-function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
-this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var E=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(ba){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(ba):this.createRoughCanvas(ba)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ea,ra,ta,la){null!=ba.handJiggle&&ba.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=
-function(ba){var ea=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,la=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,xa=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ca=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;Y.apply(this,
-arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ca;ba.setStrokeColor=xa;this.configurePointerEvents=pa;this.stroke=la;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}Y.apply(this,arguments);ba.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ea,ra,ta,la,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,R.apply(this,arguments),ba.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
-Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var ba=0;ba<Y.length;ba++)if("mxgraph"==Y[ba].getAttribute("class")){R.push(Y[ba]);
-break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&
-(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),
-Y=null;0<Q.length?(q=Graph.decompress(Q,null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&
-!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,ba=[],ea=null;R<q.length;){var ra=q.charCodeAt(R);R+=1;10!=ra&&(E+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=
-0;if(19==Y){var ta=q.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ta>R){Q=q.substring(R,ta);break}}10==ra&&("endobj"==E?ea=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(ea=[],ba[E.split(" ")[0]]=ea):null!=ea&&ea.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(ba));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),
-null!=E&&0<E.length&&(E=q[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,
-E){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
-q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=
-q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+
-"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");
-E.appendChild(document.createTextNode(q.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
-q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=
-q.zoomFactor&&(E=parseFloat(q.zoomFactor),!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),
-mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&
-(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
-null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");
-Q.setAttribute("type","text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
-"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var Z=Y[R];switch(Z.type){case "path":null!=Q.stroke&&this._drawToContext(q,Z,Q);break;case "fillPath":this._drawToContext(q,Z,Q);break;case "fillSketch":this.fillSketch(q,Z,Q)}}};E.fillSketch=function(Q,Y,R){var Z=q.state.strokeColor,da=q.state.strokeWidth,qa=q.state.strokeAlpha,va=q.state.dashed,ja=R.fillWeight;
+0>ja&&(ja=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(ja);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(va);q.setStrokeWidth(da);q.setStrokeColor(Z);q.setStrokeAlpha(qa)};E._drawToContext=function(Q,Y,R){Q.begin();for(var Z=0;Z<Y.ops.length;Z++){var da=Y.ops[Z],qa=da.data;switch(da.op){case "move":Q.moveTo(qa[0],qa[1]);break;case "bcurveTo":Q.curveTo(qa[0],qa[1],qa[2],qa[3],qa[4],qa[5]);break;case "lineTo":Q.lineTo(qa[0],qa[1])}}Q.end();
+"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(Z,da,qa){this.canvas=Z;this.rc=da;this.shape=qa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
+q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Z,da){var qa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var ja=0;ja<va.length;ja++)qa=(qa<<5)-qa+va.charCodeAt(ja)<<0}qa={strokeWidth:this.canvas.state.strokeWidth,seed:qa,preserveVertices:!0};va=this.rc.getDefaultOptions();qa.stroke=Z?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Z=null;(qa.filled=da)?(qa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Z=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):qa.fill="";qa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);qa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);qa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
+qa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);qa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);qa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);qa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);da=mxUtils.getValue(this.shape.style,"hachureGap",-1);qa.hachureGap="auto"==da?-1:da;qa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+da);qa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",da);qa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",da);da=mxUtils.getValue(this.shape.style,"fillWeight",-1);qa.fillWeight="auto"==da?-1:da;da=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==da&&(da=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),da=null!=qa.fill&&(null!=Z||null!=da&&qa.fill==da)?"solid":va.fillStyle);
+qa.fillStyle=da;return qa};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Z=2;Z<arguments.length;Z+=2)this.lastX=arguments[Z-1],this.lastY=arguments[Z],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+q.prototype.lineTo=function(Z,da){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Z,da),this.lastX=Z,this.lastY=da)};q.prototype.moveTo=function(Z,da){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Z,da),this.lastX=Z,this.lastY=da,this.firstX=Z,this.firstY=da)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Z,da,qa,
+va){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Z,da,qa,va),this.lastX=qa,this.lastY=va)};q.prototype.curveTo=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Z,da,qa,va,ja,sa),this.lastX=ja,this.lastY=sa)};q.prototype.arcTo=function(Z,da,qa,va,ja,sa,ya){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Z,da,qa,
+va,ja,sa,ya);if(null!=Aa)for(var Ea=0;Ea<Aa.length;Ea+=6)this.curveTo(Aa[Ea],Aa[Ea+1],Aa[Ea+2],Aa[Ea+3],Aa[Ea+4],Aa[Ea+5]);this.lastX=sa;this.lastY=ya}};q.prototype.rect=function(Z,da,qa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Z,da,qa,va,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Z,da,qa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Z+
+qa/2,da+va/2,qa,va,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Z+ja,da),this.lineTo(Z+qa-ja,da),this.quadTo(Z+qa,da,Z+qa,da+sa),this.lineTo(Z+qa,da+va-sa),this.quadTo(Z+qa,da+va,Z+qa-ja,da+va),this.lineTo(Z+ja,da+va),this.quadTo(Z,da+va,Z,da+va-sa),this.lineTo(Z,da+sa),this.quadTo(Z,da,Z+ja,da))};q.prototype.drawPath=function(Z){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
+Z)}catch(qa){}this.passThrough=!1}else if(null!=this.nextShape){for(var da in Z)this.nextShape.options[da]=Z[da];Z.stroke!=mxConstants.NONE&&null!=Z.stroke||delete this.nextShape.options.stroke;Z.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
+this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Z){return new q(Z,Editor.createRoughCanvas(Z),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Z){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(Z):this.createRoughCanvas(Z)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Z,da,qa,va,ja){null!=Z.handJiggle&&Z.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=function(Z){var da=Z.addTolerance,qa=!0;null!=this.style&&(qa="1"==
+mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Z.handJiggle&&Z.handJiggle.constructor==q&&!this.outline){Z.save();var va=this.fill,ja=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,ya=Z.setStrokeColor;Z.setStrokeColor=function(){};var Aa=Z.setFillColor;Z.setFillColor=function(){};qa||null==va||(this.configurePointerEvents=function(){});Z.handJiggle.passThrough=!0;Y.apply(this,arguments);Z.handJiggle.passThrough=!1;Z.setFillColor=Aa;Z.setStrokeColor=
+ya;this.configurePointerEvents=sa;this.stroke=ja;this.fill=va;Z.restore();qa&&null!=va&&(Z.addTolerance=function(){})}Y.apply(this,arguments);Z.addTolerance=da};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Z,da,qa,va,ja,sa){null!=Z.handJiggle&&Z.handJiggle.constructor==q?(Z.handJiggle.passThrough=!0,R.apply(this,arguments),Z.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
+q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var Z=0;Z<Y.length;Z++)if("mxgraph"==Y[Z].getAttribute("class")){R.push(Y[Z]);break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),
+null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=
+mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),Y=null;0<Q.length?(q=Graph.decompress(Q,
+null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,
+!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,Z=[],da=null;R<q.length;){var qa=q.charCodeAt(R);R+=1;10!=qa&&(E+=String.fromCharCode(qa));qa=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=0;if(19==Y){var va=q.indexOf("%3C%2Fmxfile%3E)",
+R)+15;R-=9;if(va>R){Q=q.substring(R,va);break}}10==qa&&("endobj"==E?da=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(da=[],Z[E.split(" ")[0]]=da):null!=da&&da.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(Z));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=q[E[1]],null!=E&&
+(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,E){null!=q&&(q=null!=q.error?q.error:
+q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||
+StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=
+q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=
+Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(q.css));
+var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);
+null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(E=parseFloat(q.zoomFactor),
+!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
+EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&
+(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&
+(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");Q.setAttribute("type",
+"text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS=
+"https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=
E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||
"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name,
@@ -3197,95 +3198,95 @@ E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=t
this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).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 Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([R]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
-Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(ba,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(R&&ba===E&&(Q[Y]+=ba),R=!R):","===ba&&R?ba=Q[++Y]="":Q[Y]+=ba,E=ba;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
-E=/\.png$/i.test(q)||/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
+function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(Z){MathJax.typesetClear([R]),null!=Z.retry?Z.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Z.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
+Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(Z,da){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,Z;q=$jscomp.makeIterator(q);for(Z=q.next();!Z.done;Z=q.next())Z=Z.value,'"'===Z?(R&&Z===E&&(Q[Y]+=Z),R=!R):","===Z&&R?Z=Q[++Y]="":Q[Y]+=Z,E=Z;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);E=/\.png$/i.test(q)||
+/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"==
-Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ba){window.clearTimeout(Y);Q&&
-E(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var ba=document.createElement("canvas"),ea=ba.getContext("2d");ba.height=R.height;ba.width=R.width;ea.drawImage(R,0,0);E(ba.toDataURL())}catch(ra){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(ba){E(Editor.svgBrokenImage.src)}};
-Editor.prototype.convertImages=function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,ba=Q||{};Q=mxUtils.bind(this,function(ea,ra){ea=q.getElementsByTagName(ea);for(var ta=0;ta<ea.length;ta++)mxUtils.bind(this,function(la){try{if(null!=la){var pa=Y.convert(la.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var xa=ba[pa];null==xa?(R++,this.convertImageToDataUri(pa,function(Ca){null!=Ca&&(ba[pa]=Ca,la.setAttribute(ra,Ca));R--;0==R&&E(q)})):la.setAttribute(ra,xa)}else null!=
-pa&&la.setAttribute(ra,pa)}}catch(Ca){}})(ea[ta])});Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,ba,ea;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}ba=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
-2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);E+="=";break}ea=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2|(ea&192)>>
-6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,ba,ea,ra){try{var ta=!ea&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var la=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=E){var xa=pa.getText();if(ta){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();xa=Array(pa.length);for(var Ca=0;Ca<pa.length;Ca++)xa[Ca]=String.fromCharCode(pa[Ca]);xa=xa.join("")}ba=null!=ba?ba:"data:image/png;base64,";xa=ba+Editor.base64Encode(xa)}E(xa)}}else null!=Q&&(0==pa.getStatus()?Q({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?Q({code:pa.getStatus()},pa):Q({message:mxResources.get("error")+" "+pa.getStatus()},pa))}),function(pa){null!=Q&&
-Q({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,retry:la})},ra)});la()}catch(pa){null!=Q&&Q(pa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var ba=1;ba<Q.length;ba++)if(Y=
-Q[ba].indexOf(")"),0<Y){var ea=Editor.trimCssUrl(Q[ba].substring(0,Y));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);E.push('url("'+ea+'"'+Q[ba].substring(Y))}else E.push(Q[ba])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=
-q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var ta=[Q[0]],la=1;la<Q.length;la++){var pa=Q[la].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(Q[la].substring(0,pa))]);ta.push('"'+Q[la].substring(pa))}E(ta.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var ba=Q[q].indexOf(")"),ea=null,ra=Q[q].indexOf("format(",ba);0<ra&&(ea=Editor.trimCssUrl(Q[q].substring(ra+7,Q[q].indexOf(")",ra))));mxUtils.bind(this,
-function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;Y++;var la="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ta))la="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ta))la="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ta))la="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ta))la="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ta))la="application/vnd.ms-fontobject";else if("sfnt"==
-ea||/(\.sfnt)($|\?)/i.test(ta))la="application/font-sfnt";this.mapFontUrl(la,ta,mxUtils.bind(this,function(pa,xa){this.loadUrl(xa,mxUtils.bind(this,function(Ca){this.cachedFonts[ta]=Ca;Y--;R()}),mxUtils.bind(this,function(Ca){Y--;R()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,ba)),ea)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=
-E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),ba=0;ba<E.length;ba++)mxUtils.bind(this,function(ea,
-ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(Y++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;Q.push(ta+"\n");Y--;R()}),mxUtils.bind(this,function(ta){Y--;Q.push("@import url("+ra+");\n");R()}))):Q.push(this.cachedGoogleFonts[ra]+"\n"):Q.push('@font-face {font-family: "'+ea+'";src: url("'+ra+'")}\n')})(E[ba].name,E[ba].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),
-Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?
-Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia,Aa,La,Da,Sa){try{ba=null!=ba?ba:!0;ea=null!=ea?ea:
-!0;xa=null!=xa?xa:this.graph;Ca=null!=Ca?Ca:0;var Ra=ta?null:xa.background;Ra==mxConstants.NONE&&(Ra=null);null==Ra&&(Ra=Y);null==Ra&&0==ta&&(Ra=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(xa.getSvg(null,null,Ca,Ia,null,ea,null,null,null,la,null,La,Da,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){U.drawImage(Za,0,0);q(L,Ta)},0):(U.drawImage(Za,0,0),q(L,Ta))},
-L=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),V=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=E&&(ra=ba?Math.min(1,Math.min(3*E/(4*V),E/O)):E/O);ra=this.getMaxCanvasScale(O,V,ra);O=Math.ceil(ra*O);V=Math.ceil(ra*V);L.setAttribute("width",O);L.setAttribute("height",V);var U=L.getContext("2d");null!=Ra&&(U.beginPath(),U.rect(0,0,O,V),U.fillStyle=Ra,U.fill());1!=ra&&U.scale(ra,ra);if(Aa){var ha=xa.view,ma=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));
-ha.scale=ma;wa="data:image/svg+xml;base64,"+wa;var sa=xa.gridSize*ha.gridSteps*ra,ya=xa.getGraphBounds(),Ha=ha.translate.x*ma,Qa=ha.translate.y*ma,ua=Ha+(ya.x-Ha)/ma-Ca,za=Qa+(ya.y-Qa)/ma-Ca,Fa=new Image;Fa.onload=function(){try{for(var Ba=-Math.round(sa-mxUtils.mod((Ha-ua)*ra,sa)),Ea=-Math.round(sa-mxUtils.mod((Qa-za)*ra,sa));Ba<O;Ba+=sa)for(var Oa=Ea;Oa<V;Oa+=sa)U.drawImage(Fa,Ba/ra,Oa/ra);z()}catch(Pa){null!=R&&R(Pa)}};Fa.onerror=function(Ba){null!=R&&R(Ba)};Fa.src=wa}else z()}catch(Ba){null!=
-R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};la&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(L){null!=R&&R(L)}}))}catch(z){null!=R&&R(z)}}),Q,pa)}catch(Ta){null!=R&&R(Ta)}};
-Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function ba(pa,xa){var Ca=ta;ta+=xa;return pa.substring(Ca,ta)}function ea(pa){pa=ba(pa,4);return pa.charCodeAt(3)+
-(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ba(q,4),"IHDR"!=ba(q,4))null!=R&&R();else{ba(q,17);R=q.substring(0,ta);do{var la=ea(q);if("IDAT"==ba(q,4)){R=q.substring(0,ta-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),
-Q=ra(Q)+ra(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=ra(Q.length)+E+Q+ra(Y^4294967295);R+=q.substring(ta-8,q.length);break}R+=q.substring(ta-8,ta-4+la);ba(q,la);ba(q,4)}while(la);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor;
-ColorDialog.addRecentColor=function(q,E){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});
-if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
-null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var ba=new ChangePageSetup(E);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible=
-R;Q.model.execute(ba)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;
-if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(ea){E.editor.setAutosave(ea);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(ea){this.listener=function(){ea(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&
-"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(ea){E.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var ba=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position=
-"relative";ba.style.marginLeft="6px";ba.style.top="2px";R.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,E,Q){if(null!=E){var Y=function(ba){if(null!=ba)if(Q)for(var ea=0;ea<ba.length;ea++)E[ba[ea].name]=ba[ea];else for(var ra in E){var ta=!1;for(ea=0;ea<ba.length;ea++)if(ba[ea].name==ra&&ba[ea].type==E[ra].type){ta=!0;break}ta||
-delete E[ra]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(ba){}}};var y=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E={},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<
-Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(U,ha,ma,wa){xa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ma.index){for(var Ha=[],Qa=ma.parentRow.nextSibling;Qa&&
-Qa.getAttribute("data-pName")==U;)Ha.push(Qa.getAttribute("data-pValue")),Qa=Qa.nextSibling;ma.index<Ha.length?null!=wa?Ha.splice(wa,1):Ha[ma.index]=ha:Ha.push(ha);null!=ma.size&&Ha.length>ma.size&&(Ha=Ha.slice(0,ma.size));ha=Ha.join(",");null!=ma.countProperty&&(xa.setCellStyles(ma.countProperty,Ha.length,xa.getSelectionCells()),sa.push(ma.countProperty),ya.push(Ha.length))}xa.setCellStyles(U,ha,xa.getSelectionCells());sa.push(U);ya.push(ha);if(null!=ma.dependentProps)for(U=0;U<ma.dependentProps.length;U++){var ua=
-ma.dependentPropsDefVal[U],za=ma.dependentPropsVals[U];if(za.length>ha)za=za.slice(0,ha);else for(var Fa=za.length;Fa<ha;Fa++)za.push(ua);za=za.join(",");xa.setCellStyles(ma.dependentProps[U],za,xa.getSelectionCells());sa.push(ma.dependentProps[U]);ya.push(za)}if("function"==typeof ma.onChange)ma.onChange(xa,ha);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",xa.getSelectionCells()))}finally{xa.getModel().endUpdate()}}function R(U,ha,ma){var wa=mxUtils.getOffset(q,
-!0),sa=mxUtils.getOffset(U,!0);ha.style.position="absolute";ha.style.left=sa.x-wa.x+"px";ha.style.top=sa.y-wa.y+"px";ha.style.width=U.offsetWidth+"px";ha.style.height=U.offsetHeight-(ma?4:0)+"px";ha.style.zIndex=5}function ba(U,ha,ma){var wa=document.createElement("div");wa.style.width="32px";wa.style.height="4px";wa.style.margin="2px";wa.style.border="1px solid black";wa.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(ha,
-function(ya){wa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;Y(U,ya,ma)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function ea(U,ha,ma,wa,sa,ya,Ha){null!=ha&&(ha=ha.split(","),Ca.push({name:U,values:ha,type:ma,defVal:wa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Ha}));btn=mxUtils.button("+",mxUtils.bind(pa,function(Qa){for(var ua=ya,za=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")==
-U)ua=ua.nextSibling,za++;else break;var Fa={type:ma,parentRow:ya,index:za,isDeletable:!0,defVal:wa,countProperty:sa};za=la(U,"",Fa,0==za%2,Ha);Y(U,wa,Fa);ua.parentNode.insertBefore(za,ua.nextSibling);mxEvent.consume(Qa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(U,ha,ma,wa,sa,ya,Ha){if(0<sa){var Qa=Array(sa);ha=null!=ha?ha.split(","):[];for(var ua=0;ua<sa;ua++)Qa[ua]=null!=ha[ua]?ha[ua]:null!=wa?wa:"";Ca.push({name:U,values:Qa,type:ma,defVal:wa,
-parentRow:ya,flipBkg:Ha,size:sa})}return document.createElement("div")}function ta(U,ha,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ha;mxEvent.addListener(wa,"change",function(){Y(U,wa.checked?"1":"0",ma)});return wa}function la(U,ha,ma,wa,sa){var ya=ma.dispName,Ha=ma.type,Qa=document.createElement("tr");Qa.className="gePropRow"+(sa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Qa.setAttribute("data-pName",U);Qa.setAttribute("data-pValue",ha);wa=!1;null!=ma.index&&
-(Qa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);wa&&(ua.style.textAlign="right");Qa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Ha)ua.appendChild(ba(U,ha,ma));else if("bool"==Ha||"boolean"==Ha)ua.appendChild(ta(U,ha,ma));else if("enum"==Ha){var za=ma.enumList;for(sa=0;sa<za.length;sa++)if(ya=
-za[sa],ya.val==ha){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Fa=document.createElement("select");R(ua,Fa);for(var Ba=0;Ba<za.length;Ba++){var Ea=za[Ba],Oa=document.createElement("option");Oa.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Oa,mxResources.get(Ea.dispName,null,Ea.dispName));Fa.appendChild(Oa)}Fa.value=ha;q.appendChild(Fa);mxEvent.addListener(Fa,"change",function(){var Pa=mxUtils.htmlEntities(Fa.value);
-Y(U,Pa,ma)});Fa.focus();mxEvent.addListener(Fa,"blur",function(){q.removeChild(Fa)})}))}else"dynamicArr"==Ha?ua.appendChild(ea(U,ha,ma.subType,ma.subDefVal,ma.countProperty,Qa,sa)):"staticArr"==Ha?ua.appendChild(ra(U,ha,ma.subType,ma.subDefVal,ma.size,Qa,sa)):"readOnly"==Ha?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ha,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(ua,
-"click",mxUtils.bind(pa,function(){function Fa(){var Ea=Ba.value;Ea=0==Ea.length&&"string"!=Ha?0:Ea;ma.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ha="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=ma.min&&Ea<ma.min?Ea=ma.min:null!=ma.max&&Ea>ma.max&&(Ea=ma.max);Ea=encodeURIComponent(("int"==Ha?parseInt(Ea):Ea)+"");Y(U,Ea,ma)}var Ba=document.createElement("input");R(ua,Ba,!0);Ba.value=decodeURIComponent(ha);Ba.className="gePropEditor";"int"!=Ha&&"float"!=Ha||ma.allowAuto||
-(Ba.type="number",Ba.step="int"==Ha?"1":"any",null!=ma.min&&(Ba.min=parseFloat(ma.min)),null!=ma.max&&(Ba.max=parseFloat(ma.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ea){13==Ea.keyCode&&Fa()});Ba.focus();mxEvent.addListener(Ba,"blur",function(){Fa()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Fa){Y(U,"",ma,ma.index);mxEvent.consume(Fa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa));
-Qa.appendChild(ua);return Qa}var pa=this,xa=this.editorUi.editor.graph,Ca=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";La.appendChild(Da);
-mxUtils.write(La,mxResources.get("property"));Aa.style.cursor="pointer";var Sa=function(){var U=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ha="none";for(var ma=q.childNodes.length-1;0<=ma;ma--)try{var wa=q.childNodes[ma],sa=wa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(wa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ha="";for(ma=0;ma<U.length;ma++)U[ma].style.display=ha};mxEvent.addListener(Aa,
-"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Sa()});Aa.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");Aa.appendChild(La);Ia.appendChild(Aa);var Ra=!1,Ta=!1;Aa=null;1==Q.vertices.length&&0==Q.edges.length?Aa=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(Aa=Q.edges[0].id);null!=Aa&&Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(Aa=
-E[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(Q,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(Q.style[Aa.sizeProperty]||E[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var z=Aa.dependentProps,L=[],O=[];for(La=0;La<z.length;La++){var V=Q.style[z[La]];O.push(E[z[La]].subDefVal);L.push(null!=V?V.split(","):[])}Aa.dependentPropsDefVal=
-O;Aa.dependentPropsVals=L}Ia.appendChild(la(Za,Na,Aa,Ra,Ta));Ra=!Ra}}for(La=0;La<Ca.length;La++)for(Aa=Ca[La],E=Aa.parentRow,Q=0;Q<Aa.values.length;Q++)Za=la(Aa.name,Aa.values[Q],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:Q,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==Q%2,Aa.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ia);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(Aa){mxEvent.addListener(Aa,
-"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var ba="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(" "),
-ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var la=document.createElement("div");la.style.display="inline-block";la.style.width="6px";la.style.height="6px";la.style.marginLeft="4px";la.style.marginRight="3px";la.style.borderRadius="3px";la.style.cursor="pointer";la.style.background="transparent";la.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(Aa){mxEvent.addListener(la,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(la);ea.appendChild(la)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,xa(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),xa=mxUtils.bind(this,function(Aa){var La=mxUtils.bind(this,
-function(Sa){var Ra=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,L=0;L<z.length;L++){for(var O=Y.getModel().getStyle(z[L]),V=0;V<ba.length;V++)O=mxUtils.removeStylename(O,ba[V]);var U=Y.getModel().isVertex(z[L])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(U,
-mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[L])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,
-Sa.stroke||mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[L])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,
-null))));Y.getModel().setStyle(z[L],O)}}finally{Y.getModel().endUpdate()}}));Ra.className="geStyleButton";Ra.style.width="36px";Ra.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ra.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Ra.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+
-"', GradientType=0)":Ra.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Ra.style.background="url('"+Dialog.prototype.noColorImage+"')":Ra.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ra.style.border=Sa.stroke==mxConstants.NONE?
-Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Ra.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-"#000000");Ra.style.backgroundColor=Ta;Ra.style.border="1px solid "+Za}Ra.style.borderRadius="0";R.appendChild(Ra)});R.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(R),La(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"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(Ca,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(Ca),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Ca);E(Ia);xa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
+Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Z){window.clearTimeout(Y);Q&&E(Editor.createSvgDataUri(Z.getText()))}),
+function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var Z=document.createElement("canvas"),da=Z.getContext("2d");Z.height=R.height;Z.width=R.width;da.drawImage(R,0,0);E(Z.toDataURL())}catch(qa){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(Z){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,Z=Q||{};Q=mxUtils.bind(this,function(da,qa){da=q.getElementsByTagName(da);for(var va=0;va<da.length;va++)mxUtils.bind(this,function(ja){try{if(null!=ja){var sa=Y.convert(ja.getAttribute(qa));if(null!=sa&&"data:"!=sa.substring(0,5)){var ya=Z[sa];null==ya?(R++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Z[sa]=Aa,ja.setAttribute(qa,Aa));R--;0==R&&E(q)})):ja.setAttribute(qa,ya)}else null!=sa&&ja.setAttribute(qa,sa)}}catch(Aa){}})(da[va])});
+Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,Z,da;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}Z=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
+3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2);E+="=";break}da=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2|(da&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(da&
+63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,Z,da,qa){try{var va=!da&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=E){var ya=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();
+ya=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)ya[Aa]=String.fromCharCode(sa[Aa]);ya=ya.join("")}Z=null!=Z?Z:"data:image/png;base64,";ya=Z+Editor.base64Encode(ya)}E(ya)}}else null!=Q&&(0==sa.getStatus()?Q({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?Q({code:sa.getStatus()},sa):Q({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=Q&&Q({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,
+retry:ja})},qa)});ja()}catch(sa){null!=Q&&Q(sa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var Z=1;Z<Q.length;Z++)if(Y=Q[Z].indexOf(")"),0<Y){var da=Editor.trimCssUrl(Q[Z].substring(0,Y));this.graph.isRelativeUrl(da)&&(da=null!=R?
+R+da:window.location.protocol+"//"+window.location.hostname+("/"==da.charAt(0)?"":q)+da);E.push('url("'+da+'"'+Q[Z].substring(Y))}else E.push(Q[Z])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var va=
+[Q[0]],ja=1;ja<Q.length;ja++){var sa=Q[ja].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(Q[ja].substring(0,sa))]);va.push('"'+Q[ja].substring(sa))}E(va.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var Z=Q[q].indexOf(")"),da=null,qa=Q[q].indexOf("format(",Z);0<qa&&(da=Editor.trimCssUrl(Q[q].substring(qa+7,Q[q].indexOf(")",qa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;Y++;var ja="application/x-font-ttf";if("svg"==da||/(\.svg)($|\?)/i.test(va))ja=
+"image/svg+xml";else if("otf"==da||"embedded-opentype"==da||/(\.otf)($|\?)/i.test(va))ja="application/x-font-opentype";else if("woff"==da||/(\.woff)($|\?)/i.test(va))ja="application/font-woff";else if("woff2"==da||/(\.woff2)($|\?)/i.test(va))ja="application/font-woff2";else if("eot"==da||/(\.eot)($|\?)/i.test(va))ja="application/vnd.ms-fontobject";else if("sfnt"==da||/(\.sfnt)($|\?)/i.test(va))ja="application/font-sfnt";this.mapFontUrl(ja,va,mxUtils.bind(this,function(sa,ya){this.loadUrl(ya,mxUtils.bind(this,
+function(Aa){this.cachedFonts[va]=Aa;Y--;R()}),mxUtils.bind(this,function(Aa){Y--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,Z)),da)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&
+(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),Z=0;Z<E.length;Z++)mxUtils.bind(this,function(da,qa){Graph.isCssFontUrl(qa)?null==this.cachedGoogleFonts[qa]?(Y++,this.loadUrl(qa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[qa]=va;Q.push(va+
+"\n");Y--;R()}),mxUtils.bind(this,function(va){Y--;Q.push("@import url("+qa+");\n");R()}))):Q.push(this.cachedGoogleFonts[qa]+"\n"):Q.push('@font-face {font-family: "'+da+'";src: url("'+qa+'")}\n')})(E[Z].name,E[Z].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea,za,Ia,Ca,Sa){try{Z=null!=Z?Z:!0;da=null!=da?da:!0;ya=null!=ya?ya:this.graph;Aa=null!=Aa?Aa:0;var Pa=va?null:ya.background;Pa==mxConstants.NONE&&(Pa=null);null==Pa&&(Pa=Y);null==Pa&&0==va&&(Pa=Ia?this.graph.defaultPageBackgroundColor:
+"#ffffff");this.convertImages(ya.getSvg(null,null,Aa,Ea,null,da,null,null,null,ja,null,Ia,Ca,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(Za,0,0);q(J,Ta)},0):(W.drawImage(Za,0,0),q(J,Ta))},J=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),U=parseInt(Ta.getAttribute("height"));qa=null!=qa?qa:1;null!=E&&(qa=Z?Math.min(1,Math.min(3*E/(4*U),E/O)):E/O);qa=
+this.getMaxCanvasScale(O,U,qa);O=Math.ceil(qa*O);U=Math.ceil(qa*U);J.setAttribute("width",O);J.setAttribute("height",U);var W=J.getContext("2d");null!=Pa&&(W.beginPath(),W.rect(0,0,O,U),W.fillStyle=Pa,W.fill());1!=qa&&W.scale(qa,qa);if(za){var ea=ya.view,ka=ea.scale;ea.scale=1;var xa=btoa(unescape(encodeURIComponent(ea.createSvgGrid(ea.gridColor))));ea.scale=ka;xa="data:image/svg+xml;base64,"+xa;var ta=ya.gridSize*ea.gridSteps*qa,pa=ya.getGraphBounds(),ua=ea.translate.x*ka,Da=ea.translate.y*ka,Fa=
+ua+(pa.x-ua)/ka-Aa,Ma=Da+(pa.y-Da)/ka-Aa,Qa=new Image;Qa.onload=function(){try{for(var Ba=-Math.round(ta-mxUtils.mod((ua-Fa)*qa,ta)),Ka=-Math.round(ta-mxUtils.mod((Da-Ma)*qa,ta));Ba<O;Ba+=ta)for(var Oa=Ka;Oa<U;Oa+=ta)W.drawImage(Qa,Ba/qa,Oa/qa);z()}catch(Ya){null!=R&&R(Ya)}};Qa.onerror=function(Ba){null!=R&&R(Ba)};Qa.src=xa}else z()}catch(Ba){null!=R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};ja&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,
+function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(J){null!=R&&R(J)}}))}catch(z){null!=R&&R(z)}}),Q,sa)}catch(Ta){null!=R&&R(Ta)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,
+Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function Z(sa,ya){var Aa=va;va+=ya;return sa.substring(Aa,va)}function da(sa){sa=Z(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function qa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,
+sa>>8&255,sa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var va=0;if(Z(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(Z(q,4),"IHDR"!=Z(q,4))null!=R&&R();else{Z(q,17);R=q.substring(0,va);do{var ja=da(q);if("IDAT"==Z(q,4)){R=q.substring(0,va-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),Q=qa(Q)+qa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,
+E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=qa(Q.length)+E+Q+qa(Y^4294967295);R+=q.substring(va-8,q.length);break}R+=q.substring(va-8,va-4+ja);Z(q,ja);Z(q,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,E){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);
+this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;
+DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var Z=new ChangePageSetup(E);Z.ignoreColor=!0;Z.ignoreImage=!0;Z.shadowVisible=R;Q.model.execute(Z)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},
+destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},
+function(da){E.editor.setAutosave(da);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(da){this.listener=function(){da(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(da){E.actions.get("mathematicalTypesetting").funct()},
+{install:function(da){this.listener=function(){da(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var Z=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";Z.style.top="2px";R.appendChild(Z)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
+defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",
+dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
+[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
+type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
+type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(q,E,Q){if(null!=E){var Y=function(Z){if(null!=Z)if(Q)for(var da=0;da<Z.length;da++)E[Z[da].name]=Z[da];else for(var qa in E){var va=!1;for(da=0;da<Z.length;da++)if(Z[da].name==qa&&Z[da].type==E[qa].type){va=!0;break}va||delete E[qa]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(Z){}}};var y=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
+{},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(W,ea,ka,xa){ya.getModel().beginUpdate();try{var ta=[],pa=[];if(null!=ka.index){for(var ua=[],Da=ka.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==W;)ua.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;ka.index<ua.length?null!=xa?ua.splice(xa,1):ua[ka.index]=ea:ua.push(ea);null!=ka.size&&ua.length>ka.size&&(ua=ua.slice(0,ka.size));ea=ua.join(",");null!=ka.countProperty&&(ya.setCellStyles(ka.countProperty,ua.length,
+ya.getSelectionCells()),ta.push(ka.countProperty),pa.push(ua.length))}ya.setCellStyles(W,ea,ya.getSelectionCells());ta.push(W);pa.push(ea);if(null!=ka.dependentProps)for(W=0;W<ka.dependentProps.length;W++){var Fa=ka.dependentPropsDefVal[W],Ma=ka.dependentPropsVals[W];if(Ma.length>ea)Ma=Ma.slice(0,ea);else for(var Qa=Ma.length;Qa<ea;Qa++)Ma.push(Fa);Ma=Ma.join(",");ya.setCellStyles(ka.dependentProps[W],Ma,ya.getSelectionCells());ta.push(ka.dependentProps[W]);pa.push(Ma)}if("function"==typeof ka.onChange)ka.onChange(ya,
+ea);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",pa,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}function R(W,ea,ka){var xa=mxUtils.getOffset(q,!0),ta=mxUtils.getOffset(W,!0);ea.style.position="absolute";ea.style.left=ta.x-xa.x+"px";ea.style.top=ta.y-xa.y+"px";ea.style.width=W.offsetWidth+"px";ea.style.height=W.offsetHeight-(ka?4:0)+"px";ea.style.zIndex=5}function Z(W,ea,ka){var xa=document.createElement("div");xa.style.width="32px";xa.style.height=
+"4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=ea&&"none"!=ea?ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ta){this.editorUi.pickColor(ea,function(pa){xa.style.background="none"==pa?"url('"+Dialog.prototype.noColorImage+"')":pa;Y(W,pa,ka)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function da(W,ea,ka,xa,ta,pa,ua){null!=ea&&(ea=ea.split(","),
+Aa.push({name:W,values:ea,type:ka,defVal:xa,countProperty:ta,parentRow:pa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Da){for(var Fa=pa,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==W)Fa=Fa.nextSibling,Ma++;else break;var Qa={type:ka,parentRow:pa,index:Ma,isDeletable:!0,defVal:xa,countProperty:ta};Ma=ja(W,"",Qa,0==Ma%2,ua);Y(W,xa,Qa);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function qa(W,ea,ka,xa,ta,pa,ua){if(0<ta){var Da=Array(ta);ea=null!=ea?ea.split(","):[];for(var Fa=0;Fa<ta;Fa++)Da[Fa]=null!=ea[Fa]?ea[Fa]:null!=xa?xa:"";Aa.push({name:W,values:Da,type:ka,defVal:xa,parentRow:pa,flipBkg:ua,size:ta})}return document.createElement("div")}function va(W,ea,ka){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ea;mxEvent.addListener(xa,"change",function(){Y(W,xa.checked?"1":"0",ka)});return xa}function ja(W,
+ea,ka,xa,ta){var pa=ka.dispName,ua=ka.type,Da=document.createElement("tr");Da.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",W);Da.setAttribute("data-pValue",ea);xa=!1;null!=ka.index&&(Da.setAttribute("data-index",ka.index),pa=(null!=pa?pa:"")+"["+ka.index+"]",xa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";pa=mxResources.get(pa,null,pa);mxUtils.write(Fa,pa);Fa.setAttribute("title",pa);xa&&(Fa.style.textAlign="right");
+Da.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ua)Fa.appendChild(Z(W,ea,ka));else if("bool"==ua||"boolean"==ua)Fa.appendChild(va(W,ea,ka));else if("enum"==ua){var Ma=ka.enumList;for(ta=0;ta<Ma.length;ta++)if(pa=Ma[ta],pa.val==ea){mxUtils.write(Fa,mxResources.get(pa.dispName,null,pa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){var Qa=document.createElement("select");R(Fa,Qa);for(var Ba=0;Ba<Ma.length;Ba++){var Ka=Ma[Ba],Oa=
+document.createElement("option");Oa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Oa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Oa)}Qa.value=ea;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Ya=mxUtils.htmlEntities(Qa.value);Y(W,Ya,ka)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==ua?Fa.appendChild(da(W,ea,ka.subType,ka.subDefVal,ka.countProperty,Da,ta)):"staticArr"==ua?Fa.appendChild(qa(W,ea,ka.subType,ka.subDefVal,
+ka.size,Da,ta)):"readOnly"==ua?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ea,ta.style.width="96px",ta.style.borderWidth="0px",Fa.appendChild(ta)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ea)),mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){function Qa(){var Ka=Ba.value;Ka=0==Ka.length&&"string"!=ua?0:Ka;ka.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",ua="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ka.min&&Ka<
+ka.min?Ka=ka.min:null!=ka.max&&Ka>ka.max&&(Ka=ka.max);Ka=encodeURIComponent(("int"==ua?parseInt(Ka):Ka)+"");Y(W,Ka,ka)}var Ba=document.createElement("input");R(Fa,Ba,!0);Ba.value=decodeURIComponent(ea);Ba.className="gePropEditor";"int"!=ua&&"float"!=ua||ka.allowAuto||(Ba.type="number",Ba.step="int"==ua?"1":"any",null!=ka.min&&(Ba.min=parseFloat(ka.min)),null!=ka.max&&(Ba.max=parseFloat(ka.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Ba.focus();mxEvent.addListener(Ba,
+"blur",function(){Qa()})})));ka.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(sa,function(Qa){Y(W,"",ka,ka.index);mxEvent.consume(Qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Fa.appendChild(ta));Da.appendChild(Fa);return Da}var sa=this,ya=this.editorUi.editor.graph,Aa=[];q.style.position="relative";q.style.padding="0";var Ea=document.createElement("table");Ea.className="geProperties";Ea.style.whiteSpace="nowrap";Ea.style.width="100%";var za=
+document.createElement("tr");za.className="gePropHeader";var Ia=document.createElement("th");Ia.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Ia.appendChild(Ca);mxUtils.write(Ia,mxResources.get("property"));za.style.cursor="pointer";var Sa=function(){var W=Ea.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ea="none";for(var ka=q.childNodes.length-
+1;0<=ka;ka--)try{var xa=q.childNodes[ka],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||q.removeChild(xa)}catch(pa){}}else Ca.src=Sidebar.prototype.expandedImage,ea="";for(ka=0;ka<W.length;ka++)W[ka].style.display=ea};mxEvent.addListener(za,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Sa()});za.appendChild(Ia);Ia=document.createElement("th");Ia.className="gePropHeaderCell";Ia.innerHTML=mxResources.get("value");za.appendChild(Ia);Ea.appendChild(za);var Pa=
+!1,Ta=!1;za=null;1==Q.vertices.length&&0==Q.edges.length?za=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(za=Q.edges[0].id);null!=za&&Ea.appendChild(ja("id",mxUtils.htmlEntities(za),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(za=E[Za],"function"!=typeof za.isVisible||za.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=za.getDefaultValue?za.getDefaultValue(Q,this):za.defVal;if("separator"==za.type)Ta=!Ta;else{if("staticArr"==za.type)za.size=
+parseInt(Q.style[za.sizeProperty]||E[za.sizeProperty].defVal)||0;else if(null!=za.dependentProps){var z=za.dependentProps,J=[],O=[];for(Ia=0;Ia<z.length;Ia++){var U=Q.style[z[Ia]];O.push(E[z[Ia]].subDefVal);J.push(null!=U?U.split(","):[])}za.dependentPropsDefVal=O;za.dependentPropsVals=J}Ea.appendChild(ja(Za,Na,za,Pa,Ta));Pa=!Pa}}for(Ia=0;Ia<Aa.length;Ia++)for(za=Aa[Ia],E=za.parentRow,Q=0;Q<za.values.length;Q++)Za=ja(za.name,za.values[Q],{type:za.type,parentRow:za.parentRow,isDeletable:za.isDeletable,
+index:Q,defVal:za.defVal,countProperty:za.countProperty,size:za.size},0==Q%2,za.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ea);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
+R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var Z="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(" "),da=document.createElement("div");da.style.whiteSpace="nowrap";da.style.position="relative";da.style.textAlign="center";da.style.width="210px";for(var qa=[],va=0;va<this.defaultColorSchemes.length;va++){var ja=
+document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){sa(za)}))})(va);qa.push(ja);da.appendChild(ja)}var sa=mxUtils.bind(this,function(za){null!=qa[za]&&(null!=this.format.currentScheme&&
+null!=qa[this.format.currentScheme]&&(qa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,ya(this.defaultColorSchemes[this.format.currentScheme]),qa[this.format.currentScheme].style.background="#84d7ff")}),ya=mxUtils.bind(this,function(za){var Ia=mxUtils.bind(this,function(Sa){var Pa=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,J=0;J<z.length;J++){for(var O=Y.getModel().getStyle(z[J]),U=
+0;U<Z.length;U++)O=mxUtils.removeStylename(O,Z[U]);var W=Y.getModel().isVertex(z[J])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&
+mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[J])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[J])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));Y.getModel().setStyle(z[J],O)}}finally{Y.getModel().endUpdate()}}));Pa.className="geStyleButton";Pa.style.width="36px";Pa.style.height=10>=this.defaultColorSchemes.length?
+"24px":"30px";Pa.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":Pa.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Pa.style.background="url('"+Dialog.prototype.noColorImage+
+"')":Pa.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Pa.style.border=Sa.stroke==mxConstants.NONE?Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Pa.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Pa.style.backgroundColor=Ta;Pa.style.border="1px solid "+Za}Pa.style.borderRadius="0";R.appendChild(Pa)});R.innerText="";for(var Ca=0;Ca<za.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(R),Ia(za[Ca])});
+null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"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(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ea=document.createElement("div");Ea.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(q.appendChild(Aa),q.appendChild(Ea));mxEvent.addListener(Ea,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Aa);E(Ea);ya(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(da);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
@@ -3293,53 +3294,53 @@ E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createE
Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ba=this.graph.getCellStyle(R);if(null!=ba&&"rack"==ba.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ba.marginLeft||0;ea.marginRight=ba.marginRight||0;ea.marginTop=ba.marginTop||
-0;ea.marginBottom=ba.marginBottom||0;ea.allowGaps=ba.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,ba,ea,ra,ta,la,
-pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var Aa=ea.getSelectionCells(),La=[],Da=0;Da<Aa.length;Da++)ea.isCellVisible(Aa[Da])&&La.push(Aa[Da]);ea.setSelectionCells(La)}function R(Aa){ea.setHiddenTags(Aa?[]:ra.slice());Y();ea.refresh()}function ba(Aa,
-La){la.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Sa=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Ra=0;Ra<Aa.length;Ra++)(function(Ta){var Za=0>mxUtils.indexOf(ea.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var L=document.createElement("img");L.setAttribute("src",
-Za?Editor.visibleImage:Editor.hiddenImage);L.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(L,Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";z.appendChild(L);mxEvent.addListener(L,"click",function(V){mxEvent.isShiftDown(V)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ta)):(ea.toggleHiddenTag(Ta),Y(),ea.refresh());mxEvent.consume(V)});Na.appendChild(z);z=document.createElement("td");
-z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(V){if(mxEvent.isShiftDown(V)){R(!0);var U=ea.getCellsForTags([Ta],null,null,!0);ea.isEnabled()?ea.setSelectionCells(U):ea.highlightCells(U)}else if(Za&&
-0<ea.hiddenTags.length)R(!0);else{U=ra.slice();var ha=mxUtils.indexOf(U,Ta);U.splice(ha,1);ea.setHiddenTags(U);Y();ea.refresh()}mxEvent.consume(V)});Na.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==La){z.style.align="center";z.style.width="16px";L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(L,
-Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";mxEvent.addListener(L,"click",function(V){var U=mxUtils.indexOf(ra,Ta);0<=U&&ra.splice(U,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ta]);ea.refresh();mxEvent.consume(V)});z.appendChild(L)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
-Ta);O.checked=O.defaultChecked;O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(V){O.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ta]):ea.removeTagsForCells(ea.getSelectionCells(),[Ta]);mxEvent.consume(V)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(Aa[Ra]);Da.appendChild(Sa);la.appendChild(Da)}}var ea=this,ra=ea.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect=
-"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.borderRadius="4px";la.style.userSelect="none";la.style.overflow="auto";la.style.position="absolute";la.style.left="10px";la.style.right="10px";la.style.top="10px";la.style.border=ea.isEnabled()?"1px solid #808080":"none";la.style.bottom=ea.isEnabled()?"48px":"10px";ta.appendChild(la);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ea.setHiddenTags([]);
-mxEvent.isShiftDown(Aa)||(ra=ea.hiddenTags.slice());Y();ea.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var xa=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(ra,function(Aa){ra=Aa;Ca()})});xa.setAttribute("title",mxResources.get("add"));xa.className="geBtn";xa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){ra=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(Aa,La){if(q()){Aa=ea.getAllTags();for(La=0;La<
-Aa.length;La++)0>mxUtils.indexOf(ra,Aa[La])&&ra.push(Aa[La]);ra.sort();ea.isSelectionEmpty()?ba(ra):ba(ra,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px";
-Ia.style.left="10px";ea.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(xa),ta.appendChild(Ia));return{div:ta,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,
-E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var W=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return W.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=q)for(var E in q)this.globalVars[E]=q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia){var Aa=null,La=null,Da=null;xa||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,La=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 Sa=Z.apply(this,arguments),Ra=this.getCustomFonts();if(pa&&0<Ra.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",L=0;L<Ra.length;L++){var O=
-Ra[L].name,V=Ra[L].url;Graph.isCssFontUrl(V)?Na+="@import url("+V+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+V+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=La,this.stylesheet=Aa,this.refresh());return Sa};var N=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(q){N.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this,
-arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var G=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}G.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var Z=this.graph.getCellStyle(R);if(null!=Z&&"rack"==Z.childLayout){var da=new mxStackLayout(this.graph,!1);da.gridSize=null!=Z.rackUnitSize?parseFloat(Z.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;da.marginLeft=Z.marginLeft||0;da.marginRight=Z.marginRight||0;da.marginTop=Z.marginTop||0;da.marginBottom=
+Z.marginBottom||0;da.allowGaps=Z.allowGaps||0;da.horizontal="1"==mxUtils.getValue(Z,"horizontalRack","0");da.resizeParent=!1;da.fill=!0;return da}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var D=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(D.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa){I.apply(this,arguments);
+Graph.processFontAttributes(sa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var za=da.getSelectionCells(),Ia=[],Ca=0;Ca<za.length;Ca++)da.isCellVisible(za[Ca])&&Ia.push(za[Ca]);da.setSelectionCells(Ia)}function R(za){da.setHiddenTags(za?[]:qa.slice());Y();da.refresh()}function Z(za,Ia){ja.innerText="";if(0<
+za.length){var Ca=document.createElement("table");Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Sa=document.createElement("tbody");if(null!=za&&0<za.length)for(var Pa=0;Pa<za.length;Pa++)(function(Ta){var Za=0>mxUtils.indexOf(da.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var J=document.createElement("img");J.setAttribute("src",Za?Editor.visibleImage:
+Editor.hiddenImage);J.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign="middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";z.appendChild(J);mxEvent.addListener(J,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(da.hiddenTags,Ta)):(da.toggleHiddenTag(Ta),Y(),da.refresh());mxEvent.consume(U)});Na.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
+z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var W=da.getCellsForTags([Ta],null,null,!0);da.isEnabled()?da.setSelectionCells(W):da.highlightCells(W)}else if(Za&&0<da.hiddenTags.length)R(!0);
+else{W=qa.slice();var ea=mxUtils.indexOf(W,Ta);W.splice(ea,1);da.setHiddenTags(W);Y();da.refresh()}mxEvent.consume(U)});Na.appendChild(z);if(da.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Ia){z.style.align="center";z.style.width="16px";J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign=
+"middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";mxEvent.addListener(J,"click",function(U){var W=mxUtils.indexOf(qa,Ta);0<=W&&qa.splice(W,1);da.removeTagsForCells(da.model.getDescendants(da.model.getRoot()),[Ta]);da.refresh();mxEvent.consume(U)});z.appendChild(J)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=Ia&&0<=mxUtils.indexOf(Ia,Ta);O.checked=O.defaultChecked;
+O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(U){O.checked?da.addTagsForCells(da.getSelectionCells(),[Ta]):da.removeTagsForCells(da.getSelectionCells(),[Ta]);mxEvent.consume(U)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(za[Pa]);Ca.appendChild(Sa);ja.appendChild(Ca)}}var da=this,qa=da.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow=
+"hidden";va.style.padding="10px";va.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=da.isEnabled()?"1px solid #808080":"none";ja.style.bottom=da.isEnabled()?"48px":"10px";va.appendChild(ja);var sa=mxUtils.button(mxResources.get("reset"),function(za){da.setHiddenTags([]);mxEvent.isShiftDown(za)||
+(qa=da.hiddenTags.slice());Y();da.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var ya=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(qa,function(za){qa=za;Aa()})});ya.setAttribute("title",mxResources.get("add"));ya.className="geBtn";ya.style.margin="0";da.addListener(mxEvent.ROOT,function(){qa=da.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(za,Ia){if(q()){za=da.getAllTags();for(Ia=0;Ia<za.length;Ia++)0>mxUtils.indexOf(qa,
+za[Ia])&&qa.push(za[Ia]);qa.sort();da.isSelectionEmpty()?Z(qa):Z(qa,da.getCommonTagsForCells(da.getSelectionCells()))}});da.selectionModel.addListener(mxEvent.CHANGE,Aa);da.model.addListener(mxEvent.CHANGE,Aa);da.addListener(mxEvent.REFRESH,Aa);var Ea=document.createElement("div");Ea.style.boxSizing="border-box";Ea.style.whiteSpace="nowrap";Ea.style.position="absolute";Ea.style.overflow="hidden";Ea.style.bottom="0px";Ea.style.height="42px";Ea.style.right="10px";Ea.style.left="10px";da.isEnabled()&&
+(Ea.appendChild(sa),Ea.appendChild(ya),va.appendChild(Ea));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==
+q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var S=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return S.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var E in q)this.globalVars[E]=
+q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea){var za=null,Ia=null,Ca=null;ya||null==this.themes||"darkTheme"!=this.defaultThemeName||(za=this.stylesheet,Ia=this.shapeForegroundColor,Ca=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 Sa=M.apply(this,arguments),Pa=this.getCustomFonts();if(sa&&0<Pa.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",J=0;J<Pa.length;J++){var O=Pa[J].name,U=Pa[J].url;Graph.isCssFontUrl(U)?
+Na+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+U+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=za&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Ia,this.stylesheet=za,this.refresh());return Sa};var fa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){fa.apply(this,
+arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var la=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){la.apply(this,arguments);this.enumerationState=0};var ra=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ra.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale=
-Q,E.redraw())}};var S=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){S.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var fa=Graph.prototype.refresh;Graph.prototype.refresh=function(){fa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var ia=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ia.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,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 Q=!1,Y=0,R=0,ba=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&ta()}),ta=mxUtils.bind(this,function(){if(R<q.length){var la=this.stoppingCustomActions,pa=q[R++],xa=[];if(null!=pa.open)if(ea(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=pa.wait?parseInt(pa.wait):1E3),ea());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,la?0:pa.fadeIn.delay));null!=pa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,la?0:pa.fadeOut.delay));null!=pa.wipeIn&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn,
-!0),!0)));null!=pa.wipeOut&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ca=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=pa.hide&&(ba(),Ca=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=pa.toggleStyle&&
-null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ca=[];null!=pa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(pa.select),this.setSelectionCells(Ca));null!=pa.highlight&&(Ca=this.getCellsForAction(pa.highlight),this.highlightCells(Ca,
-pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ca=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=pa.tags){Ca=[];null!=pa.tags.hidden&&(Ca=Ca.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ca,Ia[Aa])&&Ca.push(Ia[Aa]);this.setHiddenTags(Ca);this.refresh()}0<
-xa.length&&(Y++,this.executeAnimations(xa,ra,la?1:pa.steps,la?0:pa.delay));0==Y?ta():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=E&&E()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),
-ba=!1,ea=0;ea<R.length;ea++)Q=R[ea].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(q,Q)),ba=!0);ba&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
-E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var ba=q[E[Q][R]];null!=ba?""!=ba&&Y.push(ba):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=
-q.excludeCells){for(var Q=[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(ba){return ba!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
+Q,E.redraw())}};var ba=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ba.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var oa=Graph.prototype.refresh;Graph.prototype.refresh=function(){oa.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,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 Q=!1,Y=0,R=0,Z=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,
+function(){Q&&(Q=!1,this.model.endUpdate())}),qa=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&va()}),va=mxUtils.bind(this,function(){if(R<q.length){var ja=this.stoppingCustomActions,sa=q[R++],ya=[];if(null!=sa.open)if(da(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;qa()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=sa.wait?parseInt(sa.wait):1E3),da());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,qa,ja?0:sa.fadeIn.delay));null!=sa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,qa,ja?0:sa.fadeOut.delay));null!=sa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
+!0),!0)));null!=sa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Z(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Z();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Z(),Aa=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=
+sa.toggleStyle.key&&(Z(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Z(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,
+sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ea=this.getAllTags(),za=0;za<Ea.length;za++)0>mxUtils.indexOf(sa.tags.visible,Ea[za])&&0>mxUtils.indexOf(Aa,Ea[za])&&Aa.push(Ea[za]);this.setHiddenTags(Aa);this.refresh()}0<ya.length&&
+(Y++,this.executeAnimations(ya,qa,ja?1:sa.steps,ja?0:sa.delay));0==Y?va():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),Z=
+!1,da=0;da<R.length;da++)Q=R[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[da].setAttribute("href",this.updateCustomLink(q,Q)),Z=!0);Z&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
+E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var Z=q[E[Q][R]];null!=Z?""!=Z&&Y.push(Z):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=q.excludeCells){for(var Q=
+[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Z){return Z!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0>
-mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var ba=0,ea={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ea[q[ra]]=!0,ba++);for(ra=0;ra<E.length;ra++)if(Q&&this.model.getParent(E[ra])==this.model.root||this.model.isVertex(E[ra])||this.model.isEdge(E[ra])){var ta=this.getTagsForCell(E[ra]),la=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa=
-la=0;pa<ta.length&&la<ba;pa++)null!=ea[ta[pa]]&&la++;la=la==ba}la&&(1!=Y||this.isCellVisible(E[ra]))&&R.push(E[ra])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var ba={},ea=0;ea<R.length;ea++)if(null==E||null!=E[R[ea]])ba[R[ea]]=!0,Q.push(R[ea]);E=ba}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var ba=0;ba<R.length;ba++)null==Q[R[ba]]&&(Q[R[ba]]=!0,E.push(R[ba]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),ba=
-!1,ea=0;ea<E.length;ea++){var ra=mxUtils.trim(E[ea]);""!=ra&&0>mxUtils.indexOf(R,ra)&&(Y=0<Y.length?Y+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),ba=!1,ea=0;ea<E.length;ea++){var ra=mxUtils.indexOf(R,E[ea]);0<=ra&&(R.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[Q],
+mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Z=0,da={},qa=0;qa<q.length;qa++)0<q[qa].length&&(da[q[qa]]=!0,Z++);for(qa=0;qa<E.length;qa++)if(Q&&this.model.getParent(E[qa])==this.model.root||this.model.isVertex(E[qa])||this.model.isEdge(E[qa])){var va=this.getTagsForCell(E[qa]),ja=!1;if(0<va.length&&(va=va.split(" "),va.length>=q.length)){for(var sa=
+ja=0;sa<va.length&&ja<Z;sa++)null!=da[va[sa]]&&ja++;ja=ja==Z}ja&&(1!=Y||this.isCellVisible(E[qa]))&&R.push(E[qa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var Z={},da=0;da<R.length;da++)if(null==E||null!=E[R[da]])Z[R[da]]=!0,Q.push(R[da]);E=Z}else return[]}return Q};
+Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var Z=0;Z<R.length;Z++)null==Q[R[Z]]&&(Q[R[Z]]=!0,E.push(R[Z]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),Z=!1,da=
+0;da<E.length;da++){var qa=mxUtils.trim(E[da]);""!=qa&&0>mxUtils.indexOf(R,qa)&&(Y=0<Y.length?Y+" "+qa:qa,Z=!0)}Z&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),Z=!1,da=0;da<E.length;da++){var qa=mxUtils.indexOf(R,E[da]);0<=qa&&(R.splice(qa,1),Z=!0)}Z&&this.setAttributeForCell(q[Q],
"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R],
-E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var ba=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ba=new mxCellHighlight(this,E,R,!1),null!=Y&&(ba.opacity=Y),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()},
-1200)},Q));return ba};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,ba=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ba.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ba.appendChild(ea);
-ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
-"offsetColor");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ba.appendChild(ea);
-ea=q.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=ea[0];R.appendChild(ba);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
-6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var Z=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),Z=new mxCellHighlight(this,E,R,!1),null!=Y&&(Z.opacity=Y),Z.highlight(q),window.setTimeout(function(){null!=Z.shape&&(mxUtils.setPrefixedStyle(Z.shape.node.style,"transition","all 1200ms ease-in-out"),Z.shape.node.style.opacity=0);window.setTimeout(function(){Z.destroy()},
+1200)},Q));return Z};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,Z=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");Z.setAttribute("id",this.shadowId);var da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");da.setAttribute("in","SourceAlpha");da.setAttribute("stdDeviation",this.svgShadowBlur);da.setAttribute("result","blur");Z.appendChild(da);
+da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");da.setAttribute("in","blur");da.setAttribute("dx",this.svgShadowSize);da.setAttribute("dy",this.svgShadowSize);da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");da.setAttribute("flood-color",this.svgShadowColor);da.setAttribute("flood-opacity",this.svgShadowOpacity);da.setAttribute("result",
+"offsetColor");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");da.setAttribute("in","offsetColor");da.setAttribute("in2","offsetBlur");da.setAttribute("operator","in");da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");da.setAttribute("in","SourceGraphic");da.setAttribute("in2","offsetBlur");Z.appendChild(da);da=
+q.getElementsByTagName("defs");0==da.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=da[0];R.appendChild(Z);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
+6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Z};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?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 q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};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",
@@ -3352,160 +3353,160 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker=
-function(q,E,Q,Y,R,ba,ea,ra,ta,la){if(null!=Q&&null==mxMarker.markers[Q]){var pa=this.getPackageForType(Q);null!=pa&&mxStencilRegistry.getStencil(pa)}return aa.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,ba){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Ca.value=
-Math.max(1,Math.min(ra,Math.max(parseInt(Ca.value),parseInt(xa.value))));xa.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ca.value),parseInt(xa.value))))}function Y(ya){function Ha($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=wa.get(),hb=
-1/$a.pageScale,tb=Sa.checked;if(tb){hb=parseInt(ha.value);var Cb=parseInt(ma.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(Qa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Qa);kb.height=Math.ceil(kb.height*Qa);hb*=Qa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,
-hb,kb,0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ia.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),
-ob.writeln(q.editor.fontCss),ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;
-ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,
-null,ib,!0);R.enableFlowAnimation=kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
-(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Qa=parseInt(sa.value)/100;isNaN(Qa)&&(Qa=1,sa.value="100 %");Qa*=.75;var ua=null,za=R.shapeForegroundColor,Fa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
-R.defaultThemeName&&(ua=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=xa.value,Ea=Ca.value,Oa=!la.checked,Pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,la.checked,Ba,Ea,Sa.checked,ha.value,ma.value,parseInt(Da.value)/100,parseInt(sa.value)/100,wa.get());else{Oa&&(Oa=Ia.checked||Ba==ta&&Ea==ta);if(!Oa&&null!=q.pages&&q.pages.length){var bb=0;Oa=q.pages.length-1;la.checked||(bb=parseInt(Ba)-1,
-Oa=parseInt(Ea)-1);for(var eb=bb;eb<=Oa;eb++){var db=q.pages[eb];Ba=db==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ea=!0;bb=!1;var ub=null,fb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ea=db.viewState.pageVisible,bb=db.viewState.mathEnabled,ub=db.viewState.background,fb=db.viewState.backgroundImage,Ba.extFonts=db.viewState.extFonts);null!=
-fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,db));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ea;Ba.mathEnabled=bb;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*
-gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=function($a){return"page"==$a?db.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(db);Ba.model.setRoot(db.root)}Pa=Ha(Ba,Pa,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Pa=Ha(R);null==Pa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Pa.mathEnabled&&(Oa=Pa.wnd.document,
-ya&&(Pa.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Pa.closeDocument(),!Pa.mathEnabled&&ya&&PrintDialog.printPreview(Pa));null!=ua&&(R.shapeForegroundColor=za,R.shapeBackgroundColor=Fa,R.stylesheet=ua,R.refresh())}}var R=q.editor.graph,ba=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,E||mxResources.get("print"));
-ba.appendChild(ea);var ra=1,ta=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var la=document.createElement("input");la.style.cssText="margin-right:8px;margin-bottom:8px;";la.setAttribute("value","all");la.setAttribute("type","radio");la.setAttribute("name","pages-printdialog");ea.appendChild(la);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));ea.appendChild(E);mxUtils.br(ea);var pa=
-la.cloneNode(!0);la.setAttribute("checked","checked");pa.setAttribute("value","range");ea.appendChild(pa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");ea.appendChild(E);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","1");xa.setAttribute("type","number");xa.setAttribute("min","1");xa.style.width="50px";ea.appendChild(xa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));ea.appendChild(E);
-var Ca=xa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(xa,"focus",function(){pa.checked=!0});mxEvent.addListener(Ca,"focus",function(){pa.checked=!0});mxEvent.addListener(xa,"change",Q);mxEvent.addListener(Ca,"change",Q);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){ta=E+1;xa.value=ta;Ca.value=ta;break}xa.setAttribute("max",ra);Ca.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ea),pa.checked=!0):pa.checked=
-!0;mxUtils.br(ea);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";R.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ea.appendChild(Ia));E=document.createElement("span");mxUtils.write(E,
-mxResources.get("selectionOnly"));Ia.parentNode.appendChild(E);1==ra&&mxUtils.br(Ia.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");Aa.appendChild(La);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));Aa.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width=
-"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){La.checked=!0});ba.appendChild(Aa);ea=ea.cloneNode(!1);var Sa=La.cloneNode(!0);Sa.setAttribute("value","fit");La.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);ea.appendChild(E);Aa=document.createElement("table");Aa.style.display="inline-block";var Ra=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),
-Na=document.createElement("td"),z=Na.cloneNode(!0),L=Na.cloneNode(!0),O=Na.cloneNode(!0),V=Na.cloneNode(!0),U=Na.cloneNode(!0);Na.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min","1");ha.setAttribute("type","number");ha.style.width="40px";z.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));
-L.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ma=ha.cloneNode(!0);V.appendChild(ma);mxEvent.addListener(ha,"focus",function(){Sa.checked=!0});mxEvent.addListener(ma,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));U.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(L);Za.appendChild(O);Za.appendChild(V);Za.appendChild(U);Ra.appendChild(Ta);Ra.appendChild(Za);Aa.appendChild(Ra);ea.appendChild(Aa);
-ba.appendChild(ea);ea=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));ea.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));ea.appendChild(E);var sa=
-document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ea.appendChild(sa);ba.appendChild(ea);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&E.appendChild(ea);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-Aa.className="geBtn",E.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();Y(!1)}),Aa.className="geBtn",E.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});Aa.className="geBtn gePrimaryBtn";E.appendChild(Aa);q.editor.cancelFirst||E.appendChild(ea);ba.appendChild(E);this.container=ba};var ja=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
-function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
-this.shadowVisible)}}else ja.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 ca=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ca.getContext("2d").drawImage(ka,
-0,0);var q=ca.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};ka.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
+function(q,E,Q,Y,R,Z,da,qa,va,ja){if(null!=Q&&null==mxMarker.markers[Q]){var sa=this.getPackageForType(Q);null!=sa&&mxStencilRegistry.getStencil(sa)}return aa.apply(this,arguments)};var V=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,Z){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return V.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Aa.value=Math.max(1,
+Math.min(qa,Math.max(parseInt(Aa.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(qa,Math.min(parseInt(Aa.value),parseInt(ya.value))))}function Y(pa){function ua($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb=1/$a.pageScale,
+tb=Sa.checked;if(tb){hb=parseInt(ea.value);var Cb=parseInt(ka.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Ca.value)/(100*$a.pageScale),isNaN(hb)&&(Da=1/$a.pageScale,Ca.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Da);kb.height=Math.ceil(kb.height*Da);hb*=Da;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,hb,kb,
+0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ea.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(q.editor.fontCss),
+ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;ab.renderPage=function(ob,yb,
+Ab,c,l,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,null,ib,!0);R.enableFlowAnimation=
+kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(ab.wnd.document.writeln('<style type="text/css">'),
+ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Da=parseInt(ta.value)/100;isNaN(Da)&&(Da=1,ta.value="100 %");Da*=.75;var Fa=null,Ma=R.shapeForegroundColor,Qa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(Fa=R.stylesheet,R.stylesheet=
+R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=ya.value,Ka=Aa.value,Oa=!ja.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ja.checked,Ba,Ka,Sa.checked,ea.value,ka.value,parseInt(Ca.value)/100,parseInt(ta.value)/100,xa.get());else{Oa&&(Oa=Ea.checked||Ba==va&&Ka==va);if(!Oa&&null!=q.pages&&q.pages.length){var db=0;Oa=q.pages.length-1;ja.checked||(db=parseInt(Ba)-1,Oa=parseInt(Ka)-1);for(var eb=db;eb<=Oa;eb++){var cb=
+q.pages[eb];Ba=cb==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ka=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ka=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ba.extFonts=cb.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,
+cb));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ka;Ba.mathEnabled=db;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=
+function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(cb);Ba.model.setRoot(cb.root)}Ya=ua(Ba,Ya,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Ya=ua(R);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Oa=Ya.wnd.document,pa&&(Ya.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+
+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&pa&&PrintDialog.printPreview(Ya));null!=Fa&&(R.shapeForegroundColor=Ma,R.shapeBackgroundColor=Qa,R.stylesheet=Fa,R.refresh())}}var R=q.editor.graph,Z=document.createElement("div"),da=document.createElement("h3");da.style.width="100%";da.style.textAlign="center";da.style.marginTop="0px";mxUtils.write(da,E||mxResources.get("print"));Z.appendChild(da);var qa=1,va=1;da=document.createElement("div");da.style.cssText=
+"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");da.appendChild(ja);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));da.appendChild(E);mxUtils.br(da);var sa=ja.cloneNode(!0);ja.setAttribute("checked","checked");sa.setAttribute("value","range");
+da.appendChild(sa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");da.appendChild(E);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="50px";da.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));da.appendChild(E);var Aa=ya.cloneNode(!0);da.appendChild(Aa);mxEvent.addListener(ya,"focus",function(){sa.checked=
+!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(ya,"change",Q);mxEvent.addListener(Aa,"change",Q);if(null!=q.pages&&(qa=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){va=E+1;ya.value=va;Aa.value=va;break}ya.setAttribute("max",qa);Aa.setAttribute("max",qa);q.isPagesEnabled()?1<qa&&(Z.appendChild(da),sa.checked=!0):sa.checked=!0;mxUtils.br(da);var Ea=document.createElement("input");Ea.setAttribute("value","all");Ea.setAttribute("type",
+"radio");Ea.style.marginRight="8px";R.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");var za=document.createElement("div");za.style.marginBottom="10px";1==qa?(Ea.setAttribute("type","checkbox"),Ea.style.marginBottom="12px",za.appendChild(Ea)):(Ea.setAttribute("name","pages-printdialog"),Ea.style.marginBottom="8px",da.appendChild(Ea));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));Ea.parentNode.appendChild(E);1==qa&&mxUtils.br(Ea.parentNode);var Ia=document.createElement("input");
+Ia.style.marginRight="8px";Ia.setAttribute("value","adjust");Ia.setAttribute("type","radio");Ia.setAttribute("name","printZoom");za.appendChild(Ia);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));za.appendChild(E);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";za.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Ia.checked=!0});Z.appendChild(za);da=da.cloneNode(!1);var Sa=Ia.cloneNode(!0);
+Sa.setAttribute("value","fit");Ia.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);da.appendChild(E);za=document.createElement("table");za.style.display="inline-block";var Pa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),Na=document.createElement("td"),z=Na.cloneNode(!0),J=Na.cloneNode(!0),O=Na.cloneNode(!0),U=Na.cloneNode(!0),W=Na.cloneNode(!0);Na.style.textAlign=
+"right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("min","1");ea.setAttribute("type","number");ea.style.width="40px";z.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));J.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ka=ea.cloneNode(!0);U.appendChild(ka);mxEvent.addListener(ea,"focus",
+function(){Sa.checked=!0});mxEvent.addListener(ka,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));W.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(J);Za.appendChild(O);Za.appendChild(U);Za.appendChild(W);Pa.appendChild(Ta);Pa.appendChild(Za);za.appendChild(Pa);da.appendChild(za);Z.appendChild(da);da=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom=
+"12px";mxUtils.write(E,mxResources.get("paperSize"));da.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);da.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));da.appendChild(E);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";
+da.appendChild(ta);Z.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});da.className="geBtn";q.editor.cancelFirst&&E.appendChild(da);q.isOffline()||(za=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),za.className="geBtn",E.appendChild(za));PrintDialog.previewEnabled&&(za=mxUtils.button(mxResources.get("preview"),
+function(){q.hideDialog();Y(!1)}),za.className="geBtn",E.appendChild(za));za=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});za.className="geBtn gePrimaryBtn";E.appendChild(za);q.editor.cancelFirst||E.appendChild(da);Z.appendChild(E);this.container=Z};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ha.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 X=document.createElement("canvas"),ia=new Image;ia.onload=function(){try{X.getContext("2d").drawImage(ia,0,0);var q=X.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};
+ia.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";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,f,g,x,y,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
-encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,y)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,t,G){t=null!=t?t:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=D+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
+encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(I){}try{G||null==window.console||console.error(t,d,f,g,x,y)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(u){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=y.spin;y.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
-G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var W=function(){};this.active&&(W=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return W}),G=!0);return G};var H=y.stop;y.stop=function(){H.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=y.spin;y.spin=function(D,I){var H=!1;this.active||(t.call(this,D),this.active=!0,null!=I&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),
+H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),H.innerHTML=I,D.appendChild(H),y.status=H),this.pause=mxUtils.bind(this,function(){var S=function(){};this.active&&(S=mxUtils.bind(this,function(){this.spin(D,I)}));this.stop();return S}),H=!0);return H};var G=y.stop;y.stop=function(){G.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var H=y.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&y.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&y.movePage(H,0)};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,
-H+1)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,y.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&y.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&y.selectPage(y.pages[0])};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.selectNextPage(!0)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)||
-x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(d),u=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var u=this.updatePageRoot(new DiagramPage(x[y]));null==u.getName()&&
-u.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,u,0==y?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,u,H,J,D,G,W){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;D=null!=D?D:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else T=Z=x;if(null==d)return"";var N=d;if("mxfile"!=N.nodeName.toLowerCase()){if(W){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
-qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));N=Graph.compress(qa);if(Graph.decompress(N)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,N)}N=d.ownerDocument.createElement("mxfile");N.appendChild(qa)}G?(N=N.cloneNode(!0),N.removeAttribute("modified"),N.removeAttribute("host"),N.removeAttribute("agent"),N.removeAttribute("etag"),N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),
-N.removeAttribute("type")):(N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),N.removeAttribute("pages"),N.removeAttribute("type"),mxClient.IS_CHROMEAPP?N.setAttribute("host","Chrome"):EditorUi.isElectronApp?N.setAttribute("host","Electron"):N.setAttribute("host",window.location.hostname),N.setAttribute("modified",(new Date).toISOString()),N.setAttribute("agent",navigator.appVersion),N.setAttribute("version",EditorUi.VERSION),N.setAttribute("etag",Editor.guid()),
-d=null!=g?g.getMode():this.mode,null!=d&&N.setAttribute("type",d),1<N.getElementsByTagName("diagram").length&&null!=this.pages&&N.setAttribute("pages",this.pages.length));W=W?mxUtils.getPrettyXml(N):mxUtils.getXml(N);if(!u&&!y&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))W=this.getHtml2(mxUtils.getXml(N),f,null!=g?g.getTitle():null,Z,T);else if(u||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),W=this.getEmbeddedSvg(W,f,
-x,null,J,D,T);return W};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D=
-D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));y.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
-J,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(J));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
-null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(t){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var G=y.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<G&&y.movePage(G,G-1)};if(38==t.keyCode)return function(){0<G&&y.movePage(G,0)};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,
+G+1)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,y.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<G&&y.selectNextPage(!1)};if(38==t.keyCode)return function(){0<G&&y.selectPage(y.pages[0])};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.selectNextPage(!0)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
+x.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var y=mxUtils.parseXml(d),t=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=t?mxUtils.getXml(t):""}}catch(G){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var t=this.updatePageRoot(new DiagramPage(x[y]));null==t.getName()&&
+t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,0==y?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,t,G,D,I,H,S){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;I=null!=I?I:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var M="_blank";else T=M=x;if(null==d)return"";var fa=d;if("mxfile"!=fa.nodeName.toLowerCase()){if(S){var la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());
+la.appendChild(d)}else{la=Graph.zapGremlins(mxUtils.getXml(d));fa=Graph.compress(la);if(Graph.decompress(fa)!=la)return la;la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());mxUtils.setTextContent(la,fa)}fa=d.ownerDocument.createElement("mxfile");fa.appendChild(la)}H?(fa=fa.cloneNode(!0),fa.removeAttribute("modified"),fa.removeAttribute("host"),fa.removeAttribute("agent"),fa.removeAttribute("etag"),fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),
+fa.removeAttribute("type")):(fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),fa.removeAttribute("pages"),fa.removeAttribute("type"),mxClient.IS_CHROMEAPP?fa.setAttribute("host","Chrome"):EditorUi.isElectronApp?fa.setAttribute("host","Electron"):fa.setAttribute("host",window.location.hostname),fa.setAttribute("modified",(new Date).toISOString()),fa.setAttribute("agent",navigator.appVersion),fa.setAttribute("version",EditorUi.VERSION),fa.setAttribute("etag",
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&fa.setAttribute("type",d),1<fa.getElementsByTagName("diagram").length&&null!=this.pages&&fa.setAttribute("pages",this.pages.length));S=S?mxUtils.getPrettyXml(fa):mxUtils.getXml(fa);if(!t&&!y&&(G||null!=g&&/(\.html)$/i.test(g.getTitle())))S=this.getHtml2(mxUtils.getXml(fa),f,null!=g?g.getTitle():null,M,T);else if(t||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),S=this.getEmbeddedSvg(S,
+f,x,null,D,I,T);return S};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var H=I.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&g?(H=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&I.appendChild(mxUtils.parseXml(H).documentElement))):null==H||g?
+I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(H)));y.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var t=this.pages[f],G=t.node;if(t!=this.currentPage)if(t.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,
+D,null,x);EditorUi.removeChildNodes(G);mxUtils.setTextContent(G,Graph.compressNode(D));delete t.needsUpdate}else x&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&
+null!=t.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,D,null,x),G=G.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(D))));d(G)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(u){var H=y.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style=
-"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete y.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(t){d[EditorUi.DIFF_INSERT][f].data=t.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(t){var G=y.cells[t];if(null!=G){for(var D in G)null!=G[D].value&&(G[D].value="["+G[D].value.length+"]"),null!=G[D].xmlValue&&(G[D].xmlValue="["+G[D].xmlValue.length+"]"),null!=G[D].style&&(G[D].style=
+"["+G[D].style.length+"]"),mxUtils.isEmptyObject(G[D])&&delete G[D];mxUtils.isEmptyObject(G)&&delete y.cells[t]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,u,H,
-J,D,G,W){y=null!=y?y:!0;u=null!=u?u:!1;var T=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Z=null!=T.themes&&"darkTheme"==T.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var N=T.getGlobalVariable;T=this.createTemporaryGraph(Z?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?T.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=qa.viewState&&null!=qa.viewState&&T.setBackgroundImage(qa.viewState.backgroundImage);T.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:N.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(y,u,G,W);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,T,D,window.location.href,d,f,g,x,y,J,G);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,y,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,t,G,
+D,I,H,S){y=null!=y?y:!0;t=null!=t?t:!1;var T=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var M=null!=T.themes&&"darkTheme"==T.defaultThemeName;H=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var fa=T.getGlobalVariable;T=this.createTemporaryGraph(M?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var la=this.pages[0];this.currentPage==la?T.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=la.viewState&&null!=la.viewState&&T.setBackgroundImage(la.viewState.backgroundImage);T.getGlobalVariable=function(ra){return"page"==ra?la.getName():"pagenumber"==ra?1:fa.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(la.root)}}G=null!=G?G:this.getXmlFileData(y,t,H,S);I=null!=I?I:this.getCurrentFile();d=this.createFileData(G,T,I,window.location.href,d,f,g,x,y,D,H);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,x,y,t){t=null!=t?t:!0;var G=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){G=t?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;t=Math.floor(G.x/I-f.view.translate.x);I=Math.floor(G.y/I-f.view.translate.y);G=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",t);d.setAttribute("y0",I)}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!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.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==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var t=this.editor.graph.getModel(),G=t.getChildren(t.root);for(x=0;x<G.length;x++){var D=G[x];t.setVisible(D,f[D.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=
this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,x,y,u,H,J,D,G,W,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!y),N=Z+("xml"==d||"pdf"==d&&W?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(N,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Z),this.saveData(N,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)N=Z+".png";else if("jpeg"==d)N=Z+".jpg";else if("remoteSvg"==d){N=Z+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var S=this.editor.graph,fa=S.getGraphBounds();var ia=Math.ceil(fa.width*J/S.view.scale+2*oa);var M=Math.ceil(fa.height*J/S.view.scale+2*oa)}}this.saveRequest(N,d,mxUtils.bind(this,function(ka,q){try{var E=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var Q=this.createDownloadRequest(ka,d,x,q,H,y,J,D,G,W,
-T,ia,M);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,X=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(N,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ja=this.editor.graph.background;if(H||ja==mxConstants.NONE)ja=null;var ca=this.editor.graph.getSvg(ja,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ca);
-this.editor.convertImages(ca,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();X(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else N=Z+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();X(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){var N=this.editor.graph,qa=N.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
-null,null,!1,"pdf"==f);var oa="",S="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=W?S="&from="+W.from+"&to="+W.to:0==u&&(S="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=N.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=u&&u!=mxConstants.NONE||(u=
-"#ffffff"):u=mxConstants.NONE;y={globalVars:N.getExportVariables()};D&&(y.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+S+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+J:"")+
-(T&&isFinite(T)?"&w="+T:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
-"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Z){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,W=mxUtils.bind(this,function(){var Z=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){Z===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),T()):
-this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(W,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();W()}));T();W()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){y(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else y("")};
-EditorUi.prototype.updateDiagram=function(d){function f(M){var aa=new mxCellOverlay(M.image||y.warningImage,M.tooltip,M.align,M.valign,M.offset);aa.addListener(mxEvent.CLICK,function(X,ja){x.alert(M.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,u=y.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id"));
-if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var W=G.attributes,T=0;T<W.length;T++)y.setAttributeForCell(J,W[T].nodeName,0<W[T].nodeValue.length?W[T].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+J.id+": "+M)}try{var Z=d.getAttribute("style");null!=Z&&y.model.setStyle(J,Z)}catch(M){null!=window.console&&console.log("Error in style for "+
-J.id+": "+M)}try{var N=d.getAttribute("icon");if(null!=N){var qa=0<N.length?JSON.parse(N):null;null!=qa&&qa.append||y.removeCellOverlays(J);null!=qa&&y.addCellOverlay(J,f(qa))}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var S=y.getCellGeometry(J);if(null!=S){S=S.clone();for(key in oa){var fa=parseFloat(oa[key]);"dx"==key?S.x+=fa:"dy"==key?S.y+=fa:"dw"==key?S.width+=fa:"dh"==key?S.height+=fa:S[key]=
-parseFloat(oa[key])}y.model.setGeometry(J,S)}}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
-0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var u=
-y.getDate(),H=y.getHours(),J=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
+function(d,f,g,x,y,t,G,D,I,H,S,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!y),fa=M+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;if("xml"==d){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(fa,d,la,"text/xml")}else if("html"==d)la=this.getHtml2(this.getFileData(!0),this.editor.graph,M),this.saveData(fa,d,la,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
+d)fa=M+".png";else if("jpeg"==d)fa=M+".jpg";else if("remoteSvg"==d){fa=M+".svg";d="svg";var ra=parseInt(I);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var ba=this.editor.graph,oa=ba.getGraphBounds();var na=Math.ceil(oa.width*D/ba.view.scale+2*ra);var N=Math.ceil(oa.height*D/ba.view.scale+2*ra)}}this.saveRequest(fa,d,mxUtils.bind(this,function(ia,q){try{var E=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var Q=this.createDownloadRequest(ia,d,x,q,G,y,
+D,I,H,S,T,na,N);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,V=mxUtils.bind(this,function(ia){ia.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",ia,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ha=this.editor.graph.background;if(G||ha==mxConstants.NONE)ha=null;var X=this.editor.graph.getSvg(ha,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(X);
+this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(ia){this.spinner.stop();V(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ia))})))}else fa=M+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ia){this.spinner.stop();V(ia)}),x)}}catch(ia){this.handleError(ia)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,t,G,D,I,H,S,T,M){var fa=this.editor.graph,la=fa.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=f,null,
+null,null,!1,"pdf"==f);var ra="",ba="";if(la.width*la.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};H=H?"1":"0";"pdf"==f&&(null!=S?ba="&from="+S.from+"&to="+S.to:0==t&&(ba="&allPages=1"));"xmlpng"==f&&(H="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){ra="&from="+t;break}t=fa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=t&&t!=mxConstants.NONE||
+(t="#ffffff"):t=mxConstants.NONE;y={globalVars:fa.getExportVariables()};I&&(y.grid={size:fa.gridSize,steps:fa.view.gridSteps,color:fa.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+ba+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+x+"&embedXml="+H+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=G?"&scale="+G:"")+(null!=D?"&border="+
+D:"")+(T&&isFinite(T)?"&w="+T:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(G){var D=null!=d.data?d.data:"";null!=G&&0<G.length&&(0<D.length&&(D+="\n"),D+=G);G=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return x};this.fileLoaded(G);
+"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var I=null!=d.interval?parseInt(d.interval):6E4,H=null,S=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(fa){M===this.currentPage&&(200<=fa.getStatus()&&300>=fa.getStatus()?(this.updateDiagram(fa.getText()),
+T()):this.handleError({message:mxResources.get("error")+" "+fa.getStatus()}))}),mxUtils.bind(this,function(fa){this.handleError(fa)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(S,I)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();S()}));T();S()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var t=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(t,mxUtils.bind(this,function(G){y(G)}),mxUtils.bind(this,function(G){null!=g&&g(G)}))}else y("")};
+EditorUi.prototype.updateDiagram=function(d){function f(N){var aa=new mxCellOverlay(N.image||y.warningImage,N.tooltip,N.align,N.valign,N.offset);aa.addListener(mxEvent.CLICK,function(V,ha){x.alert(N.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,t=y.getModel();t.beginUpdate();var G=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var D=t.getCell(d.getAttribute("id"));
+if(null!=D){try{var I=d.getAttribute("value");if(null!=I){var H=mxUtils.parseXml(I).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))t.setValue(D,H);else for(var S=H.attributes,T=0;T<S.length;T++)y.setAttributeForCell(D,S[T].nodeName,0<S[T].nodeValue.length?S[T].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+D.id+": "+N)}try{var M=d.getAttribute("style");null!=M&&y.model.setStyle(D,M)}catch(N){null!=window.console&&console.log("Error in style for "+
+D.id+": "+N)}try{var fa=d.getAttribute("icon");if(null!=fa){var la=0<fa.length?JSON.parse(fa):null;null!=la&&la.append||y.removeCellOverlays(D);null!=la&&y.addCellOverlay(D,f(la))}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var ba=y.getCellGeometry(D);if(null!=ba){ba=ba.clone();for(key in ra){var oa=parseFloat(ra[key]);"dx"==key?ba.x+=oa:"dy"==key?ba.y+=oa:"dw"==key?ba.width+=oa:"dh"==key?ba.height+=
+oa:ba[key]=parseFloat(ra[key])}y.model.setGeometry(D,ba)}}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}}}else if("model"==d.nodeName){for(var na=d.firstChild;null!=na&&na.nodeType!=mxConstants.NODETYPE_ELEMENT;)na=na.nextSibling;null!=na&&(new mxCodec(d.firstChild)).decode(na,t)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
+0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(G=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{t.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var t=
+y.getDate(),G=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+t+"-"+G+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&
"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&
d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=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_"+u})}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(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(J){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+H.stack})}catch(J){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H=
-d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=y.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,W,T){return!T||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?T&&"mxCell"==D.nodeName&&"previous"==
-G?null:W:Math.round(W)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var u=d.attributes[y].name,H=null!=f?f(d,u,d.attributes[y].value,!0):d.attributes[y].value;null!=H&&(x^=this.hashValue(u,
-f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+x=!0;if(!this.isOffline()&&null!=d.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}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(G){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(G){}}catch(G){this.fileLoadedError=G;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+G.message,label:"stack_"+G.stack})}catch(D){}d=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(G,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var t=0;t<d.length;t++){this.updatePageRoot(d[t]);var G=
+d[t].node.cloneNode(!1);G.removeAttribute("name");x.root=d[t].root;var D=y.encode(x);this.editor.graph.saveViewState(d[t].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");G.appendChild(D);null!=f&&(f.eltCount+=G.getElementsByTagName("*").length,f.nodeCount+=G.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(G,function(I,H,S,T){return!T||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=H&&"y"!=H&&"width"!=H&&"height"!=H?T&&"mxCell"==I.nodeName&&"previous"==
+H?null:S:Math.round(S)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var t=d.attributes[y].name,G=null!=f?f(d,t,d.attributes[y].value,!0):d.attributes[y].value;null!=G&&(x^=this.hashValue(t,
+f,g)+this.hashValue(G,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,t,G){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,M){0==ia.length&&d.isEditable()?
-(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),M.appendChild(u)):this.addLibraryEntries(ia,M)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(y);var D=J.parentNode.previousSibling;x=D.getAttribute("title");
-null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var W=document.createElement("img");W.className="geAdaptiveAsset";W.setAttribute("src",Editor.crossImage);W.setAttribute("title",mxResources.get("close"));W.setAttribute("valign","absmiddle");W.setAttribute("border",
-"0");W.style.position="relative";W.style.top="2px";W.style.width="14px";W.style.cursor="pointer";W.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(W),mxEvent.addListener(W,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var M=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(ia)}}));if(d.isEditable()){var Z=
-this.editor.graph,N=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=W.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",G.insertBefore(N,G.firstChild),D.style.paddingRight=18*G.childNodes.length+
-"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&(N.parentNode.removeChild(N),D.style.paddingRight=18*G.childNodes.length+"px")})):null==T&&(T=W.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),G.insertBefore(T,G.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(D.style.paddingRight=
-18*G.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(M)})),D.style.paddingRight=18*G.childNodes.length+"px")}),S=mxUtils.bind(this,function(ia,M,aa,X){ia=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(ia)));for(var ja=0;ja<ia.length;ja++){var ca=Z.getCellGeometry(ia[ja]);null!=ca&&ca.translate(-M.x,-M.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,M.width,M.height,X||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))),
-w:M.width,h:M.height};null!=X&&(ia.title=X);f.push(ia);oa(aa);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),fa=mxUtils.bind(this,function(ia){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(ia),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=Z.getSelectionCells(),aa=Z.view.getBounds(M),X=Z.view.scale;aa.x/=X;aa.y/=X;aa.width/=X;aa.height/=X;aa.x-=
-Z.view.translate.x;aa.y-=Z.view.translate.y;S(M,aa)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&
-null!=Z.graphHandler&&(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,fa(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,aa,X,ja,ca,ka,q,E,Q){if(null!=M&&"image/"==aa.substring(0,
-6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,ca,ka),M)],M[0].vertex=!0,S(M,new mxRectangle(0,0,ca,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var Y=!1,R=mxUtils.bind(this,function(ba,ea){null!=ba&&"application/pdf"==ea&&(ea=Editor.extractGraphModelFromPdf(ba),null!=
-ea&&0<ea.length&&(ba=ea));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();Y=!0}catch(xa){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var la=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(la);S(la,new mxRectangle(0,
-0,pa.width,pa.height),ia)}Y=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(ba){R(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,q)&&null!=Q?this.isExternalDataComms()?
-this.parseFile(Q,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?R(ba.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(M,aa)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor=
-"";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));W=W.cloneNode(!1);W.setAttribute("src",Editor.editImage);W.setAttribute("title",mxResources.get("edit"));G.insertBefore(W,G.firstChild);mxEvent.addListener(W,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=W.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",fa);this.isOffline()||
-".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
-function(d,f){for(var g=0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.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=
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var t=null,G=mxUtils.bind(this,function(na,N){0==na.length&&d.isEditable()?
+(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),N.appendChild(t)):this.addLibraryEntries(na,N)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(na){G(f,na)}));this.repositionLibrary(y);var I=D.parentNode.previousSibling;x=I.getAttribute("title");
+null!=x&&0<x.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var H=document.createElement("div");H.style.position="absolute";H.style.right="0px";H.style.top="0px";H.style.padding="8px";H.style.backgroundColor="inherit";I.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border",
+"0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)H.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(na){if(!mxEvent.isConsumed(na)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(na)}}));if(d.isEditable()){var M=
+this.editor.graph,fa=null,la=mxUtils.bind(this,function(na){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(na)}),ra=mxUtils.bind(this,function(na){d.setModified(!0);d.isAutosave()?(null!=fa&&null!=fa.parentNode&&fa.parentNode.removeChild(fa),fa=S.cloneNode(!1),fa.setAttribute("src",Editor.spinImage),fa.setAttribute("title",mxResources.get("saving")),fa.style.cursor="default",fa.style.marginRight="2px",fa.style.marginTop="-2px",H.insertBefore(fa,H.firstChild),I.style.paddingRight=
+18*H.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=fa&&null!=fa.parentNode&&(fa.parentNode.removeChild(fa),I.style.paddingRight=18*H.childNodes.length+"px")})):null==T&&(T=S.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),H.insertBefore(T,H.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+T||d.isModified()||(I.style.paddingRight=18*H.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(N)})),I.style.paddingRight=18*H.childNodes.length+"px")}),ba=mxUtils.bind(this,function(na,N,aa,V){na=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(na)));for(var ha=0;ha<na.length;ha++){var X=M.getCellGeometry(na[ha]);null!=X&&X.translate(-N.x,-N.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(na,N.width,N.height,V||"",!0,null,!1));na={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(na))),
+w:N.width,h:N.height};null!=V&&(na.title=V);f.push(na);ra(aa);null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)}),oa=mxUtils.bind(this,function(na){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(na),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=M.getSelectionCells(),aa=M.view.getBounds(N),V=M.view.scale;aa.x/=V;aa.y/=V;aa.width/=V;aa.height/=V;aa.x-=
+M.view.translate.x;aa.y-=M.view.translate.y;ba(N,aa)}mxEvent.consume(na)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(na))}),mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&
+null!=M.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=!1,M.autoScroll=!0,oa(na),mxEvent.consume(na))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&
+(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(na){D.style.backgroundColor="#f1f3f4";na.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(na){D.style.cursor="";D.style.backgroundColor="";0<na.dataTransfer.files.length&&this.importFiles(na.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,aa,V,ha,X,ia,q,E,Q){if(null!=N&&"image/"==aa.substring(0,
+6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,ia),N)],N[0].vertex=!0,ba(N,new mxRectangle(0,0,X,ia),na,mxEvent.isAltDown(na)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null);else{var Y=!1,R=mxUtils.bind(this,function(Z,da){null!=Z&&"application/pdf"==da&&(da=Editor.extractGraphModelFromPdf(Z),null!=
+da&&0<da.length&&(Z=da));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(Z.documentElement));G(qa,D);f=f.concat(qa);ra(na);this.spinner.stop();Y=!0}catch(ya){}else if("mxfile"==Z.documentElement.nodeName)try{var va=Z.documentElement.getElementsByTagName("diagram");for(qa=0;qa<va.length;qa++){var ja=this.stringToCells(Editor.getDiagramNodeXml(va[qa])),sa=this.editor.graph.getBoundingBoxFromGeometry(ja);ba(ja,new mxRectangle(0,
+0,sa.width,sa.height),na)}Y=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(Z){R(Z,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,q)&&null!=Q?this.isExternalDataComms()?
+this.parseFile(Q,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?R(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(N,aa)}}));na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"dragleave",function(na){D.style.cursor="";D.style.backgroundColor=
+"";na.stopPropagation();na.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));H.insertBefore(S,H.firstChild);mxEvent.addListener(S,"click",la);mxEvent.addListener(D,"dblclick",function(na){mxEvent.getSource(na)==D&&la(na)});x=S.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));H.insertBefore(x,H.firstChild);mxEvent.addListener(x,"click",oa);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(na){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(na)})),H.insertBefore(x,H.firstChild))}I.appendChild(H);I.style.paddingRight=18*H.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(t+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(t+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.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="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,u,H){d=new ImageDialog(this,d,f,g,x,y,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
+new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,t,G){d=new ImageDialog(this,d,f,g,x,y,t,G);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
+400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{H?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(N){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),W=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),W=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code?
-null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=u?u:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.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==D.code||404==D.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),W,mxResources.get("changeUser"),mxUtils.bind(this,function(){function N(){fa.innerText="";for(var ia=
-0;ia<qa.length;ia++){var M=document.createElement("option");mxUtils.write(M,qa[ia].displayName);M.value=ia;fa.appendChild(M);M=document.createElement("option");M.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(M,"<"+qa[ia].email+">");M.setAttribute("disabled","disabled");fa.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=qa.length;fa.appendChild(M)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),S=document.createElement("span");
-S.style.marginTop="6px";mxUtils.write(S,mxResources.get("changeUser")+": ");oa.appendChild(S);var fa=document.createElement("select");fa.style.width="200px";N();mxEvent.addListener(fa,"change",mxUtils.bind(this,function(){var ia=fa.value,M=qa.length!=ia;M&&this.drive.setUser(qa[ia]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(qa=this.drive.getUsersList(),N())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));oa.appendChild(fa);oa=new CustomDialog(this,oa,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):
-D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Z=u=null;null!=D&&null!=D.helpLink?(u=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f,
-H,G,g,W,null,null,u,Z,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,y,null,null,null,null,
-J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.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(u.style,
-"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");u.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(y);y=document.createElement("img");y.setAttribute("src",
-Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";u.appendChild(y);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");
-H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J);u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(W){mxEvent.consume(W);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(W){var T=mxEvent.getSource(W);T!=H&&T!=J?(null!=g&&g(),D(),mxEvent.consume(W)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
-0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,f,g,y);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
-9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
-(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=
-document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10):!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},
-2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
-u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);y[u]=new Uint8Array(D)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(u);isLocalStorage&&y++;var D=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,W){try{if("_blank"==W)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else W==App.MODE_DEVICE||"download"==W?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(W,mxUtils.bind(this,function(N){try{this.exportFile(d,G,g,x,W,N)}catch(qa){this.handleError(qa)}}))}catch(N){this.handleError(N)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<y,D,d,g,x);u=this.isServices(y)?y>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,t,G){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
+d.message)try{G?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(fa){}if(null!=I||null!=f){G=mxUtils.htmlEntities(mxResources.get("unknownError"));var H=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(H=mxResources.get("cancel"),S=function(){D();I.retry()});if(404==I.code||404==I.status||403==I.code){G=403==I.code?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=t?t:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.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==I.code||404==I.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,G,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){oa.innerText="";for(var na=
+0;na<la.length;na++){var N=document.createElement("option");mxUtils.write(N,la[na].displayName);N.value=na;oa.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(N,"<"+la[na].email+">");N.setAttribute("disabled","disabled");oa.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=la.length;oa.appendChild(N)}var la=this.drive.getUsersList(),ra=document.createElement("div"),ba=document.createElement("span");
+ba.style.marginTop="6px";mxUtils.write(ba,mxResources.get("changeUser")+": ");ra.appendChild(ba);var oa=document.createElement("select");oa.style.width="200px";fa();mxEvent.addListener(oa,"change",mxUtils.bind(this,function(){var na=oa.value,N=la.length!=na;N&&this.drive.setUser(la[na]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(la=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));ra.appendChild(oa);ra=new CustomDialog(this,ra,mxUtils.bind(this,
+function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?G=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?G=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout")):
+I.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(G=mxUtils.htmlEntities(I)))}var M=t=null;null!=I&&null!=I.helpLink?(t=mxResources.get("help"),M=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(t=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+t+": "+I.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,
+G,H,g,S,null,null,t,M,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,t){var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){G();null!=f&&f()},function(){G();null!=g&&g()},x,y,null,null,null,null,
+D);this.showDialog(d.container,340,46+D,!0,t);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,
+"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(y);y=document.createElement("img");y.setAttribute("src",
+Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(y);mxUtils.write(t,f);document.body.appendChild(t);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var G=document.createElement("input");G.setAttribute("type","checkbox");
+G.setAttribute("id","geDoNotShowAgainCheckbox");G.style.marginRight="6px";if(!x){f.appendChild(G);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);t.style.paddingBottom="30px";t.appendChild(f)}var I=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,G.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(S){mxEvent.consume(S);I()}));var H=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(S){var T=mxEvent.getSource(S);T!=G&&T!=D?(null!=g&&g(),I(),mxEvent.consume(S)):H()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,
+"transform","translate(-50%,0%)")}),500);window.setTimeout(H,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
+0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var t="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+t;d=this.createImageDataUri(d,f,g,y);this.saveData(x,t,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
+9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,t){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
+(f=f+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var G=
+document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(D?parseInt(D[2],10):!1)?!1:t}if(t||this.isOffline()){G.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));t?G.download=f:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
+2E4),G.click(),G.parentNode.removeChild(G)}catch(I){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,t){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=t?"&base64="+t:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
+t=0;t<x;++t){for(var G=1024*t,D=Math.min(G+1024,g),I=Array(D-G),H=0;G<D;++H,++G)I[H]=d[G].charCodeAt(0);y[t]=new Uint8Array(I)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,t,G,D){t=null!=t?t:!1;G=null!=G?G:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(t);isLocalStorage&&y++;var I=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(H,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
+g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,H,g,x,null,D):null!=H&&0<H.length&&this.pickFolder(S,mxUtils.bind(this,function(fa){try{this.exportFile(d,H,g,x,S,fa)}catch(la){this.handleError(la)}}))}catch(fa){this.handleError(fa)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,G,null,1<y,I,d,g,x);t=this.isServices(y)?y>I?390:280:160;this.showDialog(f.container,420,t,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
@@ -3513,173 +3514,200 @@ this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsCom
4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight=
-"140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,y,f,H)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;
-var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,W){if("_blank"==W||null!=G&&0<G.length){var T=g("_blank"==W?null:G,W==App.MODE_DEVICE||"download"==W||null==W||"_blank"==W?"0":"1");null!=T&&(W==App.MODE_DEVICE||"download"==W||"_blank"==W?T.simulate(document,"_blank"):this.pickFolder(W,mxUtils.bind(this,function(Z){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(N){this.spinner.stop();this.handleError(N)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,y);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container,
-420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,u){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==
-mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=W?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var S=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,W,T);x&&this.editor.graph.addSvgShadow(S);var fa=this.getBaseFilename()+(y?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var ia=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));N(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var M=mxUtils.bind(this,function(aa){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
-ia,this.thumbImageCache)):ia(aa)});Z?this.embedFonts(S,M):(this.editor.addFontCss(S),M(S))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,u,H){return this.addCheckbox(d,g,x,y,u,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&&
-(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),y||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
-var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==
-u.value){var H=new FilenameDialog(this,y,mxResources.get("ok"),function(J){null!=J?y=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":y:null},getEditInput:function(){return g},
-getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+
+function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=t.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight=
+"140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",I);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(t,G){return this.createEchoRequest(g,t,x,y,f,G)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,t,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;
+var D=this.getServiceCount(!1);isLocalStorage&&D++;var I=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(H,S){if("_blank"==S||null!=H&&0<H.length){var T=g("_blank"==S?null:H,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=T&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?T.simulate(document,"_blank"):this.pickFolder(S,mxUtils.bind(this,function(M){t=null!=t?t:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(fa){this.spinner.stop();this.handleError(fa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,G,null,1<D,I,x,t,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,
+420,D,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,t){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var la=this.editor.graph.isSelectionEmpty();g=null!=g?g:la;var ra=f?null:this.editor.graph.background;ra==
+mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=S?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var ba=this.editor.graph.getSvg(ra,d,G,D,null,g,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!M,S,T);x&&this.editor.graph.addSvgShadow(ba);var oa=this.getBaseFilename()+(y?".drawio":"")+".svg";fa=null!=fa?fa:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(oa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var na=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));fa(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(ba);var N=mxUtils.bind(this,function(aa){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
+na,this.thumbImageCache)):na(aa)});M?this.embedFonts(ba,N):(this.editor.addFontCss(ba),N(ba))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,t,G){return this.addCheckbox(d,g,x,y,t,G,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();I.id=G;null!=D&&I.setAttribute("name",D);
+g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);x&&I.setAttribute("disabled","disabled");t&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",G),d.appendChild(g),y||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
+var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));t.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");t.appendChild(x);d.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==
+t.value){var G=new FilenameDialog(this,y,mxResources.get("ok"),function(D){null!=D?y=D:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(G.container,300,80,!0,!1);G.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":y:null},getEditInput:function(){return g},
+getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=t):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");G.innerText="";G.appendChild(D)}mxUtils.write(d,mxResources.get("links")+
":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,
-mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
-H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),
-"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&H.push("edit="+encodeURIComponent(y)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,y,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,y,u,D);d=this.getCurrentFile();
-f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,u,H,J,D,G,W,T){this.getBasenames();var Z={};""!=y&&y!=mxConstants.NONE&&(Z.highlight=y);"auto"!==x&&(Z.target=x);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];H&&(g.push("pages"),Z.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=W&&0<W.length&&(Z.edit=W);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
-"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,
-mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value",
-"copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D),
-mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");y.appendChild(H);var W=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");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=
-"100%";y.appendChild(Z);var N=this.addCheckbox(y,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(y,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(y,mxResources.get("layers"),!0),S=this.addCheckbox(y,mxResources.get("tags"),!0),fa=this.addCheckbox(y,mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(y,fa);var M=ia.getEditInput();M.style.marginBottom="16px";H+=50;mxEvent.addListener(fa,"change",function(){fa.checked?
-M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&fa.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(J.checked?g:null,T.checked,Z.value,W.getTarget(),W.getColor(),N.checked,qa.checked,oa.checked,S.checked,fa.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,
-f,g,x,y,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var W=this.getCurrentFile();d=0;if(null==W||W.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
-G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));G.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(W.getId())}));T.style.marginTop="12px";T.className="geBtn";G.appendChild(T);D.appendChild(G);T=document.createElement("a");
-T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));G.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container,
-300,80,!0,!1);X.init()}))}))}var Z=null,N=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Z=document.createElement("input"),Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",D.appendChild(Z),mxUtils.write(D,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom=
-"10px",N.value=x+"px",D.appendChild(N),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==W||W.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var S=this.addCheckbox(D,mxResources.get("lightbox"),!0,null,null,!u),fa=this.addEditButton(D,S),ia=fa.getEditInput();u&&(ia.style.marginLeft=S.style.marginLeft,S.style.display="none",d-=20);var M=this.addCheckbox(D,mxResources.get("layers"),!0);M.style.marginLeft=
-ia.style.marginLeft;M.style.marginTop="8px";var aa=this.addCheckbox(D,mxResources.get("tags"),!0);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?(M.removeAttribute("disabled"),ia.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&S.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});
-f=new CustomDialog(this,D,mxUtils.bind(this,function(){y(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,S.checked,fa.getLink(),M.checked,null!=Z?Z.value:null,null!=N?N.value:null,aa.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var u=document.createElement("div");
-u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";u.appendChild(H);if(y){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u,
-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";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),W=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var T=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),
-H.background==mxConstants.NONE||null==H.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Z=parseInt(J.value)/100||1,N=parseInt(D.value)||0;g(!G.checked,null!=W?W.checked:!1,null!=T?T.checked:!1,Z,N)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";
-var W=this.editor.graph,T="jpeg"==J?220:300,Z=document.createElement("h3");mxUtils.write(Z,d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);mxUtils.write(G,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";G.appendChild(N);mxUtils.write(G,mxResources.get("borderWidth")+
-":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,W.isSelectionEmpty()),S=document.createElement("input");S.style.marginTop="16px";S.style.marginRight="8px";S.style.marginLeft="24px";S.setAttribute("disabled","disabled");S.setAttribute("type","checkbox");var fa=document.createElement("select");
-fa.style.marginTop="16px";fa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Z=0;Z<d.length;Z++)if(!W.isSelectionEmpty()||"selectionOnly"!=d[Z]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Z]));M.setAttribute("value",d[Z]);fa.appendChild(M);ia[d[Z]]=M}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(fa),mxUtils.br(G),T+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(oa.checked=!0)})):u&&(G.appendChild(S),
-mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),T+=30,mxEvent.addListener(oa,"change",function(){oa.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}));W.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display="none",oa.nextSibling.nextSibling.style.display="none",T-=30):(fa.value="diagram",S.setAttribute("checked","checked"),S.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){fa.value=oa.checked?"selectionOnly":"diagram"}));var aa=
-this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(G,mxResources.get("dark"),!0),T+=26);var ja=this.addCheckbox(G,mxResources.get("shadow"),W.shadowVisible),ca=null;if("png"==J||"jpeg"==J)ca=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input");
-q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value",
-"embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(u);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==fa.value&&(fa.value="diagram"),ja.checked=!1,ja.setAttribute("disabled","disabled"),
-Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ja.removeAttribute("disabled"),ia.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(E),mxUtils.br(G),T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";
-Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));
-Y.style.margin="7px";Y.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(Q),G.appendChild(Y),mxUtils.br(G),mxUtils.br(G),T+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=N.value;y(N.value,aa.checked,!oa.checked,ja.checked,ka.checked,q.checked,qa.value,S.checked,!1,Q.value,null!=ca?ca.checked:null,null!=X?X.checked:null,fa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,
-340,T,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"),
-!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),W=this.addCheckbox(u,g),T=this.addCheckbox(u,mxResources.get("lightbox"),!0),Z=this.addEditButton(u,T),N=Z.getEditInput(),qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=N.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?(qa&&oa.removeAttribute("disabled"),N.removeAttribute("disabled")):
-(oa.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&T.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,W.checked,T.checked,Z.getLink(),oa.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,u,H,J){function D(N){var qa=" ",oa="";x&&(qa=
-" 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!=W?"&page="+W:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var S="";g&&(S=
-' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+N+'"'+S+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),W=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var qa=x?this.getFileData(!0):null;N=this.createImageDataUri(N,qa,"png");D(N)}),null,null,null,mxUtils.bind(this,function(N){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);
-else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?D("data:image/png;base64,"+Z.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
-function(d,f,g,x,y,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var W=D[G].getAttribute("href");null!=W&&"#"==W.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&&J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var T=" ",Z="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(N){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=Z?' style="'+Z+'"':"")+T+"/>")}))}else Z="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),y=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),Z+="max-width:100%;max-height:"+y+"px;",J.removeAttribute("height")),""!=Z&&J.setAttribute("style",Z),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=
+mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var t="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(t||"none",function(I){t=I;g()});mxEvent.consume(D)}));g();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
+G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";d.appendChild(G);mxUtils.br(d);return{getColor:function(){return t},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,t,G){G=null!=G?G:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||G.push("lightbox=1"),
+"auto"!=d&&G.push("target="+d),null!=f&&f!=mxConstants.NONE&&G.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&G.push("edit="+encodeURIComponent(y)),t&&G.push("layers=1"),this.editor.graph.foldingEnabled&&G.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&G.push("page-id="+this.currentPage.getId());return G};EditorUi.prototype.createLink=function(d,f,g,x,y,t,G,D,I,H){I=this.createUrlParameters(d,f,g,x,y,t,I);d=this.getCurrentFile();
+f=!0;null!=G?g="#U"+encodeURIComponent(G):(d=this.getCurrentFile(),D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));H&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,t,G,D,I,H,S,T){this.getBasenames();var M={};""!=y&&y!=mxConstants.NONE&&(M.highlight=y);"auto"!==x&&(M.target=x);H||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];G&&(g.push("pages"),M.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),M.resize=!0);D&&g.push("layers");I&&g.push("tags");0<g.length&&(H&&g.push("lightbox"),M.toolbar=g.join(" "));null!=S&&0<S.length&&(M.edit=S);null!=d?M.url=d:M.xml=this.getFileData(!0,null,null,null,null,!G);f='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
+"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,
+mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(t);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");t=D.cloneNode(!0);t.setAttribute("value",
+"copy");G.appendChild(t);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(I);mxUtils.br(G);G.appendChild(D);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));G.appendChild(I);var H=this.getCurrentFile();null==g&&null!=H&&H.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),G.appendChild(I),
+mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));t.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(G);var S=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=
+"100%";y.appendChild(M);var fa=this.addCheckbox(y,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(y,mxResources.get("allPages"),G,!G),ra=this.addCheckbox(y,mxResources.get("layers"),!0),ba=this.addCheckbox(y,mxResources.get("tags"),!0),oa=this.addCheckbox(y,mxResources.get("lightbox"),!0),na=null;G=380;if(EditorUi.enableHtmlEditOption){na=this.addEditButton(y,oa);var N=na.getEditInput();N.style.marginBottom="16px";G+=50;mxEvent.addListener(oa,"change",
+function(){oa.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&oa.checked?na.getEditSelect().removeAttribute("disabled"):na.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(D.checked?g:null,T.checked,M.value,S.getTarget(),S.getColor(),fa.checked,la.checked,ra.checked,ba.checked,oa.checked,null!=na?na.getLink():null)}),null,d,f);this.showDialog(d.container,340,G,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=
+function(d,f,g,x,y,t,G,D){var I=document.createElement("div");I.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,d||mxResources.get("link"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(H);var S=this.getCurrentFile();d=0;if(null==S||S.constructor!=window.DriveFile||f)G=null!=G?G:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;G=null!=G?G:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
+H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));H.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(S.getId())}));T.style.marginTop="12px";T.className="geBtn";H.appendChild(T);I.appendChild(H);T=document.createElement("a");
+T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));H.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(V){this.spinner.stop();V=new ErrorDialog(this,null,mxResources.get(null!=V?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(V.container,
+300,80,!0,!1);V.init()}))}))}var M=null,fa=null;if(null!=g||null!=x)d+=30,mxUtils.write(I,mxResources.get("width")+":"),M=document.createElement("input"),M.setAttribute("type","text"),M.style.marginRight="16px",M.style.width="50px",M.style.marginLeft="6px",M.style.marginRight="16px",M.style.marginBottom="10px",M.value="100%",I.appendChild(M),mxUtils.write(I,mxResources.get("height")+":"),fa=document.createElement("input"),fa.setAttribute("type","text"),fa.style.width="50px",fa.style.marginLeft="6px",
+fa.style.marginBottom="10px",fa.value=x+"px",I.appendChild(fa),mxUtils.br(I);var la=this.addLinkSection(I,t);g=null!=this.pages&&1<this.pages.length;var ra=null;if(null==S||S.constructor!=window.DriveFile||f)ra=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var ba=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),oa=this.addEditButton(I,ba),na=oa.getEditInput();t&&(na.style.marginLeft=ba.style.marginLeft,ba.style.display="none",d-=20);var N=this.addCheckbox(I,mxResources.get("layers"),
+!0);N.style.marginLeft=na.style.marginLeft;N.style.marginTop="8px";var aa=this.addCheckbox(I,mxResources.get("tags"),!0);aa.style.marginLeft=na.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(ba,"change",function(){ba.checked?(N.removeAttribute("disabled"),na.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),na.setAttribute("disabled","disabled"));na.checked&&ba.checked?oa.getEditSelect().removeAttribute("disabled"):oa.getEditSelect().setAttribute("disabled",
+"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){y(la.getTarget(),la.getColor(),null==ra?!0:ra.checked,ba.checked,oa.getLink(),N.checked,null!=M?M.value:null,null!=fa?fa.value:null,aa.checked)}),null,mxResources.get("create"),G,D);this.showDialog(f.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):la.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var t=
+document.createElement("div");t.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";t.appendChild(G);if(y){mxUtils.write(t,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";
+t.appendChild(D);mxUtils.write(t,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";t.appendChild(I);mxUtils.br(t)}var H=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=x?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var T=
+x?null:this.addCheckbox(t,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,t,mxUtils.bind(this,function(){var M=parseInt(D.value)/100||1,fa=parseInt(I.value)||0;g(!H.checked,null!=S?S.checked:!1,null!=T?T.checked:!1,M,fa)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,t,G,D,I){G=null!=G?G:Editor.defaultIncludeDiagram;
+var H=document.createElement("div");H.style.whiteSpace="nowrap";var S=this.editor.graph,T="jpeg"==D?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";H.appendChild(M);mxUtils.write(H,mxResources.get("zoom")+":");var fa=document.createElement("input");fa.setAttribute("type","text");fa.style.marginRight="16px";fa.style.width="60px";fa.style.marginLeft="4px";fa.style.marginRight="12px";fa.value=this.lastExportZoom||
+"100%";H.appendChild(fa);mxUtils.write(H,mxResources.get("borderWidth")+":");var la=document.createElement("input");la.setAttribute("type","text");la.style.marginRight="16px";la.style.width="60px";la.style.marginLeft="4px";la.value=this.lastExportBorder||"0";H.appendChild(la);mxUtils.br(H);var ra=this.addCheckbox(H,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled",
+"disabled");ba.setAttribute("type","checkbox");var oa=document.createElement("select");oa.style.marginTop="16px";oa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var na={};for(M=0;M<d.length;M++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[M]){var N=document.createElement("option");mxUtils.write(N,mxResources.get(d[M]));N.setAttribute("value",d[M]);oa.appendChild(N);na[d[M]]=N}I?(mxUtils.write(H,mxResources.get("size")+":"),H.appendChild(oa),mxUtils.br(H),T+=26,mxEvent.addListener(oa,
+"change",function(){"selectionOnly"==oa.value&&(ra.checked=!0)})):t&&(H.appendChild(ba),mxUtils.write(H,mxResources.get("crop")),mxUtils.br(H),T+=30,mxEvent.addListener(ra,"change",function(){ra.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?I&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",T-=30):(oa.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(ra,
+"change",function(){oa.value=ra.checked?"selectionOnly":"diagram"}));var aa=this.addCheckbox(H,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(H,mxResources.get("dark"),!0),T+=26);var ha=this.addCheckbox(H,mxResources.get("shadow"),S.shadowVisible),X=null;if("png"==D||"jpeg"==D)X=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ia=this.addCheckbox(H,mxResources.get("includeCopyOfMyDiagram"),
+G,null,null,"jpeg"!=D);ia.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,
+mxResources.get("noChange"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(t);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),na.page.style.display=
+"none","page"==oa.value&&(oa.value="diagram"),ha.checked=!1,ha.setAttribute("disabled","disabled"),Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ha.removeAttribute("disabled"),na.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(H.appendChild(q),mxUtils.write(H,mxResources.get("embedImages")),mxUtils.br(H),mxUtils.write(H,mxResources.get("txtSettings")+":"),H.appendChild(E),mxUtils.br(H),
+T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
+Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));Y.style.margin="7px";Y.style.display="none";"svg"==D&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(Q),H.appendChild(Y),mxUtils.br(H),mxUtils.br(H),T+=50);g=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=la.value;this.lastExportZoom=fa.value;y(fa.value,aa.checked,!ra.checked,ha.checked,ia.checked,q.checked,la.value,ba.checked,!1,Q.value,null!=X?X.checked:null,
+null!=V?V.checked:null,oa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,340,T,!0,!0,null,null,null,null,!0);fa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?fa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var t=document.createElement("div");t.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(D)}var I=this.addCheckbox(t,mxResources.get("fit"),!0),H=this.addCheckbox(t,mxResources.get("shadow"),G.shadowVisible&&x,!x),S=this.addCheckbox(t,g),T=this.addCheckbox(t,mxResources.get("lightbox"),!0),M=this.addEditButton(t,T),fa=M.getEditInput(),la=1<G.model.getChildCount(G.model.getRoot()),ra=this.addCheckbox(t,mxResources.get("layers"),la,!la);ra.style.marginLeft=fa.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop=
+"8px";mxEvent.addListener(T,"change",function(){T.checked?(la&&ra.removeAttribute("disabled"),fa.removeAttribute("disabled")):(ra.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&T.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,t,mxUtils.bind(this,function(){d(I.checked,H.checked,S.checked,T.checked,M.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,
+280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,t,G,D){function I(fa){var la=" ",ra="";x&&(la=" 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!=S?"&page="+S:"")+(y?"&edit=_blank":
+"")+(t?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var ba="";g&&(ba=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');G('<img src="'+fa+'"'+ba+(""!=ra?' style="'+ra+'"':"")+la+"/>")}var H=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(fa){var la=x?this.getFileData(!0):null;fa=this.createImageDataUri(fa,la,"png");I(fa)}),null,null,null,mxUtils.bind(this,
+function(fa){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&299>=M.getStatus()?I("data:image/png;base64,"+M.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,f,g,x,y,t,G){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=D.getElementsByTagName("a");if(null!=I)for(var H=0;H<I.length;H++){var S=I[H].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==I[H].getAttribute("target")&&I[H].removeAttribute("target")}x&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var T=" ",M="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(fa){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(fa))+'"'+(""!=M?' style="'+M+'"':"")+T+"/>")}))}else M="",x&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),M+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),M+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=M&&D.setAttribute("style",M),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),G(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(W){return"page"==W?G.getName():"pagenumber"==W?1:D.apply(this,
-arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(W){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=W.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(J));d(T.substring(T.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(W){null!=f&&
-f(W)}),null,null,x,null,u.shadowVisible,null,u,y,null,null,null,"diagram",null)}catch(W){null!=f&&f(W)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){J=null!=J?J:!0;W=null!=W?W:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,W,null,null,u,null,null,null,f.shadowVisible||T,null,Z,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(u,null,null,0==W);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var N=mxUtils.bind(this,function(qa){qa=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=y&&y(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=y)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){N(oa)})):N(qa)}));else return N(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var N=this.editor.graph.isSelectionEmpty();g=null!=g?g:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-y?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,W)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,T,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,u,H){f=null!=f?f:0;g=null!=g?g:0;var J=
-[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var W=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=W&&"mxfile"==W.nodeName&&null!=this.pages){var T=W.getElementsByTagName("diagram");if(1==T.length&&!u){if(W=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=T[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,Z))}}else if(0<T.length){u=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),W=Editor.parseDiagramNode(T[0]),x=!1,N=1);for(;N<T.length;N++){var qa=T[N].getAttribute("id");T[N].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(T[N]));d[qa]=T[N].getAttribute("id");var S=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[S+1]));D.model.execute(new ChangePage(this,
-oa,oa,S,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=W&&"mxGraphModel"===W.nodeName){J=D.importGraphModel(W,f,g,x);if(null!=J)for(N=0;N<J.length;N++)this.updatePageLinksForCell(d,J[N]);var fa=D.parseBackgroundImage(W.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(d,fa);var ia=new ChangePageSetup(this,null,fa);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(M){if(y)throw M;
-this.handleError(M)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)y=u[J].getAttribute("href"),null!=y&&(u[J].setAttribute("href",this.updatePageLink(d,y)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var u=x.actions[y];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
-G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(T){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var W=new XMLHttpRequest;W.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));W.responseType="blob";this.addRemoteServiceSecurityCheck(W);
-null!=y&&W.setRequestHeader("x-convert-custom",y);W.onreadystatechange=mxUtils.bind(this,function(){if(4==W.readyState)if(200<=W.status&&299>=W.status)try{var T=W.response;if("text/xml"==T.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(N){try{f(N.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(N){g(N)}else try{""==W.responseType||"text"==W.responseType?g({message:W.responseText}):(Z=new FileReader,
-Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(W.response))}catch(N){g({})}});W.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
+d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(t){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
+d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var t=this.editor.graph,G=null!=t.themes&&"darkTheme"==t.defaultThemeName,D=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),t),D=g;else if(G||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet());var I=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&t.setBackgroundImage(H.viewState.backgroundImage);t.getGlobalVariable=function(S){return"page"==S?H.getName():"pagenumber"==S?1:I.apply(this,
+arguments)};document.body.appendChild(t.container);t.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(S){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=S.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(D));d(T.substring(T.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(M){null!=f&&f(M)}}),null,null,null,mxUtils.bind(this,function(S){null!=f&&
+f(S)}),null,null,x,null,t.shadowVisible,null,t,y,null,null,null,"diagram",null)}catch(S){null!=f&&f(S)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M){D=null!=D?D:!0;S=null!=S?S:0;G=null!=I?I:f.background;G==mxConstants.NONE&&(G=null);t=f.getSvg(G,H,S,null,null,t,null,null,null,f.shadowVisible||T,null,M,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(t,null,null,0==S);null!=d&&t.setAttribute("content",d);null!=g&&t.setAttribute("resource",g);var fa=mxUtils.bind(this,function(la){la=
+(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(la);null!=y&&y(la);return la});f.mathEnabled&&this.editor.addMathCss(t);if(null!=y)this.embedFonts(t,mxUtils.bind(this,function(la){D?this.editor.convertImages(la,mxUtils.bind(this,function(ra){fa(ra)})):fa(la)}));else return fa(t)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,t,G,D,I,H,S,T,M){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var fa=this.editor.graph.isSelectionEmpty();g=null!=g?g:fa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(la){this.spinner.stop();try{this.saveCanvas(la,
+y?this.getFileData(!0,null,null,null,g,D):null,I,null==this.pages||0==this.pages.length,S)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}),null,g,d||1,f,x,null,null,t,G,H,T,M)}catch(la){this.spinner.stop(),this.handleError(la)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,t,G){f=null!=f?f:0;g=null!=g?g:0;var D=
+[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var T=S.getElementsByTagName("diagram");if(1==T.length&&!t){if(S=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=T[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,M))}}else if(0<T.length){t=[];var fa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),S=Editor.parseDiagramNode(T[0]),x=!1,fa=1);for(;fa<T.length;fa++){var la=T[fa].getAttribute("id");T[fa].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(T[fa]));d[la]=T[fa].getAttribute("id");var ba=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",[ba+1]));I.model.execute(new ChangePage(this,
+ra,ra,ba,!0));t.push(ra)}this.updatePageLinks(d,t)}}if(null!=S&&"mxGraphModel"===S.nodeName){D=I.importGraphModel(S,f,g,x);if(null!=D)for(fa=0;fa<D.length;fa++)this.updatePageLinksForCell(d,D[fa]);var oa=I.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=oa&&null!=oa.originalSrc){this.updateBackgroundPageLink(d,oa);var na=new ChangePageSetup(this,null,oa);na.ignoreColor=!0;I.model.execute(na)}}G&&this.insertHandler(D,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(N){if(y)throw N;
+this.handleError(N)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var t=g.getElementsByTagName("a"),G=!1,D=0;D<t.length;D++)y=t[D].getAttribute("href"),null!=y&&(t[D].setAttribute("href",this.updatePageLink(d,y)),G=!0);G&&x.labelChanged(f,g.innerHTML)}for(D=0;D<x.model.getChildCount(f);D++)this.updatePageLinksForCell(d,x.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var t=x.actions[y];if(null!=t.open&&Graph.isPageLink(t.open)){var G=t.open.substring(t.open.indexOf(",")+1);g=d[G];null!=g?t.open="data:page/id,"+g:null==this.getPageById(G)&&delete t.open}}f="data:action/json,"+JSON.stringify(x)}}catch(D){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(G){this.handleError(G)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(x);try{var D="UNKNOWN-VISIO",I=x.lastIndexOf(".");if(0<=I&&I<x.length)D=x.substring(I+1).toUpperCase();else{var H=x.lastIndexOf("/");0<=
+H&&H<x.length&&(x=x.substring(H+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+x,label:G?"remote":"local"})}catch(T){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,x);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
+null!=y&&S.setRequestHeader("x-convert-custom",y);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var T=S.response;if("text/xml"==T.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(fa){try{f(fa.target.result)}catch(la){g({message:mxResources.get("errorLoadingFile")})}});M.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(fa){g(fa)}else try{""==S.responseType||"text"==S.responseType?g({message:S.responseText}):(M=new FileReader,
+M.onload=function(){g({message:JSON.parse(M.result).Message})},M.readAsText(S.response))}catch(fa){g({})}});S.send(G)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=
-JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&u.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var H=0;H<y.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(y.svgThumbs[H]));null!=y.thumb&&u.push(y.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&t.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var G=0;G<y.svgThumbs.length;G++)t.push(Editor.createSvgDataUri(y.svgThumbs[G]));null!=y.thumb&&t.push(y.thumb);console.log.apply(console,t)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,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",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var y=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg");
-if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var W=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(W[2]);G=parseFloat(W[3])}catch(T){D=D||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+y(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+y(J.charCodeAt(i),0,0):r+y(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var W=new Image;W.onload=
-function(){try{var T=W.width,Z=W.height;if(0==T&&0==Z){var N=D.result,qa=N.indexOf(","),oa=decodeURIComponent(escape(atob(N.substring(qa+1)))),S=mxUtils.parseXml(oa).getElementsByTagName("svg");0<S.length&&(T=parseFloat(S[0].getAttribute("width")),Z=parseFloat(S[0].getAttribute("height")))}g(D.result,T,Z)}catch(fa){x(fa)}};W.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=null;x.getModel().beginUpdate();
-try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;H=null!=H?H:!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(Z){4==
-Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,
-f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var W=this.importXml(G,f,g,u,!0,J);if(0<W.length)return W}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(oa,S,fa){D.setSelectionCell(D.insertVertex(null,null,
-"",D.snap(f),D.snap(g),S,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*N);Z=Math.round(Z.height*N);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Z=null;D.getModel().beginUpdate();try{Z=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Z),D.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,u,null,J))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{D=this.editor.graph;y=null;D.getModel().beginUpdate();try{y=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");y.value=d;D.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=D.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&D.setLinkForCell(y,y.value);y.geometry.width+=D.gridSize;y.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+f,g,x){var y=this,t=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(G).getElementsByTagName("svg");
+if(0<D.length){var I=parseFloat(D[0].getAttribute("width")),H=parseFloat(D[0].getAttribute("height"));if(isNaN(I)||isNaN(H))try{var S=D[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(S[2]);H=parseFloat(S[3])}catch(T){I=I||100,H=H||100}g(y.convertDataUri(Editor.createSvgDataUri(G)),I,H)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(G){x(G)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(D,I,H){c1=D>>2;c2=(D&3)<<4|I>>4;c3=(I&15)<<2|H>>6;c4=H&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(G.responseType="blob");G.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(H){var S=new Image;S.onload=
+function(){try{var T=S.width,M=S.height;if(0==T&&0==M){var fa=I.result,la=fa.indexOf(","),ra=decodeURIComponent(escape(atob(fa.substring(la+1)))),ba=mxUtils.parseXml(ra).getElementsByTagName("svg");0<ba.length&&(T=parseFloat(ba[0].getAttribute("width")),M=parseFloat(ba[0].getAttribute("height")))}g(I.result,T,M)}catch(oa){x(oa)}};S.src=I.result};I.onerror=function(H){x(H)}}else x(D)};G.onerror=function(D){x(D)};G.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=
+null;x.getModel().beginUpdate();try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;G=null!=G?G:!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(M){4==M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,g,t,!0,D)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),
+null!=H&&0<H.length))return this.importXml(H,f,g,t,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(H,f,g,t,!0,D);if(0<S.length)return S}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,d,mxUtils.bind(this,function(ra,ba,
+oa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),ba,oa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),G,this.maxImageSize);else{var fa=Math.min(1,Math.min(this.maxImageSize/M.width,this.maxImageSize/M.height)),la=Math.round(M.width*fa);M=Math.round(M.height*fa);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),la,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var M=null;I.getModel().beginUpdate();try{M=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(x?"html=1;":"")),I.updateCellSize(M),I.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{I.getModel().endUpdate()}I.setSelectionCell(M)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,t,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(M){this.editor.graph.setSelectionCells(this.importXml(M,f,g,t,null,D))}),mxUtils.bind(this,function(M){this.handleError(M)}));else{I=this.editor.graph;y=null;I.getModel().beginUpdate();try{y=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");y.value=d;I.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=I.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&I.setLinkForCell(y,y.value);y.geometry.width+=I.gridSize;y.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,J){StorageFile.listFiles(this,
-"F",H,J)});window.openBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.getFileContent(this,H,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.deleteFile(this,H,J,D)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(H=new Blob([H],{type:"application/octet-stream"}),
-this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,u=y.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(y,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,W){G=W.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,W.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=W))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?f(W.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,u,H,J,D,G,W,T){G=null!=
-G?G:!0;var Z=!1,N=null,qa=mxUtils.bind(this,function(oa){var S=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):S=this.importXml(oa,g,x,G,null,null!=T?mxEvent.isControlDown(T):null);null!=J&&J(S)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=W?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(N=this.importXml(f,g,x,G,null,null!=T?mxEvent.isControlDown(T):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0,
-D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),N=[f.insertVertex(null,null,"",g,x,y,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Z=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,y=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,y,H):this.parseFile(D,y,H)):0==d.indexOf("PK")&&null!=D?(Z=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){N=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(N)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(N=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,G,null,null!=T?mxEvent.isControlDown(T):null));Z||null==J||J(N);return N};EditorUi.prototype.importFiles=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var N=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var S=W||this.resampleThreshold,fa=0;fa<d.length;fa++)if("image/svg"!==d[fa].type.substring(0,9)&&"image/"===d[fa].type.substring(0,6)&&d[fa].size>S){oa=!0;break}var ia=mxUtils.bind(this,
-function(){var M=this.editor.graph,aa=M.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,ba,ea,ra,ta,la){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,ra)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,ra,!0)),null):this.importFile(E,Q,Y,R,ba,ea,ra,ta,la,N,T,Z)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this,
-function(E){M.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=d.length,ja=X,ca=[],ka=mxUtils.bind(this,function(E,Q){ca[E]=Q;if(0==--ja){this.spinner.stop();if(null!=J)J(ca);else{var Y=[];M.getModel().beginUpdate();try{for(E=0;E<ca.length;E++){var R=ca[E]();null!=R&&(Y=Y.concat(R))}}finally{M.getModel().endUpdate()}}u(Y)}}),q=0;q<X;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
-H||H(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var ba=Graph.clipSvgDataUri(R.target.result),ea=ba.indexOf(",");ea=decodeURIComponent(escape(atob(ba.substring(ea+1))));var ra=mxUtils.parseXml(ea);ea=ra.getElementsByTagName("svg");if(0<ea.length){ea=ea[0];var ta=T?null:ea.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta||
-"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(E,mxUtils.bind(this,function(){try{if(null!=ra){var xa=ra.getElementsByTagName("svg");if(0<xa.length){var Ca=xa[0],Ia=Ca.getAttribute("width"),Aa=Ca.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var La=Ca.getAttribute("viewBox");if(null==La||0==La.length)Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da=
-La.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Sa=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Ra=y(ba,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ia*Sa)),Math.max(1,Math.round(Aa*Sa)),Q.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Ra[0].geometry.width=Ia;Ra[0].geometry.height=Aa;Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);
-ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));M.setCellStyles("image",ba,[Ra[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ca))}return Ra}}}catch(Za){}return null})):ka(E,mxUtils.bind(this,function(){return y(ta,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ka(E,mxUtils.bind(this,function(){return null}))}else{ea=!1;if("image/png"==Q.type){var la=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=
-la&&0<la.length){var pa=new Image;pa.src=R.target.result;ka(E,mxUtils.bind(this,function(){return y(la,"text/xml",f+E*aa,g+E*aa,pa.width,pa.height,Q.name)}));ea=!0}}ea||(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(R.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,
-R.target.result,mxUtils.bind(this,function(Ca,Ia,Aa){ka(E,mxUtils.bind(this,function(){if(null!=Ca&&Ca.length<G){var La=qa&&this.isResampleImageSize(Q.size,W)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return y(Ca,Q.type,f+E*aa,g+E*aa,Math.round(Ia*La),Math.round(Aa*La),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,W,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=R.target.result,y(ba,Q.type,f+
-E*aa,g+E*aa,240,160,Q.name,function(xa){ka(E,function(){return xa})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ka(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(oa){oa=[];for(fa=0;fa<d.length;fa++)oa.push(d[fa]);d=oa;this.confirmImageResize(function(M){qa=M;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!=
-this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(u){y(u,!0)},function(u){y(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};
-EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=
-function(d,f,g,x,y,u,H){y=null!=y?y:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/y,D/y);if(1<G){var W=Math.round(J/G),T=Math.round(D/G),Z=document.createElement("canvas");Z.width=W;Z.height=T;Z.getContext("2d").drawImage(d,0,0,W,T);var N=Z.toDataURL();if(N.length<f.length){var qa=document.createElement("canvas");qa.width=W;qa.height=T;var oa=qa.toDataURL();N!==oa&&(f=N,J=W,D=T)}}}catch(S){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng=
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,D){StorageFile.listFiles(this,
+"F",G,D)});window.openBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.getFileContent(this,G,D,I)});window.deleteBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.deleteFile(this,G,D,I)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(G=new Blob([G],{type:"application/octet-stream"}),
+this.importVisio(G,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(G,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,t=y.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=x;t.apply(y,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var G=0,D,I=!1;t.forEach(function(H,S){H=S.name.toLowerCase();"diagram/diagram.xml"==H?(I=!0,S.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>G&&(G=H,D=S))});0<G?D.async("string").then(function(H){(new XMLHttpRequest).upload&&
+x.isRemoteFileFormat(H,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(H,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):g())}),d.name):g()}):I||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,t,G,D,I,H,S,T){H=null!=
+H?H:!0;var M=!1,fa=null,la=mxUtils.bind(this,function(ra){var ba=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,G)):ba=this.importXml(ra,g,x,H,null,null!=T?mxEvent.isControlDown(T):null);null!=D&&D(ba)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=S?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(fa=this.importXml(f,g,x,H,null,null!=T?mxEvent.isControlDown(T):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
+d.substring(0,I)+d.substring(d.indexOf(",",I+1))),H&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),fa=[f.insertVertex(null,null,"",g,x,y,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,la)):null!=I&&null!=G&&(/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G))?(M=!0,this.importVisio(I,la)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,G)?
+this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?la(ra.responseText):null!=D&&D(null))}),null!=d?this.parseFileData(d,y,G):this.parseFile(I,y,G)):0==d.indexOf("PK")&&null!=I?(M=!0,this.importZipFile(I,la,mxUtils.bind(this,function(){fa=this.insertTextAt(this.validateFileData(d),g,x,!0,null,H);D(fa)}))):/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(fa=this.insertTextAt(this.validateFileData(d),
+g,x,!0,null,H,null,null!=T?mxEvent.isControlDown(T):null));M||null==D||D(fa);return fa};EditorUi.prototype.importFiles=function(d,f,g,x,y,t,G,D,I,H,S,T,M){x=null!=x?x:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var fa=null!=f&&null!=g,la=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var ba=S||this.resampleThreshold,oa=0;oa<d.length;oa++)if("image/svg"!==d[oa].type.substring(0,9)&&"image/"===d[oa].type.substring(0,6)&&d[oa].size>ba){ra=!0;break}var na=mxUtils.bind(this,
+function(){var N=this.editor.graph,aa=N.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,Z,da,qa,va,ja){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,qa)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,qa,!0)),null):this.importFile(E,Q,Y,R,Z,da,qa,va,ja,fa,T,M)}catch(sa){return this.handleError(sa),null}});t=null!=t?t:mxUtils.bind(this,
+function(E){N.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var V=d.length,ha=V,X=[],ia=mxUtils.bind(this,function(E,Q){X[E]=Q;if(0==--ha){this.spinner.stop();if(null!=D)D(X);else{var Y=[];N.getModel().beginUpdate();try{for(E=0;E<X.length;E++){var R=X[E]();null!=R&&(Y=Y.concat(R))}}finally{N.getModel().endUpdate()}}t(Y)}}),q=0;q<V;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
+G||G(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var Z=Graph.clipSvgDataUri(R.target.result),da=Z.indexOf(",");da=decodeURIComponent(escape(atob(Z.substring(da+1))));var qa=mxUtils.parseXml(da);da=qa.getElementsByTagName("svg");if(0<da.length){da=da[0];var va=T?null:da.getAttribute("content");null!=va&&"<"!=va.charAt(0)&&"%"!=va.charAt(0)&&(va=unescape(window.atob?atob(va):Base64.decode(va,!0)));null!=va&&"%"==va.charAt(0)&&(va=decodeURIComponent(va));null==va||"<mxfile "!==
+va.substring(0,8)&&"<mxGraphModel "!==va.substring(0,14)?ia(E,mxUtils.bind(this,function(){try{if(null!=qa){var ya=qa.getElementsByTagName("svg");if(0<ya.length){var Aa=ya[0],Ea=Aa.getAttribute("width"),za=Aa.getAttribute("height");Ea=null!=Ea&&"%"!=Ea.charAt(Ea.length-1)?parseFloat(Ea):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ia=Aa.getAttribute("viewBox");if(null==Ia||0==Ia.length)Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);else if(isNaN(Ea)||isNaN(za)){var Ca=Ia.split(" ");
+3<Ca.length&&(Ea=parseFloat(Ca[2]),za=parseFloat(Ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(x/Math.max(1,Ea)),x/Math.max(1,za)),Pa=y(Z,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ea*Sa)),Math.max(1,Math.round(za*Sa)),Q.name);if(isNaN(Ea)||isNaN(za)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ea=Math.max(1,Ta.width);za=Math.max(1,Ta.height);Pa[0].geometry.width=Ea;Pa[0].geometry.height=za;Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));
+var Za=Z.indexOf(";");0<Za&&(Z=Z.substring(0,Za)+Z.substring(Z.indexOf(",",Za+1)));N.setCellStyles("image",Z,[Pa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Pa}}}catch(Za){}return null})):ia(E,mxUtils.bind(this,function(){return y(va,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ia(E,mxUtils.bind(this,function(){return null}))}else{da=!1;if("image/png"==Q.type){var ja=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=ja&&0<ja.length){var sa=new Image;sa.src=R.target.result;
+ia(E,mxUtils.bind(this,function(){return y(ja,"text/xml",f+E*aa,g+E*aa,sa.width,sa.height,Q.name)}));da=!0}}da||(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(R.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,R.target.result,mxUtils.bind(this,
+function(Aa,Ea,za){ia(E,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<H){var Ia=la&&this.isResampleImageSize(Q.size,S)?Math.min(1,Math.min(x/Ea,x/za)):1;return y(Aa,Q.type,f+E*aa,g+E*aa,Math.round(Ea*Ia),Math.round(za*Ia),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),la,x,S,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=R.target.result,y(Z,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(ya){ia(E,
+function(){return ya})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ia(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(ra){ra=[];for(oa=0;oa<d.length;oa++)ra.push(d[oa]);d=ra;this.confirmImageResize(function(N){la=N;na()},I)}else na()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(t,G){if(t||f)mxSettings.setResizeImages(t?G:null),mxSettings.save();g();d(G)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){y(t,!0)},function(t){y(t,
+!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,y,t,
+G){y=null!=y?y:this.maxImageSize;var D=Math.max(1,d.width),I=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=G?G:f.length,t))try{var H=Math.max(D/y,I/y);if(1<H){var S=Math.round(D/H),T=Math.round(I/H),M=document.createElement("canvas");M.width=S;M.height=T;M.getContext("2d").drawImage(d,0,0,S,T);var fa=M.toDataURL();if(fa.length<f.length){var la=document.createElement("canvas");la.width=S;la.height=T;var ra=la.toDataURL();fa!==ra&&(f=fa,D=S,I=T)}}}catch(ba){}g(f,D,I)};EditorUi.prototype.extractGraphModelFromPng=
function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var fa=S.getEvent();
-return null==S.getState()&&!mxEvent.isMouseEvent(fa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(fa)&&(null==S.getState()||mxEvent.isControlDown(fa)||mxEvent.isShiftDown(fa))});f.cellEditor.editPlantUmlData=function(S,fa,ia){var M=JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("plantUml")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,M.format,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-M.format)f.labelChanged(S,"<pre>"+X+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",d.convertDataUri(X),[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=ja,ka.height=ca,f.cellsResized([S],[ka],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:aa,format:M.format}))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};f.cellEditor.editMermaidData=function(S,fa,ia){var M=
-JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("mermaid")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,M.config,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",X,[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ja),ka.height=Math.max(ka.height,ca),f.cellsResized([S],[ka],!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:aa,
-config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,fa){try{var ia=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=ia)this.editPlantUmlData(S,fa,ia);else if(ia=this.graph.getAttributeForCell(S,"mermaidData"),null!=ia)this.editMermaidData(S,fa,ia);else{var M=f.getCellStyle(S);"1"==mxUtils.getValue(M,"metaEdit",
-"0")?d.showDataDialog(S):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(S){return d.getLinkTitle(S)};f.customLinkClicked=function(S){var fa=!1;try{d.handleCustomLink(S),fa=!0}catch(ia){d.handleError(ia)}return fa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var fa=x.apply(this,arguments);null!=fa&&null!=fa.src&&Graph.isPageLink(fa.src)&&(fa={originalSrc:fa.src});return fa};var y=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!=
-S.originalSrc&&(S=d.createImageForPageLink(S.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(S,fa){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var ia=S.indexOf(",");if(0<ia)for(S=S.substring(ia+1),fa=fa.getProperty("patches"),
-ia=0;ia<fa.length;ia++)if(null!=fa[ia][EditorUi.DIFF_UPDATE]&&null!=fa[ia][EditorUi.DIFF_UPDATE][S]||null!=fa[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(fa[ia][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,fa){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!fa)ia={src:ia.originalSrc};else if(fa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var M=this.stylesheet,aa=this.shapeForegroundColor,
-X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=X;this.shapeForegroundColor=aa;this.stylesheet=M}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.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 J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(S,fa,ia){var M=fa;fa=function(aa,X){if(null==X){var ja=mxEvent.getSource(aa);"a"==ja.nodeName.toLowerCase()&&(X=
-ja.getAttribute("href"))}null!=X&&f.isCustomLink(X)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(X)&&mxEvent.consume(aa);null!=M&&M(aa,X)};D.call(this,S,fa,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,fa,ia){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(S,
-"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}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 W=f.getExportVariables;f.getExportVariables=function(){var S=W.apply(this,arguments),fa=d.getCurrentFile();null!=fa&&(S.filename=fa.getTitle());S.pagecount=null!=d.pages?d.pages.length:1;S.page=null!=d.currentPage?d.currentPage.getName():"";
-S.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return S};var T=f.getGlobalVariable;f.getGlobalVariable=function(S){var fa=d.getCurrentFile();return"filename"==S&&null!=fa?fa.getTitle():"page"==S&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==S?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==S?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(S,
-fa,ia){var M=fa.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var S=d.defaultFilename,fa=d.getCurrentFile();null!=fa&&(S=null!=fa.getTitle()?fa.getTitle():S);return S};var N=this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);
-N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),
-this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var fa=f.cellEditor.text2,
-ia=null;null!=fa&&(mxEvent.addListener(fa,"dragleave",function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(fa,"dragover",mxUtils.bind(this,function(M){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(fa));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(fa,"drop",mxUtils.bind(this,function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,
-0,0,this.maxImageSize,function(X,ja,ca,ka,q,E){f.insertImage(X,q,E)},function(){},function(X){return"image/"==X.type.substring(0,6)},function(X){for(var ja=0;ja<X.length;ja++)X[ja]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var aa=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(X){var ja=Math.max(1,X.width);X=Math.max(1,X.height);var ca=this.maxImageSize;
-ca=Math.min(1,Math.min(ca/Math.max(1,ja)),ca/Math.max(1,X));f.insertImage(decodeURIComponent(aa),ja*ca,X*ca)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));this.isSettingsEnabled()&&
-(N=this.editor.graph.view,N.setUnit(mxSettings.getUnit()),N.addListener("unitChanged",function(S,fa){mxSettings.setUnit(fa.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,N.unit),this.refresh());if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(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)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(S,fa){0<this.editor.graph.getSelectionCount()?(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:qa.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||
-this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,
-function(S){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var fa=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),ia=S.dataTransfer.files,M=f.view.translate,aa=f.view.scale,X=fa.x/aa-M.x,ja=fa.y/aa-M.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ia,!0)):(mxEvent.isAltDown(S)&&(ja=X=null),this.importFiles(ia,X,ja,this.maxImageSize,
-null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),S));else{mxEvent.isAltDown(S)&&(ja=X=0);var ca=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;fa=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=fa)f.setSelectionCells(this.importXml(fa,X,ja,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var ka=S.dataTransfer.getData("text/html");fa=document.createElement("div");fa.innerHTML=f.sanitizeHtml(ka);
-var q=null;ia=fa.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=fa.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(fa=fa.getElementsByTagName("pre"),null!=fa&&1==fa.length&&(ka=mxUtils.getTextContent(fa[0]))));var E=!0,Q=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ka,X,ja,!0,q,null,E,mxEvent.isControlDown(S)))});
-q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(S)):Q()}else null!=ca&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ca)?this.loadImage(decodeURIComponent(ca),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,R)),ba/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,null,"",X,ja,R*ba,Y*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-ca+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(ca,X,ja,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),X,ja,!0))}}S.stopPropagation();S.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();N=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",
-N);this.addListener("sketchModeChanged",N);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"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);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=
-this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(D,G,W,T,Z,N){d.insertImage(D,Z,N)},function(){},function(D){return"image/"==D.type.substring(0,
-6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect",
-"off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=
-!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+
-10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,
-function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this,
-function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);f=f||this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var f=Editor.currentTheme,g=!1;if(f!=d){if("1"==urlParams["live-ui"]){var x=
-function(y){return null==y||""==y||"dark"==y||"kennedy"==y};console.log("doSetCurrentTheme",f,d);d=x(d)?"default":d;f=x(f)?"default":f;"sketch"==f&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,
-this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==f&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(d)}Editor.currentTheme=d}return g};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d);
-this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),
-this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=
-function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height=
-"22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&
-(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,f,g,x){var y=this.menus.get(f);d=d.addMenu(mxResources.get(f),y.funct);d.className=g;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height="30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(f));this.menus.menuCreated(y,
-d,"geMenuItem");null!=x&&(d.style.backgroundImage="url("+x+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-241):Math.max(10,this.diagramContainer.clientWidth-248),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?
-580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
-"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html body div.geToolbarContainer 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: '+
+mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(ba){var oa=ba.getEvent();
+return null==ba.getState()&&!mxEvent.isMouseEvent(oa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(oa)&&(null==ba.getState()||mxEvent.isControlDown(oa)||mxEvent.isShiftDown(oa))});f.cellEditor.editPlantUmlData=function(ba,oa,na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,N.format,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
+N.format)f.labelChanged(ba,"<pre>"+V+"</pre>"),f.updateCellSize(ba,!0);else{f.setCellStyles("image",d.convertDataUri(V),[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=ha,ia.height=X,f.cellsResized([ba],[ia],!1))}f.setAttributeForCell(ba,"plantUmlData",JSON.stringify({data:aa,format:N.format}))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};f.cellEditor.editMermaidData=function(ba,oa,
+na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,N.config,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",V,[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=Math.max(ia.width,ha),ia.height=Math.max(ia.height,X),f.cellsResized([ba],[ia],!1));f.setAttributeForCell(ba,"mermaidData",JSON.stringify({data:aa,
+config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(ba,oa){try{var na=this.graph.getAttributeForCell(ba,"plantUmlData");if(null!=na)this.editPlantUmlData(ba,oa,na);else if(na=this.graph.getAttributeForCell(ba,"mermaidData"),null!=na)this.editMermaidData(ba,oa,na);else{var N=f.getCellStyle(ba);"1"==mxUtils.getValue(N,"metaEdit",
+"0")?d.showDataDialog(ba):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(ba){return d.getLinkTitle(ba)};f.customLinkClicked=function(ba){var oa=!1;try{d.handleCustomLink(ba),oa=!0}catch(na){d.handleError(na)}return oa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(ba){var oa=x.apply(this,arguments);null!=oa&&null!=oa.src&&Graph.isPageLink(oa.src)&&(oa={originalSrc:oa.src});return oa};var y=f.setBackgroundImage;f.setBackgroundImage=function(ba){null!=
+ba&&null!=ba.originalSrc&&(ba=d.createImageForPageLink(ba.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(ba,oa){ba=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=ba){var na=ba.indexOf(",");if(0<na)for(ba=ba.substring(na+
+1),oa=oa.getProperty("patches"),na=0;na<oa.length;na++)if(null!=oa[na][EditorUi.DIFF_UPDATE]&&null!=oa[na][EditorUi.DIFF_UPDATE][ba]||null!=oa[na][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(oa[na][EditorUi.DIFF_REMOVE],ba)){f.refreshBackgroundImage();break}}}));var t=f.getBackgroundImageObject;f.getBackgroundImageObject=function(ba,oa){var na=t.apply(this,arguments);if(null!=na&&null!=na.originalSrc)if(!oa)na={src:na.originalSrc};else if(oa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=
+this.stylesheet,aa=this.shapeForegroundColor,V=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";na=d.createImageForPageLink(na.originalSrc);this.shapeBackgroundColor=V;this.shapeForegroundColor=aa;this.stylesheet=N}return na};var G=this.clearDefaultStyle;this.clearDefaultStyle=function(){G.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(ba){ba=null!=ba?ba:"";"1"==urlParams.dev&&(ba+=(0<ba.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(ba,oa,na){var N=oa;oa=function(aa,V){if(null==
+V){var ha=mxEvent.getSource(aa);"a"==ha.nodeName.toLowerCase()&&(V=ha.getAttribute("href"))}null!=V&&f.isCustomLink(V)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(V)&&mxEvent.consume(aa);null!=N&&N(aa,V)};I.call(this,ba,oa,na)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var H=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(ba,oa,na){d.editor.graph.isSelectionEmpty()?
+H.apply(this,arguments):d.menus.addMenuItems(ba,"delete - cut copy copyAsImage - duplicate".split(" "),null,na)}}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 S=f.getExportVariables;f.getExportVariables=function(){var ba=S.apply(this,arguments),oa=d.getCurrentFile();null!=oa&&(ba.filename=oa.getTitle());ba.pagecount=null!=d.pages?d.pages.length:1;ba.page=
+null!=d.currentPage?d.currentPage.getName():"";ba.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return ba};var T=f.getGlobalVariable;f.getGlobalVariable=function(ba){var oa=d.getCurrentFile();return"filename"==ba&&null!=oa?oa.getTitle():"page"==ba&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==ba?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==ba?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};
+var M=f.labelLinkClicked;f.labelLinkClicked=function(ba,oa,na){var N=oa.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(na)&&mxEvent.isPopupTrigger(na))M.apply(this,arguments);else{if(!f.isEnabled()||null!=ba&&f.isCellLocked(ba.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(na)}};this.editor.getOrCreateFilename=function(){var ba=d.defaultFilename,oa=d.getCurrentFile();null!=oa&&(ba=null!=oa.getTitle()?oa.getTitle():ba);return ba};var fa=this.actions.get("print");
+fa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);fa.visible=fa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
+this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,
+mxUtils.bind(this,function(ba){var oa=f.cellEditor.text2,na=null;null!=oa&&(mxEvent.addListener(oa,"dragleave",function(N){null!=na&&(na.parentNode.removeChild(na),na=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(oa,"dragover",mxUtils.bind(this,function(N){null==na&&(!mxClient.IS_IE||10<document.documentMode)&&(na=this.highlightElement(oa));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(oa,"drop",mxUtils.bind(this,function(N){null!=na&&(na.parentNode.removeChild(na),
+na=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(V,ha,X,ia,q,E){f.insertImage(V,q,E)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var ha=0;ha<V.length;ha++)V[ha]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var aa=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,
+function(V){var ha=Math.max(1,V.width);V=Math.max(1,V.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,ha)),X/Math.max(1,V));f.insertImage(decodeURIComponent(aa),ha*X,V*X)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));
+N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(fa=this.editor.graph.view,fa.setUnit(mxSettings.getUnit()),fa.addListener("unitChanged",function(ba,oa){mxSettings.setUnit(oa.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,fa.unit),this.refresh());if("1"==urlParams.styledev){fa=document.getElementById("geFooter");
+null!=fa&&(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)})),fa.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ba,oa){0<this.editor.graph.getSelectionCount()?(ba=this.editor.graph.getSelectionCell(),ba=this.editor.graph.getModel().getStyle(ba),this.styleInput.value=ba||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(ba){return mxEvent.getSource(ba)==this.styleInput?!0:la.apply(this,arguments)}}fa=document.getElementById("geInfo");
+null!=fa&&fa.parentNode.removeChild(fa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(ba){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),ba.stopPropagation(),ba.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(ba){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
+ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(ba){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var oa=mxUtils.convertPoint(f.container,mxEvent.getClientX(ba),mxEvent.getClientY(ba)),na=ba.dataTransfer.files,N=f.view.translate,aa=f.view.scale,V=oa.x/aa-N.x,ha=oa.y/aa-N.y;if(0<na.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(ba)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),
+this.openFiles(na,!0)):(mxEvent.isAltDown(ba)&&(ha=V=null),this.importFiles(na,V,ha,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(ba),null,null,mxEvent.isShiftDown(ba),ba));else{mxEvent.isAltDown(ba)&&(ha=V=0);var X=0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")?ba.dataTransfer.getData("text/uri-list"):null;oa=this.extractGraphModelFromEvent(ba,null!=this.pages);if(null!=oa)f.setSelectionCells(this.importXml(oa,V,ha,!0));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")){var ia=
+ba.dataTransfer.getData("text/html");oa=document.createElement("div");oa.innerHTML=f.sanitizeHtml(ia);var q=null;na=oa.getElementsByTagName("img");null!=na&&1==na.length?(ia=na[0].getAttribute("src"),null==ia&&(ia=na[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ia)||(q=!0)):(na=oa.getElementsByTagName("a"),null!=na&&1==na.length?ia=na[0].getAttribute("href"):(oa=oa.getElementsByTagName("pre"),null!=oa&&1==oa.length&&(ia=mxUtils.getTextContent(oa[0]))));var E=!0,Q=mxUtils.bind(this,
+function(){f.setSelectionCells(this.insertTextAt(ia,V,ha,!0,q,null,E,mxEvent.isControlDown(ba)))});q&&null!=ia&&ia.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(ba)):Q()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,R)),Z/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,
+null,"",V,ha,R*Z,Y*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(X,V,ha,!0))})):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(ba.dataTransfer.getData("text/plain"),V,ha,!0))}}ba.stopPropagation();ba.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
+fa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",fa);this.addListener("sketchModeChanged",fa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"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);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,
+5)){x=!0;break}if(!x){var t=g.items;for(index in t){var G=t[index];if("file"===G.kind){if(d.isEditing())this.importFiles([G.getAsFile()],0,0,this.maxImageSize,function(I,H,S,T,M,fa){d.insertImage(I,M,fa)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var H=0;H<I.length;H++)I[H]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([G.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
+"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var G=mxEvent.getSource(t);
+null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",t=f.container.scrollLeft,G=f.container.scrollTop,f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=t,f.container.scrollTop=G)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var G=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=G&&17!=G&&91!=G&&93!=G||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"cut",
+mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var G=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=G;f.container.scrollTop=D;
+this.pasteCells(t,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function f(S){return""==S||"dark"==S||"kennedy"==S||null==S}var g=Editor.currentTheme;d=f(d)?"default":d;g=f(g)?"default":g;var x=
+"sketch"==g&&"default"==d||"default"==g&&"sketch"==d;if(x&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var y=this.editor.graph.view.translate,t=y.x,G=y.y,D=mxUtils.getOffset(this.editor.graph.container),I=this.editor.graph.container.scrollLeft-D.x,H=this.editor.graph.container.scrollTop-D.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
+function(){"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
+"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var S=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=I+D.x+(y.x-t)*S;this.editor.graph.container.scrollTop=
+H+D.y+(y.y-G)*S;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return x};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
+"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
+this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
+(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=
+Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
+function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
+(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",d);
+this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var t=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+x+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
+g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(g);mxUtils.bind(this,function(x){mxEvent.addListener(x,
+"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var y=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
+y)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var x=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);x.style.paddingLeft="12px";x.style.backgroundSize="";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var y=this.createMenu("insert",Editor.plusImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var t=!1,G=mxUtils.bind(this,function(){f.innerText="";if(!t){var D=function(H,S,T,M){null!=S&&H.setAttribute("title",S);H.style.cursor="pointer";H.style.margin="8px 0px";
+H.style.display="block";f.appendChild(H);null!=M&&(H.style.position="relative",H.style.overflow="visible",S=document.createElement("div"),S.style.position="absolute",S.style.fontSize="8px",S.style.left="32px",S.style.top="28px",mxUtils.write(S,M),H.appendChild(S));return H};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var I=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,0),!1);I.geometry.points=
+[];I.geometry.relative=!0;I.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,I.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");I=I.clone();I.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";I.geometry.width=this.editor.graph.defaultEdgeLength+20;I.geometry.setTerminalPoint(new mxPoint(0,20),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,20),!1);
+D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(x,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,G()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
+G);this.addListener("sketchModeChanged",G);G();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
+"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,f){var g=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),g.funct);x.className="geToolbarButton";x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(g,x,"geMenuItem");null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize=
+"100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createMenuItem=function(d,f,g){var x=document.createElement("a");x.className="geToolbarButton";x.setAttribute("title",mxResources.get(d));x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width="24px";x.style.height="24px";var y=this.actions.get(d);
+null!=y&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(x,"click",function(t){"disabled"!=x.getAttribute("disabled")&&y.funct(t);mxEvent.consume(t)}),g||(d=function(){y.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),y.addListener("stateChanged",
+d),d()));return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
+"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
-"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
-(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
-(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
+(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+
+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("href",STYLE_PATH+"/dark.css");
@@ -3687,168 +3715,168 @@ p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.pro
"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&
(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):null!=p.parentNode&&p.parentNode.removeChild(p)}};
-EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,y,u){null==
-x[y]&&(x[y]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");
-f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,
-"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():
-mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
-EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],
-"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,
-function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):
+null!=p.parentNode&&p.parentNode.removeChild(p)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
+d){var f=function(x,y,t){null==x[y]&&(x[y]=t)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,
+"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
+f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),
+f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
+mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
+"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
+mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(y.getAttribute("width")),J=parseInt(y.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var t=this.createImageDataUri(x,f,"png"),G=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(t,G,D,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,
function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
-f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,u=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var H=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),y.setSelectionCells(u);else if(f&&1==y.getSelectionCount()){H=y.getStartEditingCell(y.getSelectionCell(),
-x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{y.model.beginUpdate();try{y.labelChanged(H,d),Graph.isLink(d)&&y.setLinkForCell(H,d)}finally{y.model.endUpdate()}}y.setSelectionCell(H)}else u=y.getInsertPoint(),y.isMouseInsertPoint()&&(H=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),y.setSelectionCells(u);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(y=
-this.parseHtmlData(J),u="text/plain"!=y.getAttribute("data-type")):null!=H&&0<H.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,J))}H=y.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
-0);var S=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,S,S));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),W=!1;try{var T=G.lastIndexOf("%3E");0<=T&&T<G.length-3&&(G=G.substring(0,T+3))}catch(qa){}try{H=y.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):
-decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(W=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Z=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,W,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Z):Z()}else this.pasteXml(G,
-x,W,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
+f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,t=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var G=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))t=this.importXml(d,G,G),y.setSelectionCells(t);else if(f&&1==y.getSelectionCount()){G=y.getStartEditingCell(y.getSelectionCell(),
+x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(G)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[G]);else{y.model.beginUpdate();try{y.labelChanged(G,d),Graph.isLink(d)&&y.setLinkForCell(G,d)}finally{y.model.endUpdate()}}y.setSelectionCell(G)}else t=y.getInsertPoint(),y.isMouseInsertPoint()&&(G=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),t=this.insertTextAt(d,t.x+G,t.y+G,!0),y.setSelectionCells(t);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,t=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var G=d.clipboardData.getData("text/plain"),D=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var I=decodeURIComponent(G);this.isCompatibleString(I)&&(D=!0,G=I)}catch(la){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(y=
+this.parseHtmlData(D),t="text/plain"!=y.getAttribute("data-type")):null!=G&&0<G.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,D))}G=y.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))g=G[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(la){var ra=this.editor.graph;ra.lastPasteXml==la?ra.pasteCounter++:(ra.lastPasteXml=la,ra.pasteCounter=
+0);var ba=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(la,ba,ba));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,function(la){this.handleError(la)})),mxEvent.consume(d));else{var H=t?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),S=!1;try{var T=H.lastIndexOf("%3E");0<=T&&T<H.length-3&&(H=H.substring(0,T+3))}catch(la){}try{G=y.getElementsByTagName("span"),(I=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):
+decodeURIComponent(H))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(S=!0,H=I)}catch(la){}try{if(null!=H&&0<H.length){if(0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var M=mxUtils.bind(this,function(){try{H=(new MiroImporter).importMiroJson(JSON.parse(H)),this.pasteXml(H,x,S,d)}catch(la){console.log("Miro import error:",la)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",M):M()}else this.pasteXml(H,
+x,S,d);try{mxEvent.consume(d)}catch(la){}}else if(!g){var fa=this.editor.graph;fa.lastPasteXml=null;fa.pasteCounter=0}}catch(la){this.handleError(la)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&&
-!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?y=u.getData("Text"):(y=null,y=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=y&&0<y.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(y),
-u=u.getElementsByTagName("img"),0<u.length&&(y=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(y=u.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&
-299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
-var u=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,u-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
+!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var t=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?y=t.getData("Text"):(y=null,y=0<=mxUtils.indexOf(t.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=y&&0<y.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(y),
+t=t.getElementsByTagName("img"),0<t.length&&(y=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(y=t.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(G){200<=G.getStatus()&&
+299>=G.getStatus()&&this.openLocalFile(G.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
+var t=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,t=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,t-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(J){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==J.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,J,f))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(J,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(),
-200<=J.status&&299>=J.status?u(J.responseText):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(J){this.spinner.stop();this.openLocalFile(J,f,x)}),mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
-g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(y=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});y.onerror=mxUtils.bind(this,function(u){this.spinner.stop();
-this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
-u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var u=0;u<y;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var t=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
+200<=D.status&&299>=D.status?t(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,x)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var G=Editor.extractGraphModelFromPdf(d);null!=G&&(y=null,x=!0,d=G)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,x.name,x,f)}catch(G){this.handleError(G)}});y.onerror=mxUtils.bind(this,function(t){this.spinner.stop();
+this.handleError(t);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var t=this.getCurrentFile(),G=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?G():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(G){if(null!=G){var D=G.lastIndexOf(".");0<D&&(G=G.substring(D+1,G.length));null==f[G]&&(f[G]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var t=0;t<y;t++)this.addBasenamesForCell(x.model.getChildAt(d,t),f)};EditorUi.prototype.setGraphEnabled=
function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!=
-D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var G=t.model.cells,D;for(D in G){var I=G[D];null!=
+I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==
-(window.opener||window.parent)){var G=D.data,W=null,T=mxUtils.bind(this,function(la){if(null!=la&&"function"===typeof la.charAt&&"<"!=la.charAt(0))try{Editor.isPngDataUrl(la)?la=Editor.extractGraphModelFromPng(la):"data:image/svg+xml;base64,"==la.substring(0,26)?la=atob(la.substring(26)):"data:image/svg+xml;utf8,"==la.substring(0,24)&&(la=la.substring(24)),null!=la&&("%"==la.charAt(0)?la=decodeURIComponent(la):"<"!=la.charAt(0)&&(la=Graph.decompress(la)))}catch(pa){}return la});if("json"==urlParams.proto){var Z=
-!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(la){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
-G.action){this.spinner.stop();var N=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(la){null!=la?H.postMessage(JSON.stringify({event:"prompt",value:la,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(N.container,300,80,!0,!1);N.init();return}if("draft"==G.action){var qa=T(G.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",
-[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
-"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(la){la&&this.actions.get("exit").funct()}));try{N.init()}catch(la){H.postMessage(JSON.stringify({event:"draft",error:la.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,S=1==G.enableSearch,fa=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),M=new TemplatesDialog(this,function(la,pa,xa){la=la||this.emptyDiagramXml;
-H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==this.emptyDiagramXml,name:pa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(la,pa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,la,pa)}):null,S?mxUtils.bind(this,function(la,pa,xa,Ca){this.remoteInvoke("searchDiagrams",[la,Ca],null,pa,xa)}):null,mxUtils.bind(this,
-function(la,pa,xa){this.remoteInvoke("getFileContent",[la.url],null,pa,xa)}),null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,!1,!1,!0,!0);this.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}N=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(la,pa,xa,Ca){la=la||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==
-this.emptyDiagramXml,name:pa,tempUrl:xa,libs:Ca,builtIn:!0,message:G}),"*"):(d(la,D,la!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(la){this.remoteInvoke("getRecentDiagrams",[null],null,la,function(){la(null,"Network Error!")})}):null,S?mxUtils.bind(this,function(la,pa){this.remoteInvoke("searchDiagrams",[la,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this,function(la,
-pa,xa){H.postMessage(JSON.stringify({event:"template",docUrl:la,info:pa,name:xa}),"*")}),null,null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,1==G.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(la){this.sidebar.hideTooltip();la&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==G.action){var aa=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",
-data:aa,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var X=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,X):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
-return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ja=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ca=this.editor.graph,ka=mxUtils.bind(this,function(la){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=la;pa.xml=ja;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(la){null==la&&(la=Editor.blankImage);"xmlpng"==G.format&&(la=Editor.writeGraphModelToPng(la,"tEXt","mxfile",encodeURIComponent(ja)));ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);ka(la)}),E=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var la=ca.getGlobalVariable;ca=this.createTemporaryGraph(ca.getStylesheet());for(var pa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==E){pa=this.updatePageRoot(this.pages[xa]);break}null==pa&&(pa=this.currentPage);ca.getGlobalVariable=function(La){return"page"==La?pa.getName():"pagenumber"==La?1:la.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}if(null!=G.layerIds){var Ca=
-ca.model,Ia=Ca.getChildCells(Ca.getRoot()),Aa={};for(xa=0;xa<G.layerIds.length;xa++)Aa[G.layerIds[xa]]=!0;for(xa=0;xa<Ia.length;xa++)Ca.setVisible(Ia[xa],Aa[Ia[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){q(La.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ca,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ja),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ja))).send(mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?ka("data:image/png;base64,"+la.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var la=this.createLoadMessage("export");
-la.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();la.xml=mxUtils.getXml(pa);la.data=this.getFileData(null,null,!0,null,null,null,pa);la.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),la.data=this.getHtml(pa,this.editor.graph),la.xml=mxUtils.getXml(pa),la.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa==
-mxConstants.NONE&&(pa=null);la.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);la.format="svg";var xa=mxUtils.bind(this,function(Ca){this.editor.graph.setEnabled(!0);this.spinner.stop();la.data=Editor.createSvgDataUri(Ca);H.postMessage(JSON.stringify(la),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(la.xml,this.editor.graph,null,!0,xa,null,null,G.embedImages,
-pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ca){G.embedImages||null==G.embedImages?this.editor.convertImages(Ca,
-mxUtils.bind(this,function(Ia){xa(mxUtils.getXml(Ia))})):xa(mxUtils.getXml(Ca))}));return}H.postMessage(JSON.stringify(la),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==G.action){Z=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);
-null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var R=Editor.sketchMode;this.doSetSketchMode(G.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(R=Editor.darkMode,this.doSetDarkMode(G.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);
-null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var ba=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";W=mxUtils.bind(this,function(){var la=this.editor.graph,pa=la.maxFitScale;la.maxFitScale=G.maxFitScale;la.fit(2*ba);la.maxFitScale=pa;la.container.scrollTop-=2*ba;la.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(la){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(qa=T(G.xml),null!=qa&&""!=qa&&ea.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(la){H.postMessage(JSON.stringify({event:"merge",message:G,error:la}),"*")}))}else"remoteInvokeReady"==
-G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(la){this.handleError(la)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(la,pa){g=!0;
-try{d(la,pa,null,Z)}catch(xa){this.handleError(xa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=ra();x&&null==f&&(f=mxUtils.bind(this,function(xa,Ca){xa=ra();xa==y||g||(Ca=this.createLoadMessage("autosave"),Ca.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ca),"*"));y=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=la,H.postMessage(JSON.stringify(pa),"*");null!=W&&W()});null!=G&&
-"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(T="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(la){ta(la,D)},mxUtils.bind(this,function(la){this.handleError(la)}),T)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
-mxUtils.bind(this,function(la){4==la.readyState&&200<=la.status&&299>=la.status&&"<mxGraphModel"==la.responseText.substring(0,13)&&ta(la.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(la){ta(la)}),mxUtils.bind(this,function(la){this.handleError(la)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=T(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(la){ta(ra(),D)}),
-mxUtils.bind(this,function(la){this.handleError(la,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,W){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:W}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,t=mxUtils.bind(this,function(I,H){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
+(window.opener||window.parent)){var H=I.data,S=null,T=mxUtils.bind(this,function(ja){if(null!=ja&&"function"===typeof ja.charAt&&"<"!=ja.charAt(0))try{Editor.isPngDataUrl(ja)?ja=Editor.extractGraphModelFromPng(ja):"data:image/svg+xml;base64,"==ja.substring(0,26)?ja=atob(ja.substring(26)):"data:image/svg+xml;utf8,"==ja.substring(0,24)&&(ja=ja.substring(24)),null!=ja&&("%"==ja.charAt(0)?ja=decodeURIComponent(ja):"<"!=ja.charAt(0)&&(ja=Graph.decompress(ja)))}catch(sa){}return ja});if("json"==urlParams.proto){var M=
+!1;try{H=JSON.parse(H),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[H])}catch(ja){H=null}try{if(null==H)return;if("dialog"==H.action){this.showError(null!=H.titleKey?mxResources.get(H.titleKey):H.title,null!=H.messageKey?mxResources.get(H.messageKey):H.message,null!=H.buttonKey?mxResources.get(H.buttonKey):H.button);null!=H.modified&&(this.editor.modified=H.modified);return}if("layout"==H.action){this.executeLayouts(this.editor.graph.createLayouts(H.layouts));return}if("prompt"==
+H.action){this.spinner.stop();var fa=new FilenameDialog(this,H.defaultValue||"",null!=H.okKey?mxResources.get(H.okKey):H.ok,function(ja){null!=ja?G.postMessage(JSON.stringify({event:"prompt",value:ja,message:H}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:H}),"*")},null!=H.titleKey?mxResources.get(H.titleKey):H.title);this.showDialog(fa.container,300,80,!0,!1);fa.init();return}if("draft"==H.action){var la=T(H.xml);this.spinner.stop();fa=new DraftDialog(this,mxResources.get("draftFound",
+[H.name||this.defaultFilename]),la,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:H}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:H}),"*")}),H.editKey?mxResources.get(H.editKey):null,H.discardKey?mxResources.get(H.discardKey):null,H.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:H}),
+"*")}):null);this.showDialog(fa.container,640,480,!0,!1,mxUtils.bind(this,function(ja){ja&&this.actions.get("exit").funct()}));try{fa.init()}catch(ja){G.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:H}),"*")}return}if("template"==H.action){this.spinner.stop();var ra=1==H.enableRecent,ba=1==H.enableSearch,oa=1==H.enableCustomTemp;if("1"==urlParams.newTempDlg&&!H.templatesOnly&&null!=H.callback){var na=this.getCurrentUser(),N=new TemplatesDialog(this,function(ja,sa,ya){ja=ja||
+this.emptyDiagramXml;G.postMessage(JSON.stringify({event:"template",xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:H}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=na?na.id:null,ra?mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,ja,sa)}):null,ba?mxUtils.bind(this,function(ja,sa,ya,Aa){this.remoteInvoke("searchDiagrams",[ja,Aa],null,sa,
+ya)}):null,mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getFileContent",[ja.url],null,sa,ya)}),null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}fa=new NewDialog(this,!1,H.templatesOnly?!1:null!=H.callback,mxUtils.bind(this,function(ja,sa,ya,Aa){ja=ja||this.emptyDiagramXml;null!=H.callback?G.postMessage(JSON.stringify({event:"template",
+xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya,libs:Aa,builtIn:!0,message:H}),"*"):(d(ja,I,ja!=this.emptyDiagramXml,H.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(ja){this.remoteInvoke("getRecentDiagrams",[null],null,ja,function(){ja(null,"Network Error!")})}):null,ba?mxUtils.bind(this,function(ja,sa){this.remoteInvoke("searchDiagrams",[ja,null],null,sa,function(){sa(null,"Network Error!")})}):null,mxUtils.bind(this,
+function(ja,sa,ya){G.postMessage(JSON.stringify({event:"template",docUrl:ja,info:sa,name:ya}),"*")}),null,null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,1==H.withoutType);this.showDialog(fa.container,620,460,!0,!1,mxUtils.bind(this,function(ja){this.sidebar.hideTooltip();ja&&this.actions.get("exit").funct()}));fa.init();return}if("textContent"==H.action){var aa=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",
+data:aa,message:H}),"*");return}if("status"==H.action){null!=H.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(H.messageKey))):null!=H.message&&this.editor.setStatus(mxUtils.htmlEntities(H.message));null!=H.modified&&(this.editor.modified=H.modified);return}if("spinner"==H.action){var V=null!=H.messageKey?mxResources.get(H.messageKey):H.message;null==H.show||H.show?this.spinner.spin(document.body,V):this.spinner.stop();return}if("exit"==H.action){this.actions.get("exit").funct();
+return}if("viewport"==H.action){null!=H.viewport&&(this.embedViewport=H.viewport);return}if("snapshot"==H.action){this.sendEmbeddedSvgExport(!0);return}if("export"==H.action){if("png"==H.format||"xmlpng"==H.format){if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin)){var ha=null!=H.xml?H.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,ia=mxUtils.bind(this,function(ja){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var sa=this.createLoadMessage("export");sa.format=H.format;sa.message=H;sa.data=ja;sa.xml=ha;G.postMessage(JSON.stringify(sa),"*")}),q=mxUtils.bind(this,function(ja){null==ja&&(ja=Editor.blankImage);"xmlpng"==H.format&&(ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(ha)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);ia(ja)}),E=H.pageId||(null!=this.pages?H.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var ja=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var sa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==E){sa=this.updatePageRoot(this.pages[ya]);break}null==sa&&(sa=this.currentPage);X.getGlobalVariable=function(Ia){return"page"==Ia?sa.getName():"pagenumber"==Ia?1:ja.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(sa.root)}if(null!=H.layerIds){var Aa=
+X.model,Ea=Aa.getChildCells(Aa.getRoot()),za={};for(ya=0;ya<H.layerIds.length;ya++)za[H.layerIds[ya]]=!0;for(ya=0;ya<Ea.length;ya++)Aa.setVisible(Ea[ya],za[Ea[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){q(Ia.toDataURL("image/png"))}),H.width,null,H.background,mxUtils.bind(this,function(){q(null)}),null,null,H.scale,H.transparent,H.shadow,null,X,H.border,null,H.grid,H.keepTheme)});null!=H.xml&&0<H.xml.length&&(g=!0,this.setFileData(ha),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==H.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=H.layerIds&&0<H.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:H.layerIds})):"")+(null!=H.scale?"&scale="+H.scale:"")+"&base64=1&xml="+encodeURIComponent(ha))).send(mxUtils.bind(this,function(ja){200<=ja.getStatus()&&299>=ja.getStatus()?ia("data:image/png;base64,"+ja.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var ja=this.createLoadMessage("export");
+ja.message=H;if("html2"==H.format||"html"==H.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var sa=this.getXmlFileData();ja.xml=mxUtils.getXml(sa);ja.data=this.getFileData(null,null,!0,null,null,null,sa);ja.format=H.format}else if("html"==H.format)sa=this.editor.getGraphXml(),ja.data=this.getHtml(sa,this.editor.graph),ja.xml=mxUtils.getXml(sa),ja.format=H.format;else{mxSvgCanvas2D.prototype.foAltText=null;sa=null!=H.background?H.background:this.editor.graph.background;sa==
+mxConstants.NONE&&(sa=null);ja.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ja.format="svg";var ya=mxUtils.bind(this,function(Aa){this.editor.graph.setEnabled(!0);this.spinner.stop();ja.data=Editor.createSvgDataUri(Aa);G.postMessage(JSON.stringify(ja),"*")});if("xmlsvg"==H.format)(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))&&this.getEmbeddedSvg(ja.xml,this.editor.graph,null,!0,ya,null,null,H.embedImages,
+sa,H.scale,H.border,H.shadow,H.keepTheme);else if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))this.editor.graph.setEnabled(!1),sa=this.editor.graph.getSvg(sa,H.scale,H.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||H.shadow,null,H.keepTheme),(this.editor.graph.shadowVisible||H.shadow)&&this.editor.graph.addSvgShadow(sa),this.embedFonts(sa,mxUtils.bind(this,function(Aa){H.embedImages||null==H.embedImages?this.editor.convertImages(Aa,
+mxUtils.bind(this,function(Ea){ya(mxUtils.getXml(Ea))})):ya(mxUtils.getXml(Aa))}));return}G.postMessage(JSON.stringify(ja),"*")}),null!=H.xml&&0<H.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(H.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==H.action){M=H.toSketch;x=1==H.autosave;this.hideDialog();null!=H.modified&&null==urlParams.modified&&(urlParams.modified=H.modified);
+null!=H.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=H.saveAndExit);null!=H.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=H.noSaveBtn);if(null!=H.rough){var R=Editor.sketchMode;this.doSetSketchMode(H.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=H.dark&&(R=Editor.darkMode,this.doSetDarkMode(H.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=H.border&&(this.embedExportBorder=H.border);
+null!=H.background&&(this.embedExportBackground=H.background);null!=H.viewport&&(this.embedViewport=H.viewport);this.embedExitPoint=null;if(null!=H.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=H.rect.top+"px";this.diagramContainer.style.left=H.rect.left+"px";this.diagramContainer.style.height=H.rect.height+"px";this.diagramContainer.style.width=H.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";S=mxUtils.bind(this,function(){var ja=this.editor.graph,sa=ja.maxFitScale;ja.maxFitScale=H.maxFitScale;ja.fit(2*Z);ja.maxFitScale=sa;ja.container.scrollTop-=2*Z;ja.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[H]))})}null!=H.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=H.noExitBtn);null!=H.title&&null!=this.buttonContainer&&(la=document.createElement("span"),mxUtils.write(la,H.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(la),this.embedFilenameSpan=la);try{H.libs&&this.sidebar.showEntries(H.libs)}catch(ja){}H=null!=H.xmlpng?this.extractGraphModelFromPng(H.xmlpng):null!=H.descriptor?H.descriptor:H.xml}else{if("merge"==H.action){var da=this.getCurrentFile();null!=da&&(la=T(H.xml),null!=la&&""!=la&&da.mergeFile(new LocalFile(this,la),function(){G.postMessage(JSON.stringify({event:"merge",message:H}),"*")},function(ja){G.postMessage(JSON.stringify({event:"merge",message:H,error:ja}),"*")}))}else"remoteInvokeReady"==
+H.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==H.action?this.handleRemoteInvoke(H,I.origin):"remoteInvokeResponse"==H.action?this.handleRemoteInvokeResponse(H):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(H)}),"*");return}}catch(ja){this.handleError(ja)}}var qa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),va=mxUtils.bind(this,function(ja,sa){g=!0;
+try{d(ja,sa,null,M)}catch(ya){this.handleError(ya)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=qa();x&&null==f&&(f=mxUtils.bind(this,function(ya,Aa){ya=qa();ya==y||g||(Aa=this.createLoadMessage("autosave"),Aa.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(Aa),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)sa=this.createLoadMessage("load"),sa.xml=ja,G.postMessage(JSON.stringify(sa),"*");null!=S&&S()});null!=H&&
+"function"===typeof H.substring&&"data:application/vnd.visio;base64,"==H.substring(0,34)?(T="0M8R4KGxGuE"==H.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(ja){va(ja,I)},mxUtils.bind(this,function(ja){this.handleError(ja)}),T)):null!=H&&"function"===typeof H.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(H,
+mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&"<mxGraphModel"==ja.responseText.substring(0,13)&&va(ja.responseText,I)}),""):null!=H&&"function"===typeof H.substring&&this.isLucidChartData(H)?this.convertLucidChart(H,mxUtils.bind(this,function(ja){va(ja)}),mxUtils.bind(this,function(ja){this.handleError(ja)})):null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=T(H),va(H,I)):this.loadDescriptor(H,mxUtils.bind(this,function(ja){va(qa(),I)}),
+mxUtils.bind(this,function(ja){this.handleError(ja,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";G.postMessage(t,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(I,H,S){D.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:I,target:H,allowOpener:S}),"*")}}};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="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):
mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",
f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,W=null,
-T=null,Z=null,N=null,qa=null,oa=null,S="whiteSpace=wrap;html=1;",fa=null,ia=null,M="",aa="auto",X="auto",ja=!1,ca=null,ka=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ea=ba.x,ra=ba.y;ba=ra;var ta=null,la="auto";ia=null;for(var pa=[],xa=null,Ca=null,Ia=0;Ia<g.length&&"#"==
-g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var La=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==La?ta=D.sanitizeHtml(Da):"labelname"==La&&0<Da.length&&"-"!=Da?N=Da:"labels"==La&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==La?W=Da:"parentstyle"==La?S=Da:"unknownStyle"==La&&"-"!=
-Da?qa=Da:"stylename"==La&&0<Da.length&&"-"!=Da?Z=Da:"styles"==La&&0<Da.length&&"-"!=Da?T=JSON.parse(Da):"vars"==La&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==La&&0<Da.length&&"-"!=Da?fa=Da:"parent"==La&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==La&&0<Da.length&&"-"!=Da?M=Da:"width"==La?aa=Da:"height"==La?X=Da:"collapsed"==La&&"-"!=Da?ja="true"==Da:"left"==La&&0<Da.length?ca=Da:"top"==La&&0<Da.length?ka=Da:"ignore"==La?Ca=Da.split(","):"connect"==La?pa.push(JSON.parse(Da)):"link"==La?xa=Da:"padding"==
-La?Y=parseFloat(Da):"edgespacing"==La?q=parseFloat(Da):"nodespacing"==La?E=parseFloat(Da):"levelspacing"==La?Q=parseFloat(Da):"layout"==La&&(la=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;La=[];for(Da=0;Da<Sa.length;Da++)fa==Sa[Da]&&(d=Da),ia==Sa[Da]&&(Aa=Da),La.push(mxUtils.trim(Sa[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+La[0]+"%");if(null!=pa)for(var Ra=
-0;Ra<pa.length;Ra++)null==J[pa[Ra].to]&&(J[pa[Ra].to]={});fa=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&fa.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<fa.length;Da++){Ta=fa[Da];var Na=null,z=null!=d?M+Ta[d]:null;g=!1;null!=z&&(Na=D.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var L=new mxCell(ta,
-new mxGeometry(ea,ba,0,0),W||"whiteSpace=wrap;html=1;");L.collapsed=ja;L.vertex=!0;L.id=z;null==Na||g||D.model.setCollapsed(Na,ja);for(var O=0;O<Ta.length;O++)D.setAttributeForCell(L,La[O],Ta[O]),null==Na||g||D.setAttributeForCell(Na,La[O],Ta[O]);if(null!=N&&null!=oa){var V=oa[L.getAttribute(N)];null!=V&&(D.labelChanged(L,V),null==Na||g||D.cellLabelChanged(Na,V))}if(null!=Z&&null!=T){var U=T[L.getAttribute(Z)];null!=U&&(L.style=U)}D.setAttributeForCell(L,"placeholders","1");L.style=D.replacePlaceholders(L,
-L.style,G);null==Na||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(D.model.setStyle(Na,L.style),0>mxUtils.indexOf(u,Na)&&u.push(Na),D.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=L;if(!g)for(Ra=0;Ra<pa.length;Ra++)J[pa[Ra].to][Na.getAttribute(pa[Ra].to)]=Na;null!=xa&&"link"!=xa&&(D.setLinkForCell(Na,Na.getAttribute(xa)),D.setAttributeForCell(Na,xa,null));var ha=this.editor.graph.getPreferredSizeForCell(Na);ia=null!=Aa?D.model.getCell(M+Ta[Aa]):null;if(Na.vertex){Za=
-null!=ia?0:ea;Ia=null!=ia?0:ra;null!=ca&&null!=Na.getAttribute(ca)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(ca)));null!=ka&&null!=Na.getAttribute(ka)&&(Na.geometry.y=Ia+parseFloat(Na.getAttribute(ka)));var ma="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ma&&"auto"!=ma?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ma?ha.width+Y:parseFloat(aa);var wa="@"==X.charAt(0)?Na.getAttribute(X.substring(1)):null;Na.geometry.height=null!=wa&&"auto"!=
-wa?parseFloat(wa):"auto"==X||"auto"==wa?ha.height+Y:parseFloat(X);ba+=Na.geometry.height+E}g?(null==H[z]&&(H[z]=[]),H[z].push(Na)):(x.push(Na),null!=ia?(ia.style=D.replacePlaceholders(ia,S,G),D.addCell(Na,ia),y.push(ia)):u.push(D.addCell(Na)))}for(Da=0;Da<y.length;Da++)ma="@"==aa.charAt(0)?y[Da].getAttribute(aa.substring(1)):null,wa="@"==X.charAt(0)?y[Da].getAttribute(X.substring(1)):null,"auto"!=aa&&"auto"!=ma||"auto"!=X&&"auto"!=wa||D.updateGroupBounds([y[Da]],Y,!0);var sa=u.slice(),ya=u.slice();
-for(Ra=0;Ra<pa.length;Ra++){var Ha=pa[Ra];for(Da=0;Da<x.length;Da++){Na=x[Da];var Qa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ea,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;J[lb.to][$a[ab]]=ib;
-ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb=
-D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?
-nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});Qa(Na,Na,Ha);if(null!=H[Na.id])for(O=0;O<H[Na.id].length;O++)Qa(Na,H[Na.id][O],Ha)}}if(null!=Ca)for(Da=0;Da<x.length;Da++)for(Na=x[Da],O=0;O<Ca.length;O++)D.setAttributeForCell(Na,mxUtils.trim(Ca[O]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var za=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x));
-pb.y=Math.round(D.snap(pb.y));"auto"==aa&&(pb.width=Math.round(D.snap(pb.width)));"auto"==X&&(pb.height=Math.round(D.snap(pb.height)))}};if("["==la.charAt(0)){var Fa=R;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(la)),function(){za();Fa()});R=null}else if("circle"==la){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ea=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ea.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ba.execute(D.getDefaultParent());
-za()},!0,R);R=null}else if("horizontaltree"==la||"verticaltree"==la||"auto"==la&&ya.length==2*u.length-1&&1==sa.length){D.view.validate();var Oa=new mxCompactTreeLayout(D,"horizontaltree"==la);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,R);R=null}else if("horizontalflow"==la||"verticalflow"==la||"auto"==la&&1==sa.length){D.view.validate();var Pa=new mxHierarchicalLayout(D,"horizontalflow"==la?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Pa.intraCellSpacing=E;Pa.parallelEdgeSpacing=q;Pa.interRankCellSpacing=Q;Pa.disableEdgeStyle=!1;this.executeLayout(function(){Pa.execute(D.getDefaultParent(),ya);D.moveCells(ya,ea,ra)},!0,R);R=null}else if("orgchart"==la){D.view.validate();var bb=new mxOrgChartLayout(D,2,Q,E),eb=bb.isVertexIgnored;bb.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){bb.execute(D.getDefaultParent());za()},!0,R);R=null}else if("organic"==
-la||"auto"==la&&ya.length>u.length){D.view.validate();var db=new mxFastOrganicLayout(D);db.forceConstant=3*E;db.disableEdgeStyle=!1;db.resetEdges=!1;var ub=db.isVertexIgnored;db.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());za()},!0,R);R=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],t=[],G={};if(0<g.length){var D={},I=this.editor.graph,H=null,S=null,
+T=null,M=null,fa=null,la=null,ra=null,ba="whiteSpace=wrap;html=1;",oa=null,na=null,N="",aa="auto",V="auto",ha=!1,X=null,ia=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(pa):(I.setSelectionCells(pa),I.scrollCellToVisible(I.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=I.getFreeInsertPoint(),da=Z.x,qa=Z.y;Z=qa;var va=null,ja="auto";na=null;for(var sa=[],ya=null,Aa=null,Ea=0;Ea<g.length&&"#"==g[Ea].charAt(0);){d=
+g[Ea].replace(/\r$/,"");for(Ea++;Ea<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ea].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ea].substring(1)),Ea++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ia=mxUtils.trim(d.substring(1,za)),Ca=mxUtils.trim(d.substring(za+1));"label"==Ia?va=I.sanitizeHtml(Ca):"labelname"==Ia&&0<Ca.length&&"-"!=Ca?fa=Ca:"labels"==Ia&&0<Ca.length&&"-"!=Ca?ra=JSON.parse(Ca):"style"==Ia?S=Ca:"parentstyle"==Ia?ba=Ca:"unknownStyle"==Ia&&"-"!=Ca?la=Ca:"stylename"==
+Ia&&0<Ca.length&&"-"!=Ca?M=Ca:"styles"==Ia&&0<Ca.length&&"-"!=Ca?T=JSON.parse(Ca):"vars"==Ia&&0<Ca.length&&"-"!=Ca?H=JSON.parse(Ca):"identity"==Ia&&0<Ca.length&&"-"!=Ca?oa=Ca:"parent"==Ia&&0<Ca.length&&"-"!=Ca?na=Ca:"namespace"==Ia&&0<Ca.length&&"-"!=Ca?N=Ca:"width"==Ia?aa=Ca:"height"==Ia?V=Ca:"collapsed"==Ia&&"-"!=Ca?ha="true"==Ca:"left"==Ia&&0<Ca.length?X=Ca:"top"==Ia&&0<Ca.length?ia=Ca:"ignore"==Ia?Aa=Ca.split(","):"connect"==Ia?sa.push(JSON.parse(Ca)):"link"==Ia?ya=Ca:"padding"==Ia?Y=parseFloat(Ca):
+"edgespacing"==Ia?q=parseFloat(Ca):"nodespacing"==Ia?E=parseFloat(Ca):"levelspacing"==Ia?Q=parseFloat(Ca):"layout"==Ia&&(ja=Ca)}}}if(null==g[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ea].replace(/\r$/,""));za=d=null;Ia=[];for(Ca=0;Ca<Sa.length;Ca++)oa==Sa[Ca]&&(d=Ca),na==Sa[Ca]&&(za=Ca),Ia.push(mxUtils.trim(Sa[Ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==va&&(va="%"+Ia[0]+"%");if(null!=sa)for(var Pa=0;Pa<sa.length;Pa++)null==
+D[sa[Pa].to]&&(D[sa[Pa].to]={});oa=[];for(Ca=Ea+1;Ca<g.length;Ca++){var Ta=this.editor.csvToArray(g[Ca].replace(/\r$/,""));if(null==Ta){var Za=40<g[Ca].length?g[Ca].substring(0,40)+"...":g[Ca];throw Error(Za+" ("+Ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&oa.push(Ta)}I.model.beginUpdate();try{for(Ca=0;Ca<oa.length;Ca++){Ta=oa[Ca];var Na=null,z=null!=d?N+Ta[d]:null;g=!1;null!=z&&(Na=I.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var J=new mxCell(va,new mxGeometry(da,
+Z,0,0),S||"whiteSpace=wrap;html=1;");J.collapsed=ha;J.vertex=!0;J.id=z;null==Na||g||I.model.setCollapsed(Na,ha);for(var O=0;O<Ta.length;O++)I.setAttributeForCell(J,Ia[O],Ta[O]),null==Na||g||I.setAttributeForCell(Na,Ia[O],Ta[O]);if(null!=fa&&null!=ra){var U=ra[J.getAttribute(fa)];null!=U&&(I.labelChanged(J,U),null==Na||g||I.cellLabelChanged(Na,U))}if(null!=M&&null!=T){var W=T[J.getAttribute(M)];null!=W&&(J.style=W)}I.setAttributeForCell(J,"placeholders","1");J.style=I.replacePlaceholders(J,J.style,
+H);null==Na||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[J])):(I.model.setStyle(Na,J.style),0>mxUtils.indexOf(t,Na)&&t.push(Na),I.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=J;if(!g)for(Pa=0;Pa<sa.length;Pa++)D[sa[Pa].to][Na.getAttribute(sa[Pa].to)]=Na;null!=ya&&"link"!=ya&&(I.setLinkForCell(Na,Na.getAttribute(ya)),I.setAttributeForCell(Na,ya,null));var ea=this.editor.graph.getPreferredSizeForCell(Na);na=null!=za?I.model.getCell(N+Ta[za]):null;if(Na.vertex){Za=
+null!=na?0:da;Ea=null!=na?0:qa;null!=X&&null!=Na.getAttribute(X)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(X)));null!=ia&&null!=Na.getAttribute(ia)&&(Na.geometry.y=Ea+parseFloat(Na.getAttribute(ia)));var ka="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ka&&"auto"!=ka?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ka?ea.width+Y:parseFloat(aa);var xa="@"==V.charAt(0)?Na.getAttribute(V.substring(1)):null;Na.geometry.height=null!=xa&&"auto"!=xa?
+parseFloat(xa):"auto"==V||"auto"==xa?ea.height+Y:parseFloat(V);Z+=Na.geometry.height+E}g?(null==G[z]&&(G[z]=[]),G[z].push(Na)):(x.push(Na),null!=na?(na.style=I.replacePlaceholders(na,ba,H),I.addCell(Na,na),y.push(na)):t.push(I.addCell(Na)))}for(Ca=0;Ca<y.length;Ca++)ka="@"==aa.charAt(0)?y[Ca].getAttribute(aa.substring(1)):null,xa="@"==V.charAt(0)?y[Ca].getAttribute(V.substring(1)):null,"auto"!=aa&&"auto"!=ka||"auto"!=V&&"auto"!=xa||I.updateGroupBounds([y[Ca]],Y,!0);var ta=t.slice(),pa=t.slice();for(Pa=
+0;Pa<sa.length;Pa++){var ua=sa[Pa];for(Ca=0;Ca<x.length;Ca++){Na=x[Ca];var Da=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=D[lb.to][$a[ab]];if(null==ib&&null!=la){ib=new mxCell($a[ab],new mxGeometry(da,qa,0,0),la);ib.style=I.replacePlaceholders(pb,ib.style,H);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;D[lb.to][$a[ab]]=ib;ib.vertex=
+!0;ib.id=$a[ab];t.push(I.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=I.replacePlaceholders(pb,lb.sourcelabel,H)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+I.replacePlaceholders(ib,lb.targetlabel,H));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?I.replacePlaceholders(qb,lb.style,H):I.createCurrentEdgeStyle();gb=I.insertEdge(null,
+null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=I.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,H));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}pa.push(gb);
+mxUtils.remove(lb.invert?fb:ib,ta)}}}});Da(Na,Na,ua);if(null!=G[Na.id])for(O=0;O<G[Na.id].length;O++)Da(Na,G[Na.id][O],ua)}}if(null!=Aa)for(Ca=0;Ca<x.length;Ca++)for(Na=x[Ca],O=0;O<Aa.length;O++)I.setAttributeForCell(Na,mxUtils.trim(Aa[O]),null);if(0<t.length){var Fa=new mxParallelEdgeLayout(I);Fa.spacing=q;Fa.checkOverlap=!0;var Ma=function(){0<Fa.spacing&&Fa.execute(I.getDefaultParent());for(var fb=0;fb<t.length;fb++){var pb=I.getCellGeometry(t[fb]);pb.x=Math.round(I.snap(pb.x));pb.y=Math.round(I.snap(pb.y));
+"auto"==aa&&(pb.width=Math.round(I.snap(pb.width)));"auto"==V&&(pb.height=Math.round(I.snap(pb.height)))}};if("["==ja.charAt(0)){var Qa=R;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ja)),function(){Ma();Qa()});R=null}else if("circle"==ja){var Ba=new mxCircleLayout(I);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ka=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ka.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){Ba.execute(I.getDefaultParent());
+Ma()},!0,R);R=null}else if("horizontaltree"==ja||"verticaltree"==ja||"auto"==ja&&pa.length==2*t.length-1&&1==ta.length){I.view.validate();var Oa=new mxCompactTreeLayout(I,"horizontaltree"==ja);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(I.getDefaultParent(),0<ta.length?ta[0]:null)},!0,R);R=null}else if("horizontalflow"==ja||"verticalflow"==ja||"auto"==ja&&1==ta.length){I.view.validate();var Ya=new mxHierarchicalLayout(I,"horizontalflow"==ja?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=E;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing=Q;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(I.getDefaultParent(),pa);I.moveCells(pa,da,qa)},!0,R);R=null}else if("orgchart"==ja){I.view.validate();var db=new mxOrgChartLayout(I,2,Q,E),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){db.execute(I.getDefaultParent());Ma()},!0,R);R=null}else if("organic"==
+ja||"auto"==ja&&pa.length>t.length){I.view.validate();var cb=new mxFastOrganicLayout(I);cb.forceConstant=3*E;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){cb.execute(I.getDefaultParent());Ma()},!0,R);R=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,
x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));
this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments);
-this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
+this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);
this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(D.getSvg(x,y,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),W=D.getGraphBounds(),T=Math.floor(W.width*y/D.view.scale),Z=Math.floor(W.height*y/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&T*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var N={globalVars:D.getExportVariables()};J&&(N.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+Z+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(y,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,t,G,D){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
+"svg",mxUtils.getXml(I.getSvg(x,y,t)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),S=I.getGraphBounds(),T=Math.floor(S.width*y/I.view.scale),M=Math.floor(S.height*y/I.view.scale);if(H.length<=MAX_REQUEST_SIZE&&T*M<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var fa={globalVars:I.getExportVariables()};D&&(fa.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(la,ra){return new mxXmlRequest(EXPORT_URL,
+"format="+g+"&base64="+(ra||"0")+(null!=la?"&filename="+encodeURIComponent(la):"")+"&extras="+encodeURIComponent(JSON.stringify(fa))+(0<G?"&dpi="+G:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+M+"&border="+t+"&xml="+encodeURIComponent(H))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,t,!0,!1,null,D,G):d.exportImage(y,!1,!0,!1,!1,t,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=
-document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));
-u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText="";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var W=0;W<G.length;W++){var T=G[W];u[T.id]&&(f[T.id]=T);var Z=this.addCheckbox(y,T.title,u[T.id]);(function(N,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[N.id]=N:delete f[N.id]})})(T,Z)}},
-mxUtils.bind(this,function(G){y.innerText="";var W=document.createElement("div");W.style.padding="8px";W.style.textAlign="center";mxUtils.write(W,mxResources.get("error")+": ");mxUtils.write(W,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(W)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,W;for(W in f)null==u[W]&&(G++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
-[T.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,T))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[W]));for(W in u)f[W]||this.closeLibrary(new RemoteLibrary(this,null,u[W]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
+document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var G=mxSettings.getCustomLibraries();for(d=0;d<G.length;d++){var D=G[d];if("R"==D.substring(0,1)){var I=JSON.parse(decodeURIComponent(D.substring(1)));
+t[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){y.innerText="";if(0==H.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<H.length;S++){var T=H[S];t[T.id]&&(f[T.id]=T);var M=this.addCheckbox(y,T.title,t[T.id]);(function(fa,la){mxEvent.addListener(la,"change",function(){this.checked?f[fa.id]=fa:delete f[fa.id]})})(T,M)}},
+mxUtils.bind(this,function(H){y.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=H&&null!=H.message?H.message:mxResources.get("unknownError"));y.appendChild(S)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var H=0,S;for(S in f)null==t[S]&&(H++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
+[T.downloadUrl],null,mxUtils.bind(this,function(M){H--;0==H&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,T))}catch(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){H--;0==H&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in t)f[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==H&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var u=
-!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,W){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=W?T.error={errResp:W}:null!=G&&(T.resp=G);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var u=!1,H=0;H<y.allowedDomains.length;H++)if(f=="https://"+y.allowedDomains[H]){u=
-!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(y.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}),J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var u=x.result;1>y.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(y){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,W,T=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",
-!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){T++;qa()}),qa=mxUtils.bind(this,function(){try{if(T>=W.length)Z();else{var S=W[T];StorageFile.getFileContent(this,S,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==S&&fa==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[S]}),"*"):N()}),N)}}catch(fa){console.log(fa)}}),
-oa=mxUtils.bind(this,function(S){try{this.setDatabaseItem(null,[{title:S.title,size:S.data.length,lastModified:Date.now(),type:S.isLib?"L":"F"},{title:S.title,data:S.data}],N,N,["filesInfo","files"])}catch(fa){console.log(fa)}});H=mxUtils.bind(this,function(S){try{if(S.source==J.contentWindow){var fa={};try{fa=JSON.parse(S.data)}catch(ia){}"init"==fa.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||G||(D?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(W=fa.resp[0],D=!1,qa()):Z():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?oa(fa.resp[0]):N())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,x,y){this.openDatabase(mxUtils.bind(this,function(u){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var H=u.transaction(y,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<y.length;u++)H.objectStore(y[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
-g;for(var u=0;u<x.length;u++)y.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var u=y.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-u=[];y.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};y.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
+d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var t=
+!0,G=window.setTimeout(mxUtils.bind(this,function(){t=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(G);t&&x.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(G);t&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
+this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(H,S){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?T.error={errResp:S}:null!=H&&(T.resp=H);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var t=!1,G=0;G<y.allowedDomains.length;G++)if(f=="https://"+y.allowedDomains[G]){t=
+!0;break}if(!t){g(null,"Invalid Call: "+x+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(H){g(null,H||"Unkown Error")}),this[x].apply(this,D);else{var I=this[x].apply(this,D);g([I])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(H){g(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var t=x.result;1>y.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=f&&f(G)}};x.onsuccess=mxUtils.bind(this,function(y){var t=x.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if(!G||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var I=!0,H=!1,S,T=0,M=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",
+!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),fa=mxUtils.bind(this,function(){T++;la()}),la=mxUtils.bind(this,function(){try{if(T>=S.length)M();else{var ba=S[T];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(oa){null==oa||".scratchpad"==ba&&oa==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):fa()}),fa)}}catch(oa){console.log(oa)}}),
+ra=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],fa,fa,["filesInfo","files"])}catch(oa){console.log(oa)}});G=mxUtils.bind(this,function(ba){try{if(ba.source==D.contentWindow){var oa={};try{oa=JSON.parse(ba.data)}catch(na){}"init"==oa.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=oa.event||H||(I?null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?(S=oa.resp[0],I=!1,la()):M():null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?ra(oa.resp[0]):fa())}}catch(na){console.log(na)}});window.addEventListener("message",G)}})));d(t);t.onversionchange=function(){t.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
+f,g,x,y){this.openDatabase(mxUtils.bind(this,function(t){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var G=t.transaction(y,"readwrite");G.oncomplete=g;G.onerror=x;for(t=0;t<y.length;t++)G.objectStore(y[t]).put(null!=d&&null!=d[t]?{key:d[t],data:f[t]}:f[t])}catch(D){null!=x&&x(D)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
+g;for(var t=0;t<x.length;t++)y.objectStore(x[t]).delete(d[t])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var t=y.transaction([x],"readonly").objectStore(x).get(d);t.onsuccess=function(){f(t.result)};t.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
+t=[];y.onsuccess=function(G){null==G.target.result?d(t):(t.push(G.target.result.value),G.target.result.continue())};y.onerror=f}catch(G){null!=f&&f(G)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,x,y,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
+function(d,f,g,x,y,t,G,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,t,G,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
+f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var S=G.getElementsByTagName("div"),fa=0,ia=0;ia<S.length;ia++)"none"!=S[ia].style.display&&S[ia].parentNode==G&&fa++;W.style.display=0==fa?"block":"none"}function K(S,fa,ia,M){function aa(){fa.removeChild(ca);fa.removeChild(ka);ja.style.display="block";X.style.display="block"}H={div:fa,comment:S,saveCallback:ia,deleteOnCancel:M};var X=fa.querySelector(".geCommentTxt"),ja=fa.querySelector(".geCommentActionsList"),ca=document.createElement("textarea");
-ca.className="geCommentEditTxtArea";ca.style.minHeight=X.offsetHeight+"px";ca.value=S.content;fa.insertBefore(ca,X);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){M?(fa.parentNode.removeChild(fa),F()):aa();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){X.innerText="";S.content=ca.value;mxUtils.write(X,S.content);aa();ia(S);H=null});mxEvent.addListener(ca,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(E);fa.insertBefore(ka,X);ja.style.display="none";X.style.display="none";ca.focus()}function P(S,fa){fa.innerText="";S=new Date(S.modifiedDate);var ia=b.timeSince(S);null==ia&&(ia=mxResources.get("lessThanAMinute"));
-mxUtils.write(fa,mxResources.get("timeAgo",[ia],"{1} ago"));fa.setAttribute("title",S.toLocaleDateString()+" "+S.toLocaleTimeString())}function d(S){var fa=document.createElement("img");fa.className="geCommentBusyImg";fa.src=IMAGE_PATH+"/spin.gif";S.appendChild(fa);S.busyImg=fa}function f(S){S.style.border="1px solid red";S.removeChild(S.busyImg)}function g(S){S.style.border="";S.removeChild(S.busyImg)}function x(S,fa,ia,M,aa){function X(R,ba,ea){var ra=document.createElement("li");ra.className="geCommentAction";
-var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,R);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(la){ba(la,S);la.preventDefault();mxEvent.consume(la)});Y.appendChild(ra);ea&&(ra.style.display="none")}function ja(){function R(ra){ba.push(ea);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ea=ea.nextSibling,R(ra.replies[ta])}var ba=[],ea=ka;R(S);return{pdiv:ea,replies:ba}}function ca(R,ba,ea,ra,ta){function la(){d(Ia);S.addReply(Ca,function(Aa){Ca.id=
-Aa;S.replies.push(Ca);g(Ia);ea&&ea()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ca,Ia,function(Aa){la()},!0)}var xa=ja().pdiv,Ca=b.newComment(R,b.getCurrentUser());Ca.pCommentId=S.id;null==S.replies&&(S.replies=[]);var Ia=x(Ca,S.replies,xa,M+1);ba?pa():la()}if(aa||!S.isResolved){W.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";ka.setAttribute("data-commentId",
-S.id);ka.style.marginLeft=20*M+5+"px";S.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=S.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,S.user.displayName||"");E.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",S.id);P(S,Q);E.appendChild(Q);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,S.content||"");ka.appendChild(q);S.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||S.isLocked||0!=M&&!u||X(mxResources.get("reply"),function(){ca("",
-!0)},S.isResolved);E=b.getCurrentUser();null==E||E.id!=S.user.id||y||S.isLocked||(X(mxResources.get("edit"),function(){function R(){K(S,ka,function(){d(ka);S.editComment(S.content,function(){g(ka)},function(ba){f(ka);R();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},S.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);S.deleteComment(function(R){if(!0===R){R=ka.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(R=0;R<ba.length;R++)ba[R].parentNode.removeChild(ba[R]);g(ka);ka.style.opacity="0.5"}else{ba=ja(S).replies;for(R=0;R<ba.length;R++)G.removeChild(ba[R]);for(R=0;R<fa.length;R++)if(fa[R]==S){fa.splice(R,1);break}W.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(R){f(ka);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-S.isResolved));y||S.isLocked||0!=M||X(S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function ba(){var ea=R.target;ea.innerText="";S.isResolved=!S.isResolved;mxUtils.write(ea,S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=S.isResolved?"none":"",ta=ja(S).replies,la=Editor.isDarkMode()?"transparent":S.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=la;for(var xa=ta[pa].querySelectorAll(".geCommentAction"),
-Ca=0;Ca<xa.length;Ca++)xa[Ca]!=ea.parentNode&&(xa[Ca].style.display=ra);N||(ta[pa].style.display="none")}F()}S.isResolved?ca(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ca(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=S.replies&&ia<S.replies.length;ia++)q=S.replies[ia],q.isResolved=S.isResolved,x(q,S.replies,null,M+1,aa);null!=H&&(H.comment.id==S.id?(aa=S.content,S.content=H.comment.content,K(S,ka,H.saveCallback,
-H.deleteOnCancel),S.content=aa):null==H.comment.id&&H.comment.pCommentId==S.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var y=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
-"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var W=document.createElement("span");W.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(W,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=D;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className=
-"geButton";if(!y){var Z=D.cloneNode();Z.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(S){function fa(){K(ia,M,function(aa){d(M);b.addComment(aa,function(X){aa.id=X;qa.push(aa);g(M)},function(X){f(M);fa();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),M=x(ia,qa,null,0);fa();S.preventDefault();
-mxEvent.consume(S)});T.appendChild(Z)}Z=D.cloneNode();Z.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Z.setAttribute("title",mxResources.get("showResolved"));Z.className="geAdaptiveAsset";var N=!1;mxEvent.addListener(Z,"click",function(S){this.className=(N=!N)?"geButton geCheckedBtn":"geButton";oa();S.preventDefault();mxEvent.consume(S)});T.appendChild(Z);b.commentsRefreshNeeded()&&(Z=D.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',
-Z.setAttribute("title",mxResources.get("refresh")),Z.className="geAdaptiveAsset",mxEvent.addListener(Z,"click",function(S){oa();S.preventDefault();mxEvent.consume(S)}),T.appendChild(Z));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(S){p();S.preventDefault();mxEvent.consume(S)}),T.appendChild(D));J.appendChild(T);
-var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var S=H.div.querySelector(".geCommentEditTxtArea"),fa=H.div.querySelector(".geCommentEditBtns");H.comment.content=S.value;S.parentNode.removeChild(S);fa.parentNode.removeChild(fa)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();
-b.commentsSupported()?b.getComments(function(ia){function M(aa){if(null!=aa){aa.sort(function(ja,ca){return new Date(ja.modifiedDate)-new Date(ca.modifiedDate)});for(var X=0;X<aa.length;X++)M(aa[X].replies)}}ia.sort(function(aa,X){return new Date(aa.modifiedDate)-new Date(X.modifiedDate)});G.innerText="";G.appendChild(W);W.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)M(qa[ia].replies),x(qa[ia],qa,null,0,N);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(G.appendChild(H.div),K(H.comment,
-H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;T=mxUtils.bind(this,function(){function S(X){var ja=ia[X.id];if(null!=ja)for(P(X,ja),ja=0;null!=X.replies&&ja<X.replies.length;ja++)S(X.replies[ja])}if(this.window.isVisible()){for(var fa=G.querySelectorAll(".geCommentDate"),
-ia={},M=0;M<fa.length;M++){var aa=fa[M];ia[aa.getAttribute("data-commentId")]=aa}for(M=0;M<qa.length;M++)S(qa[M])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,K,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");
-d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
-k(y.checked)});d.appendChild(u);null!=F?(u.innerHTML=F+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")),
-x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){y.checked=!y.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};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")};
+var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var ba=H.getElementsByTagName("div"),oa=0,na=0;na<ba.length;na++)"none"!=ba[na].style.display&&ba[na].parentNode==H&&oa++;S.style.display=0==oa?"block":"none"}function L(ba,oa,na,N){function aa(){oa.removeChild(X);oa.removeChild(ia);ha.style.display="block";V.style.display="block"}G={div:oa,comment:ba,saveCallback:na,deleteOnCancel:N};var V=oa.querySelector(".geCommentTxt"),ha=oa.querySelector(".geCommentActionsList"),X=document.createElement("textarea");
+X.className="geCommentEditTxtArea";X.style.minHeight=V.offsetHeight+"px";X.value=ba.content;oa.insertBefore(X,V);var ia=document.createElement("div");ia.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){N?(oa.parentNode.removeChild(oa),F()):aa();G=null});q.className="geCommentEditBtn";ia.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){V.innerText="";ba.content=X.value;mxUtils.write(V,ba.content);aa();na(ba);G=null});mxEvent.addListener(X,
+"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ia.appendChild(E);oa.insertBefore(ia,V);ha.style.display="none";V.style.display="none";X.focus()}function P(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var na=b.timeSince(ba);null==na&&(na=mxResources.get("lessThanAMinute"));
+mxUtils.write(oa,mxResources.get("timeAgo",[na],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function d(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function f(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function g(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function x(ba,oa,na,N,aa){function V(R,Z,da){var qa=document.createElement("li");qa.className=
+"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,R);qa.appendChild(va);mxEvent.addListener(va,"click",function(ja){Z(ja,ba);ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);da&&(qa.style.display="none")}function ha(){function R(qa){Z.push(da);if(null!=qa.replies)for(var va=0;va<qa.replies.length;va++)da=da.nextSibling,R(qa.replies[va])}var Z=[],da=ia;R(ba);return{pdiv:da,replies:Z}}function X(R,Z,da,qa,va){function ja(){d(Ea);ba.addReply(Aa,
+function(za){Aa.id=za;ba.replies.push(Aa);g(Ea);da&&da()},function(za){sa();f(Ea);b.handleError(za,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,va)}function sa(){L(Aa,Ea,function(za){ja()},!0)}var ya=ha().pdiv,Aa=b.newComment(R,b.getCurrentUser());Aa.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var Ea=x(Aa,ba.replies,ya,N+1);Z?sa():ja()}if(aa||!ba.isResolved){S.style.display="none";var ia=document.createElement("div");ia.className="geCommentContainer";ia.setAttribute("data-commentId",
+ba.id);ia.style.marginLeft=20*N+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(ia.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=ba.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,ba.user.displayName||"");E.appendChild(Q);
+Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",ba.id);P(ba,Q);E.appendChild(Q);ia.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ba.content||"");ia.appendChild(q);ba.isLocked&&(ia.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||ba.isLocked||0!=N&&!t||V(mxResources.get("reply"),function(){X("",
+!0)},ba.isResolved);E=b.getCurrentUser();null==E||E.id!=ba.user.id||y||ba.isLocked||(V(mxResources.get("edit"),function(){function R(){L(ba,ia,function(){d(ia);ba.editComment(ba.content,function(){g(ia)},function(Z){f(ia);R();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},ba.isResolved),V(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ia);ba.deleteComment(function(R){if(!0===R){R=ia.querySelector(".geCommentTxt");
+R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var Z=ia.querySelectorAll(".geCommentAction");for(R=0;R<Z.length;R++)Z[R].parentNode.removeChild(Z[R]);g(ia);ia.style.opacity="0.5"}else{Z=ha(ba).replies;for(R=0;R<Z.length;R++)H.removeChild(Z[R]);for(R=0;R<oa.length;R++)if(oa[R]==ba){oa.splice(R,1);break}S.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(R){f(ia);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ba.isResolved));y||ba.isLocked||0!=N||V(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function Z(){var da=R.target;da.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(da,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=ba.isResolved?"none":"",va=ha(ba).replies,ja=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=ja;for(var ya=va[sa].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<ya.length;Aa++)ya[Aa]!=da.parentNode&&(ya[Aa].style.display=qa);fa||(va[sa].style.display="none")}F()}ba.isResolved?X(mxResources.get("reOpened")+": ",!0,Z,!1,!0):X(mxResources.get("markedAsResolved"),!1,Z,!0)});ia.appendChild(q);null!=na?H.insertBefore(ia,na.nextSibling):H.appendChild(ia);for(na=0;null!=ba.replies&&na<ba.replies.length;na++)q=ba.replies[na],q.isResolved=ba.isResolved,x(q,ba.replies,null,N+1,aa);null!=G&&(G.comment.id==ba.id?(aa=ba.content,ba.content=G.comment.content,L(ba,
+ia,G.saveCallback,G.deleteOnCancel),ba.content=aa):null==G.comment.id&&G.comment.pCommentId==ba.id&&(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel)));return ia}}var y=!b.canComment(),t=b.canReplyToReplies(),G=null,D=document.createElement("div");D.className="geCommentsWin";D.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(I)+7+"px";D.appendChild(H);var S=document.createElement("span");S.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(S,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=I;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");
+I.className="geButton";if(!y){var M=I.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(M,"click",function(ba){function oa(){L(na,N,function(aa){d(N);b.addComment(aa,function(V){aa.id=V;la.push(aa);g(N)},function(V){f(N);oa();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var na=b.newComment("",b.getCurrentUser()),N=x(na,la,null,
+0);oa();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M)}M=I.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));M.className="geAdaptiveAsset";var fa=!1;mxEvent.addListener(M,"click",function(ba){this.className=(fa=!fa)?"geButton geCheckedBtn":"geButton";ra();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M);b.commentsRefreshNeeded()&&(M=I.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),M.className="geAdaptiveAsset",mxEvent.addListener(M,"click",function(ba){ra();ba.preventDefault();mxEvent.consume(ba)}),T.appendChild(M));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geAdaptiveAsset",mxEvent.addListener(I,"click",function(ba){p();ba.preventDefault();
+mxEvent.consume(ba)}),T.appendChild(I));D.appendChild(T);var la=[],ra=mxUtils.bind(this,function(){this.hasError=!1;if(null!=G)try{G.div=G.div.cloneNode(!0);var ba=G.div.querySelector(".geCommentEditTxtArea"),oa=G.div.querySelector(".geCommentEditBtns");G.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(na){b.handleError(na)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(na){function N(aa){if(null!=aa){aa.sort(function(ha,X){return new Date(ha.modifiedDate)-new Date(X.modifiedDate)});for(var V=0;V<aa.length;V++)N(aa[V].replies)}}na.sort(function(aa,V){return new Date(aa.modifiedDate)-new Date(V.modifiedDate)});H.innerText="";H.appendChild(S);S.style.display="block";la=na;for(na=0;na<la.length;na++)N(la[na].replies),x(la[na],la,null,0,fa);null!=G&&null==G.comment.id&&null==G.comment.pCommentId&&
+(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel))},mxUtils.bind(this,function(na){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(na&&na.message?": "+na.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ra();this.refreshComments=ra;T=mxUtils.bind(this,function(){function ba(V){var ha=na[V.id];if(null!=ha)for(P(V,ha),ha=0;null!=V.replies&&ha<V.replies.length;ha++)ba(V.replies[ha])}if(this.window.isVisible()){for(var oa=
+H.querySelectorAll(".geCommentDate"),na={},N=0;N<oa.length;N++){var aa=oa[N];na[aa.getAttribute("data-commentId")]=aa}for(N=0;N<la.length;N++)ba(la[N])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),D,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,L,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var t=mxUtils.button(C||
+mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(y.checked)});d.appendChild(t);null!=F?(t.innerHTML=F+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),
+mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(G){y.checked=!y.checked;mxEvent.consume(G)})):d.style.marginTop="12px";this.init=function(){t.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3858,16 +3886,16 @@ function ChangePage(b,e,k,m,C){SelectPage.call(this,b,k);this.relatedPage=e;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}};
+mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
@@ -3887,7 +3915,7 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -3895,200 +3923,183 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation();
g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var K=this.createControlTab(4,"&nbsp;&#10095;");K.style.position="absolute";
-K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var L=this.createControlTab(4,"&nbsp;&#10095;");L.style.position="absolute";
+L.style.right=this.editor.chromeless?"0px":"29px";L.style.fontSize="13pt";this.tabContainer.appendChild(L);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var C=new mxPopupMenu(mxUtils.bind(this,function(K,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),P),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
-function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(P),f());var g=this.currentPage;if(null!=g){K.addSeparator(P);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||K.addSeparator(P);K.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(K.addSeparator(P),f(),K.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
+var C=new mxPopupMenu(mxUtils.bind(this,function(L,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(t){var G=L.addItem(this.getShortPageName(this.pages[t]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[t])}),P),D=this.pages[t].getId();G.setAttribute("title",this.pages[t].getName()+" ("+(t+1)+"/"+this.pages.length+")"+(null!=D?" ["+D+"]":""));this.pages[t]==this.currentPage&&L.addCheckmark(G,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
+function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(P),f());var g=this.currentPage;if(null!=g){L.addSeparator(P);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||L.addSeparator(P);L.addItem(mxResources.get("duplicateIt",
+[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(L.addSeparator(P),f(),L.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var K=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(K,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(L,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,K,P,d,f){p=this.createUrlParameters(p,F,K,P,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-F.x,K.y=K.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,L,P,d,f){p=this.createUrlParameters(p,F,L,P,d,f);L||p.push("hide-pages=1");C.isSelectionEmpty()||(L=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-F.x,L.y=L.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C,
-!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);K==C||null!=P&&!d||p.push(K);return(null==P||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,K,P){return this.model.filterCells(this.getEdges(m,
-C,p,F,K,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(M){return H.isVertex(M)&&p(M)}function C(M){var aa=
-!1;null!=M&&(aa="1"==u.getCurrentCellStyle(M).treeMoving);return aa}function p(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),aa="tree"==(null!=aa?aa.style:u.getCellStyle(M)).containerType);return aa}function F(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),u.view.getState(M),aa=null!=(null!=aa?aa.style:u.getCellStyle(M)).childLayout);return aa}function K(M){M=u.view.getState(M);if(null!=M){var aa=u.getIncomingTreeEdges(M.cell);if(0<aa.length&&(aa=u.view.getState(aa[0]),
-null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==M.y&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==M.y+M.height&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(M,aa){aa=null!=aa?aa:!0;u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=u.cloneCells([ja[0],
-M]);u.model.setTerminal(ca[0],u.model.getTerminal(ja[0],!0),!0);var ka=K(M),q=X.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ca[1].geometry.x+=aa?M.geometry.width+10:-ca[1].geometry.width-10:ca[1].geometry.y+=aa?M.geometry.height+10:-ca[1].geometry.height-10;u.view.currentRoot!=X&&(ca[1].geometry.x-=q.x,ca[1].geometry.y-=q.y);var E=u.view.getState(M),Q=u.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?
-Y.x+=(aa?M.geometry.width+10:-ca[1].geometry.width-10)*Q:Y.y+=(aa?M.geometry.height+10:-ca[1].geometry.height-10)*Q;var R=u.getOutgoingTreeEdges(u.model.getTerminal(ja[0],!0));if(null!=R){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=ja=0;ea<R.length;ea++){var ra=u.model.getTerminal(R[ea],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,ta)&&(ja=10+
-Math.max(ja,(Math.min(Y.x+Y.width,ta.x+ta.width)-Math.max(Y.x,ta.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,ta.y+ta.height)-Math.max(Y.y,ta.y))/Q))}}ba?q=0:ja=0;for(ea=0;ea<R.length;ea++)if(ra=u.model.getTerminal(R[ea],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY()))){var la=[];u.traverse(ta.cell,!0,function(pa,xa){var Ca=null!=xa&&u.isTreeEdge(xa);Ca&&la.push(xa);(null==xa||Ca)&&la.push(pa);return null==
-xa||Ca});u.moveCells(la,(aa?1:-1)*ja,(aa?1:-1)*q)}}}return u.addCells(ca,X)}finally{u.model.endUpdate()}}function d(M){u.model.beginUpdate();try{var aa=K(M),X=u.getIncomingTreeEdges(M),ja=u.cloneCells([X[0],M]);u.model.setTerminal(X[0],ja[1],!1);u.model.setTerminal(ja[0],ja[1],!0);u.model.setTerminal(ja[0],M,!1);var ca=u.model.getParent(M),ka=ca.geometry,q=[];u.view.currentRoot!=ca&&(ja[1].geometry.x-=ka.x,ja[1].geometry.y-=ka.y);u.traverse(M,!0,function(Y,R){var ba=null!=R&&u.isTreeEdge(R);ba&&q.push(R);
-(null==R||ba)&&q.push(Y);return null==R||ba});var E=M.geometry.width+40,Q=M.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);u.moveCells(q,E,Q);return u.addCells(ja,ca)}finally{u.model.endUpdate()}}function f(M,aa){u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=K(M);0==ja.length&&(ja=[u.createEdge(X,null,"",null,null,u.createCurrentEdgeStyle())],
-ca=aa);var ka=u.cloneCells([ja[0],M]);u.model.setTerminal(ka[0],M,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)u.setCellStyles(Q,E[Q],[ka[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&u.setCellStyles("elbow",ca==mxConstants.DIRECTION_SOUTH||ca==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ja=u.getOutgoingTreeEdges(M);var Y=X.geometry;aa=[];u.view.currentRoot==
-X&&(Y=new mxRectangle);for(q=0;q<ja.length;q++){var R=u.model.getTerminal(ja[q],!1);null!=R&&aa.push(R)}var ba=u.view.getBounds(aa),ea=u.view.translate,ra=u.view.scale;ca==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x-Y.x+10,ka[1].geometry.y+=ka[1].geometry.height-Y.y+40):ca==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x+-Y.x+
-10,ka[1].geometry.y-=ka[1].geometry.height+Y.y+40):(ka[1].geometry.x=ca==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+Y.x+40):ka[1].geometry.x+(ka[1].geometry.width-Y.x+40),ka[1].geometry.y=null==ba?M.geometry.y+(M.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ea.y+-Y.y+10);return u.addCells(ka,X)}finally{u.model.endUpdate()}}function g(M,aa,X){M=u.getOutgoingTreeEdges(M);X=u.view.getState(X);var ja=[];if(null!=X&&null!=M){for(var ca=0;ca<M.length;ca++){var ka=
-u.view.getState(u.model.getTerminal(M[ca],!1));null!=ka&&(!aa&&Math.min(ka.x+ka.width,X.x+X.width)>=Math.max(ka.x,X.x)||aa&&Math.min(ka.y+ka.height,X.y+X.height)>=Math.max(ka.y,X.y))&&ja.push(ka)}ja.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ja}function x(M,aa){var X=K(M),ja=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==ja&&X!=aa?y.actions.get("selectParent").funct():X==aa?
-(aa=u.getOutgoingTreeEdges(M),null!=aa&&0<aa.length&&u.setSelectionCell(u.model.getTerminal(aa[0],!1))):(X=u.getIncomingTreeEdges(M),null!=X&&0<X.length&&(ja=g(u.model.getTerminal(X[0],!0),ja,M),M=u.view.getState(M),null!=M&&(M=mxUtils.indexOf(ja,M),0<=M&&(M+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=ja.length-1&&u.setSelectionCell(ja[M].cell)))))}var y=this,u=y.editor.graph,H=u.getModel(),J=y.menus.createPopupMenu;y.menus.createPopupMenu=function(M,aa,X){J.apply(this,
-arguments);if(1==u.getSelectionCount()){aa=u.getSelectionCell();var ja=u.getOutgoingTreeEdges(aa);M.addSeparator();0<ja.length&&(m(u.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,X),this.addMenuItems(M,["selectDescendants"],null,X));m(u.getSelectionCell())?(M.addSeparator(),0<u.getIncomingTreeEdges(aa).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,X)):0<u.model.getEdgeCount(aa)&&this.addMenuItems(M,["selectConnections"],null,X)}};y.actions.addAction("selectChildren",
-function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getOutgoingTreeEdges(M);if(null!=M){for(var aa=[],X=0;X<M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=u.getOutgoingTreeEdges(u.model.getTerminal(M[0],!0)),null!=M)){for(var aa=[],X=0;X<
-M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);null!=M&&0<M.length&&u.setSelectionCell(u.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(M,aa){M=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(M)){if(null!=aa&&mxEvent.isAltDown(aa))u.setSelectionCells(u.model.getTreeEdges(M,
-null==aa||!mxEvent.isShiftDown(aa),null==aa||!mxEvent.isControlDown(aa)));else{var X=[];u.traverse(M,!0,function(ja,ca){var ka=null!=ca&&u.isTreeEdge(ca);ka&&X.push(ca);null!=ca&&!ka||null!=aa&&mxEvent.isShiftDown(aa)||X.push(ja);return null==ca||ka})}u.setSelectionCells(X)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(M,aa){aa=null!=aa?aa:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));aa&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var X=[],ja=0;ja<
-M.length;ja++){var ca=M[ja];H.isEdge(ca)&&p(ca)&&(X.push(ca),ca=H.getTerminal(ca,!1));if(m(ca)){var ka=[];u.traverse(ca,!0,function(q,E){var Q=null!=E&&u.isTreeEdge(E);Q&&ka.push(E);(null==E||Q)&&ka.push(q);return null==E||Q});0<ka.length&&(X=X.concat(ka),ca=u.getIncomingTreeEdges(M[ja]),M=M.concat(ca))}else null!=ca&&X.push(M[ja])}M=X;return D.apply(this,arguments)};y.hoverIcons.getStateAt=function(M,aa,X){return m(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,X))};var G=u.duplicateCells;
-u.duplicateCells=function(M,aa){M=null!=M?M:this.getSelectionCells();for(var X=M.slice(0),ja=0;ja<X.length;ja++){var ca=u.view.getState(X[ja]);if(null!=ca&&m(ca.cell)){var ka=u.getIncomingTreeEdges(ca.cell);for(ca=0;ca<ka.length;ca++)mxUtils.remove(ka[ca],M)}}this.model.beginUpdate();try{var q=G.call(this,M,aa);if(q.length==M.length)for(ja=0;ja<M.length;ja++)if(m(M[ja])){var E=u.getIncomingTreeEdges(q[ja]);ka=u.getIncomingTreeEdges(M[ja]);if(0==E.length&&0<ka.length){var Q=this.cloneCell(ka[0]);this.addEdge(Q,
-u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ja])}}}finally{this.model.endUpdate()}return q};var W=u.moveCells;u.moveCells=function(M,aa,X,ja,ca,ka,q){var E=null;this.model.beginUpdate();try{var Q=ca,Y=this.getCurrentCellStyle(ca);if(null!=M&&m(ca)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<M.length;R++)if(m(M[R])||u.model.isEdge(M[R])&&null==u.model.getTerminal(M[R],!0)){ca=u.model.getParent(M[R]);break}if(null!=Q&&ca!=Q&&null!=this.view.getState(M[0])){var ba=u.getIncomingTreeEdges(M[0]);
-if(0<ba.length){var ea=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ea){var ra=u.view.getState(Q);null!=ra&&(aa=(ra.getCenterX()-ea.getCenterX())/u.view.scale,X=(ra.getCenterY()-ea.getCenterY())/u.view.scale)}}}}E=W.apply(this,arguments);if(null!=E&&null!=M&&E.length==M.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(M[R])&&(ba=u.getIncomingTreeEdges(M[R]),0<ba.length))if(!ja)m(Q)&&
-0>mxUtils.indexOf(M,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0],Q,!0);else if(0==u.getIncomingTreeEdges(E[R]).length){Y=Q;if(null==Y||Y==u.model.getParent(M[R]))Y=u.model.getTerminal(ba[0],!0);ja=this.cloneCell(ba[0]);this.addEdge(ja,u.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(M,aa,X,ja){var ca=u.model,ka=null;ca.beginUpdate();try{if(ka=T.apply(this,arguments),m(M))for(var q=
-0;q<ka.length;q++)if(ca.isEdge(ka[q])&&null==ca.getTerminal(ka[q],!0)){ca.setTerminal(ka[q],M,!0);var E=u.getCellGeometry(ka[q]);E.points=null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{ca.endUpdate()}return ka}}var Z={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},N=y.onKeyDown;y.onKeyDown=function(M){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var aa=
-null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==M.which?aa=mxEvent.isShiftDown(M)?d(u.getSelectionCell()):f(u.getSelectionCell()):13==M.which&&(aa=P(u.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=aa&&0<aa.length)1==aa.length&&u.model.isEdge(aa[0])?u.setSelectionCell(u.model.getTerminal(aa[0],!1)):u.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(M);
-else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var X=Z[M.keyCode];null!=X&&(X.funct(M),mxEvent.consume(M))}else 37==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(ja){y.handleError(ja)}mxEvent.isConsumed(M)||
-N.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(M,aa,X,ja,ca,ka,q){var E=u.getIncomingTreeEdges(M);if(m(M)){var Q=K(M),Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(M,aa):Y==R?d(M):P(M,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(M){var aa=[M];!C(M)&&!m(M)||F(M)||u.traverse(M,!0,function(X,
-ja){var ca=null!=ja&&u.isTreeEdge(ja);ca&&0>mxUtils.indexOf(aa,ja)&&aa.push(ja);(null==ja||ca)&&0>mxUtils.indexOf(aa,X)&&aa.push(X);return null==ja||ca});return aa};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(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(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;y.hoverIcons.reset();
-mxEvent.consume(M)})))};var S=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){S.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 fa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){fa.apply(this,arguments);null!=this.moveHandle&&
-(this.moveHandle.style.display=M?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(M,aa){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",
-new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=
-!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-p.vertex=!0;var F=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};');F.vertex=!0;var K=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};');
-K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-y.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;F.insertEdge(u,!0);y.insertEdge(u,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(u);p.insert(F);p.insert(K);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",
-new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,L){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(L,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);L==C||null!=P&&!d||p.push(L);return(null==P||d)&&(L==C||!this.model.isCollapsed(L))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,L,P){return this.model.filterCells(this.getEdges(m,
+C,p,F,L,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(N){return G.isVertex(N)&&p(N)}function C(N){var aa=
+!1;null!=N&&(aa="1"==t.getCurrentCellStyle(N).treeMoving);return aa}function p(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),aa="tree"==(null!=aa?aa.style:t.getCellStyle(N)).containerType);return aa}function F(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),t.view.getState(N),aa=null!=(null!=aa?aa.style:t.getCellStyle(N)).childLayout);return aa}function L(N){N=t.view.getState(N);if(null!=N){var aa=t.getIncomingTreeEdges(N.cell);if(0<aa.length&&(aa=t.view.getState(aa[0]),
+null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==N.y&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==N.y+N.height&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>N.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(N,aa){aa=null!=aa?aa:!0;t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=t.cloneCells([ha[0],
+N]);t.model.setTerminal(X[0],t.model.getTerminal(ha[0],!0),!0);var ia=L(N),q=V.geometry;ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?X[1].geometry.x+=aa?N.geometry.width+10:-X[1].geometry.width-10:X[1].geometry.y+=aa?N.geometry.height+10:-X[1].geometry.height-10;t.view.currentRoot!=V&&(X[1].geometry.x-=q.x,X[1].geometry.y-=q.y);var E=t.view.getState(N),Q=t.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?
+Y.x+=(aa?N.geometry.width+10:-X[1].geometry.width-10)*Q:Y.y+=(aa?N.geometry.height+10:-X[1].geometry.height-10)*Q;var R=t.getOutgoingTreeEdges(t.model.getTerminal(ha[0],!0));if(null!=R){for(var Z=ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH,da=q=ha=0;da<R.length;da++){var qa=t.model.getTerminal(R[da],!1);if(ia==L(qa)){var va=t.view.getState(qa);qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,va)&&(ha=10+Math.max(ha,
+(Math.min(Y.x+Y.width,va.x+va.width)-Math.max(Y.x,va.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,va.y+va.height)-Math.max(Y.y,va.y))/Q))}}Z?q=0:ha=0;for(da=0;da<R.length;da++)if(qa=t.model.getTerminal(R[da],!1),ia==L(qa)&&(va=t.view.getState(qa),qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY()))){var ja=[];t.traverse(va.cell,!0,function(sa,ya){var Aa=null!=ya&&t.isTreeEdge(ya);Aa&&ja.push(ya);(null==ya||Aa)&&ja.push(sa);return null==ya||Aa});t.moveCells(ja,
+(aa?1:-1)*ha,(aa?1:-1)*q)}}}return t.addCells(X,V)}finally{t.model.endUpdate()}}function d(N){t.model.beginUpdate();try{var aa=L(N),V=t.getIncomingTreeEdges(N),ha=t.cloneCells([V[0],N]);t.model.setTerminal(V[0],ha[1],!1);t.model.setTerminal(ha[0],ha[1],!0);t.model.setTerminal(ha[0],N,!1);var X=t.model.getParent(N),ia=X.geometry,q=[];t.view.currentRoot!=X&&(ha[1].geometry.x-=ia.x,ha[1].geometry.y-=ia.y);t.traverse(N,!0,function(Y,R){var Z=null!=R&&t.isTreeEdge(R);Z&&q.push(R);(null==R||Z)&&q.push(Y);
+return null==R||Z});var E=N.geometry.width+40,Q=N.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);t.moveCells(q,E,Q);return t.addCells(ha,X)}finally{t.model.endUpdate()}}function f(N,aa){t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=L(N);0==ha.length&&(ha=[t.createEdge(V,null,"",null,null,t.createCurrentEdgeStyle())],X=aa);var ia=t.cloneCells([ha[0],
+N]);t.model.setTerminal(ia[0],N,!0);if(null==t.model.getTerminal(ia[0],!1)){t.model.setTerminal(ia[0],ia[1],!1);var q=t.getCellStyle(ia[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)t.setCellStyles(Q,E[Q],[ia[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&t.setCellStyles("elbow",X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ia[0]])}catch(va){}}ha=t.getOutgoingTreeEdges(N);var Y=V.geometry;aa=[];t.view.currentRoot==V&&(Y=new mxRectangle);for(q=
+0;q<ha.length;q++){var R=t.model.getTerminal(ha[q],!1);null!=R&&aa.push(R)}var Z=t.view.getBounds(aa),da=t.view.translate,qa=t.view.scale;X==mxConstants.DIRECTION_SOUTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x-Y.x+10,ia[1].geometry.y+=ia[1].geometry.height-Y.y+40):X==mxConstants.DIRECTION_NORTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x+-Y.x+10,ia[1].geometry.y-=ia[1].geometry.height+
+Y.y+40):(ia[1].geometry.x=X==mxConstants.DIRECTION_WEST?ia[1].geometry.x-(ia[1].geometry.width+Y.x+40):ia[1].geometry.x+(ia[1].geometry.width-Y.x+40),ia[1].geometry.y=null==Z?N.geometry.y+(N.geometry.height-ia[1].geometry.height)/2:(Z.y+Z.height)/qa-da.y+-Y.y+10);return t.addCells(ia,V)}finally{t.model.endUpdate()}}function g(N,aa,V){N=t.getOutgoingTreeEdges(N);V=t.view.getState(V);var ha=[];if(null!=V&&null!=N){for(var X=0;X<N.length;X++){var ia=t.view.getState(t.model.getTerminal(N[X],!1));null!=
+ia&&(!aa&&Math.min(ia.x+ia.width,V.x+V.width)>=Math.max(ia.x,V.x)||aa&&Math.min(ia.y+ia.height,V.y+V.height)>=Math.max(ia.y,V.y))&&ha.push(ia)}ha.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ha}function x(N,aa){var V=L(N),ha=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==ha&&V!=aa?y.actions.get("selectParent").funct():V==aa?(aa=t.getOutgoingTreeEdges(N),null!=aa&&0<aa.length&&
+t.setSelectionCell(t.model.getTerminal(aa[0],!1))):(V=t.getIncomingTreeEdges(N),null!=V&&0<V.length&&(ha=g(t.model.getTerminal(V[0],!0),ha,N),N=t.view.getState(N),null!=N&&(N=mxUtils.indexOf(ha,N),0<=N&&(N+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=N&&N<=ha.length-1&&t.setSelectionCell(ha[N].cell)))))}var y=this,t=y.editor.graph,G=t.getModel(),D=y.menus.createPopupMenu;y.menus.createPopupMenu=function(N,aa,V){D.apply(this,arguments);if(1==t.getSelectionCount()){aa=t.getSelectionCell();
+var ha=t.getOutgoingTreeEdges(aa);N.addSeparator();0<ha.length&&(m(t.getSelectionCell())&&this.addMenuItems(N,["selectChildren"],null,V),this.addMenuItems(N,["selectDescendants"],null,V));m(t.getSelectionCell())?(N.addSeparator(),0<t.getIncomingTreeEdges(aa).length&&this.addMenuItems(N,["selectSiblings","selectParent"],null,V)):0<t.model.getEdgeCount(aa)&&this.addMenuItems(N,["selectConnections"],null,V)}};y.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=
+t.getSelectionCell();N=t.getOutgoingTreeEdges(N);if(null!=N){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);if(null!=N&&0<N.length&&(N=t.getOutgoingTreeEdges(t.model.getTerminal(N[0],!0)),null!=N)){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},
+null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);null!=N&&0<N.length&&t.setSelectionCell(t.model.getTerminal(N[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(N,aa){N=t.getSelectionCell();if(t.isEnabled()&&t.model.isVertex(N)){if(null!=aa&&mxEvent.isAltDown(aa))t.setSelectionCells(t.model.getTreeEdges(N,null==aa||!mxEvent.isShiftDown(aa),null==
+aa||!mxEvent.isControlDown(aa)));else{var V=[];t.traverse(N,!0,function(ha,X){var ia=null!=X&&t.isTreeEdge(X);ia&&V.push(X);null!=X&&!ia||null!=aa&&mxEvent.isShiftDown(aa)||V.push(ha);return null==X||ia})}t.setSelectionCells(V)}},null,null,"Alt+Shift+D");var I=t.removeCells;t.removeCells=function(N,aa){aa=null!=aa?aa:!0;null==N&&(N=this.getDeletableCells(this.getSelectionCells()));aa&&(N=this.getDeletableCells(this.addAllEdges(N)));for(var V=[],ha=0;ha<N.length;ha++){var X=N[ha];G.isEdge(X)&&p(X)&&
+(V.push(X),X=G.getTerminal(X,!1));if(m(X)){var ia=[];t.traverse(X,!0,function(q,E){var Q=null!=E&&t.isTreeEdge(E);Q&&ia.push(E);(null==E||Q)&&ia.push(q);return null==E||Q});0<ia.length&&(V=V.concat(ia),X=t.getIncomingTreeEdges(N[ha]),N=N.concat(X))}else null!=X&&V.push(N[ha])}N=V;return I.apply(this,arguments)};y.hoverIcons.getStateAt=function(N,aa,V){return m(N.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,V))};var H=t.duplicateCells;t.duplicateCells=function(N,aa){N=null!=N?N:this.getSelectionCells();
+for(var V=N.slice(0),ha=0;ha<V.length;ha++){var X=t.view.getState(V[ha]);if(null!=X&&m(X.cell)){var ia=t.getIncomingTreeEdges(X.cell);for(X=0;X<ia.length;X++)mxUtils.remove(ia[X],N)}}this.model.beginUpdate();try{var q=H.call(this,N,aa);if(q.length==N.length)for(ha=0;ha<N.length;ha++)if(m(N[ha])){var E=t.getIncomingTreeEdges(q[ha]);ia=t.getIncomingTreeEdges(N[ha]);if(0==E.length&&0<ia.length){var Q=this.cloneCell(ia[0]);this.addEdge(Q,t.getDefaultParent(),this.model.getTerminal(ia[0],!0),q[ha])}}}finally{this.model.endUpdate()}return q};
+var S=t.moveCells;t.moveCells=function(N,aa,V,ha,X,ia,q){var E=null;this.model.beginUpdate();try{var Q=X,Y=this.getCurrentCellStyle(X);if(null!=N&&m(X)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<N.length;R++)if(m(N[R])||t.model.isEdge(N[R])&&null==t.model.getTerminal(N[R],!0)){X=t.model.getParent(N[R]);break}if(null!=Q&&X!=Q&&null!=this.view.getState(N[0])){var Z=t.getIncomingTreeEdges(N[0]);if(0<Z.length){var da=t.view.getState(t.model.getTerminal(Z[0],!0));if(null!=da){var qa=t.view.getState(Q);
+null!=qa&&(aa=(qa.getCenterX()-da.getCenterX())/t.view.scale,V=(qa.getCenterY()-da.getCenterY())/t.view.scale)}}}}E=S.apply(this,arguments);if(null!=E&&null!=N&&E.length==N.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(N[R])&&(Z=t.getIncomingTreeEdges(N[R]),0<Z.length))if(!ha)m(Q)&&0>mxUtils.indexOf(N,this.model.getTerminal(Z[0],!0))&&this.model.setTerminal(Z[0],Q,!0);else if(0==t.getIncomingTreeEdges(E[R]).length){Y=
+Q;if(null==Y||Y==t.model.getParent(N[R]))Y=t.model.getTerminal(Z[0],!0);ha=this.cloneCell(Z[0]);this.addEdge(ha,t.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(N,aa,V,ha){var X=t.model,ia=null;X.beginUpdate();try{if(ia=T.apply(this,arguments),m(N))for(var q=0;q<ia.length;q++)if(X.isEdge(ia[q])&&null==X.getTerminal(ia[q],!0)){X.setTerminal(ia[q],N,!0);var E=t.getCellGeometry(ia[q]);E.points=
+null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{X.endUpdate()}return ia}}var M={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},fa=y.onKeyDown;y.onKeyDown=function(N){try{if(t.isEnabled()&&!t.isEditing()&&m(t.getSelectionCell())&&1==t.getSelectionCount()){var aa=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==N.which?aa=mxEvent.isShiftDown(N)?d(t.getSelectionCell()):f(t.getSelectionCell()):
+13==N.which&&(aa=P(t.getSelectionCell(),!mxEvent.isShiftDown(N))));if(null!=aa&&0<aa.length)1==aa.length&&t.model.isEdge(aa[0])?t.setSelectionCell(t.model.getTerminal(aa[0],!1)):t.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(N);else if(mxEvent.isAltDown(N)&&mxEvent.isShiftDown(N)){var V=M[N.keyCode];null!=V&&(V.funct(N),mxEvent.consume(N))}else 37==N.keyCode?(x(t.getSelectionCell(),
+mxConstants.DIRECTION_WEST),mxEvent.consume(N)):38==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(N)):39==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(N)):40==N.keyCode&&(x(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(N))}}catch(ha){y.handleError(ha)}mxEvent.isConsumed(N)||fa.apply(this,arguments)};var la=t.connectVertex;t.connectVertex=function(N,aa,V,ha,X,ia,q){var E=t.getIncomingTreeEdges(N);if(m(N)){var Q=L(N),
+Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(N,aa):Y==R?d(N):P(N,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return la.apply(this,arguments)};t.getSubtree=function(N){var aa=[N];!C(N)&&!m(N)||F(N)||t.traverse(N,!0,function(V,ha){var X=null!=ha&&t.isTreeEdge(ha);X&&0>mxUtils.indexOf(aa,ha)&&aa.push(ha);(null==ha||X)&&0>mxUtils.indexOf(aa,V)&&aa.push(V);return null==ha||
+X});return aa};var ra=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ra.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(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(N){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(N),mxEvent.getClientY(N),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(N);this.graph.isMouseDown=!0;y.hoverIcons.reset();mxEvent.consume(N)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){ba.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 oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(N){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=N?"":"none")};var na=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(N,aa){na.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
+!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=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};');
+F.vertex=!0;var L=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};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;
+F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');y.vertex=!0;var t=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);y.insertEdge(t,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(t);p.insert(F);p.insert(L);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
+p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var L=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
-!0;P.edge=!0;K.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var T="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;W="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,W.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,T,240,W,
-function(Z){D.createFormat(Z).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
-D.formatElt.style.right="0px"),W=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),W.style.right="0px"):(W.parentNode.appendChild(D.formatElt),W.style.right=D.formatElt.style.width)}function e(D,G){function W(qa,oa){var S=D.menus.get(qa);qa=N.addMenu(oa,mxUtils.bind(this,function(){S.funct.apply(this,arguments)}));qa.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;";
-qa.className="geTitle";G.appendChild(qa);return qa}var T=document.createElement("div");T.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";T.className="geTitle";var Z=document.createElement("span");Z.style.fontSize="18px";Z.style.marginRight="5px";Z.innerHTML="+";T.appendChild(Z);mxUtils.write(T,mxResources.get("moreShapes"));G.appendChild(T);mxEvent.addListener(T,"click",function(){D.actions.get("shapes").funct()});
-var N=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?T.style.bottom="0":null!=D.actions.get("newLibrary")?(T=document.createElement("div"),T.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("newLibrary")),T.appendChild(Z),
-G.appendChild(T),mxEvent.addListener(T,"click",D.actions.get("newLibrary").funct),T=document.createElement("div"),T.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("openLibrary")),T.appendChild(Z),G.appendChild(T),mxEvent.addListener(T,
-"click",D.actions.get("openLibrary").funct)):(T=W("newLibrary",mxResources.get("newLibrary")),T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="0",T=W("openLibraryFrom",mxResources.get("openLibraryFrom")),T.style.borderLeft="1px solid lightgray",T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"}
-function k(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(W.container.clientWidth-10,218);var T="1"==urlParams.embedInline?650:Math.min(W.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(W.container.clientHeight-T)/2):56,G-6,T-6,function(Z){e(D,Z)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Z){D.sidebar.showEntries(Z,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
-D.sidebarElt.style.borderRight="1px solid gray"),W=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),W.style.left="0px"):(W.parentNode.appendChild(D.sidebarElt),W.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
+F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
+!0;P.edge=!0;L.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.formatWindow){I="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var S="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;H="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,H.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),I,S,240,H,
+function(T){D.createFormat(T).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=I?I:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
+D.formatElt.style.right="0px"),H=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),H.style.right="0px"):(H.parentNode.appendChild(D.formatElt),H.style.right=D.formatElt.style.width)}function e(D,I){function H(fa,la){var ra=D.menus.get(fa);fa=M.addMenu(la,mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}));fa.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;";
+fa.className="geTitle";I.appendChild(fa);return fa}var S=document.createElement("div");S.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;";S.className="geTitle";var T=document.createElement("span");T.style.fontSize="18px";T.style.marginRight="5px";T.innerHTML="+";S.appendChild(T);mxUtils.write(S,mxResources.get("moreShapes"));I.appendChild(S);mxEvent.addListener(S,"click",function(){D.actions.get("shapes").funct()});
+var M=new Menubar(D,I);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?S.style.bottom="0":null!=D.actions.get("newLibrary")?(S=document.createElement("div"),S.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("newLibrary")),S.appendChild(T),
+I.appendChild(S),mxEvent.addListener(S,"click",D.actions.get("newLibrary").funct),S=document.createElement("div"),S.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;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("openLibrary")),S.appendChild(T),I.appendChild(S),mxEvent.addListener(S,
+"click",D.actions.get("openLibrary").funct)):(S=H("newLibrary",mxResources.get("newLibrary")),S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="0",S=H("openLibraryFrom",mxResources.get("openLibraryFrom")),S.style.borderLeft="1px solid lightgray",S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="50%");I.appendChild(D.sidebar.container);I.style.overflow="hidden"}
+function k(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){I=Math.min(H.container.clientWidth-10,218);var S="1"==urlParams.embedInline?650:Math.min(H.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(H.container.clientHeight-S)/2):56,I-6,S-6,function(T){e(D,T)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(T){D.sidebar.showEntries(T,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=I?I:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
+D.sidebarElt.style.borderRight="1px solid gray"),H=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),H.style.left="0px"):(H.parentNode.appendChild(D.sidebarElt),H.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):F.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
-D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var G=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var T=document.createElement("img");T.setAttribute("border","0");T.style.position="absolute";
-T.style.left="18px";T.style.top="2px";T.style.width="12px";T.style.height="12px";var Z=W.getRealtimeError();W=W.getRealtimeState();G+=" ("+mxResources.get("realtimeCollaboration");1==W?(T.src=Editor.syncImage,G+=mxResources.get("online")):(T.src=Editor.syncProblemImage,G=null!=Z&&null!=Z.message?G+Z.message:G+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(T);G+=")"}}D.setAttribute("title",G)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className="geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var W="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,W);G.setAttribute("title",W);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="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G=document.createElement("a"),W="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G,
-W),G.setAttribute("title",W),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,
-D)){var W=mxUtils.getOffset(this.editorUi.picker);W.x+=this.editorUi.picker.offsetWidth+4;W.y+=D.offsetTop-G.height/2+16;return W}var T=d.apply(this,arguments);W=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);T.x+=W.x-16;T.y+=W.y;return T};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,W){var T=this.editorUi.editor.graph;D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?T.isEnabled()&&(D.addSeparator(),1==T.getSelectionCount()&&this.addMenuItems(D,
-["-","lockUnlock"],null,W)):1==T.getSelectionCount()?(T.isCellFoldable(T.getSelectionCell())&&this.addMenuItems(D,T.isCellCollapsed(G)?["expand"]:["collapse"],null,W),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,W),D.addSeparator(),this.addSubmenu("layout",D)):T.isSelectionEmpty()&&T.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,W),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,W)):
-T.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,W)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,W){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,W)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var x=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.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&
-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){y.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&&
-null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=G||"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 u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(S){D.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));G=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));G.shortcut=D.actions.get("formatPanel").shortcut;G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var S=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(S.container,620,420,!0,!1);S.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var S=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(S.container,620,420,!0,!1);S.init()}));var W=
-this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(S,fa){var ia=this.editorUi.editor.graph,M=ia.getSelectionCell();W.call(this,S,M,null,fa);this.addMenuItems(S,["editTooltip"],fa);ia.model.isVertex(M)&&this.addMenuItems(S,["editGeometry"],fa);this.addMenuItems(S,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(S,fa,ia,M){S.addSeparator();this.addSubmenu("editCell",S,M,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(S,fa){var ia=
-D.getCurrentFile();D.menus.addMenuItems(S,["new"],fa);D.menus.addSubmenu("openFrom",S,fa);isLocalStorage&&this.addSubmenu("openRecent",S,fa);S.addSeparator(fa);D.menus.addMenuItems(S,["-","save"],fa);null!=ia&&ia.constructor==DriveFile||D.menus.addMenuItems(S,["saveAs"],fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile&&null==ia.fileHandle||D.menus.addMenuItems(S,["synchronize"],fa);null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,"- rename makeCopy - moveToFolder openFolder".split(" "),
-fa):(D.menus.addMenuItems(S,["-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa);if(null!=ia){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var M=null!=ia.getTitle()?ia.getTitle():D.defaultFilename;(ia.constructor==DriveFile&&null!=ia.sync&&ia.sync.isConnected()||!/(\.html)$/i.test(M)&&
-!/(\.svg)$/i.test(M))&&this.addMenuItems(S,["properties"],fa)}ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa)}D.menus.addMenuItems(S,["-","autosave"],fa)})));this.put("diagram",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();D.menus.addSubmenu("extras",S,fa,mxResources.get("preferences"));S.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(S,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||
-D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&D.menus.addMenuItems(S,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(S,["saveAndExit"],fa),null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["revisionHistory"],fa);S.addSeparator(fa)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(S,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?
-(D.menus.addMenuItems(S,["new"],fa),D.menus.addSubmenu("openFrom",S,fa),isLocalStorage&&this.addSubmenu("openRecent",S,fa),S.addSeparator(fa),null!=ia&&(ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile||D.menus.addMenuItems(S,["synchronize"],fa)),S.addSeparator(fa),D.menus.addSubmenu("save",S,fa)):D.menus.addSubmenu("file",S,fa));D.menus.addSubmenu("exportAs",S,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-D.menus.addMenuItems(S,["import"],fa):"1"!=urlParams.noFileMenu&&D.menus.addSubmenu("importFrom",S,fa);D.menus.addMenuItems(S,["-","findReplace"],fa);D.commentsSupported()&&D.menus.addMenuItems(S,["comments","-"],fa);D.menus.addMenuItems(S,["toggleFormat","layers","tags","-","pageSetup"],fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(S,["print"],fa);"1"!=urlParams.sketch&&null!=ia&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(ia=null!=ia.getTitle()?ia.getTitle():
-D.defaultFilename,/(\.html)$/i.test(ia)||/(\.svg)$/i.test(ia)||this.addMenuItems(S,["-","properties"]));S.addSeparator(fa);D.menus.addSubmenu("help",S,fa);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(S,["-","exit"],fa):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(S,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,
-["save","makeCopy","-","rename","moveToFolder"],fa):(D.menus.addMenuItems(S,["save","saveAs","-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));D.menus.addMenuItems(S,["-","autosave"],fa);null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa)})));var T=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(S,fa){T.funct(S,
-fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(S,["publishLink"],fa);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(S.addSeparator(fa),D.menus.addSubmenu("embed",S,fa))})));var Z=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(S,fa){D.menus.addInsertTableCellItem(S,fa)})));var N=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(S,fa){N.funct(S,fa);this.addMenuItems(S,["-","ruler","-","pageScale"],fa)})));this.put("extras",new Menu(mxUtils.bind(this,
-function(S,fa){null==Z||"1"==urlParams.embed&&null!=urlParams.lang||D.menus.addSubmenu("language",S,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",S,fa);D.menus.addSubmenu("units",S,fa);S.addSeparator(fa);"1"!=urlParams.sketch&&D.menus.addMenuItems(S,["scrollbars","-","tooltips","copyConnect","collapseExpand"],fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&&
-D.menus.addMenuItems(S,["-","showStartScreen","search","scratchpad"],fa);S.addSeparator(fa);"1"==urlParams.sketch&&D.menus.addMenuItems(S,["copyConnect","collapseExpand","tooltips","-"],fa);EditorUi.isElectronApp&&D.menus.addMenuItems(S,["-","spellCheck","autoBkp","drafts","-"],fa);var ia=D.getCurrentFile();null!=ia&&ia.isRealtimeEnabled()&&ia.isRealtimeSupported()&&this.addMenuItems(S,["-","showRemoteCursors","shareCursor","-"],fa);Graph.translateDiagram&&D.menus.addMenuItems(S,["diagramLanguage"],
-fa);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"configuration",fa);"1"!=urlParams.sketch&&!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"plugins",fa);S.addSeparator(fa)})));mxUtils.bind(this,function(){var S=this.get("insert"),fa=S.funct;S.funct=function(ia,M){"1"==urlParams.sketch?(D.menus.addMenuItems(ia,["toggleShapes"],M),D.menus.addSubmenu("table",ia,M),ia.addSeparator(M),D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(ia,["insertTemplate"],
-M),D.menus.addMenuItems(ia,["insertImage","insertLink","-"],M),D.menus.addSubmenu("insertAdvanced",ia,M,mxResources.get("advanced")),D.menus.addSubmenu("layout",ia,M)):(fa.apply(this,arguments),D.menus.addSubmenu("table",ia,M))}})();var qa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),oa=function(S,fa,ia,M){S.addItem(ia,null,mxUtils.bind(this,function(){var aa=new CreateGraphDialog(D,ia,M);D.showDialog(aa.container,620,420,!0,!1);aa.init()}),fa)};
-this.put("insertLayout",new Menu(mxUtils.bind(this,function(S,fa){for(var ia=0;ia<qa.length;ia++)"-"==qa[ia]?S.addSeparator(fa):oa(S,fa,mxResources.get(qa[ia])+"...",qa[ia])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,W=document.createElement("div");W.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%;";G.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(T,Z){0<G.getSelectionCount()?(D.appendChild(W),W.innerHTML="Selected: "+G.getSelectionCount()):null!=W.parentNode&&W.parentNode.removeChild(W)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",
-this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(ua,za,Fa){var Ba=
-N.menus.get(ua),Ea=fa.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ba.funct.apply(this,arguments)}),S);Ea.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ea.style.display="inline-block";Ea.style.boxSizing="border-box";Ea.style.top="6px";Ea.style.marginRight="6px";Ea.style.height="30px";Ea.style.paddingTop="6px";Ea.style.paddingBottom="6px";Ea.style.cursor="pointer";Ea.setAttribute("title",mxResources.get(ua));N.menus.menuCreated(Ba,Ea,"geMenuItem");null!=Fa?(Ea.style.backgroundImage=
-"url("+Fa+")",Ea.style.backgroundPosition="center center",Ea.style.backgroundRepeat="no-repeat",Ea.style.backgroundSize="24px 24px",Ea.style.width="34px",Ea.innerText=""):za||(Ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ea.style.backgroundPosition="right 6px center",Ea.style.backgroundRepeat="no-repeat",Ea.style.paddingRight="22px");return Ea}function G(ua,za,Fa,Ba,Ea,Oa){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!=N.statusContainer?oa.insertBefore(Pa,N.statusContainer):oa.appendChild(Pa);null!=Oa?(Pa.style.backgroundImage="url("+Oa+")",Pa.style.backgroundPosition="center center",Pa.style.backgroundRepeat=
-"no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px"):mxUtils.write(Pa,ua);mxEvent.addListener(Pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(bb){bb.preventDefault()}));mxEvent.addListener(Pa,"click",function(bb){"disabled"!=Pa.getAttribute("disabled")&&za(bb);mxEvent.consume(bb)});null==Fa&&(Pa.style.marginRight="4px");null!=Ba&&Pa.setAttribute("title",Ba);null!=Ea&&(ua=function(){Ea.isEnabled()?(Pa.removeAttribute("disabled"),Pa.style.cursor="pointer"):
-(Pa.setAttribute("disabled","disabled"),Pa.style.cursor="default")},Ea.addListener("stateChanged",ua),qa.addListener("enabledChanged",ua),ua());return Pa}function W(ua,za,Fa){Fa=document.createElement("div");Fa.className="geMenuItem";Fa.style.display="inline-block";Fa.style.verticalAlign="top";Fa.style.marginRight="6px";Fa.style.padding="0 4px 0 4px";Fa.style.height="30px";Fa.style.position="relative";Fa.style.top="0px";"1"==urlParams.sketch&&(Fa.style.boxShadow="none");for(var Ba=0;Ba<ua.length;Ba++)null!=
-ua[Ba]&&("1"==urlParams.sketch&&(ua[Ba].style.padding="10px 8px",ua[Ba].style.width="30px"),ua[Ba].style.margin="0px",ua[Ba].style.boxShadow="none",Fa.appendChild(ua[Ba]));null!=za&&mxUtils.setOpacity(Fa,za);null!=N.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(Fa,N.statusContainer):oa.appendChild(Fa);return Fa}function T(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(E.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var ua=oa.firstChild;null!=ua;){var za=ua.nextSibling;
-"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}S=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>m||"1"==urlParams.sketch;var Fa=null;ua||(Fa=D("diagram"));za=ua?D("diagram",null,Editor.menuImage):null;null!=za&&(Fa=za);W([Fa,G(mxResources.get("shapes"),N.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),N.actions.get("image"),ua?Editor.shapesImage:null),G(mxResources.get("format"),N.actions.get("toggleFormat").funct,
-null,mxResources.get("format")+" ("+N.actions.get("formatPanel").shortcut+")",N.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);var Ba=D("insert",!0,ua?ca:null);W([Ba,G(mxResources.get("delete"),N.actions.get("delete").funct,null,mxResources.get("delete"),N.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=m&&(W([Ta,Za],60),520<=m&&W([ha,640<=m?G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",La,Editor.zoomInImage):null,640<=m?G("",Da.funct,!0,mxResources.get("zoomOut")+
-" ("+Editor.ctrlKey+" -)",Da,Editor.zoomOutImage):null],60))}null!=Fa&&(mxEvent.disableContextMenu(Fa),mxEvent.addGestureListeners(Fa,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&N.appIconClicked(Ea)}),null,null));za=N.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?
-(null==wa&&(Ba=fa.addMenu("",za.funct),Ba.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="22px 22px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="12px",oa.appendChild(Ba),
-wa=Ba,"1"==urlParams["live-ui"]&&(za=mxUtils.bind(this,function(){Ba.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",za),za())),N.buttonContainer.style.paddingRight="34px"):(N.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}J.apply(this,arguments);var Z=document.createElement("div");Z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-Z.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Z);"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<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
-!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var N=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==N.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Fa=N.embedViewport.x+N.embedViewport.width,Ba=parseInt(this.div.offsetTop),Ea=parseInt(this.div.offsetHeight),Oa=N.embedViewport.y+
-N.embedViewport.height;this.div.style.left=Math.max(N.embedViewport.x,Math.min(ua,Fa-za))+"px";this.div.style.top=Math.max(N.embedViewport.y,Math.min(Ba,Oa-Ea))+"px";this.div.style.height=Math.min(N.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(N.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
-(this.initFormatWindow(),Z=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Z)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));N=this;var qa=N.editor.graph;N.toolbar=this.createToolbar(N.createDiv("geToolbar"));N.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var S=null,
-fa=new Menubar(N,oa);N.statusContainer=N.createStatusContainer();N.statusContainer.style.position="relative";N.statusContainer.style.maxWidth="";N.statusContainer.style.marginTop="7px";N.statusContainer.style.marginLeft="6px";N.statusContainer.style.color="gray";N.statusContainer.style.cursor="default";var ia=N.hideCurrentMenu;N.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=N.descriptorChanged;N.descriptorChanged=function(){M.apply(this,arguments);
-var ua=N.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);oa.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else oa.removeAttribute("title")};N.setStatusText(N.editor.getStatus());oa.appendChild(N.statusContainer);N.buttonContainer=document.createElement("div");N.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-oa.appendChild(N.buttonContainer);N.menubarContainer=N.buttonContainer;N.tabContainer=document.createElement("div");N.tabContainer.className="geTabContainer";N.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Z=N.diagramContainer.parentNode;var aa=document.createElement("div");aa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";N.diagramContainer.style.top="1"==
-urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){aa.style.top="20px";N.titlebar=document.createElement("div");N.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var X=document.createElement("div");X.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;";N.titlebar.appendChild(X);
-Z.appendChild(N.titlebar)}X=N.menus.get("viewZoom");var ja=X.funct;X.funct=function(ua,za){ja.apply(this,arguments);N.menus.addMenuItems(ua,["-","outline","fullscreen"],za)};var ca="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,E="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)E.style.left="10px",E.style.top=
-"10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",N.diagramContainer.setAttribute("data-bounds",N.diagramContainer.style.top+" "+N.diagramContainer.style.left+" "+N.diagramContainer.style.width+" "+N.diagramContainer.style.height),N.diagramContainer.style.top="0px",N.diagramContainer.style.left="0px",N.diagramContainer.style.bottom="0px",N.diagramContainer.style.right="0px",N.diagramContainer.style.width="",N.diagramContainer.style.height="";
-else{var ua=N.diagramContainer.getAttribute("data-bounds");if(null!=ua){N.diagramContainer.style.background="transparent";N.diagramContainer.removeAttribute("data-bounds");var za=qa.getGraphBounds();ua=ua.split(" ");N.diagramContainer.style.top=ua[0];N.diagramContainer.style.left=ua[1];N.diagramContainer.style.width=za.width+50+"px";N.diagramContainer.style.height=za.height+46+"px";N.diagramContainer.style.bottom="";N.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:N.diagramContainer.getBoundingClientRect()}),"*");N.refresh()}E.style.left=N.diagramContainer.offsetLeft+"px";E.style.top=N.diagramContainer.offsetTop-E.offsetHeight-4+"px";q.style.display="";q.style.left=N.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=N.diagramContainer.offsetTop+"px";ka.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=E.style.top;ka.style.right="";N.bottomResizer.style.left=N.diagramContainer.offsetLeft+
-(N.diagramContainer.offsetWidth-N.bottomResizer.offsetWidth)/2+"px";N.bottomResizer.style.top=N.diagramContainer.offsetTop+N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight/2-1+"px";N.rightResizer.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-N.rightResizer.offsetWidth/2-1+"px";N.rightResizer.style.top=N.diagramContainer.offsetTop+(N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight)/2+"px"}N.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":
-"";N.rightResizer.style.visibility=N.bottomResizer.style.visibility;oa.style.display="none";E.style.visibility="";ka.style.visibility=""}),Y=N.actions.get("fullscreen"),R=G("",Y.funct,null,mxResources.get(""),Y,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){R.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
-Q()});Y=mxUtils.bind(this,function(){b(N,!0);N.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y);ba()});N.addListener("inlineFullscreenChanged",ba);N.addListener("editInlineStart",Y);"1"==urlParams.embedInline&&N.addListener("darkModeChanged",Y);N.addListener("editInlineStop",mxUtils.bind(this,function(ua){N.diagramContainer.style.width="10px";N.diagramContainer.style.height="10px";N.diagramContainer.style.border="";
-N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=N.hoverIcons){var ea=N.hoverIcons.update;N.hoverIcons.update=function(){qa.freehand.isDrawing()||ea.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(ua){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className=
-"geToolbarContainer";E.className="geToolbarContainer";oa.className="geToolbarContainer";N.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=N.getServiceName()&&(mxEvent.addListener(oa,"mouseenter",function(){N.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(N.statusContainer.style.display="none")}));var la=mxUtils.bind(this,function(ua){null!=N.notificationBtn&&(null!=ua?N.notificationBtn.setAttribute("title",ua):N.notificationBtn.removeAttribute("title"))});
-if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var pa=D("theme",null,Editor.darkModeImage);null!=pa&&(pa.style.position="relative",pa.style.backgroundPosition="top center",pa.style.backgroundSize="22px 22px",pa.style.width="24px",pa.style.height="28px",pa.style.top="4px",oa.appendChild(pa),Y=mxUtils.bind(this,function(){pa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",Y),Y())}oa.style.visibility=20>oa.clientWidth?
-"hidden":"";N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=N.getServiceName())if(N.statusContainer.style.display="inline-block",ta=!0,1==N.statusContainer.children.length&&""==N.editor.getStatus())oa.style.visibility="hidden";else{if(0==N.statusContainer.children.length||1==N.statusContainer.children.length&&"function"===typeof N.statusContainer.firstChild.getAttribute&&null==N.statusContainer.firstChild.getAttribute("class")){var ua=
-null!=N.statusContainer.firstChild&&"function"===typeof N.statusContainer.firstChild.getAttribute?N.statusContainer.firstChild.getAttribute("title"):N.editor.getStatus();la(ua);var za=N.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(N.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',N.statusContainer.style.display="inline-block",ta=!0):6<N.buttonContainer.clientWidth&&
-(N.statusContainer.style.display="none",ta=!1)}else N.statusContainer.style.display="inline-block",la(null),ta=!0;oa.style.visibility=20>oa.clientWidth&&!ta?"hidden":""}}));U=D("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";E.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
-this.appIconClicked(ua)}),null,null);N.statusContainer.style.position="";N.statusContainer.style.display="none";N.statusContainer.style.margin="0px";N.statusContainer.style.padding="6px 0px";N.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";N.statusContainer.style.display="inline-block";N.statusContainer.style.textOverflow="ellipsis";N.buttonContainer.style.display="inline-block";N.buttonContainer.style.position="relative";N.buttonContainer.style.paddingRight="0px";N.buttonContainer.style.top=
-"0px";var xa=document.createElement("a");xa.style.padding="0px";xa.style.boxShadow="none";xa.className="geMenuItem";xa.style.display="inline-block";xa.style.width="40px";xa.style.height="12px";xa.style.marginBottom="-2px";xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";xa.style.backgroundPosition="top center";xa.style.backgroundRepeat="no-repeat";xa.setAttribute("title","Minimize");var Ca=!1,Ia=mxUtils.bind(this,function(){q.innerText="";if(!Ca){var ua=function(za,Fa,Ba,Ea){null!=
-Fa&&za.setAttribute("title",Fa);za.style.cursor=null!=Ba?Ba:"default";za.style.margin="2px 0px";q.appendChild(za);mxUtils.br(q);null!=Ea&&(za.style.position="relative",za.style.overflow="visible",Fa=document.createElement("div"),Fa.style.position="absolute",Fa.style.left="34px",Fa.style.top="28px",Fa.style.fontSize="8px",mxUtils.write(Fa,Ea),za.appendChild(Fa));return za};ua(N.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
-60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ua(N.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ua(N.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ua(N.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var za=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");za.geometry.setTerminalPoint(new mxPoint(0,0),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width,
-0),!1);za.geometry.points=[];za.geometry.relative=!0;za.edge=!0;ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,za.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");za=za.clone();za.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";za.geometry.width=qa.defaultEdgeLength+20;za.geometry.setTerminalPoint(new mxPoint(0,20),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width,
-20),!1);ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(za,Fa,Ba,Ea){za=G("",za.funct,null,Fa,za,Ba);za.style.width="40px";za.style.height="34px";za.style.opacity="0.7";return ua(za,null,"pointer",Ea)})(N.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");U=D("insert",null,Editor.plusImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin=
-"0px";U.style.height="34px";U.style.width="37px";ua(U,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(xa)});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){Ca?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",xa.style.width="40px",xa.style.height="12px",xa.setAttribute("title","Minimize"),Ca=!1,Ia()):(q.innerText=
-"",q.appendChild(xa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",xa.style.height="24px",xa.style.backgroundImage="url("+Editor.plusImage+")",xa.setAttribute("title",mxResources.get("insert")),xa.style.width="24px",Ca=!0)}));Ia();N.addListener("darkModeChanged",Ia);N.addListener("sketchModeChanged",Ia)}else N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus())}));
-if(null!=X){var Aa=function(ua){if(mxEvent.isAltDown(ua))N.hideCurrentMenu(),N.actions.get("customZoom").funct(),mxEvent.consume(ua);else if("geItem"!=mxEvent.getSource(ua).className||mxEvent.isShiftDown(ua))N.hideCurrentMenu(),N.actions.get("smartFit").funct(),mxEvent.consume(ua)},La=N.actions.get("zoomIn"),Da=N.actions.get("zoomOut");Y=N.actions.get("resetView");var Sa=N.actions.get("undo"),Ra=N.actions.get("redo"),Ta=G("",Sa.funct,null,mxResources.get("undo")+" ("+Sa.shortcut+")",Sa,Editor.undoImage),
-Za=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){Y=function(){V.style.display=null!=N.pages&&("0"!=urlParams.pages||1<N.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Na=function(){V.innerText="";if(null!=N.currentPage){mxUtils.write(V,N.currentPage.getName());var ua=null!=N.pages?N.pages.length:1,za=N.getPageIndex(N.currentPage);za=null!=za?za+1:1;var Fa=N.currentPage.getId();V.setAttribute("title",N.currentPage.getName()+" ("+za+
-"/"+ua+")"+(null!=Fa?" ["+Fa+"]":""))}},z=N.actions.get("delete"),L=G("",z.funct,null,mxResources.get("delete"),z,Editor.trashImage);L.style.opacity="0.1";E.appendChild(L);z.addListener("stateChanged",function(){L.style.opacity=z.enabled?"":"0.1"});var O=function(){Ta.style.display=0<N.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none";Za.style.display=Ta.style.display;Ta.style.opacity=Sa.enabled?"":"0.1";Za.style.opacity=Ra.enabled?"":"0.1"};E.appendChild(Ta);E.appendChild(Za);
-Sa.addListener("stateChanged",O);Ra.addListener("stateChanged",O);O();var V=this.createPageMenuTab(!1,!0);V.style.display="none";V.style.position="";V.style.marginLeft="";V.style.top="";V.style.left="";V.style.height="100%";V.style.lineHeight="";V.style.borderStyle="none";V.style.padding="3px 0";V.style.margin="0px";V.style.background="";V.style.border="";V.style.boxShadow="none";V.style.verticalAlign="top";V.style.width="auto";V.style.maxWidth="160px";V.style.position="relative";V.style.padding=
-"6px";V.style.textOverflow="ellipsis";V.style.opacity="0.8";ka.appendChild(V);N.editor.addListener("pagesPatched",Na);N.editor.addListener("pageSelected",Na);N.editor.addListener("pageRenamed",Na);N.editor.addListener("fileLoaded",Na);Na();N.addListener("fileDescriptorChanged",Y);N.addListener("pagesVisibleChanged",Y);N.editor.addListener("pagesPatched",Y);Y();Y=G("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Da,Editor.zoomOutImage);ka.appendChild(Y);var U=fa.addMenu("100%",
-X.funct);U.setAttribute("title",mxResources.get("zoom"));U.innerHTML="100%";U.style.display="inline-block";U.style.color="inherit";U.style.cursor="pointer";U.style.textAlign="center";U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.verticalAlign="top";U.style.padding="6px 0";U.style.fontSize="14px";U.style.width="40px";U.style.opacity="0.4";ka.appendChild(U);X=G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",La,Editor.zoomInImage);
-ka.appendChild(X);"1"==urlParams.embedInline?(ka.appendChild(R),X=N.actions.get("exit"),ka.appendChild(G("",X.funct,null,mxResources.get("exit"),X,Editor.closeImage))):R.parentNode.removeChild(R);N.tabContainer.style.visibility="hidden";oa.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;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";E.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;";ka.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;";aa.appendChild(E);aa.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(q.style.touchAction="none");aa.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(aa)}else{var ha=G("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Y,Editor.zoomFitImage);oa.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";U=fa.addMenu("100%",
-X.funct);U.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(N.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(N.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px";
-U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";aa.appendChild(U)}(function(ua){mxEvent.addListener(ua,"click",Aa);var za=mxUtils.bind(this,function(){ua.innerText="";mxUtils.write(ua,Math.round(100*N.editor.graph.view.scale)+"%")});N.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);N.editor.addListener("resetGraphView",za);N.editor.addListener("pageSelected",
-za)})(U);var ma=N.setGraphEnabled;N.setGraphEnabled=function(){ma.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}aa.appendChild(oa);aa.appendChild(N.diagramContainer);Z.appendChild(aa);N.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&aa.appendChild(N.tabContainer);
-var wa=null;T();mxEvent.addListener(window,"resize",function(){T();null!=N.sidebarWindow&&N.sidebarWindow.window.fit();null!=N.formatWindow&&N.formatWindow.window.fit();null!=N.actions.outlineWindow&&N.actions.outlineWindow.window.fit();null!=N.actions.layersWindow&&N.actions.layersWindow.window.fit();null!=N.menus.tagsWindow&&N.menus.tagsWindow.window.fit();null!=N.menus.findWindow&&N.menus.findWindow.window.fit();null!=N.menus.findReplaceWindow&&N.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(N.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==N.diagramContainer.parentNode&&(N.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),N.sendEmbeddedSvgExport())});Z=document.createElement("div");Z.style.position="absolute";Z.style.width="10px";Z.style.height="10px";Z.style.borderRadius="5px";Z.style.border="1px solid gray";Z.style.background="#ffffff";Z.style.cursor=
-"row-resize";N.diagramContainer.parentNode.appendChild(Z);N.bottomResizer=Z;var sa=null,ya=null,Ha=null,Qa=null;mxEvent.addGestureListeners(Z,function(ua){Qa=parseInt(N.diagramContainer.style.height);ya=mxEvent.getClientY(ua);qa.popupMenuHandler.hideMenu();mxEvent.consume(ua)});Z=Z.cloneNode(!1);Z.style.cursor="col-resize";N.diagramContainer.parentNode.appendChild(Z);N.rightResizer=Z;mxEvent.addGestureListeners(Z,function(ua){Ha=parseInt(N.diagramContainer.style.width);sa=mxEvent.getClientX(ua);qa.popupMenuHandler.hideMenu();
-mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=sa&&(N.diagramContainer.style.width=Math.max(20,Ha+mxEvent.getClientX(ua)-sa)+"px",za=!0);null!=ya&&(N.diagramContainer.style.height=Math.max(20,Qa+mxEvent.getClientY(ua)-ya)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:N.diagramContainer.getBoundingClientRect()}),"*"),Q(),N.refresh())},function(ua){null==sa&&null==
-ya||mxEvent.consume(ua);ya=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&N.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,I){null!=I.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",I.shortcut):F.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
+D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var I=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var H=this.getCurrentFile();if(null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()){var S=document.createElement("img");S.setAttribute("border","0");S.style.position="absolute";
+S.style.left="18px";S.style.top="2px";S.style.width="12px";S.style.height="12px";var T=H.getRealtimeError();H=H.getRealtimeState();I+=" ("+mxResources.get("realtimeCollaboration")+": ";1==H?(S.src=Editor.syncImage,I+=mxResources.get("online")):(S.src=Editor.syncProblemImage,I=null!=T&&null!=T.message?I+T.message:I+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(S);I+=")"}}D.setAttribute("title",I)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var I=document.createElement("a");I.className="geMenuItem gePrimaryBtn";I.style.marginLeft="8px";I.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var H="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(I,H);I.setAttribute("title",H);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(I)}}else mxUtils.write(I,mxResources.get("save")),I.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(I),
+"1"==urlParams.saveAndExit&&(I=document.createElement("a"),mxUtils.write(I,mxResources.get("saveAndExit")),I.setAttribute("title",mxResources.get("saveAndExit")),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(I));"1"!=urlParams.noExitBtn&&(I=document.createElement("a"),H="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(I,
+H),I.setAttribute("title",H),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(I));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,I,H){var S=this.editorUi.editor.graph;D.smartSeparators=!0;d.apply(this,arguments);
+"1"==urlParams.sketch?S.isEnabled()&&(D.addSeparator(),1==S.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,H)):1==S.getSelectionCount()?(S.isCellFoldable(S.getSelectionCell())&&this.addMenuItems(D,S.isCellCollapsed(I)?["expand"]:["collapse"],null,H),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,H),D.addSeparator(),this.addSubmenu("layout",D)):S.isSelectionEmpty()&&S.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,H),D.addSeparator(),this.addSubmenu("layout",
+D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,H)):S.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,H)};var f=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,I,H){f.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,H)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):
+b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){x.apply(this,arguments);if(D){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=I&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
+null!=this.formatWindow&&(1E3<=I||"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 y=Menus.prototype.init;Menus.prototype.init=function(){y.apply(this,arguments);var D=this.editorUi,I=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(la){D.setPagesVisible(!Editor.pagesVisible)}));
+I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));I=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));I.shortcut=D.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
+!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var la=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(la.container,620,420,!0,!1);la.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var la=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(la.container,620,420,!0,!1);la.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
+function(la,ra){var ba=this.editorUi.editor.graph,oa=ba.getSelectionCell();H.call(this,la,oa,null,ra);this.addMenuItems(la,["editTooltip"],ra);ba.model.isVertex(oa)&&this.addMenuItems(la,["editGeometry"],ra);this.addMenuItems(la,["-","edit"],ra)})));this.addPopupMenuCellEditItems=function(la,ra,ba,oa){la.addSeparator();this.addSubmenu("editCell",la,oa,mxResources.get("edit"))};var S=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(la,ra){S.funct(la,ra);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||D.menus.addMenuItems(la,["publishLink"],ra);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(la.addSeparator(ra),D.menus.addSubmenu("embed",la,ra))})));var T=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(la,ra){T.funct(la,ra);this.addMenuItems(la,["-","ruler","-","pageScale"],ra)})));var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),fa=function(la,ra,ba,oa){la.addItem(ba,null,mxUtils.bind(this,
+function(){var na=new CreateGraphDialog(D,ba,oa);D.showDialog(na.container,620,420,!0,!1);na.init()}),ra)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(la,ra){for(var ba=0;ba<M.length;ba++)"-"==M[ba]?la.addSeparator(ra):fa(la,ra,mxResources.get(M[ba])+"...",M[ba])})))};EditorUi.prototype.installFormatToolbar=function(D){var I=this.editor.graph,H=document.createElement("div");H.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%;";
+I.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,T){0<I.getSelectionCount()?(D.appendChild(H),H.innerHTML="Selected: "+I.getSelectionCount()):null!=H.parentNode&&H.parentNode.removeChild(H)}))};var t=!1;EditorUi.prototype.initFormatWindow=function(){if(!t&&null!=this.formatWindow){t=!0;var D=this.formatWindow.window.toggleMinimized,I=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(I=parseInt(this.div.style.width),this.div.style.width=
+"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+I-140+"px"):(this.div.style.width=I+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-I+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(H){mxEvent.getSource(H)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function D(pa,ua,Da){var Fa=M.menus.get(pa),Ma=ba.addMenu(mxResources.get(pa),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ra);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(pa));M.menus.menuCreated(Fa,
+Ma,"geMenuItem");null!=Da?(Ma.style.backgroundImage="url("+Da+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerText=""):ua||(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 I(pa,ua,Da,Fa,Ma,Qa){var Ba=document.createElement("a");Ba.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";"1"==urlParams.sketch&&(Ba.style.borderStyle="none",Ba.style.boxShadow="none",Ba.style.padding="6px",Ba.style.margin="0px");null!=M.statusContainer?la.insertBefore(Ba,M.statusContainer):la.appendChild(Ba);null!=Qa?(Ba.style.backgroundImage="url("+Qa+")",Ba.style.backgroundPosition=
+"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,pa);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ka){Ka.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ka){"disabled"!=Ba.getAttribute("disabled")&&ua(Ka);mxEvent.consume(Ka)});null==Da&&(Ba.style.marginRight="4px");null!=Fa&&Ba.setAttribute("title",Fa);null!=Ma&&(pa=function(){Ma.isEnabled()?(Ba.removeAttribute("disabled"),
+Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},Ma.addListener("stateChanged",pa),fa.addListener("enabledChanged",pa),pa());return Ba}function H(pa,ua,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
+for(var Fa=0;Fa<pa.length;Fa++)null!=pa[Fa]&&("1"==urlParams.sketch&&(pa[Fa].style.padding="10px 8px",pa[Fa].style.width="30px"),pa[Fa].style.margin="0px",pa[Fa].style.boxShadow="none",Da.appendChild(pa[Fa]));null!=ua&&mxUtils.setOpacity(Da,ua);null!=M.statusContainer&&"1"!=urlParams.sketch?la.insertBefore(Da,M.statusContainer):la.appendChild(Da);return Da}function S(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ia.style.left=58>X.offsetTop-X.offsetHeight/2?"70px":"10px");else{for(var pa=
+la.firstChild;null!=pa;){var ua=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ua}ra=la.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;pa=1E3>m||"1"==urlParams.sketch;var Da=null;pa||(Da=D("diagram"));ua=pa?D("diagram",null,Editor.menuImage):null;null!=ua&&(Da=ua);H([Da,I(mxResources.get("shapes"),M.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),M.actions.get("image"),pa?Editor.shapesImage:
+null),I(mxResources.get("format"),M.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+M.actions.get("formatPanel").shortcut+")",M.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ua=D("insert",!0,pa?V:null);H([ua,I(mxResources.get("delete"),M.actions.get("delete").funct,null,mxResources.get("delete"),M.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=m&&(H([Ca,Sa],60),520<=m&&H([O,640<=m?I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",ya,Editor.zoomInImage):null,640<=m?I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Aa,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&M.appIconClicked(Fa)}),null,null));ua=M.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==W&&(ua=ba.addMenu("",ua.funct),ua.setAttribute("title","language"),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="22px 22px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="12px",la.appendChild(ua),
+W=ua),M.buttonContainer.style.paddingRight="34px"):(M.buttonContainer.style.paddingRight="4px",null!=W&&(W.parentNode.removeChild(W),W=null))}G.apply(this,arguments);var T=document.createElement("div");T.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";T.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(T);"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<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
+var M=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==M.embedViewport)mxUtils.fit(this.div);else{var pa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),Da=M.embedViewport.x+M.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),Qa=M.embedViewport.y+M.embedViewport.height;this.div.style.left=Math.max(M.embedViewport.x,Math.min(pa,Da-ua))+"px";this.div.style.top=Math.max(M.embedViewport.y,Math.min(Fa,Qa-Ma))+"px";this.div.style.height=
+Math.min(M.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(M.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),T=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>T)?this.formatWindow.window.toggleMinimized():
+this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));M=this;var fa=M.editor.graph;M.toolbar=this.createToolbar(M.createDiv("geToolbar"));M.defaultLibraryName=mxResources.get("untitledLibrary");var la=document.createElement("div");la.className="geMenubarContainer";var ra=null,ba=new Menubar(M,la);M.statusContainer=M.createStatusContainer();M.statusContainer.style.position="relative";M.statusContainer.style.maxWidth="";M.statusContainer.style.marginTop="7px";M.statusContainer.style.marginLeft=
+"6px";M.statusContainer.style.color="gray";M.statusContainer.style.cursor="default";var oa=M.hideCurrentMenu;M.hideCurrentMenu=function(){oa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var na=M.descriptorChanged;M.descriptorChanged=function(){na.apply(this,arguments);var pa=M.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ua=pa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua);
+la.setAttribute("title",pa.getTitle()+(null!=ua?" ("+ua+")":""))}else la.removeAttribute("title")};M.setStatusText(M.editor.getStatus());la.appendChild(M.statusContainer);M.buttonContainer=document.createElement("div");M.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";la.appendChild(M.buttonContainer);M.menubarContainer=M.buttonContainer;M.tabContainer=document.createElement("div");M.tabContainer.className=
+"geTabContainer";M.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";T=M.diagramContainer.parentNode;var N=document.createElement("div");N.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";M.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){N.style.top="20px";M.titlebar=document.createElement("div");M.titlebar.style.cssText=
+"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var aa=document.createElement("div");aa.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;";M.titlebar.appendChild(aa);T.appendChild(M.titlebar)}var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ha="1"==urlParams.sketch?document.createElement("div"):null,X="1"==
+urlParams.sketch?document.createElement("div"):null,ia="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ia.style.left="10px",ia.style.top="10px",X.style.left="10px",X.style.top="60px",ha.style.top="10px",ha.style.right="12px",ha.style.left="",M.diagramContainer.setAttribute("data-bounds",M.diagramContainer.style.top+" "+M.diagramContainer.style.left+" "+M.diagramContainer.style.width+" "+M.diagramContainer.style.height),M.diagramContainer.style.top=
+"0px",M.diagramContainer.style.left="0px",M.diagramContainer.style.bottom="0px",M.diagramContainer.style.right="0px",M.diagramContainer.style.width="",M.diagramContainer.style.height="";else{var pa=M.diagramContainer.getAttribute("data-bounds");if(null!=pa){M.diagramContainer.style.background="transparent";M.diagramContainer.removeAttribute("data-bounds");var ua=fa.getGraphBounds();pa=pa.split(" ");M.diagramContainer.style.top=pa[0];M.diagramContainer.style.left=pa[1];M.diagramContainer.style.width=
+ua.width+50+"px";M.diagramContainer.style.height=ua.height+46+"px";M.diagramContainer.style.bottom="";M.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:M.diagramContainer.getBoundingClientRect()}),"*");M.refresh()}ia.style.left=M.diagramContainer.offsetLeft+"px";ia.style.top=M.diagramContainer.offsetTop-ia.offsetHeight-4+"px";X.style.display="";X.style.left=M.diagramContainer.offsetLeft-X.offsetWidth-4+"px";X.style.top=M.diagramContainer.offsetTop+
+"px";ha.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-ha.offsetWidth+"px";ha.style.top=ia.style.top;ha.style.right="";M.bottomResizer.style.left=M.diagramContainer.offsetLeft+(M.diagramContainer.offsetWidth-M.bottomResizer.offsetWidth)/2+"px";M.bottomResizer.style.top=M.diagramContainer.offsetTop+M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight/2-1+"px";M.rightResizer.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-M.rightResizer.offsetWidth/
+2-1+"px";M.rightResizer.style.top=M.diagramContainer.offsetTop+(M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight)/2+"px"}M.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";M.rightResizer.style.visibility=M.bottomResizer.style.visibility;la.style.display="none";ia.style.visibility="";ha.style.visibility=""});aa=M.actions.get("fullscreen");var E=I("",aa.funct,null,mxResources.get(""),aa,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){E.style.backgroundImage="url("+
+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";q()});aa=mxUtils.bind(this,function(){b(M,!0);M.initFormatWindow();var pa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(pa.x+pa.width+4,pa.y);Q()});M.addListener("inlineFullscreenChanged",Q);M.addListener("editInlineStart",aa);"1"==urlParams.embedInline&&M.addListener("darkModeChanged",
+aa);M.addListener("editInlineStop",mxUtils.bind(this,function(pa){M.diagramContainer.style.width="10px";M.diagramContainer.style.height="10px";M.diagramContainer.style.border="";M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}));if(null!=M.hoverIcons){var Y=M.hoverIcons.update;M.hoverIcons.update=function(){fa.freehand.isDrawing()||Y.apply(this,arguments)}}if(null!=fa.freehand){var R=
+fa.freehand.createStyle;fa.freehand.createStyle=function(pa){return R.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){X.className="geToolbarContainer";ha.className="geToolbarContainer";ia.className="geToolbarContainer";la.className="geToolbarContainer";M.picker=X;M.sketchPickerMenuElt=X;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=M.getServiceName()&&(mxEvent.addListener(la,"mouseenter",function(){M.statusContainer.style.display="inline-block"}),mxEvent.addListener(la,"mouseleave",function(){Z||
+(M.statusContainer.style.display="none")}));var da=mxUtils.bind(this,function(pa){null!=M.notificationBtn&&(null!=pa?M.notificationBtn.setAttribute("title",pa):M.notificationBtn.removeAttribute("title"))});la.style.visibility=20>la.clientWidth?"hidden":"";M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=M.getServiceName())if(M.statusContainer.style.display="inline-block",Z=!0,1==M.statusContainer.children.length&&
+""==M.editor.getStatus())la.style.visibility="hidden";else{if(0==M.statusContainer.children.length||1==M.statusContainer.children.length&&"function"===typeof M.statusContainer.firstChild.getAttribute&&null==M.statusContainer.firstChild.getAttribute("class")){var pa=null!=M.statusContainer.firstChild&&"function"===typeof M.statusContainer.firstChild.getAttribute?M.statusContainer.firstChild.getAttribute("title"):M.editor.getStatus();da(pa);var ua=M.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+pa==mxResources.get(ua)+"..."?(M.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',M.statusContainer.style.display="inline-block",Z=!0):6<M.buttonContainer.clientWidth&&(M.statusContainer.style.display="none",Z=!1)}else M.statusContainer.style.display="inline-block",da(null),Z=!0;la.style.visibility=20>la.clientWidth&&!Z?"hidden":""}}));J=D("diagram",null,Editor.menuImage);J.style.boxShadow="none";J.style.padding="6px";J.style.margin=
+"0px";ia.appendChild(J);mxEvent.disableContextMenu(J);mxEvent.addGestureListeners(J,mxUtils.bind(this,function(pa){(mxEvent.isShiftDown(pa)||mxEvent.isAltDown(pa)||mxEvent.isMetaDown(pa)||mxEvent.isControlDown(pa)||mxEvent.isPopupTrigger(pa))&&this.appIconClicked(pa)}),null,null);M.statusContainer.style.position="";M.statusContainer.style.display="none";M.statusContainer.style.margin="0px";M.statusContainer.style.padding="6px 0px";M.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";M.statusContainer.style.display=
+"inline-block";M.statusContainer.style.textOverflow="ellipsis";M.buttonContainer.style.display="inline-block";M.buttonContainer.style.position="relative";M.buttonContainer.style.paddingRight="0px";M.buttonContainer.style.top="0px";var qa=document.createElement("a");qa.style.padding="0px";qa.style.boxShadow="none";qa.className="geMenuItem";qa.style.display="inline-block";qa.style.width="40px";qa.style.height="12px";qa.style.marginBottom="-2px";qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
+")";qa.style.backgroundPosition="top center";qa.style.backgroundRepeat="no-repeat";qa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){X.innerText="";if(!va){var pa=function(ua,Da,Fa,Ma){null!=Da&&ua.setAttribute("title",Da);ua.style.cursor=null!=Fa?Fa:"default";ua.style.margin="2px 0px";X.appendChild(ua);mxUtils.br(X);null!=Ma&&(ua.style.position="relative",ua.style.overflow="visible",Da=document.createElement("div"),Da.style.position="absolute",Da.style.left="34px",Da.style.top=
+"28px",Da.style.fontSize="8px",mxUtils.write(Da,Ma),ua.appendChild(Da));return ua};pa(M.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");pa(M.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");pa(M.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");pa(M.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,fa.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+ua.geometry.width=fa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,Da,Fa,Ma){ua=I("",ua.funct,null,Da,ua,Fa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return pa(ua,null,"pointer",Ma)})(M.actions.get("insertFreehand"),mxResources.get("freehand")+
+" (X)",Editor.freehandImage,"X");J=D("insert",null,Editor.plusImage);J.style.boxShadow="none";J.style.opacity="0.7";J.style.padding="6px";J.style.margin="0px";J.style.height="34px";J.style.width="37px";pa(J,null,"pointer")}"1"!=urlParams.embedInline&&X.appendChild(qa)});mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(X.style,"transform","translate(0, -50%)"),X.style.padding="8px 6px 4px",X.style.top="50%",X.style.bottom="",X.style.height="",qa.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",qa.style.width="40px",qa.style.height="12px",qa.setAttribute("title","Minimize"),va=!1,ja()):(X.innerText="",X.appendChild(qa),mxUtils.setPrefixedStyle(X.style,"transform","translate(0, 0)"),X.style.top="",X.style.bottom="12px",X.style.padding="0px",X.style.height="24px",qa.style.height="24px",qa.style.backgroundImage="url("+Editor.plusImage+")",qa.setAttribute("title",mxResources.get("insert")),qa.style.width="24px",va=!0)}));ja();M.addListener("darkModeChanged",
+ja);M.addListener("sketchModeChanged",ja)}else M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus())}));aa=M.menus.get("viewZoom");if(null!=aa){var sa=function(pa){if(mxEvent.isAltDown(pa))M.hideCurrentMenu(),M.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))M.hideCurrentMenu(),M.actions.get("smartFit").funct(),mxEvent.consume(pa)},ya=M.actions.get("zoomIn"),Aa=M.actions.get("zoomOut"),
+Ea=M.actions.get("resetView"),za=M.actions.get("undo"),Ia=M.actions.get("redo"),Ca=I("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Sa=I("",Ia.funct,null,mxResources.get("redo")+" ("+Ia.shortcut+")",Ia,Editor.redoImage);if(null!=ha){Ea=function(){z.style.display=null!=M.pages&&("0"!=urlParams.pages||1<M.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){z.innerText="";if(null!=M.currentPage){mxUtils.write(z,M.currentPage.getName());var pa=
+null!=M.pages?M.pages.length:1,ua=M.getPageIndex(M.currentPage);ua=null!=ua?ua+1:1;var Da=M.currentPage.getId();z.setAttribute("title",M.currentPage.getName()+" ("+ua+"/"+pa+")"+(null!=Da?" ["+Da+"]":""))}},Ta=M.actions.get("delete"),Za=I("",Ta.funct,null,mxResources.get("delete"),Ta,Editor.trashImage);Za.style.opacity="0.3";ia.appendChild(Za);Ta.addListener("stateChanged",function(){Za.style.opacity=Ta.enabled?"":"0.3"});var Na=function(){Ca.style.display=0<M.editor.undoManager.history.length||fa.isEditing()?
+"inline-block":"none";Sa.style.display=Ca.style.display;Ca.style.opacity=za.enabled?"":"0.3";Sa.style.opacity=Ia.enabled?"":"0.3"};ia.appendChild(Ca);ia.appendChild(Sa);za.addListener("stateChanged",Na);Ia.addListener("stateChanged",Na);Na();var z=this.createPageMenuTab(!1,!0);z.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";ha.appendChild(z);M.editor.addListener("pagesPatched",Pa);M.editor.addListener("pageSelected",
+Pa);M.editor.addListener("pageRenamed",Pa);M.editor.addListener("fileLoaded",Pa);Pa();M.addListener("fileDescriptorChanged",Ea);M.addListener("pagesVisibleChanged",Ea);M.editor.addListener("pagesPatched",Ea);Ea();Ea=I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Aa,Editor.zoomOutImage);ha.appendChild(Ea);var J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom"));J.innerHTML="100%";J.style.display="inline-block";J.style.color="inherit";J.style.cursor=
+"pointer";J.style.textAlign="center";J.style.whiteSpace="nowrap";J.style.paddingRight="10px";J.style.textDecoration="none";J.style.verticalAlign="top";J.style.padding="6px 0";J.style.fontSize="14px";J.style.width="40px";ha.appendChild(J);aa=I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ya,Editor.zoomInImage);ha.appendChild(aa);"1"==urlParams.embedInline?(ha.appendChild(E),aa=M.actions.get("exit"),ha.appendChild(I("",aa.funct,null,mxResources.get("exit"),aa,Editor.closeImage))):
+E.parentNode.removeChild(E);M.tabContainer.style.visibility="hidden";la.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;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ia.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;";
+ha.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;";N.appendChild(ia);N.appendChild(ha);X.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&&(X.style.touchAction="none");N.appendChild(X);window.setTimeout(function(){mxUtils.setPrefixedStyle(X.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(N)}else{var O=I("",sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ea,Editor.zoomFitImage);la.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";J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");J.style.whiteSpace="nowrap";J.style.paddingRight=
+"10px";J.style.textDecoration="none";J.style.textDecoration="none";J.style.overflow="hidden";J.style.visibility="hidden";J.style.textAlign="center";J.style.cursor="pointer";J.style.height=parseInt(M.tabContainerHeight)-1+"px";J.style.lineHeight=parseInt(M.tabContainerHeight)+1+"px";J.style.position="absolute";J.style.display="block";J.style.fontSize="12px";J.style.width="59px";J.style.right="0px";J.style.bottom="0px";J.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";J.style.backgroundPosition=
+"right 6px center";J.style.backgroundRepeat="no-repeat";N.appendChild(J)}(function(pa){mxEvent.addListener(pa,"click",sa);var ua=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*M.editor.graph.view.scale)+"%")});M.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);M.editor.addListener("resetGraphView",ua);M.editor.addListener("pageSelected",ua)})(J);var U=M.setGraphEnabled;M.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(J.style.visibility=
+this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ha?this.tabContainerHeight+"px":"0px")}}N.appendChild(la);N.appendChild(M.diagramContainer);T.appendChild(N);M.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ha&&N.appendChild(M.tabContainer);var W=null;S();mxEvent.addListener(window,"resize",function(){S();null!=M.sidebarWindow&&M.sidebarWindow.window.fit();
+null!=M.formatWindow&&M.formatWindow.window.fit();null!=M.actions.outlineWindow&&M.actions.outlineWindow.window.fit();null!=M.actions.layersWindow&&M.actions.layersWindow.window.fit();null!=M.menus.tagsWindow&&M.menus.tagsWindow.window.fit();null!=M.menus.findWindow&&M.menus.findWindow.window.fit();null!=M.menus.findReplaceWindow&&M.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";X.style.transform="";mxEvent.addGestureListeners(M.diagramContainer.parentNode,
+function(pa){mxEvent.getSource(pa)==M.diagramContainer.parentNode&&(M.embedExitPoint=new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),M.sendEmbeddedSvgExport())});T=document.createElement("div");T.style.position="absolute";T.style.width="10px";T.style.height="10px";T.style.borderRadius="5px";T.style.border="1px solid gray";T.style.background="#ffffff";T.style.cursor="row-resize";M.diagramContainer.parentNode.appendChild(T);M.bottomResizer=T;var ea=null,ka=null,xa=null,ta=null;mxEvent.addGestureListeners(T,
+function(pa){ta=parseInt(M.diagramContainer.style.height);ka=mxEvent.getClientY(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});T=T.cloneNode(!1);T.style.cursor="col-resize";M.diagramContainer.parentNode.appendChild(T);M.rightResizer=T;mxEvent.addGestureListeners(T,function(pa){xa=parseInt(M.diagramContainer.style.width);ea=mxEvent.getClientX(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});mxEvent.addGestureListeners(document.body,null,function(pa){var ua=!1;null!=ea&&(M.diagramContainer.style.width=
+Math.max(20,xa+mxEvent.getClientX(pa)-ea)+"px",ua=!0);null!=ka&&(M.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(pa)-ka)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:M.diagramContainer.getBoundingClientRect()}),"*"),q(),M.refresh())},function(pa){null==ea&&null==ka||mxEvent.consume(pa);ka=ea=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
+M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}"1"==urlParams.prefetchFonts&&M.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;F.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+
-" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
-P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=P[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var J=0<=H;J&&this.selectPage(H);return J};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var J=H.src,
-D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=y.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var G=this.view.graphBounds,D=this.view.translate;F.setAttribute("viewBox",G.x+D.x-this.panDx+" "+(G.y+D.y-this.panDy)+
+" "+(G.width+1)+" "+(G.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",G))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(G){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(G){return L.getImageUrl(G)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
+P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(G){var D=P[L.currentPage];return"page"==G?D.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==G?L.currentPage+1:"pagecount"==G?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(G){this.handlingResize||(this.currentPage=mxUtils.mod(G,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(G){G=this.getIndexById(G);var D=0<=G;D&&this.selectPage(G);return D};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(G){if(null!=G&&Graph.isPageLink(G.src)){var D=G.src,
+I=D.indexOf(",");0<I&&(I=L.getIndexById(D.substring(I+1)),0<=I&&(G=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[I])),G.originalSrc=D))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(G){var D=y.apply(this,arguments);G=this.backgroundImage;if(null!=G){var I=this.view.translate,H=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((I.x+G.x)*H,(I.y+G.y)*H,G.width*H,G.height*H))}return D};this.addListener("xmlNodeChanged",d);d();
+urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var J=H.indexOf(",");K.selectPageById(H.substring(J+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(G){if(Graph.isPageLink(G)){var D=G.indexOf(",");L.selectPageById(G.substring(D+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(G);return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
@@ -4096,36 +4107,36 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
-P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};K={left:K.left-P.left,top:K.top-P.top,bottom:K.bottom-P.top,right:K.right-P.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
+P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};L={left:L.left-P.left,top:L.top-P.top,bottom:L.bottom-P.top,right:L.right-P.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var F=mxUtils.bind(this,function(K){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty||
-null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;F(K)}};
+m);var F=mxUtils.bind(this,function(L){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
+null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(L){e=this.graph.getGraphBounds();C=null;F(L)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var P=b.getCell(m[K]);null!=P&&(e=!0,p[P.id]=!0)}else for(K=0;K<k.length;K++)P=b.getChildAt(b.root,parseInt(k[K])),null!=P&&(e=!0,p[P.id]=!0);for(K=0;e&&
-K<F;K++)P=b.getChildAt(b.root,K),b.setVisible(P,p[P.id]||!1)}else for(K=0;K<F;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var L=0;L<m.length;L++){var P=b.getCell(m[L]);null!=P&&(e=!0,p[P.id]=!0)}else for(L=0;L<k.length;L++)P=b.getChildAt(b.root,parseInt(k[L])),null!=P&&(e=!0,p[P.id]=!0);for(L=0;e&&
+L<F;L++)P=b.getChildAt(b.root,L),b.setVisible(P,p[P.id]||!1)}else for(L=0;L<F;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
-e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
-m=null}),100)}),oa||200)}),p=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var F=this.graph,K=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(oa,
-S){},mouseUp:function(oa,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<K&&Math.abs(this.scrollTop-F.container.scrollTop)<K&&Math.abs(this.startX-S.getGraphX())<K&&Math.abs(this.startY-S.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,S,fa,ia){oa=this.createToolbarButton(oa,S,fa,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,y=null,u=null,H=0;H<P.length;H++){var J=P[H];if("pages"==
-J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";J=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",J);J()}else if("zoom"==J)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var W=this.graph.getModel(),T=f(mxUtils.bind(this,function(oa){if(null!=
-g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var fa=this.graph.getGraphBounds(),ia=this.graph.view;0>fa.x||0>fa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<fa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<fa.y/ia.scale+this.graph.originalViewState.translate.y-
-ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var S=mxUtils.getDocumentScrollOrigin(document);g.style.left=S.x+oa.left-1+"px";g.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");W.addListener(mxEvent.CHANGE,function(){T.style.display=1<W.getChildCount(W.root)?"inline-block":"none"});T.style.display=
-1<W.getChildCount(W.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Z=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
-x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});oa=Z.getBoundingClientRect();var S=mxUtils.getDocumentScrollOrigin(document);y.style.left=S.x+oa.left-1+"px";y.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");W.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null==
-J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
-e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var N=b.style.border,qa=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=b.getBoundingClientRect(),S=mxUtils.getScrollOrigin(document.body);S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};oa={left:oa.left-
-S.left,top:oa.top-S.top,bottom:oa.bottom-S.top,right:oa.right-S.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==N&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var fa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=g&&
-(g.parentNode.removeChild(g),g=null);b.style.border=N});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}fa()});mxEvent.addListener(document.body,"mouseleave",function(ia){fa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-e.parentNode&&qa()})).observe(b)};
+e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
+m=null}),100)}),ra||200)}),p=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ra||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ra){mxEvent.consume(ra)});mxEvent.addListener(e,"mouseenter",
+mxUtils.bind(this,function(ra){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ra){p(100);mxEvent.consume(ra)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||p(30)}));var F=this.graph,L=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ra,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(ra,
+ba){},mouseUp:function(ra,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<L&&Math.abs(this.scrollTop-F.container.scrollTop)<L&&Math.abs(this.startX-ba.getGraphX())<L&&Math.abs(this.startY-ba.getGraphY())<L&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(ra,ba,oa,na){ra=this.createToolbarButton(ra,ba,oa,na);e.appendChild(ra);d++;return ra}),g=null,x=null,y=null,t=null,G=0;G<P.length;G++){var D=P[G];
+if("pages"==D){t=b.ownerDocument.createElement("div");t.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(t,70);var I=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");I.style.borderRightStyle="none";I.style.paddingLeft="0px";I.style.paddingRight="0px";e.appendChild(t);var H=f(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";D=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";I.style.display=t.style.display;H.style.display=t.style.display});this.addListener("graphChanged",D);D()}else if("zoom"==D)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==D){if(this.layersEnabled){var S=this.graph.getModel(),T=f(mxUtils.bind(this,function(ra){if(null!=
+g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),na=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale}):null!=this.graph.originalViewState&&0<oa.x/na.scale+this.graph.originalViewState.translate.x-na.translate.x&&0<oa.y/na.scale+this.graph.originalViewState.translate.y-
+na.translate.y&&(na.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ra=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
+g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var ba=mxUtils.getDocumentScrollOrigin(document);g.style.left=ba.x+ra.left-1+"px";g.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");S.addListener(mxEvent.CHANGE,function(){T.style.display=1<S.getChildCount(S.root)?"inline-block":"none"});T.style.display=
+1<S.getChildCount(S.root)?"inline-block":"none"}}else if("tags"==D){if(this.tagsEnabled){var M=f(mxUtils.bind(this,function(ra){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
+x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});ra=M.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);y.style.left=ba.x+ra.left-1+"px";y.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");S.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==D?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(D=this.graphConfig["toolbar-buttons"][D],null!=D&&(D.elem=f(null==
+D.enabled||D.enabled?D.handler:function(){},D.image,D.title,D.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
+e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var fa=b.style.border,la=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ra=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ra={left:ra.left-
+ba.left,top:ra.top-ba.top,bottom:ra.bottom-ba.top,right:ra.right-ba.left};e.style.left=ra.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ra.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ra.top+1+"px"):e.style.top=ra.top+"px";"1px solid transparent"==fa&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
+g&&(g.parentNode.removeChild(g),g=null);b.style.border=fa});mxEvent.addListener(document,"mousemove",function(na){for(na=mxEvent.getSource(na);null!=na;){if(na==b||na==e||na==g)return;na=na.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(na){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",la):la();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+e.parentNode&&la()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,m){if(null==m)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==m;)"a"==C.nodeName.toLowerCase()&&(m=C.getAttribute("href")),C=C.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(k):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
@@ -4136,10 +4147,10 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var K=m.editor.graph,P=K.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var L=m.editor.graph,P=L.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
+"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var C=m[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(m[k]))}return e};
@@ -4148,8 +4159,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached=
new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],u=y.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var W,T,Z,N;x=function(){if((Z=g.offsetWidth)!=W||(N=g.offsetHeight)!=T)D=!0,W=Z,T=N;J()};var qa=function(oa,
-S,fa){oa.attachEvent?oa.attachEvent("on"+S,fa):oa.addEventListener(S,fa)};qa(y,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],K)}else F(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
+g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],t=y.childNodes[0],G=g.resizeSensor.childNodes[1],D=function(){t.style.width="100000px";t.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};D();var I=!1,H=function(){g.resizedAttached&&(I&&(g.resizedAttached.call(),I=!1),b(H))};b(H);var S,T,M,fa;x=function(){if((M=g.offsetWidth)!=S||(fa=g.offsetHeight)!=T)I=!0,S=M,T=fa;D()};var la=function(ra,
+ba,oa){ra.attachEvent?ra.attachEvent("on"+ba,oa):ra.addEventListener(ba,oa)};la(y,"scroll",x);la(G,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],L)}else F(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},