draw.io is a JavaScript, client-side editor for general diagramming.
28.0.4 release
David Bensonf2c89157d2dd
diff --git a/ChangeLog b/ChangeLogindex cf2efd2da..11f600492 100644--- a/ChangeLog+++ b/ChangeLog@@ -1,3 +1,10 @@+12-JUL-2025: 28.0.4++- Adds pages option to export URL dialog+- Handles backgroundColor in HTML to SVG+- Adds resizing for plantuml and mermaid edit dialog+- Removes image option in plantuml dialog+11-JUL-2025: 28.0.3- Activates convert HTML to SVG and removes feature flagdiff --git a/VERSION b/VERSIONindex 1d3a8525d..aef06cfdc 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-28.0.3\ No newline at end of file+28.0.4\ No newline at end of filediff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.jsindex 44163b22a..5a0d57515 100644--- a/src/main/webapp/js/app.min.js+++ b/src/main/webapp/js/app.min.js@@ -62,7 +62,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"28.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -442,9 +442,9 @@ mxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r){k=null!=k&&"verticl+"; ");null!=m&&(d+="border-width: 1px; border-style: solid; border-color: inherit; border: 1px solid "+m+"; ");""==c||g?p+=d:q+=d;e&&(k&&0<b||!k&&0<a)?(p+="white-space: normal; word-wrap: "+mxConstants.WORD_WRAP+"; ",k?v="height: "+Math.round(b)+"px; ":u="width: "+Math.round(a)+"px; ",""!=c&&"fill"!=f&&(k?y=0:t=0)):(p+="white-space: nowrap; ",""==c&&"block"!=f&&(y=0));r(y,t,n+u+v,q+c,p,c)};mxSvgCanvas2D.prototype.getTextCss=function(){var a=this.state,b=mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;b="display: inline-block; font-size: "+mxUtils.htmlEntities(a.fontSize)+"px; font-family: "+mxUtils.parseCssFontFamily(a.fontFamily,!0)+"; color: "+this.getLightDarkColor(mxUtils.htmlEntities(a.fontColor)).cssText+"; line-height: "+mxUtils.htmlEntities(b)+"; pointer-events: "+(this.pointerEvents?mxUtils.htmlEntities(this.pointerEventsValue):"none")+"; ";(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="font-weight: bold; ");(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="font-style: italic; ");var c=[];(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push("underline");(a.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push("line-through");0<c.length&&(b+="text-decoration: "+c.join(" ")+"; ");return b};-mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):"SUP"==l.nodeName||"SUB"==l.nodeName||"B"==l.nodeName||"I"==l.nodeName||"SPAN"==l.nodeName||"FONT"==l.nodeName||"STRIKE"==l.nodeName||"U"==l.nodeName?(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),-k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration","line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration",-"underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d)):e=!1;l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};+mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):""!=l.style.backgroundColor||"SUP"!=l.nodeName&&"SUB"!=l.nodeName&&"B"!=l.nodeName&&"I"!=l.nodeName&&"SPAN"!=l.nodeName&&"FONT"!=l.nodeName&&"STRIKE"!=l.nodeName&&"U"!=l.nodeName?e=!1:(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),+""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration",+"line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration","underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d));l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e)if(p=null!=p?p:0,this.foEnabled&&"html"==l){var r=this.createDiv(e);if(null!=r){var t=this.createElement("text"),u=new mxPoint(0,0);this.allowConvertHtmlToSvg&&this.convertHtmlToSvg(r.firstChild.firstChild,t,u)?(0>u.y&&g==mxConstants.ALIGN_TOP?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_BOTTOM?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_TOP&&(t.style.transform="translateY("+u.y+"em)"),this.plainText(a+this.state.dx,b+this.state.dy,c,d,"",f,g,k,m,n,p,q,t)):(null!=q&&"vertical-"!=q.substring(0,9)&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))}}else this.plainText(a+this.state.dx,b+this.state.dy,c,d,e,f,g,k,m,n,p,q)};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;e=this.createElement("clipPath");e.setAttribute("id",g);g=this.createElement("rect");g.setAttribute("x",a);g.setAttribute("y",b);g.setAttribute("width",c);g.setAttribute("height",d);e.appendChild(g);return e};@@ -1998,8 +1998,8 @@ Editor.toUnit=function(a,b){return b==mxConstants.INCHES?Math.round(100*a/mxConsEditor.fromUnit=function(a,b){return b==mxConstants.INCHES?Math.round(a*mxConstants.PIXELS_PER_INCH):b==mxConstants.MILLIMETERS?Math.round(a*mxConstants.PIXELS_PER_MM):b==mxConstants.METERS?Math.round(a*mxConstants.PIXELS_PER_MM*1E3):Math.round(a)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};-Editor.prototype.editAsNew=function(a,b,f,e){b=null!=b?"?title="+encodeURIComponent(b):"";f?(b+=(0<b.length?"&":"?")+"lightbox=1",null!=e&&(b+="&page-id="+e)):null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,d=mxUtils.bind(this,function(h){"ready"==h.data&&h.source==g&&(mxEvent.removeListener(window,"message",d),g.postMessage(a,"*"))});mxEvent.addListener(window,-"message",d);g=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};+Editor.prototype.editAsNew=function(a,b,f,e){b=null!=b?"?title="+encodeURIComponent(b):"";f?b+=(0<b.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);null!=e&&(b+=(0<b.length?"&":"?")+"page-id="+e);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,d=mxUtils.bind(this,function(h){"ready"==h.data&&h.source==g&&(mxEvent.removeListener(window,"message",d),g.postMessage(a,"*"))});+mxEvent.addListener(window,"message",d);g=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,e=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!e.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};@@ -2180,23 +2180,23 @@ mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appe600)}),aa||200)}),J=mxUtils.bind(this,function(aa){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,aa||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(aa){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=M.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=P.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));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(aa)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){M.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(aa){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(aa)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(y=0;y<this.lightboxToolbarActions.length;y++){var L=this.lightboxToolbarActions[y];L.elem=d(L.fn,L.icon,L.tooltip)}if(null!=g.refreshBtn){var W=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);d(mxUtils.bind(this,function(aa){null!=-W?window.location.href=W:window.location.reload();mxEvent.consume(aa)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(aa){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(aa)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&d(mxUtils.bind(this,function(aa){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(aa))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||-(mxEvent.isShiftDown(aa)||J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(aa){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(aa)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(aa){mxEvent.isShiftDown(aa)?G():J(100);mxEvent.consume(aa)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||J(30)}));var X=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(aa,P){},mouseUp:function(aa,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<X&&Math.abs(this.scrollTop-a.container.scrollTop)<-X&&Math.abs(this.startX-P.getGraphX())<X&&Math.abs(this.startY-P.getGraphY())<X&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var T=a.view.validate,N=new mxPoint,ca=!1,H=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=f.currentPage&&H!=f.currentPage){H=f.currentPage;ca=!0;var aa=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);-null==aa&&(aa=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));aa=a.getPageLayout(aa,N,1);var P=a.getDefaultTranslate(aa);this.x0=aa.x;this.y0=aa.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();aa=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=aa||this.translate.y!=P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,-arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=ma||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*-this.view.scale),this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ea=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&-(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ea.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ea.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";ea.style.transform=""},0)):(la.style.transform="",ea.style.transform=""),-a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=V&&(Ja=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(Ja+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor--1)),!mxUtils.hasScrollbars(a.container)||0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/-2));aa?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,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;if(a.isFastZoomEnabled()){null==ia&&""!=la.getAttribute("filter")&&(ia=la.getAttribute("filter"),la.removeAttribute("filter"));Y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);aa=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=P||null==V?a.container.scrollLeft+a.container.clientWidth/2:V.x+a.container.scrollLeft-a.container.offsetLeft;-var Ja=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+aa+")";ea.style.transformOrigin=ma+"px "+Ja+"px";ea.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/2+a.container.scrollLeft-ma.offsetLeft+-"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",+P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(aa)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){M.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(aa){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();+else if("_blank"==this.editor.editButtonLink){var P=null!=this.currentPage?this.currentPage.getId():null;this.editor.editAsNew(this.getEditBlankXml(),null,null,P)}else a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(aa)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(y=0;y<this.lightboxToolbarActions.length;y++){var L=this.lightboxToolbarActions[y];L.elem=d(L.fn,L.icon,L.tooltip)}if(null!=g.refreshBtn){var W=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);+d(mxUtils.bind(this,function(aa){null!=W?window.location.href=W:window.location.reload();mxEvent.consume(aa)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(aa){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(aa)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||+a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,function(aa){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(aa))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":+"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(mxEvent.isShiftDown(aa)||J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(aa){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(aa)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(aa){mxEvent.isShiftDown(aa)?+G():J(100);mxEvent.consume(aa)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||J(30)}));var X=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(aa,P){},mouseUp:function(aa,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-+a.container.scrollLeft)<X&&Math.abs(this.scrollTop-a.container.scrollTop)<X&&Math.abs(this.startX-P.getGraphX())<X&&Math.abs(this.startY-P.getGraphY())<X&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var T=a.view.validate,N=new mxPoint,ca=!1,H=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=f.currentPage&&H!=f.currentPage){H=f.currentPage;+ca=!0;var aa=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==aa&&(aa=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));aa=a.getPageLayout(aa,N,1);var P=a.getDefaultTranslate(aa);this.x0=aa.x;this.y0=aa.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();aa=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=aa||this.translate.y!=+P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=ma||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);+this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*this.view.scale),this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ea=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||+ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ea.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ea.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";+ea.style.transform=""},0)):(la.style.transform="",ea.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=V&&(Ja=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(Ja+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,+null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft++a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));aa?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,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;if(a.isFastZoomEnabled()){null==ia&&""!=la.getAttribute("filter")&&(ia=la.getAttribute("filter"),la.removeAttribute("filter"));Y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);aa=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=P||null==V?a.container.scrollLeft+a.container.clientWidth/+2:V.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+aa+")";ea.style.transformOrigin=ma+"px "+Ja+"px";ea.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/+2+a.container.scrollLeft-ma.offsetLeft+"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",aa))}ta(a.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(a.container,function(aa){null!=O&&window.clearTimeout(O)},null,function(aa){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(aa){null==O||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(aa,P,ba,ma,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(aa))ba=a.view.getTranslate(),ma=40/a.view.scale,mxEvent.isShiftDown(aa)?a.view.setTranslate(ba.x+(P?-ma:ma),ba.y):a.view.setTranslate(ba.x,ba.y+(P?ma:-ma));else if(ba||a.isZoomWheelEvent(aa))for(var na=mxEvent.getSource(aa);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),V=null!=ma&&null!=Ja?new mxPoint(ma,Ja):new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ha=ba,ba=a.zoomFactor,ma=null,aa.ctrlKey&&null!=aa.deltaY&&40>Math.abs(aa.deltaY)&&Math.round(aa.deltaY)!=aa.deltaY?ba=1+Math.abs(aa.deltaY)/20*(ba-1):null!=aa.movementY&&"pointermove"==aa.type&&(ba=1+Math.max(1,Math.abs(aa.movementY))/20*(ba-1),ma=-1),a.lazyZoom(P,null,ma,ba),mxEvent.consume(aa),!1;na=na.parentNode}}),a.container);a.panningHandler.zoomGraph=function(aa){a.cumulativeZoomFactor=aa.scale;a.lazyZoom(0<aa.scale,!0);mxEvent.consume(aa)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};@@ -3777,16 +3777,19 @@ ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(f){var e=a.editor.graph;e.getModel().beginUpdate();try{e.setCellStyles(b,f),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[f],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}}};ColorDialog.recentColors=[];ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href",-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,h,m,p,k,v,w,y,C,D){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");-m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";G.style.display="flex";G.style.whiteSpace="nowrap";G.style.alignItems="center";G.style.justifyContent="end";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(G);null!=D&&-m.appendChild(D);var J=document.createElement("textarea");v?J.setAttribute("wrap","off"):J.style.wordBreak="break-all";J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");mxUtils.write(J,f||"");J.style.resize="none";J.style.outline="none";J.style.position="absolute";J.style.boxSizing="border-box";J.style.top="0px";J.style.left="0px";J.style.height="100%";J.style.width="100%";this.textarea=J;this.init=-function(){J.focus();J.scrollTop=0};E.appendChild(J);null==y||a.isOffline()||G.appendChild(a.createHelpIcon(y));if(null!=C)for(b=0;b<C.length;b++)(function(Q,L,W){Q=mxUtils.button(Q,function(X){L(X,J)});null!=W&&Q.setAttribute("title",W);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,J);if(null!=-e){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();e(J.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";G.appendChild(M);mxEvent.addListener(J,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&M.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck",-"false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";var e=a.getDiagramSnapshot();f.value=mxUtils.getPrettyXml(e.node);b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),f.addEventListener("drop",function(m){m.stopPropagation();-m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;p.onload=function(k){f.value=k.target.result};p.readAsText(m)}else f.value=a.extractGraphModelFromEvent(m)},!1));var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var h=document.createElement("option");-h.setAttribute("value","apply");mxUtils.write(h,mxResources.get("apply",null,"Update Existing Drawing"));d.appendChild(h)}a.editor.graph.isEnabled()&&(h=document.createElement("option"),h.setAttribute("value","insert"),mxUtils.write(h,mxResources.get("insert")),d.appendChild(h));h=document.createElement("option");h.setAttribute("value","new");mxUtils.write(h,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&!navigator.standalone&&d.appendChild(h);b.appendChild(d);h=mxUtils.button(mxResources.get("ok"),-function(){var m=Graph.zapGremlins(mxUtils.trim(f.value)),p=null;if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement,v=Editor.extractParserError(k,mxResources.get("unknownError"));v?(EditorUi.debug("EditDiagramDialogParserError",[this],"node",[k],"cause",[v]),p=mxResources.get("invalidInput")+" ("+v+")"):("mxfile"==k.nodeName?a.editor.setGraphXml(k):a.updateDiagramData(e,k),a.hideDialog())}catch(D){p=D}else if("insert"==d.value){a.editor.graph.model.beginUpdate();-try{var w=mxUtils.parseXml(m),y=new mxGraphModel;(new mxCodec(w)).decode(w.documentElement,y);var C=y.getChildren(y.getChildAt(y.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(C));a.hideDialog()}catch(D){p=D}finally{a.editor.graph.model.endUpdate()}}null!=p&&a.handleError(p)});h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},SimpleTextareaDialog=function(a,b,f){var e=document.createElement("div"),g=document.createElement("textarea");g.style.position="absolute";g.style.left="30px";g.style.right="30px";g.style.top="30px";g.style.bottom="100px";g.style.resize=+"none";g.setAttribute("wrap","off");g.setAttribute("spellcheck","false");g.setAttribute("autocorrect","off");g.setAttribute("autocomplete","off");g.setAttribute("autocapitalize","off");g.value=null!=b?b:"";e.appendChild(g);b=document.createElement("div");b.style.position="absolute";b.style.bottom="46px";b.style.right="30px";b.style.left="30px";b.style.justifyContent="end";b.style.display="flex";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.setAttribute("title","Escape");+d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);var h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f(g.value)});h.setAttribute("title","Ctrl+Enter");h.className="geBtn gePrimaryBtn";b.appendChild(h);mxEvent.addListener(g,"keydown",function(m){13==m.keyCode&&mxEvent.isControlDown(m)&&h.click()});a.editor.cancelFirst||b.appendChild(d);this.init=function(){g.focus();g.scrollTop=0};e.appendChild(b);this.container=e},TextareaDialog=function(a,b,f,e,g,d,h,m,p,k,v,w,y,C,D){k=+null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";G.style.display="flex";G.style.whiteSpace="nowrap";G.style.alignItems="center";G.style.justifyContent="end";G.style.bottom="0px";+G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(G);null!=D&&m.appendChild(D);var J=document.createElement("textarea");v?J.setAttribute("wrap","off"):J.style.wordBreak="break-all";J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");mxUtils.write(J,f||"");J.style.resize="none";J.style.outline=+"none";J.style.position="absolute";J.style.boxSizing="border-box";J.style.top="0px";J.style.left="0px";J.style.height="100%";J.style.width="100%";this.textarea=J;this.init=function(){J.focus();J.scrollTop=0};E.appendChild(J);null==y||a.isOffline()||G.appendChild(a.createHelpIcon(y));if(null!=C)for(b=0;b<C.length;b++)(function(Q,L,W){Q=mxUtils.button(Q,function(X){L(X,J)});null!=W&&Q.setAttribute("title",W);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),+function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,J);if(null!=e){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();e(J.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";G.appendChild(M);mxEvent.addListener(J,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&M.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=h},EditDiagramDialog=+function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";var e=a.getDiagramSnapshot();f.value=mxUtils.getPrettyXml(e.node);b.appendChild(f);this.init=+function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),f.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;p.onload=function(k){f.value=k.target.result};p.readAsText(m)}else f.value=a.extractGraphModelFromEvent(m)},!1));var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&+b.appendChild(g);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var h=document.createElement("option");h.setAttribute("value","apply");mxUtils.write(h,mxResources.get("apply",null,"Update Existing Drawing"));d.appendChild(h)}a.editor.graph.isEnabled()&&(h=document.createElement("option"),h.setAttribute("value","insert"),mxUtils.write(h,mxResources.get("insert")),d.appendChild(h));h=document.createElement("option");+h.setAttribute("value","new");mxUtils.write(h,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&!navigator.standalone&&d.appendChild(h);b.appendChild(d);h=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(f.value)),p=null;if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement,v=Editor.extractParserError(k,mxResources.get("unknownError"));v?(EditorUi.debug("EditDiagramDialogParserError",+[this],"node",[k],"cause",[v]),p=mxResources.get("invalidInput")+" ("+v+")"):("mxfile"==k.nodeName?a.editor.setGraphXml(k):a.updateDiagramData(e,k),a.hideDialog())}catch(D){p=D}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var w=mxUtils.parseXml(m),y=new mxGraphModel;(new mxCodec(w)).decode(w.documentElement,y);var C=y.getChildren(y.getChildAt(y.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(C));a.hideDialog()}catch(D){p=D}finally{a.editor.graph.model.endUpdate()}}null!=+p&&a.handleError(p)});h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;var ExportDialog=function(a){function b(){var T=v.value,N=T.lastIndexOf(".");v.value=0<N?T.substring(0,N+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),C.setAttribute("disabled","true"),D.setAttribute("disabled","true"),L.setAttribute("disabled","true")):(y.removeAttribute("disabled"),C.removeAttribute("disabled"),D.removeAttribute("disabled"),L.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*D.value>MAX_AREA||0>=C.value?"red":"";D.style.backgroundColor=C.value*D.value>MAX_AREA||0>=D.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,h=Math.ceil(g.width/d),m=Math.ceil(g.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var v=document.createElement("input");v.setAttribute("value",a.editor.getOrCreateFilename());v.style.width="180px";k=document.createElement("td");k.appendChild(v);g.appendChild(k);@@ -11924,24 +11927,24 @@ function(t){k&&(window.clearTimeout(c),this.sync.cleanup(b,f,t))}),p,q):this.updDrawioFile.prototype.updateFile=function(b,f,k,c,p){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",p,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=q?this.mergeFile(q,b,f,c,p):this.reloadFile(b,f))}catch(t){null!=f&&f(t)}}),f))};DrawioFile.prototype.mergeFile=function(b,f,k,c,p){try{var q=b.getShadowPages();if(null!=q&&0<q.length){var t=this.getShadowPages(),y=[this.ui.diffPages(null!=c?c:t,q)],H=this.ignorePatches(y);if(H)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",H),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(t,-this.isRealtime()?this.ownPages:this.ui.pages):null,D=this.ui.patchPages(this.ui.clonePages(t),y[0]),d=this.ui.getHashValueForPages(D,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",t,"pages",q,"patched",D,"patches",y,"changes",F,"checksum",d,"current",g,"valid",d==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",p);if(null!=d&&d!=g)this.checksumError(k,y,null,null,"mergeFile",+this.isRealtime()?this.ownPages:this.ui.pages):null,E=this.ui.patchPages(this.ui.clonePages(t),y[0]),d=this.ui.getHashValueForPages(E,{}),g=this.ui.getHashValueForPages(q,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",t,"pages",q,"patched",E,"patches",y,"changes",F,"checksum",d,"current",g,"valid",d==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",p);if(null!=d&&d!=g)this.checksumError(k,y,null,null,"mergeFile",d,g,b.getCurrentRevisionId());else{this.setShadowPages(q);if(null!=this.sync){var l=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?F:null,null,p);null==l||mxUtils.isEmptyObject(l)||y.push(l)}this.patch(y,DrawioFile.LAST_WRITE_WINS?F:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(z);try{var n=this.getCurrentUser(),x=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,z)}catch(B){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=k&&k(z)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var p=f.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(p=this.ui.anonymizeNode(p,!0));p.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,p,!0);k.appendChild(p)}return mxUtils.getPrettyXml(k)};DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,f,k,c,p,q,t,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var H=this.getCurrentUser(),F=null!=H?H.id:"unknown",D=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(f).length,g=null;if(null!=f&&1E3>d){b=[];for(k=0;k<f.length;k++)b.push(this.ui.anonymizePatch(f[k]));g=JSON.stringify(b);g=null!=g&&1E3>+DrawioFile.prototype.checksumError=function(b,f,k,c,p,q,t,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var H=this.getCurrentUser(),F=null!=H?H.id:"unknown",E=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(f).length,g=null;if(null!=f&&1E3>d){b=[];for(k=0;k<f.length;k++)b.push(this.ui.anonymizePatch(f[k]));g=JSON.stringify(b);g=null!=g&&1E3>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var n=null!=g?"report":"error",x=this.ui.getHashValueForPages(l.getShadowPages()),z="unknown",B="unknown",I="unknown";try{var G=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=G&&(null!=G.getAttribute("version")&&(z=G.getAttribute("version")),null!=G.getAttribute("agent")&&(B=G.getAttribute("agent")),null!=G.getAttribute("type")&&(I=G.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+-n+" in "+p,null,this.getMode()+"."+D,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=t?"-current_"+t:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+B)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+D,action:p,label:"user_"++n+" in "+p,null,this.getMode()+"."+E,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=q?"-expected_"+q:"")+(null!=t?"-current_"+t:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+B)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+E,action:p,label:"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+f.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(l){}};-DrawioFile.prototype.sendErrorReport=function(b,f,k,c){try{var p=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),y=null!=t?this.ui.hashValue(t.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),D=F.lastIndexOf(".");t="xml";0<D&&(t=F.substring(D));var d=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++DrawioFile.prototype.sendErrorReport=function(b,f,k,c){try{var p=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),y=null!=t?this.ui.hashValue(t.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),E=F.lastIndexOf(".");t="xml";0<E&&(t=F.substring(E));var d=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()+" ("+t+")\nUser="+y+H+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+d+"\n\nShadow:\n"+p+"\n\nData:\n"+q,c)}catch(g){}};DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var k=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,p=c.getSelectionCells(),q=c.getViewState(),t=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(y){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[k],"viewState",[q],"latestFile",y);null!=y?(this.ui.replaceFileData(y.getData(),[k]),this.ui.restoreViewState(t,q,p),this.setDescriptor(y.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var H=this.ui.getCurrentFile();null!=H&&(H.stats=this.stats,H.patch([k]),H.fileChanged());this.ui.restoreViewState(t,q,p);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(y){null!=f&&f(y)}};DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var k=0;k<b.length&&f;k++)f=f&&mxUtils.isEmptyObject(b[k]);return f};-DrawioFile.prototype.patch=function(b,f,k,c){if(null!=b){var p=this.ui.editor.undoManager,q=p.history.slice(),t=p.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var H=this.changeListenerEnabled;this.changeListenerEnabled=k;var F=y.foldingEnabled,D=y.mathEnabled,d=y.cellRenderer.redraw;y.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());d.apply(this,arguments)};y.model.beginUpdate();+DrawioFile.prototype.patch=function(b,f,k,c){if(null!=b){var p=this.ui.editor.undoManager,q=p.history.slice(),t=p.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var H=this.changeListenerEnabled;this.changeListenerEnabled=k;var F=y.foldingEnabled,E=y.mathEnabled,d=y.cellRenderer.redraw;y.cellRenderer.redraw=function(B){B.view.graph.isEditing(B.cell)&&(B.view.graph.scrollCellToVisible(B.cell),B.view.graph.cellEditor.resize());d.apply(this,arguments)};y.model.beginUpdate();try{if(k){for(var g=this.ui.pages.slice(),l=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),x=0;x<n.length;x++){var z=mxUtils.indexOf(this.ui.pages,n[x]);0>z?this.ui.insertPage(n[x],Math.min(x,this.ui.pages.length)):this.ui.movePage(z,x)}for(x=0;x<g.length;x++)0>mxUtils.indexOf(n,g[x])&&this.ui.removePage(g[x]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified());0==this.ui.pages.length&&-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=d;this.changeListenerEnabled=H;k||(p.history=q,p.indexOfNextAdd=t,p.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)D!=y.mathEnabled?(this.ui.editor.updateGraphComponents(),y.refresh()):(F!=y.foldingEnabled?+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=d;this.changeListenerEnabled=H;k||(p.history=q,p.indexOfNextAdd=t,p.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)E!=y.mathEnabled?(this.ui.editor.updateGraphComponents(),y.refresh()):(F!=y.foldingEnabled?y.view.revalidate():y.view.validate(),y.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};DrawioFile.prototype.save=function(b,f,k,c,p,q){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",p,"manual",q,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!p&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=k)k(t);else throw t;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};@@ -11992,7 +11995,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=newthis.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(k){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",k);b(f,k)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};DrawioFile.prototype.fileSaved=function(b,f,k,c,p,q,t){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(q,f,k,c,p,t)}catch(F){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=c&&c(F);try{var y=this.getCurrentUser(),H=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),H,F)}catch(D){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=c&&c(F)}};+this.inConflictState=!0;this.descriptorChanged();null!=c&&c(F);try{var y=this.getCurrentUser(),H=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),H,F)}catch(E){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=c&&c(F)}};DrawioFile.prototype.autosave=function(b,f,k,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var p=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var t=this.isAutosaveRevision();t&&(this.lastAutosaveRevision=(new Date).getTime());this.save(t,mxUtils.bind(this,function(y){this.autosaveCompleted();null!=k&&k(y)}),mxUtils.bind(this,function(y){null!=c&&c(y)}))}else this.isModified()||this.ui.clearStatus(),null!=k&&k(null)}catch(y){null!=c&&c(y)}}),p);this.autosaveThread=q;EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"maxDelay",f,"actualDelay",p,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};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"))};@@ -12001,10 +12004,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(thisDrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,c,p,q,t){DrawioFile.call(this,b,f);this.title=k;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=p;this.desc=q;this.editable=t};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,k,c,p){this.saveAs(this.title,f,k,c,p)};LocalFile.prototype.saveAs=function(b,f,k,c,p){this.saveFile(b,!1,f,k,null,c,p)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};-LocalFile.prototype.saveFile=function(b,f,k,c,p,q,t){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;p||this.updateFileData();var y=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var H=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),D=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+LocalFile.prototype.saveFile=function(b,f,k,c,p,q,t){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;p||this.updateFileData();var y=Editor.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var H=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),E=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft(H);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[x],"conflict",this.desc.lastModified!=x.lastModified);t||this.desc.lastModified==x.lastModified?n.write(y?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var B=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(H,B,F,g);this.removeDraft()}catch(I){g(I)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(x){this.invalidFileHandle=!0;g(x)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,y?"image/png":"text/xml",y);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));F()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){D(d)}),c,this.ui.getCurrentFile()!=this?H:null,f.scale,f.border)):D(H)};+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));F()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){E(d)}),c,this.ui.getCurrentFile()!=this?H:null,f.scale,f.border)):E(H)};LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.etag=this.getEtag(f)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,f){this.getLatestVersionId(b,f)};StorageFile.prototype.getLatestVersionId=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(this.getEtag(k))}),f)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};@@ -12028,15 +12031,15 @@ var StorageDialog=function(b,f,k){function c(d,g,l,n,x,z){function B(){mxEvent.a"ellipsis";G.style.overflow="hidden";G.style.position="absolute";G.style.bottom="8px";G.style.left="0px";G.style.right="0px";mxUtils.write(G,g);I.appendChild(G);if(null!=d){var C=document.createElement("img");C.setAttribute("src",d);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";I.appendChild(C)}else G.style.paddingTop="5px",G.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top="6px"):mxClient.IS_FF&&(G.style.paddingTop="0px",G.style.marginTop="-2px");if(null!=x)for(d=0;d<x.length;d++)mxUtils.br(G),mxUtils.write(G,x[d]);if(null!=n&&null==b[n]){C.style.visibility="hidden";mxUtils.setOpacity(G,10);var Q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});Q.spin(I);var U=window.setTimeout(function(){null==b[n]&&(Q.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(T,P){null!=b[n]&&P.getProperty("client")==b[n]&&(window.clearTimeout(U),mxUtils.setOpacity(G,100),C.style.visibility="",Q.stop(),B(),"drive"==n&&null!=F.parentNode&&F.parentNode.removeChild(F))}))}else B();H.appendChild(I)}k=null!=k?k:2;var p=document.createElement("div");p.style.textAlign="center";p.style.whiteSpace="nowrap";p.style.paddingTop="0px";p.style.paddingBottom="20px";var q=document.createElement("div");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";-q.style.padding="10px 0px 20px 0px";var t=0,y=0,H=document.createElement("div");H.style.paddingTop="2px";q.appendChild(H);var F=document.createElement("p"),D=document.createElement("p");D.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(D,mxResources.get("saveDiagramsTo")+":");p.appendChild(D);p.appendChild(q);t=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===+q.style.padding="10px 0px 20px 0px";var t=0,y=0,H=document.createElement("div");H.style.paddingTop="2px";q.appendChild(H);var F=document.createElement("p"),E=document.createElement("p");E.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(E,mxResources.get("saveDiagramsTo")+":");p.appendChild(E);p.appendChild(q);t=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");q=document.createElement("span");q.style.position="absolute";q.style.cursor="pointer";q.style.bottom="27px";q.style.color="gray";q.style.userSelect="none";q.style.textAlign="center";q.style.left="50%";mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0)");mxUtils.write(q,mxResources.get("decideLater"));p.appendChild(q);mxEvent.addListener(q,"click",function(){b.hideDialog();var d=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(F.style.padding="7px",F.style.fontSize="9pt",F.style.marginTop="-14px",F.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",p.appendChild(F))},5E3);this.container=p},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var p=document.createElement("div");p.style.margin="8px 0px 0px 0px";p.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",p.style.paddingBottom="10px",p.style.paddingTop="30px",k=mxResources.get("device"));var q=document.createElement("button");-q.className="geBigButton";q.style.marginBottom="8px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)p.style.padding="42px 0px 10px 0px",q.style.marginBottom="12px";else{p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";var t=document.createElement("table"),y=document.createElement("tbody"),H=document.createElement("tr"),F=document.createElement("td"),D=document.createElement("td");t.setAttribute("align",-"center");F.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,k);D.style.textAlign="left";D.appendChild(c);H.appendChild(F);H.appendChild(D);y.appendChild(H);t.appendChild(y);f.appendChild(t);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,+q.className="geBigButton";q.style.marginBottom="8px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)p.style.padding="42px 0px 10px 0px",q.style.marginBottom="12px";else{p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";var t=document.createElement("table"),y=document.createElement("tbody"),H=document.createElement("tr"),F=document.createElement("td"),E=document.createElement("td");t.setAttribute("align",+"center");F.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,k);E.style.textAlign="left";E.appendChild(c);H.appendChild(F);H.appendChild(E);y.appendChild(H);t.appendChild(y);f.appendChild(t);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(q,mxResources.get("createNewDiagram"));mxEvent.addListener(q,"click",function(){b.hideDialog();b.actions.get("new").funct()});p.appendChild(q);mxUtils.br(p);q=document.createElement("button");q.className="geBigButton";q.style.marginBottom="22px";q.style.fontSize="18px";q.style.padding="10px";q.style.width="340px";mxUtils.write(q,mxResources.get("openExistingDiagram"));mxEvent.addListener(q,"click",function(){b.actions.get("open").funct()});p.appendChild(q);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(l){q.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));q.style.marginBottom="16px";p.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){l()})});p.appendChild(n)},b.mode==App.MODE_GOOGLE&&@@ -12044,44 +12047,44 @@ null!=b.drive){var d=b.drive.getUsersList();if(0<d.length){c=document.createElemmxUtils.write(t,"<"+d[k].email+">"),t.setAttribute("disabled","disabled"),g.appendChild(t);t=document.createElement("option");mxUtils.write(t,mxResources.get("addAccount"));t.value=d.length;g.appendChild(t);mxEvent.addListener(g,"change",function(){var l=g.value,n=d.length!=l;n&&b.drive.setUser(d[l]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(x){b.handleError(x,null,function(){b.hideDialog();b.showSplash()})},!0)});p.appendChild(g)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();var l=document.createElement("form");l.setAttribute("method","post");l.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");l.setAttribute("target","_blank");document.body.appendChild(l);l.submit();l.parentNode.removeChild(l)}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(p);this.container=f},EmbedDialog=function(b,f,k,c,p,q,t,y,H){c=document.createElement("div");var F=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=q?mxUtils.write(c,q):mxUtils.write(c,mxResources.get(5E5>f.length?F?"link":"mainEmbedNotice":"preview")+":");-mxUtils.br(c);q=document.createElement("div");q.style.position="absolute";q.style.top="30px";q.style.right="30px";q.style.color="gray";mxUtils.write(q,b.formatFileSize(f.length));c.appendChild(q);var D=document.createElement("textarea");D.setAttribute("autocomplete","off");D.setAttribute("autocorrect","off");D.setAttribute("autocapitalize","off");D.setAttribute("spellcheck","false");D.style.fontFamily="monospace";D.style.wordBreak="break-all";D.style.marginTop="10px";D.style.resize="none";D.style.height=-"150px";D.style.width="440px";D.style.border="1px solid gray";D.value=mxResources.get("updatingDocument");c.appendChild(D);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>f.length?(D.value=f,D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)):(D.setAttribute("readonly","true"),D.value=mxResources.get("tooLargeUseDownload"))},0)};q=document.createElement("div");q.style.position="absolute";q.style.bottom="36px";-q.style.right="32px";t=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!F||navigator.standalone||!(F||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(t=mxUtils.button(null!=y?y:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var g=5E5>f.length?D.value:f;if(null!=p)p(g);else if(F)try{var l=b.openLink(g);null!=l&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,+mxUtils.br(c);q=document.createElement("div");q.style.position="absolute";q.style.top="30px";q.style.right="30px";q.style.color="gray";mxUtils.write(q,b.formatFileSize(f.length));c.appendChild(q);var E=document.createElement("textarea");E.setAttribute("autocomplete","off");E.setAttribute("autocorrect","off");E.setAttribute("autocapitalize","off");E.setAttribute("spellcheck","false");E.style.fontFamily="monospace";E.style.wordBreak="break-all";E.style.marginTop="10px";E.style.resize="none";E.style.height=+"150px";E.style.width="440px";E.style.border="1px solid gray";E.value=mxResources.get("updatingDocument");c.appendChild(E);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>f.length?(E.value=f,E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)):(E.setAttribute("readonly","true"),E.value=mxResources.get("tooLargeUseDownload"))},0)};q=document.createElement("div");q.style.position="absolute";q.style.bottom="36px";+q.style.right="32px";t=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!F||navigator.standalone||!(F||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(t=mxUtils.button(null!=y?y:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var g=5E5>f.length?E.value:f;if(null!=p)p(g);else if(F)try{var l=b.openLink(g);null!=l&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,8)!=g.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(x){}}),k||500)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==f.substring(0,7)?f:mxUtils.htmlEntities(f))+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),-t.className="geBtn",q.appendChild(t));if(!F||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=H?H:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",q.appendChild(y);if(!b.isOffline()&&5E5>f.length){y=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(H||b.defaultFilename)+"&body="+encodeURIComponent(D.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});-var d=document.createElement("img");d.className="geAdaptiveAsset";d.setAttribute("src",Editor.mailImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");d.style.marginBottom="5px";y.appendChild(d);y.style.verticalAlign="bottom";y.style.paddingTop="4px";y.style.minWidth="46px";y.className="geBtn";q.appendChild(y)}y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});q.appendChild(y);d=mxUtils.button(mxResources.get("copy"),function(){D.focus();-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(q.appendChild(d),d.className="geBtn gePrimaryBtn",y.className="geBtn"):null!=t&&(q.appendChild(t),y.className="geBtn",t.className="geBtn gePrimaryBtn");c.appendChild(q);this.container=c};EmbedDialog.showPreviewOption=!0;+t.className="geBtn",q.appendChild(t));if(!F||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=H?H:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",q.appendChild(y);if(!b.isOffline()&&5E5>f.length){y=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(H||b.defaultFilename)+"&body="+encodeURIComponent(E.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});+var d=document.createElement("img");d.className="geAdaptiveAsset";d.setAttribute("src",Editor.mailImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");d.style.marginBottom="5px";y.appendChild(d);y.style.verticalAlign="bottom";y.style.paddingTop="4px";y.style.minWidth="46px";y.className="geBtn";q.appendChild(y)}y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});q.appendChild(y);d=mxUtils.button(mxResources.get("copy"),function(){E.focus();+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(q.appendChild(d),d.className="geBtn gePrimaryBtn",y.className="geBtn"):null!=t&&(q.appendChild(t),y.className="geBtn",t.className="geBtn gePrimaryBtn");c.appendChild(q);this.container=c};EmbedDialog.showPreviewOption=!0;var CreateGraphDialog=function(b,f,k){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var p=document.createElement("div");p.style.position="relative";p.style.border="1px solid gray";p.style.boxSizing="border-box";p.style.width="100%";p.style.height="360px";p.style.overflow="hidden";p.style.marginBottom="16px";mxEvent.disableContextMenu(p);c.appendChild(p);var q=new Graph(p);q.setCellsCloneable(!0);q.setPanning(!0);q.setAllowDanglingEdges(!1);q.connectionHandler.select=!1;q.view.setTranslate(20,20);q.border=20;q.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=q.view.getDrawPane()&&(p=q.view.getDrawPane().ownerSVGElement,null!=p&&(p.style.position="absolute"));var t="curved=1;";q.cellRenderer.installCellOverlayListeners=function(n,x,z){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(z.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(z.node,"touchstart",function(B){x.fireEvent(new mxEventObject("pointerdown","event",B,"state",n))})};q.getAllConnectionConstraints=function(){return null};q.connectionHandler.marker.highlight.keepOnTop=!1;q.connectionHandler.createEdgeState=function(n){n=q.createEdge(null,null,null,null,null,t);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=q.getDefaultParent(),H=mxUtils.bind(this,function(n){var x=new mxCellOverlay(this.connectImage,"Add outgoing");x.cursor="hand";x.addListener(mxEvent.CLICK,function(z,B){q.connectionHandler.reset();q.clearSelection();var I=q.getCellGeometry(n),G;d(function(){G=q.insertVertex(y,null,"Entry",I.x,I.y,80,30,"rounded=1;");H(G);q.view.refresh(G);q.insertEdge(y,null,"",n,G,t)},function(){q.scrollCellToVisible(G)})});x.addListener("pointerdown",function(z,B){z=B.getProperty("event");B=B.getProperty("state");q.popupMenuHandler.hideMenu();q.stopEditing(!1);var I=mxUtils.convertPoint(q.container,-mxEvent.getClientX(z),mxEvent.getClientY(z));q.connectionHandler.start(B,I.x,I.y);q.isMouseDown=!0;q.isMouseTrigger=mxEvent.isMouseEvent(z);mxEvent.consume(z)});q.addCellOverlay(n,x)});q.getModel().beginUpdate();try{var F=q.insertVertex(y,null,"Start",0,0,80,30,"ellipse");H(F)}finally{q.getModel().endUpdate()}if("horizontalTree"==k){var D=new mxCompactTreeLayout(q);D.edgeRouting=!1;D.levelDistance=30;D.sortEdges=!0;t="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(D=new mxCompactTreeLayout(q,-!1),D.edgeRouting=!1,D.levelDistance=30,D.sortEdges=!0,t="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(D=new mxRadialTreeLayout(q,!1),D.edgeRouting=!1,D.levelDistance=80):"verticalFlow"==k?D=new mxHierarchicalLayout(q,mxConstants.DIRECTION_NORTH):"horizontalFlow"==k?D=new mxHierarchicalLayout(q,mxConstants.DIRECTION_WEST):"circle"==k?D=new mxCircleLayout(q):(D=new mxFastOrganicLayout(q,!1),D.forceConstant=80);if(null!=D){var d=function(n,x){q.getModel().beginUpdate();try{null!=n&&n(),-D.execute(q.getDefaultParent(),F)}catch(z){throw z;}finally{n=new mxMorphing(q),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){q.getModel().endUpdate();null!=x&&x()})),n.startAnimation()}},g=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,x,z,B,I){g.apply(this,arguments);d()};q.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};q.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),+mxEvent.getClientX(z),mxEvent.getClientY(z));q.connectionHandler.start(B,I.x,I.y);q.isMouseDown=!0;q.isMouseTrigger=mxEvent.isMouseEvent(z);mxEvent.consume(z)});q.addCellOverlay(n,x)});q.getModel().beginUpdate();try{var F=q.insertVertex(y,null,"Start",0,0,80,30,"ellipse");H(F)}finally{q.getModel().endUpdate()}if("horizontalTree"==k){var E=new mxCompactTreeLayout(q);E.edgeRouting=!1;E.levelDistance=30;E.sortEdges=!0;t="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(E=new mxCompactTreeLayout(q,+!1),E.edgeRouting=!1,E.levelDistance=30,E.sortEdges=!0,t="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(E=new mxRadialTreeLayout(q,!1),E.edgeRouting=!1,E.levelDistance=80):"verticalFlow"==k?E=new mxHierarchicalLayout(q,mxConstants.DIRECTION_NORTH):"horizontalFlow"==k?E=new mxHierarchicalLayout(q,mxConstants.DIRECTION_WEST):"circle"==k?E=new mxCircleLayout(q):(E=new mxFastOrganicLayout(q,!1),E.forceConstant=80);if(null!=E){var d=function(n,x){q.getModel().beginUpdate();try{null!=n&&n(),+E.execute(q.getDefaultParent(),F)}catch(z){throw z;}finally{n=new mxMorphing(q),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){q.getModel().endUpdate();null!=x&&x()})),n.startAnimation()}},g=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,x,z,B,I){g.apply(this,arguments);d()};q.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};q.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);var l=mxUtils.button(mxResources.get("insert"),function(n){q.clearCellOverlays();var x=q.getModel().getChildren(q.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(q.getBoundingBoxFromGeometry(x,!0));x=b.editor.graph.importCells(x,n.x,n.y);n=b.editor.graph.view;var z=n.getBounds(x);null!=z&&(z.x-=n.translate.x,z.y-=n.translate.y,b.editor.graph.scrollRectToVisible(z),b.editor.graph.setSelectionCells(x));b.hideDialog()});c.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(p);this.graph=q};this.container=c};CreateGraphDialog.prototype.connectImage=new mxImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==",26,26);-var BackgroundImageDialog=function(b,f,k,c,p){function q(){null==A||A==mxConstants.NONE?(v.style.display="none",T.checked=!1):(v.style.backgroundColor=A,v.style.display="",T.checked=!0)}var t=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var H=document.createElement("h2");mxUtils.write(H,mxResources.get("background"));H.style.marginTop="0px";y.appendChild(H);var F=null!=k&&null!=k.originalSrc;H=!1;var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value",-"url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=F||null==k?"":k.src;var l=document.createElement("select");l.style.width="360px";-if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var x=document.createElement("option");mxUtils.write(x,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));x.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&x.setAttribute("disabled","disabled");null!=k&&k.originalSrc==x.getAttribute("value")&&(x.setAttribute("selected","selected"),H=!0);l.appendChild(x)}F||null!=b.pages&&1!=b.pages.length||(D.style.display="none",d.style.display="none",l.style.display=+var BackgroundImageDialog=function(b,f,k,c,p){function q(){null==A||A==mxConstants.NONE?(v.style.display="none",T.checked=!1):(v.style.backgroundColor=A,v.style.display="",T.checked=!0)}var t=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var H=document.createElement("h2");mxUtils.write(H,mxResources.get("background"));H.style.marginTop="0px";y.appendChild(H);var F=null!=k&&null!=k.originalSrc;H=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value",+"url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=F||null==k?"":k.src;var l=document.createElement("select");l.style.width="360px";+if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var x=document.createElement("option");mxUtils.write(x,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));x.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&x.setAttribute("disabled","disabled");null!=k&&k.originalSrc==x.getAttribute("value")&&(x.setAttribute("selected","selected"),H=!0);l.appendChild(x)}F||null!=b.pages&&1!=b.pages.length||(E.style.display="none",d.style.display="none",l.style.display="none");var z=document.createElement("option"),B=!1,I=!1,G=function(J,K){B||null!=J&&I||(d.checked?null!=K&&K(z.selected?null:l.value):""==g.value||b.isOffline()?(Q.value="",U.value="",null!=K&&K("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(m){Q.value=m.width;U.value=m.height;null!=K&&K(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));Q.value="";U.value="";null!=K&&K(null)})))},C=mxUtils.bind(this,function(J){b.importFiles(J,-0,0,b.maxBackgroundSize,function(K,m,u,E,M,L){g.value=K;G();g.focus()},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var m=0;m<K.length;m++)K[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){F?l.focus():g.focus();mxEvent.addListener(l,"focus",function(){D.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");D.setAttribute("checked","checked");-D.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var J=y.parentNode,K=null;mxEvent.addListener(J,"dragleave",function(m){null!=K&&(K.parentNode.removeChild(K),K=null);m.stopPropagation();m.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(m){null==K&&(K=b.highlightElement(J));m.stopPropagation();m.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(m){null!=K&&(K.parentNode.removeChild(K),K=null);-if(0<m.dataTransfer.files.length)C(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")){var u=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(u)&&(g.value=decodeURIComponent(u),G())}m.stopPropagation();m.preventDefault()}),!1)}};y.appendChild(D);y.appendChild(g);mxUtils.br(y);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");y.appendChild(n);var Q=document.createElement("input");+0,0,b.maxBackgroundSize,function(K,m,u,D,M,L){g.value=K;G();g.focus()},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var m=0;m<K.length;m++)K[m]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){F?l.focus():g.focus();mxEvent.addListener(l,"focus",function(){E.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");E.setAttribute("checked","checked");+E.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var J=y.parentNode,K=null;mxEvent.addListener(J,"dragleave",function(m){null!=K&&(K.parentNode.removeChild(K),K=null);m.stopPropagation();m.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(m){null==K&&(K=b.highlightElement(J));m.stopPropagation();m.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(m){null!=K&&(K.parentNode.removeChild(K),K=null);+if(0<m.dataTransfer.files.length)C(m.dataTransfer.files);else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")){var u=m.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(u)&&(g.value=decodeURIComponent(u),G())}m.stopPropagation();m.preventDefault()}),!1)}};y.appendChild(E);y.appendChild(g);mxUtils.br(y);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");y.appendChild(n);var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="60px";Q.style.marginLeft="8px";Q.style.marginRight="16px";Q.value=null==k||F?"":k.width;y.appendChild(Q);mxUtils.write(y,mxResources.get("height")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.width="60px";U.style.marginLeft="8px";U.style.marginRight="16px";U.value=null==k||F?"":k.height;y.appendChild(U);mxUtils.br(y);mxUtils.br(y);mxEvent.addListener(g,"change",G);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&-null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(g.value=J.url,G()));g.focus()};y.appendChild(d);y.appendChild(l);mxUtils.br(y);mxUtils.br(y);F?(d.setAttribute("checked","checked"),d.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!H&&d.checked&&(mxUtils.write(z,mxResources.get("pageNotFound")),z.setAttribute("disabled","disabled"),z.setAttribute("selected","selected"),z.setAttribute("value","pageNotFound"),l.appendChild(z),mxEvent.addListener(l,+null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(g.value=J.url,G()));g.focus()};y.appendChild(d);y.appendChild(l);mxUtils.br(y);mxUtils.br(y);F?(d.setAttribute("checked","checked"),d.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!H&&d.checked&&(mxUtils.write(z,mxResources.get("pageNotFound")),z.setAttribute("disabled","disabled"),z.setAttribute("selected","selected"),z.setAttribute("value","pageNotFound"),l.appendChild(z),mxEvent.addListener(l,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)}));k=document.createElement("div");k.style.display=p?"inline-flex":"none";k.style.alignItems="center";k.style.cursor="default";k.style.minWidth="40%";k.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=c!=mxConstants.NONE&&null!=c;T.checked=T.defaultChecked;k.appendChild(T);mxUtils.write(k,mxResources.get("fillColor"));p=k.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=t.shadowVisible;P.checked=P.defaultChecked;p.appendChild(P);mxUtils.write(p,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(p,"click",function(J){mxEvent.getSource(J)!=P&&(P.checked=!P.checked)});var v=document.createElement("button");v.style.width="36px";v.style.height="18px";v.style.cursor="pointer";v.style.marginLeft="10px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.verticalAlign="bottom";v.className="geColorBtn";var A=c;q();mxEvent.addListener(k,"click",function(J){mxEvent.getSource(J)!=T&&(T.checked=!T.checked);A=T.checked?"#ffffff":null;q()});mxEvent.addListener(v,"click",function(J){b.pickColor(A||"none",function(K){A=K;q()});mxEvent.consume(J)});k.appendChild(v);y.appendChild(k);y.appendChild(p);mxUtils.br(y);-c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&c.appendChild(t);p=mxUtils.button(mxResources.get("reset"),function(){g.value="";Q.value="";U.value="";D.checked=!0;A=mxConstants.NONE;q();B=!1});mxEvent.addGestureListeners(p,function(){B=!0});p.className="geBtn";p.width="100";c.appendChild(p);if(Graph.fileSupport){var N=document.createElement("input");+c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){B=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&c.appendChild(t);p=mxUtils.button(mxResources.get("reset"),function(){g.value="";Q.value="";U.value="";E.checked=!0;A=mxConstants.NONE;q();B=!1});mxEvent.addGestureListeners(p,function(){B=!0});p.className="geBtn";p.width="100";c.appendChild(p);if(Graph.fileSupport){var N=document.createElement("input");N.setAttribute("multiple","multiple");N.setAttribute("type","file");mxEvent.addListener(N,"change",function(J){null!=N.files&&(C(N.files),N.type="",N.type="file",N.value="")});N.style.display="none";y.appendChild(N);p=mxUtils.button(mxResources.get("open"),function(){N.click()});p.className="geBtn";c.appendChild(p)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();G(null,function(J){f(""!=J&&null!=J?new mxImage(J,Q.value,U.value):null,null==J,A,!mxClient.IS_SVG||mxClient.IS_SF?-null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(t);y.appendChild(c);this.container=y},ParseDialog=function(b,f,k){function c(l,n,x){var z=l.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(u,E,M,L,O){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,L,O));var R=-null;I.getModel().beginUpdate();try{R="txt"==E?b.insertAsPreText(M,q.x,q.y):I.insertVertex(null,null,null,q.x,q.y,L,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(M)+";"),I.setAttributeForCell(R,"plantUmlData",JSON.stringify({data:u,format:E},null,2))}finally{I.getModel().endUpdate()}null!=R&&(I.setSelectionCell(R),I.scrollCellToVisible(R))},I=b.editor.graph,G="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==+null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(t);y.appendChild(c);this.container=y},ParseDialog=function(b,f,k){function c(l,n,x){var z=l.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var B=function(u,D,M,L,O){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,L,O));var R=+null;I.getModel().beginUpdate();try{R="txt"==D?b.insertAsPreText(M,q.x,q.y):I.insertVertex(null,null,null,q.x,q.y,L,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(M)+";"),I.setAttributeForCell(R,"plantUmlData",JSON.stringify({data:u,format:D},null,2))}finally{I.getModel().endUpdate()}null!=R&&(I.setSelectionCell(R),I.scrollCellToVisible(R))},I=b.editor.graph,G="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==l&&"svg"==G?window.setTimeout(function(){b.spinner.stop();B(l,G,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",-295,212)},200):b.generatePlantUmlImage(l,G,function(u,E,M){b.spinner.stop();B(l,G,u,E,M)},function(u){b.handleError(u)})}}else if("mermaid"==n||"mermaid2drawio"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<z.length&&(0==z[C].trim().length||"%%"==z[C].substring(0,2));)C++;if("---"==z[C].trim()){do C++;while(C<z.length&&"---"!=z[C].trim());C++}C=z[C].trim().toLowerCase();z=C.indexOf(" ");C=C.substring(0,0<z?z:C.length);var Q="undefined"!==typeof mxMermaidToDrawio&&-"mermaid2drawio"==n&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);I=b.editor.graph;Q&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(u){b.spinner.stop();I.setSelectionCells(b.importXml(u,Math.max(q.x,20),Math.max(q.y,20),!0,null,null,!0));I.scrollCellToVisible(I.getSelectionCell())}));b.generateMermaidImage(l,null,function(u,E,M){if(!Q){q=-mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,E,M));b.spinner.stop();var L=null;I.getModel().beginUpdate();try{L=I.insertVertex(null,null,null,q.x,q.y,E,M,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+u+";"),I.setAttributeForCell(L,"mermaidData",JSON.stringify({data:l},null,2))}finally{I.getModel().endUpdate()}null!=L&&(I.setSelectionCell(L),I.scrollCellToVisible(L))}},function(u){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(u)})}}else if("table"==+295,212)},200):b.generatePlantUmlImage(l,G,function(u,D,M){b.spinner.stop();B(l,G,u,D,M)},function(u){b.handleError(u)})}}else if("mermaid"==n||"mermaid2drawio"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<z.length&&(0==z[C].trim().length||"%%"==z[C].substring(0,2));)C++;if("---"==z[C].trim()){do C++;while(C<z.length&&"---"!=z[C].trim());C++}C=z[C].trim().toLowerCase();z=C.indexOf(" ");C=C.substring(0,0<z?z:C.length);var Q="undefined"!==typeof mxMermaidToDrawio&&+"mermaid2drawio"==n&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);I=b.editor.graph;Q&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(u){b.spinner.stop();I.setSelectionCells(b.importXml(u,Math.max(q.x,20),Math.max(q.y,20),!0,null,null,!0));I.scrollCellToVisible(I.getSelectionCell())}));b.generateMermaidImage(l,null,function(u,D,M){if(!Q){q=+mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(new mxRectangle(0,0,D,M));b.spinner.stop();var L=null;I.getModel().beginUpdate();try{L=I.insertVertex(null,null,null,q.x,q.y,D,M,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+u+";"),I.setAttributeForCell(L,"mermaidData",JSON.stringify({data:l},null,2))}finally{I.getModel().endUpdate()}null!=L&&(I.setSelectionCell(L),I.scrollCellToVisible(L))}},function(u){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(u)})}}else if("table"==n){n=null;var U=[],T=0,P={};for(C=0;C<z.length;C++){var v=mxUtils.trim(z[C]);if("primary key"==v.substring(0,11).toLowerCase()){var A=v.match(/\((.+)\)/);A&&A[1]&&(P[A[1]]=!0);z.splice(C,1)}else 0<v.toLowerCase().indexOf("primary key")&&(P[v.split(" ")[0]]=!0,z[C]=mxUtils.trim(v.replace(/primary key/i,"")))}for(C=0;C<z.length;C++)if(v=mxUtils.trim(z[C]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-1))),n=new mxCell(v,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,U.push(n),v=b.editor.graph.getPreferredSizeForCell(N),null!=v&&(n.geometry.width=v.width+10);else if(null!=n&&")"==v.charAt(0))T+=n.geometry.width+40,n=null;else if("("!=v&&null!=n){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);A=P[v.split(" ")[0]];var N=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(A?"1":"0")+";");N.vertex=!0;var J=new mxCell(A?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(A?"fontStyle=1;":""));J.vertex=!0;N.insert(J);v=new mxCell(v,new mxGeometry(30,@@ -12089,31 +12092,32 @@ n){n=null;var U=[],T=0,P={};for(C=0;C<z.length;C++){var v=mxUtils.trim(z[C]);if(!0)),I.setSelectionCells(I.importCells(U,q.x,q.y)),I.scrollCellToVisible(I.getSelectionCell()))}else if("list"==n){if(0<z.length){I=b.editor.graph;n=null;U=[];for(C=N=0;C<z.length;C++)";"!=z[C].charAt(0)&&(0==z[C].length?n=null:null==n?(n=new mxCell(z[C],new mxGeometry(N,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),n.vertex=!0,U.push(n),v=I.getPreferredSizeForCell(n),null!=v&&n.geometry.width<v.width+10&&(n.geometry.width=v.width+10),N+=n.geometry.width+40):"--"==z[C]?(v=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),v.vertex=!0,n.geometry.height+=v.geometry.height,n.insert(v)):0<z[C].length&&(T=new mxCell(z[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),T.vertex=!0,v=I.getPreferredSizeForCell(T),null!=v&&T.geometry.width<v.width&&(T.geometry.width=v.width),n.geometry.width=Math.max(n.geometry.width,T.geometry.width),n.geometry.height+=T.geometry.height,n.insert(T)));if(0<U.length){q=mxEvent.isAltDown(x)?q:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(U,!0));I.getModel().beginUpdate();try{U=I.importCells(U,q.x,q.y);v=[];for(C=0;C<U.length;C++)v.push(U[C]),v=v.concat(U[C].children);I.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{I.getModel().endUpdate()}I.setSelectionCells(U);-I.scrollCellToVisible(I.getSelectionCell())}}}else{N=function(u){var E=K[u];null==E&&(E=new mxCell(u,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),E.vertex=!0,K[u]=E,U.push(E));return E};var K={};U=[];for(C=0;C<z.length;C++)if(";"!=z[C].charAt(0)){var m=z[C].split("->");2<=m.length&&(A=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2<m.length?m[1]:"",new mxGeometry),m.edge=!0,m.geometry.relative=!0,A.insertEdge(m,!0),J.insertEdge(m,!1),U.push(m))}if(0<U.length){z=document.createElement("div");z.style.visibility=+I.scrollCellToVisible(I.getSelectionCell())}}}else{N=function(u){var D=K[u];null==D&&(D=new mxCell(u,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),D.vertex=!0,K[u]=D,U.push(D));return D};var K={};U=[];for(C=0;C<z.length;C++)if(";"!=z[C].charAt(0)){var m=z[C].split("->");2<=m.length&&(A=N(m[0]),J=N(m[m.length-1]),m=new mxCell(2<m.length?m[1]:"",new mxGeometry),m.edge=!0,m.geometry.relative=!0,A.insertEdge(m,!0),J.insertEdge(m,!1),U.push(m))}if(0<U.length){z=document.createElement("div");z.style.visibility="hidden";document.body.appendChild(z);I=new Graph(z);I.getModel().beginUpdate();try{U=I.importCells(U);for(C=0;C<U.length;C++)I.getModel().isVertex(U[C])&&(v=I.getPreferredSizeForCell(U[C]),U[C].geometry.width=Math.max(U[C].geometry.width,v.width),U[C].geometry.height=Math.max(U[C].geometry.height,v.height));C=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(I,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(I.getDefaultParent(),U),C=!1):"circle"==n?(new mxCircleLayout(I)).execute(I.getDefaultParent()):(T=new mxFastOrganicLayout(I),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(I.getDefaultParent()));C&&(P=new mxParallelEdgeLayout(I),P.spacing=30,P.execute(I.getDefaultParent()))}finally{I.getModel().endUpdate()}I.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{U=I.getModel().getChildren(I.getDefaultParent()),q=mxEvent.isAltDown(x)?q:b.editor.graph.getCenterInsertPoint(I.getBoundingBoxFromGeometry(U,!0)),v=b.editor.graph.importCells(U,q.x,q.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());I.destroy();z.parentNode.removeChild(z)}}}function p(){return"list"==y.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==y.value||"mermaid2drawio"==y.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==y.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":-"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var q=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var t=document.createElement("textarea");t.style.boxSizing="border-box";t.style.resize=-"none";t.style.width="100%";t.style.height="354px";t.style.marginBottom="16px";var y=document.createElement("select");y.className="geBtn";if("formatSql"==k||"mermaid"==k&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var H=document.createElement("option");H.setAttribute("value","list");mxUtils.write(H,mxResources.get("list"));"plantUml"!=k&&"mermaid"!=k&&y.appendChild(H);null!=k&&"fromText"!=k||H.setAttribute("selected","selected");H=document.createElement("option");-H.setAttribute("value","table");mxUtils.write(H,mxResources.get("formatSql"));"formatSql"==k&&(y.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("image"));if("mermaid"==k)if("undefined"!==typeof mxMermaidToDrawio){var F=document.createElement("option");F.setAttribute("value","mermaid2drawio");F.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("diagram"));y.appendChild(F)}else y.style.display=-"none";y.appendChild(H);H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));F=document.createElement("option");F.setAttribute("value","circle");mxUtils.write(F,mxResources.get("circle"));var D=document.createElement("option");D.setAttribute("value","horizontalFlow");mxUtils.write(D,mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));-"plantUml"!=k&&"mermaid"!=k&&(y.appendChild(H),y.appendChild(F),y.appendChild(D),y.appendChild(d));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&H.setAttribute("selected","selected");F=document.createElement("option");F.setAttribute("value","plantUmlPng");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");D=document.createElement("option");D.setAttribute("value",-"plantUmlTxt");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(y.appendChild(H),y.appendChild(F),y.appendChild(D));var g=p();t.value=g;f.appendChild(t);this.init=function(){t.focus()};Graph.fileSupport&&(t.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),t.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=-l.dataTransfer.files[0];var n=new FileReader;n.onload=function(x){t.value=x.target.result};n.readAsText(l)}},!1));"plantUml"==k&&"https://plant-aws.diagrams.net"==window.PLANT_URL&&(H=document.createElement("div"),H.style.display="inline-block",H.style.color="#c00",H.style.fontSize="12px",H.style.marginRight="16px",H.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',-f.appendChild(H));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=k&&"plantUml"!=k||f.appendChild(b.createHelpIcon("mermaid"==k?"https://mermaid.js.org/intro/":"https://plantuml.com/"));f.appendChild(y);mxEvent.addListener(y,"change",function(){var l=p();if(0==t.value.length||t.value==g)g=l,t.value=g});k=mxUtils.button(mxResources.get("close"),function(){t.value==g?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});k.className="geBtn";b.editor.cancelFirst&&f.appendChild(k);-H=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),c(t.value,y.value,l)}catch(n){b.handleError(n)}});H.className="geBtn gePrimaryBtn";f.appendChild(H);b.editor.cancelFirst||f.appendChild(k);this.container=f},NewDialog=function(b,f,k,c,p,q,t,y,H,F,D,d,g,l,n,x,z,B,I,G){function C(ka){null!=ka&&(Aa=Ca=ka?135:140);ka=!0;if(null!=Xa)for(;M<Xa.length&&(ka||0!=mxUtils.mod(M,30));){var xa=Xa[M++];xa=J(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,-xa.onClick,xa.preview,xa.noImg,xa.clibs,xa.type);ka&&xa.click();ka=!1}}function Q(ka,xa,ta,pa,sa,ya){if(null!=ka&&mxUtils.isAncestorNode(document.body,pa)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ga=new mxCodec(ka.ownerDocument),Ja=new mxGraphModel;Ga.decode(ka,Ja);b.sidebar.createTooltip(pa,Ja.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||-document.body.clientHeight)-120,800),null!=sa?mxResources.get(sa):null,!0,new mxPoint(xa,ta),!0,function(){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&P(pa,null,null,ya,infoObj,clibs)},!0,!1)}}function U(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var xa=document.createElement("input");-xa.setAttribute("type","text");xa.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));xa.style.width="100%";xa.style.marginTop="6px";xa.style.marginBottom="4px";xa.style.boxSizing="border-box";ka.appendChild(xa);ka.init=function(){xa.focus()};mxUtils.br(ka);var ta=document.createElement("div");ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var pa=document.createElement("div");-pa.style.boxSizing="border-box";pa.style.position="relative";pa.style.textAlign="center";pa.style.top="50%";mxUtils.write(pa,mxResources.get("blankDiagram"));ta.appendChild(pa);var sa=document.createElement("select");sa.className="geBtn";sa.style.maxWidth="160px";sa.style.marginLeft="0px";pa=document.createElement("option");mxUtils.write(pa,mxResources.get("diagramType"));pa.setAttribute("value","");sa.appendChild(pa);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){pa=document.createElement("option");-var Ga=EditorUi.mermaidDiagramTypes[ya],Ja=Ga;Ga==urlParams["smart-template-type"]&&pa.setAttribute("selected","selected");"erDiagram"==Ja&&(Ja="entityRelationshipDiagram");Ja=mxResources.get(Ja,null,Ja.charAt(0).toUpperCase()+Ja.substring(1).replace(/[A-Z]/g," $&"));pa.setAttribute("value",Ga);mxUtils.write(pa,Ja);sa.appendChild(pa)}var Na=mxUtils.button(mxResources.get("generate"),function(){var Ua=xa.value,Ra=sa.value.replace(/([A-Z])/g," $1").toLowerCase(),ab="Write the declaration code for a detailed and complex "+-(""!=Ra?Ra:"graph")+' that shows "'+(""!=Ua?Ua:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ra=""!=sa.value?" ("+mxUtils.trim(mxUtils.getTextContent(sa.options[sa.selectedIndex]))+")":"";var Oa="gantt"==sa.value||"pie"==sa.value||"timeline"==sa.value||"quadrantchart"==sa.value||"c4context"==sa.value,Va=xa.value+Ra;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Fa){Oa||(ra=ba=Fa,wa="Smart Template: "+-Va)}));b.spinner.spin(ta,mxResources.get("generate")+" '"+Ua+"'")&&b.generateOpenAiMermaidDiagram(ab,function(Fa,bb,Za,ib){b.spinner.stop();ta.innerHTML="";var cb=document.createElement("img");cb.setAttribute("title",mxResources.get("preview"));cb.src="data:image/svg+xml;base64,"+bb.substring(bb.indexOf(",")+1);cb.style.cursor="pointer";cb.style.width="100%";cb.style.height="100%";ta.appendChild(cb);Fa=b.createMermaidXml(Fa,EditorUi.defaultMermaidConfig,bb,Za,ib,Va);var kb="<mxfile><diagram>"+Graph.compress(Fa)+-"</diagram></mxfile>";if(Oa||"undefined"===typeof mxMermaidToDrawio)ra=ba=Fa;Fa=R.cloneNode(!0);ta.appendChild(Fa);bb=function(Pa){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Za=function(Pa){X||Q(kb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),cb,Va)};mxEvent.addGestureListeners(cb,bb,null,Za);mxEvent.addGestureListeners(Fa,bb,null,Za)},function(Fa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Fa)})});Na.setAttribute("disabled",-"disabled");Na.className="geBtn gePrimaryBtn";pa=function(){window.setTimeout(function(){""!=xa.value?Na.removeAttribute("disabled"):Na.setAttribute("disabled","disabled")},0)};ya=null!=I?I:urlParams["smart-template"];null!=ya&&"1"!=ya&&(xa.value=decodeURIComponent(ya),pa(),""==ya||null==I&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Na.click()},0));mxEvent.addListener(xa,"change",pa);mxEvent.addListener(xa,"keydown",pa);mxEvent.addListener(xa,"cut",pa);mxEvent.addListener(xa,-"paste",pa);mxEvent.addListener(xa,"keydown",function(Ua){13==Ua.keyCode&&Na.click()});pa=document.createElement("div");pa.style.height="40px";pa.style.marginTop="4px";pa.style.marginBottom="4px";pa.style.whiteSpace="nowrap";pa.style.overflowX="auto";pa.style.overflowY="hidden";pa.appendChild(sa);pa.appendChild(Na);ka.appendChild(pa);ka.appendChild(ta);return ka}function T(){if(la&&null!=l)k||b.hideDialog(),l(la,va,E.value);else if(c)k||b.hideDialog(),c(ba,E.value,da,fa);else{var ka=E.value;if(null!=-ka&&0<ka.length){var xa=function(pa,sa,ya){b.createFile(ya,ba,null!=fa&&0<fa.length?fa:null,pa,function(){b.hideDialog()},null,sa,null,null!=ma&&0<ma.length?ma:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,ka,mxUtils.bind(this,function(pa,sa,ya){xa(sa,ya,pa.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(pa){xa(b.mode,pa,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}+"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var q=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");var t=document.createElement("textarea");t.style.position="absolute";t.style.left="30px";t.style.right="30px";t.style.top=+"30px";t.style.bottom="100px";t.style.resize="none";t.setAttribute("wrap","off");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");var y=document.createElement("select");y.className="geBtn";if("formatSql"==k||"mermaid"==k&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var H=document.createElement("option");H.setAttribute("value","list");mxUtils.write(H,mxResources.get("list"));+"plantUml"!=k&&"mermaid"!=k&&y.appendChild(H);null!=k&&"fromText"!=k||H.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","table");mxUtils.write(H,mxResources.get("formatSql"));"formatSql"==k&&(y.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("image"));if("mermaid"==k){if("undefined"!==typeof mxMermaidToDrawio){var F=document.createElement("option");+F.setAttribute("value","mermaid2drawio");F.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("diagram"));y.appendChild(F)}else y.style.display="none";y.appendChild(H)}H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));F=document.createElement("option");F.setAttribute("value","circle");mxUtils.write(F,mxResources.get("circle"));var E=document.createElement("option");E.setAttribute("value","horizontalFlow");mxUtils.write(E,+mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));"plantUml"!=k&&"mermaid"!=k&&(y.appendChild(H),y.appendChild(F),y.appendChild(E),y.appendChild(d));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&H.setAttribute("selected","selected");F=document.createElement("option");+F.setAttribute("value","plantUmlPng");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");E=document.createElement("option");E.setAttribute("value","plantUmlTxt");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(y.appendChild(H),y.appendChild(F),y.appendChild(E));var g=p();t.value=g;f.appendChild(t);H=document.createElement("div");H.style.position="absolute";H.style.bottom=+"46px";H.style.right="30px";H.style.left="30px";H.style.justifyContent="end";H.style.display="flex";this.init=function(){t.focus()};Graph.fileSupport&&(t.addEventListener("dragover",function(l){l.stopPropagation();l.preventDefault()},!1),t.addEventListener("drop",function(l){l.stopPropagation();l.preventDefault();if(0<l.dataTransfer.files.length){l=l.dataTransfer.files[0];var n=new FileReader;n.onload=function(x){t.value=x.target.result};n.readAsText(l)}},!1));"plantUml"==k&&"https://plant-aws.diagrams.net"==+window.PLANT_URL&&(F=document.createElement("div"),F.style.display="inline-block",F.style.color="#c00",F.style.fontSize="12px",F.style.marginRight="10px",F.style.display="flex",F.style.alignItems="center",F.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',H.appendChild(F));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=k&&"plantUml"!=k||H.appendChild(b.createHelpIcon("mermaid"==+k?"https://mermaid.js.org/intro/":"https://plantuml.com/"));H.appendChild(y);mxEvent.addListener(y,"change",function(){var l=p();if(0==t.value.length||t.value==g)g=l,t.value=g});k=mxUtils.button(mxResources.get("close"),function(){t.value==g?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});k.className="geBtn";b.editor.cancelFirst&&H.appendChild(k);F=mxUtils.button(mxResources.get("insert"),function(l){try{b.hideDialog(),c(t.value,y.value,l)}catch(n){b.handleError(n)}});+F.className="geBtn gePrimaryBtn";H.appendChild(F);b.editor.cancelFirst||H.appendChild(k);f.appendChild(H);this.container=f},NewDialog=function(b,f,k,c,p,q,t,y,H,F,E,d,g,l,n,x,z,B,I,G){function C(ka){null!=ka&&(Aa=Ca=ka?135:140);ka=!0;if(null!=Xa)for(;M<Xa.length&&(ka||0!=mxUtils.mod(M,30));){var xa=Xa[M++];xa=J(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs,xa.type);ka&&xa.click();ka=!1}}function Q(ka,xa,ta,pa,sa,ya){if(null!=+ka&&mxUtils.isAncestorNode(document.body,pa)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ga=new mxCodec(ka.ownerDocument),Ja=new mxGraphModel;Ga.decode(ka,Ja);b.sidebar.createTooltip(pa,Ja.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=sa?mxResources.get(sa):null,!0,new mxPoint(xa,+ta),!0,function(){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&P(pa,null,null,ya,infoObj,clibs)},!0,!1)}}function U(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var xa=document.createElement("input");xa.setAttribute("type","text");xa.setAttribute("placeholder",+mxResources.get("processForHiringNewEmployee"));xa.style.width="100%";xa.style.marginTop="6px";xa.style.marginBottom="4px";xa.style.boxSizing="border-box";ka.appendChild(xa);ka.init=function(){xa.focus()};mxUtils.br(ka);var ta=document.createElement("div");ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var pa=document.createElement("div");pa.style.boxSizing="border-box";pa.style.position="relative";+pa.style.textAlign="center";pa.style.top="50%";mxUtils.write(pa,mxResources.get("blankDiagram"));ta.appendChild(pa);var sa=document.createElement("select");sa.className="geBtn";sa.style.maxWidth="160px";sa.style.marginLeft="0px";pa=document.createElement("option");mxUtils.write(pa,mxResources.get("diagramType"));pa.setAttribute("value","");sa.appendChild(pa);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){pa=document.createElement("option");var Ga=EditorUi.mermaidDiagramTypes[ya],Ja=Ga;+Ga==urlParams["smart-template-type"]&&pa.setAttribute("selected","selected");"erDiagram"==Ja&&(Ja="entityRelationshipDiagram");Ja=mxResources.get(Ja,null,Ja.charAt(0).toUpperCase()+Ja.substring(1).replace(/[A-Z]/g," $&"));pa.setAttribute("value",Ga);mxUtils.write(pa,Ja);sa.appendChild(pa)}var Na=mxUtils.button(mxResources.get("generate"),function(){var Ua=xa.value,Ra=sa.value.replace(/([A-Z])/g," $1").toLowerCase(),ab="Write the declaration code for a detailed and complex "+(""!=Ra?Ra:"graph")+' that shows "'++(""!=Ua?Ua:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ra=""!=sa.value?" ("+mxUtils.trim(mxUtils.getTextContent(sa.options[sa.selectedIndex]))+")":"";var Oa="gantt"==sa.value||"pie"==sa.value||"timeline"==sa.value||"quadrantchart"==sa.value||"c4context"==sa.value,Va=xa.value+Ra;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Fa){Oa||(ra=ba=Fa,wa="Smart Template: "+Va)}));b.spinner.spin(ta,+mxResources.get("generate")+" '"+Ua+"'")&&b.generateOpenAiMermaidDiagram(ab,function(Fa,bb,Za,ib){b.spinner.stop();ta.innerHTML="";var cb=document.createElement("img");cb.setAttribute("title",mxResources.get("preview"));cb.src="data:image/svg+xml;base64,"+bb.substring(bb.indexOf(",")+1);cb.style.cursor="pointer";cb.style.width="100%";cb.style.height="100%";ta.appendChild(cb);Fa=b.createMermaidXml(Fa,EditorUi.defaultMermaidConfig,bb,Za,ib,Va);var kb="<mxfile><diagram>"+Graph.compress(Fa)+"</diagram></mxfile>";+if(Oa||"undefined"===typeof mxMermaidToDrawio)ra=ba=Fa;Fa=R.cloneNode(!0);ta.appendChild(Fa);bb=function(Pa){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Za=function(Pa){X||Q(kb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),cb,Va)};mxEvent.addGestureListeners(cb,bb,null,Za);mxEvent.addGestureListeners(Fa,bb,null,Za)},function(Fa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Fa)})});Na.setAttribute("disabled","disabled");+Na.className="geBtn gePrimaryBtn";pa=function(){window.setTimeout(function(){""!=xa.value?Na.removeAttribute("disabled"):Na.setAttribute("disabled","disabled")},0)};ya=null!=I?I:urlParams["smart-template"];null!=ya&&"1"!=ya&&(xa.value=decodeURIComponent(ya),pa(),""==ya||null==I&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Na.click()},0));mxEvent.addListener(xa,"change",pa);mxEvent.addListener(xa,"keydown",pa);mxEvent.addListener(xa,"cut",pa);mxEvent.addListener(xa,"paste",+pa);mxEvent.addListener(xa,"keydown",function(Ua){13==Ua.keyCode&&Na.click()});pa=document.createElement("div");pa.style.height="40px";pa.style.marginTop="4px";pa.style.marginBottom="4px";pa.style.whiteSpace="nowrap";pa.style.overflowX="auto";pa.style.overflowY="hidden";pa.appendChild(sa);pa.appendChild(Na);ka.appendChild(pa);ka.appendChild(ta);return ka}function T(){if(la&&null!=l)k||b.hideDialog(),l(la,va,D.value);else if(c)k||b.hideDialog(),c(ba,D.value,da,fa);else{var ka=D.value;if(null!=ka&&+0<ka.length){var xa=function(pa,sa,ya){b.createFile(ya,ba,null!=fa&&0<fa.length?fa:null,pa,function(){b.hideDialog()},null,sa,null,null!=ma&&0<ma.length?ma:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,ka,mxUtils.bind(this,function(pa,sa,ya){xa(sa,ya,pa.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(pa){xa(b.mode,pa,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function P(ka,xa,ta,pa,sa,ya,Ga){return ja!=ka?(null!=ja&&(ja.classList.remove("geTemplateSelected"),ja==Da&&(Ba.style.display="none",Ka.style.display="",La.style.visibility="hidden",Ia.style.visibility=null!=ra?"visible":"hidden")),ka==Da&&(xa=ra,null!=xa?(Ia.style.visibility="visible",Ia.style.visibility=null!=ra?"visible":"hidden",La.style.visibility="visible"):(Ba.style.display="",La.style.visibility="hidden",Ia.style.visibility="hidden")),O.removeAttribute("disabled"),ba=xa,fa=ta,ma=ya,ja=ka,la=pa,da=Ga,va=sa,ja.classList.add("geTemplateSelected"),!0):!1}function v(){Ba.style.display="";Ka.style.display="none";La.style.visibility="hidden";Ia.style.visibility="hidden";Ma.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Ma.select():document.execCommand("selectAll",!1,null)}function A(){Ka.style.backgroundImage=za;Ka.style.backgroundSize="contain";Ba.style.display="none";Ka.style.display="";La.style.visibility="visible";Ia.style.visibility="visible"}function N(ka){var xa=mxUtils.trim(Ma.value);ka||""==xa?null!=wa&&(Ma.value=wa,A()):(Ka.style.backgroundImage="url("+Editor.spinImage+")",Ka.style.backgroundSize="12px 12px",Ka.style.display="",Ba.style.display="none",b.generateDiagram(xa,mxUtils.bind(this,function(ta,pa){ja==Da&&"none"==Ba.style.display&&(za="url(data:image/svg+xml;base64,"+pa.substring(pa.indexOf(",")+1)+")",Da.setAttribute("title",xa),Ia.style.display="",ra=ba=ta,wa=xa,A())}),mxUtils.bind(this,function(ta){ja==Da&&(Ba.style.display="",Ka.style.display=@@ -12130,19 +12134,19 @@ sa.setAttribute("title",ta+" ("+ya.length+")");mxUtils.write(sa,sa.getAttribute(ya=null;if(null!=Ha[pa].content)sa=document.createElement(Ga?"ul":"div"),ta=ka(pa),sa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",sa.setAttribute("title",ta),mxUtils.write(sa,ta),qa.appendChild(sa),ta=sa;else{var Ga=Sa[pa];ta=sa=document.createElement(Ga?"ul":"div");ya=Ha[pa];var Ja=ka(pa,ya);if(null!=Ga){ya=document.createElement("li");var Na=document.createElement("div");Na.className="geTempTreeCaret";Na.setAttribute("title",Ja);mxUtils.write(Na,Ja);ta=Na;ya.appendChild(Na);Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Ua in Ga){var Ra=document.createElement("li"),ab=ka(Ua,Ga[Ua]);Ra.setAttribute("title",ab);mxUtils.write(Ra,ab);xa(pa,Ra,Ua);Ja.appendChild(Ra)}ya.appendChild(Ja);sa.className="geTempTree";sa.appendChild(ya);(function(Oa,Va){mxEvent.addListener(Va,"click",function(){Oa.style.visibility="visible";Oa.classList.toggle("geTempTreeActive");Oa.classList.toggle("geTempTreeNested")&&setTimeout(function(){Oa.style.visibility="hidden"},550);Va.classList.toggle("geTempTreeCaret-down")})})(Ja,Na)}else sa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",sa.setAttribute("title",Ja),mxUtils.write(sa,Ja);null!=F&&(sa.style.padding=F);qa.appendChild(sa)}xa(pa,ta);null==Ya&&ta.click()}C(!1)}-y=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;p=null!=p?p:!1;t=null!=t?t:"light-dark(#ebf2f9, "+Editor.darkColor+")";D=null!=D?D:EditorUi.templateFile;var m=document.createElement("div");m.style.userSelect="none";m.style.height="100%";H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";k&&m.appendChild(H);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width=+y=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;p=null!=p?p:!1;t=null!=t?t:"light-dark(#ebf2f9, "+Editor.darkColor+")";E=null!=E?E:EditorUi.templateFile;var m=document.createElement("div");m.style.userSelect="none";m.style.height="100%";H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";k&&m.appendChild(H);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="40px";u.style.height="40px";u.style.marginRight="10px";u.style.paddingBottom="4px";u.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||y||!k||H.appendChild(u);k&&mxUtils.write(H,(y?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");u=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?u=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?u=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?u=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?u=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?-u=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(u=b.trello.extension);var E=document.createElement("input");E.setAttribute("value",b.defaultFilename+u);E.style.marginLeft="10px";E.style.width=f||y?"144px":"244px";this.init=function(){k&&Editor.selectFilename(E);null!=oa.parentNode&&null!=oa.parentNode.parentNode&&mxEvent.addGestureListeners(oa.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};k&&(H.appendChild(E),B?E.style.width=-f||y?"350px":"450px":null!=b.editor.diagramFileTypes&&(B=FilenameDialog.createFileTypes(b,E,b.editor.diagramFileTypes),B.style.marginLeft="6px",B.style.width=f||y?"80px":"180px",H.appendChild(B)));B=!1;var M=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),O=mxUtils.button(x||mxResources.get("create"),function(){O.setAttribute("disabled","disabled");T();O.removeAttribute("disabled")});+u=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(u=b.trello.extension);var D=document.createElement("input");D.setAttribute("value",b.defaultFilename+u);D.style.marginLeft="10px";D.style.width=f||y?"144px":"244px";this.init=function(){k&&Editor.selectFilename(D);null!=oa.parentNode&&null!=oa.parentNode.parentNode&&mxEvent.addGestureListeners(oa.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};k&&(H.appendChild(D),B?D.style.width=+f||y?"350px":"450px":null!=b.editor.diagramFileTypes&&(B=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),B.style.marginLeft="6px",B.style.width=f||y?"80px":"180px",H.appendChild(B)));B=!1;var M=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),O=mxUtils.button(x||mxResources.get("create"),function(){O.setAttribute("disabled","disabled");T();O.removeAttribute("disabled")});O.className="geBtn gePrimaryBtn";var R=document.createElement("img");R.setAttribute("src",Editor.magnifyImage);R.setAttribute("title",mxResources.get("preview"));R.className="geButton geRoundButton";var S=!1,V=null,X=!1;if(d||g){var W=[],Y=null,Z=null,aa=null,ha=function(ka){O.setAttribute("disabled","disabled");for(var xa=0;xa<W.length;xa++)W[xa].className=xa==ka?"geBtn gePrimaryBtn":"geBtn"};B=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";m.appendChild(x);y=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){qa.style.display="";ia.style.display="";oa.style.left="160px";ha(0);oa.scrollTop=0;oa.innerText="";M=0;Y!=Xa&&(Xa=Y,Ha=Z,db=aa,qa.innerText="",K(),Y=null)});W.push(y);x.appendChild(y);var ea=function(ka){qa.style.display="none";ia.style.display="none";oa.style.left="30px";ha(ka?-1:1);null==Y&&(Y=Xa);oa.scrollTop=0;oa.innerText="";L.spin(oa);var xa=function(ta,pa,sa){M=0;L.stop();Xa=ta;sa=sa||{};var ya=0,Ga;for(Ga in sa)ya+=sa[Ga].length;if(pa)oa.innerText=pa;else if(0==ta.length&&0==ya)oa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(oa.innerText="",0<ya){qa.style.display="";oa.style.left="160px";qa.innerText="";db=0;Ha={"draw.io":ta};for(Ga in sa)Ha[Ga]=sa[Ga];K()}else C(!0)};ka?g(ca.value,xa):d(xa)};d&&(y=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ea()}),x.appendChild(y),W.push(y));if(g){y=document.createElement("span");y.style.marginLeft="10px";y.innerText=mxResources.get("search")+":";x.appendChild(y);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(ka){13==ka.keyCode&&ea(!0)});x.appendChild(ca);y=mxUtils.button(mxResources.get("search"),function(){ea(!0)});y.className="geBtn";x.appendChild(y)}ha(0)}var fa=null,ma=null,ba=null,ja=null,la=null,da=null,va=null,ra=null,wa=null,oa=document.createElement("div");oa.style.border="1px solid #d3d3d3";oa.style.position="absolute";oa.style.left="160px";oa.style.right="34px";x=(k?72:40)+(B?30:0);oa.style.top=x+"px";oa.style.bottom="68px";oa.style.margin="6px 0 0 -1px";oa.style.padding="6px";oa.style.overflow="auto";var ia=document.createElement("div");ia.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap;";var na=document.createElement("input");na.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";na.setAttribute("placeholder",mxResources.get("search"));na.setAttribute("type","text");ia.appendChild(na);var ua=document.createElement("img");ua.setAttribute("src",Editor.magnifyImage);ua.setAttribute("title",mxResources.get("search"));ua.className="geAdaptiveAsset";ua.style.position="relative";ua.style.cursor="pointer";ua.style.outline="none";ua.style.opacity="0.5";ua.style.height="16px";ua.style.left="-20px";ua.style.top="4px";ia.appendChild(ua);mxEvent.addListener(ua,"click",function(){ua.getAttribute("src")!=-Editor.magnifyImage&&(ua.setAttribute("src",Editor.magnifyImage),ua.setAttribute("title",mxResources.get("search")),na.value="",null!=eb&&(eb.click(),eb=null));na.focus()});mxEvent.addListener(na,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var xa=na.value;if(""==xa)null!=eb&&(eb.click(),eb=null);else{if(null==NewDialog.tagsList[D]){var ta={};for(Ra in Ha)if(null==Ha[Ra].content)for(var pa=Ha[Ra],sa=0;sa<pa.length;sa++){var ya=pa[sa];if(null!=ya.tags)for(var Ga=ya.tags.toLowerCase().split(";"),-Ja=0;Ja<Ga.length;Ja++)null==ta[Ga[Ja]]&&(ta[Ga[Ja]]=[]),ta[Ga[Ja]].push(ya)}NewDialog.tagsList[D]=ta}var Na=xa.toLowerCase().split(" ");ta=NewDialog.tagsList[D];if(0<db&&null==ta.__tagsList__){for(Ra in $a)for(pa=$a[Ra],sa=0;sa<pa.length;sa++)for(ya=pa[sa],Ga=ya.title.split(" "),Ga.push(Ra),Ja=0;Ja<Ga.length;Ja++){var Ua=Ga[Ja].toLowerCase();null==ta[Ua]&&(ta[Ua]=[]);ta[Ua].push(ya)}ta.__tagsList__=!0}var Ra=[];pa={};for(sa=Ga=0;sa<Na.length;sa++)if(0<Na[sa].length){Ua=ta[Na[sa]];var ab={};Ra=[];+Editor.magnifyImage&&(ua.setAttribute("src",Editor.magnifyImage),ua.setAttribute("title",mxResources.get("search")),na.value="",null!=eb&&(eb.click(),eb=null));na.focus()});mxEvent.addListener(na,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var xa=na.value;if(""==xa)null!=eb&&(eb.click(),eb=null);else{if(null==NewDialog.tagsList[E]){var ta={};for(Ra in Ha)if(null==Ha[Ra].content)for(var pa=Ha[Ra],sa=0;sa<pa.length;sa++){var ya=pa[sa];if(null!=ya.tags)for(var Ga=ya.tags.toLowerCase().split(";"),+Ja=0;Ja<Ga.length;Ja++)null==ta[Ga[Ja]]&&(ta[Ga[Ja]]=[]),ta[Ga[Ja]].push(ya)}NewDialog.tagsList[E]=ta}var Na=xa.toLowerCase().split(" ");ta=NewDialog.tagsList[E];if(0<db&&null==ta.__tagsList__){for(Ra in $a)for(pa=$a[Ra],sa=0;sa<pa.length;sa++)for(ya=pa[sa],Ga=ya.title.split(" "),Ga.push(Ra),Ja=0;Ja<Ga.length;Ja++){var Ua=Ga[Ja].toLowerCase();null==ta[Ua]&&(ta[Ua]=[]);ta[Ua].push(ya)}ta.__tagsList__=!0}var Ra=[];pa={};for(sa=Ga=0;sa<Na.length;sa++)if(0<Na[sa].length){Ua=ta[Na[sa]];var ab={};Ra=[];if(null!=Ua)for(Ja=0;Ja<Ua.length;Ja++)ya=Ua[Ja],0==Ga==(null==pa[ya.url])&&(ab[ya.url]=!0,Ra.push(ya));pa=ab;Ga++}oa.scrollTop=0;oa.innerText="";M=0;ta=document.createElement("div");ta.style.padding="6px";ta.style.whiteSpace="nowrap";ta.style.overflow="hidden";ta.style.textOverflow="ellipsis";ya=mxResources.get(0==Ra.length?"noResultsFor":"resultsFor",[xa]);ta.setAttribute("title",ya);mxUtils.write(ta,ya);oa.appendChild(ta);null!=Ya&&null==eb&&(Ya.style.backgroundColor="",eb=Ya,Ya=ta);Xa=Ra;Y=null;C(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(na,"keyup",mxUtils.bind(this,function(ka){""==na.value?(ua.setAttribute("src",Editor.magnifyImage),ua.setAttribute("title",mxResources.get("search"))):(ua.setAttribute("src",Editor.crossImage),ua.setAttribute("title",mxResources.get("reset")))}));x+=23;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(oa,"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var Aa=140,Ca=Aa,Da=null,za="url("+Editor.sparklesImage+")",Ba=document.createElement("div");Ba.className="geGenerateDiagramForm";Ba.style.position="absolute";Ba.style.width="100%";Ba.style.height="100%";var Ka=document.createElement("div");Ka.className="geTemplatePreview geAdaptiveAsset";Ka.style.backgroundImage=za;var Ma=document.createElement("textarea");Ma.setAttribute("placeholder",mxResources.get("describeYourDiagram"));Ma.className=@@ -12150,32 +12154,32 @@ C(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(na,"keyup",mxUtils.bind(this,f"</diagram></mxfile>";Q(xa,mxEvent.getClientX(ka),mxEvent.getClientY(ka),Da,wa)}});var La=R.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";x=R.cloneNode(!0);x.setAttribute("src",Editor.helpImage);x.setAttribute("title",mxResources.get("help"));mxEvent.addListener(x,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});Ba.appendChild(Ma);Ba.appendChild(Ea);Ba.appendChild(x);Ba.style.display="none";mxEvent.addListener(La,"click",v);mxEvent.addListener(Ma,"input",function(){""!=Ma.value?Ea.removeAttribute("disabled"):Ea.setAttribute("disabled","disabled")});mxEvent.addListener(Ea,"click",function(){N()});mxEvent.addListener(Ma,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(N(!0),mxEvent.consume(ka)):(N(),mxEvent.consume(ka))});var Ha={},Sa={},$a={},db=0,fb=!0,Ya=null,eb=null;Ha.basic=G?[]:[{title:"blankDiagram"}];var Xa=Ha.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ha.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ha.smartTemplate={content:U()});if(!f){var jb=function(){mxUtils.get(Wa,function(ka){if(!Ta){Ta=!0;ka=ka.getXml().documentElement.firstChild;for(var xa=-{};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&console.log("Parser error in "+D+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ta=ka.getAttribute("name"),pa=ka.getElementsByTagName("add"),sa=[],ya=0;ya<pa.length;ya++)sa.push(encodeURIComponent(mxUtils.getTextContent(pa[ya])));null!=ta&&0<sa.length&&(xa[ta]=sa.join(";"))}else if(sa=ka.getAttribute("url"),null!=sa){pa=ka.getAttribute("section");ta=ka.getAttribute("subsection");if(null==+{};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&console.log("Parser error in "+E+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ta=ka.getAttribute("name"),pa=ka.getElementsByTagName("add"),sa=[],ya=0;ya<pa.length;ya++)sa.push(encodeURIComponent(mxUtils.getTextContent(pa[ya])));null!=ta&&0<sa.length&&(xa[ta]=sa.join(";"))}else if(sa=ka.getAttribute("url"),null!=sa){pa=ka.getAttribute("section");ta=ka.getAttribute("subsection");if(null==pa&&(ya=sa.indexOf("/"),pa=sa.substring(0,ya),null==ta)){var Ga=sa.indexOf("/",ya+1);-1<Ga&&(ta=sa.substring(ya+1,Ga))}ya=Ha[pa];null==ya&&(ya=[],Ha[pa]=ya);sa=ka.getAttribute("clibs");null!=xa[sa]&&(sa=xa[sa]);sa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:sa,tags:ka.getAttribute("tags")};ya.push(sa);null!=ta&&(ya=Sa[pa],null==ya&&(ya={},Sa[pa]=ya),pa=ya[ta],-null==pa&&(pa=[],ya[ta]=pa),pa.push(sa))}ka=ka.nextSibling}L.stop();K()}})};m.appendChild(ia);m.appendChild(qa);m.appendChild(oa);var Ta=!1,Wa=D;/^https?:\/\//.test(Wa)&&!b.editor.isCorsEnabledForUrl(Wa)&&(Wa=PROXY_URL+"?url="+encodeURIComponent(Wa));L.spin(oa);null!=z?z(function(ka,xa){$a=ka;aa=db=xa;jb()},jb):jb();Z=Ha}mxEvent.addListener(E,"keypress",function(ka){b.dialog.container.firstChild==m&&13==ka.keyCode&&T()});z=document.createElement("div");z.style.marginTop=f?"4px":"16px";z.style.textAlign=+null==pa&&(pa=[],ya[ta]=pa),pa.push(sa))}ka=ka.nextSibling}L.stop();K()}})};m.appendChild(ia);m.appendChild(qa);m.appendChild(oa);var Ta=!1,Wa=E;/^https?:\/\//.test(Wa)&&!b.editor.isCorsEnabledForUrl(Wa)&&(Wa=PROXY_URL+"?url="+encodeURIComponent(Wa));L.spin(oa);null!=z?z(function(ka,xa){$a=ka;aa=db=xa;jb()},jb):jb();Z=Ha}mxEvent.addListener(D,"keypress",function(ka){b.dialog.container.firstChild==m&&13==ka.keyCode&&T()});z=document.createElement("div");z.style.marginTop=f?"4px":"16px";z.style.textAlign="right";z.style.position="absolute";z.style.left="40px";z.style.bottom="24px";z.style.right="40px";G=mxUtils.button(mxResources.get("cancel"),function(){null!=q&&q();b.hideDialog(!0)});G.className="geBtn";!b.editor.cancelFirst||p&&null==q||z.appendChild(G);f||"1"==urlParams.embed||p||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(ta){ba=ta;fa=null;templateRealURl=xa;b.hideDialog();T()},function(ta){b.handleError(ta)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),f.className="geBtn",z.appendChild(f));Graph.fileSupport&&n&&(n=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(xa){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),n.className="geBtn",z.appendChild(n));z.appendChild(O);b.editor.cancelFirst||null!=c||p&&null==q||z.appendChild(G);m.appendChild(z);this.container=m};NewDialog.tagsList={};-var SaveDialog=function(b,f,k,c,p,q,t,y){function H(J,K,m,u,E,M){var L=null;if(null==c||0>mxUtils.indexOf(c,J)){E=null!=E?E:b.getTitleForService(J);var O=0<=mxUtils.indexOf(T,J);if(O||null!=b.getServiceForName(J)){L=document.createElement("option");var R="";!O&&b.isOffline()&&(L.setAttribute("disabled","disabled"),R=" ("+mxResources.get("offline")+")");if("pick"==M)L.innerHTML=mxUtils.htmlEntities(E)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+R,L.setAttribute("value",-"pickFolder-"+J),L.setAttribute("title",E+" - "+mxResources.get("pickFolder")+"...");else{O=J+(null!=m?"-"+m:"");var S=A[O];null!=S&&null!=S.option&&S.option.parentNode.removeChild(S.option);S=null;if(null!=K){"/"==K.charAt(K.length-1)&&(K=K.substring(0,K.length-1));"/"==K.charAt(0)&&(K=K.substring(1));S=K;if(J!=App.MODE_GITHUB&&J==App.MODE_GITLAB){var V=S.lastIndexOf("/");0<=V&&(S=S.substring(V+1))}40<S.length&&(S=S.substring(0,20)+"..."+S.substring(S.length-20))}L.innerHTML=mxUtils.htmlEntities(E)+-(null!=S?" – "+mxUtils.htmlEntities(S):"")+R;L.setAttribute("title",E+(null!=K?" ("+K+")":"")+(null!=m&&decodeURIComponent(m)!=K?" ["+m+"]":""));L.setAttribute("value",O);A[O]={option:L,mode:J,path:K,id:m};SaveDialog.lastValue==O&&null==y&&"disabled"==!L.getAttribute("disabled")?u=!0:null==u&&("root"==M?u=null==y&&b.mode==J||null!=J&&J==y:"pickFolder-"==Q.value.substring(0,11)&&(u=!0));u&&L.setAttribute("selected","selected")}Q.appendChild(L)}}return L}function F(J){b.pickFolder(J,-function(K){var m=null;J==App.MODE_GOOGLE&&null!=K.docs&&0<K.docs.length?m={mode:J,path:K.docs[0].name,id:K.docs[0].id}:J==App.MODE_ONEDRIVE&&null!=K.value&&0<K.value.length?m={mode:J,path:K.value[0].name,id:OneDriveFile.prototype.getIdOf(K.value[0])}:(J==App.MODE_GITHUB||J==App.MODE_GITLAB)&&null!=K&&0<K.length&&(m={mode:J,path:decodeURIComponent(K),id:K});null!=m&&(U.style.display="",b.addRecent(m,"Folders",5),K=H(m.mode,m.path,m.id,!0),Q.innerHTML="",A={},D(),m=Q.selectedIndex,Q.value=K.value,-0>Q.selectedIndex&&(Q.selectedIndex=m))},!0,!0,!0,!0)}function D(){var J=b.getRecent("Folders"),K=0;if(null!=J&&0<J.length){for(var m=0;m<J.length;m++)null!=H(J[m].mode,J[m].path,J[m].id)&&K++;0<K&&Q.appendChild(P.cloneNode(!0))}H(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");H(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(H(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),H(App.MODE_ONEDRIVE,null,+var SaveDialog=function(b,f,k,c,p,q,t,y){function H(J,K,m,u,D,M){var L=null;if(null==c||0>mxUtils.indexOf(c,J)){D=null!=D?D:b.getTitleForService(J);var O=0<=mxUtils.indexOf(T,J);if(O||null!=b.getServiceForName(J)){L=document.createElement("option");var R="";!O&&b.isOffline()&&(L.setAttribute("disabled","disabled"),R=" ("+mxResources.get("offline")+")");if("pick"==M)L.innerHTML=mxUtils.htmlEntities(D)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+R,L.setAttribute("value",+"pickFolder-"+J),L.setAttribute("title",D+" - "+mxResources.get("pickFolder")+"...");else{O=J+(null!=m?"-"+m:"");var S=A[O];null!=S&&null!=S.option&&S.option.parentNode.removeChild(S.option);S=null;if(null!=K){"/"==K.charAt(K.length-1)&&(K=K.substring(0,K.length-1));"/"==K.charAt(0)&&(K=K.substring(1));S=K;if(J!=App.MODE_GITHUB&&J==App.MODE_GITLAB){var V=S.lastIndexOf("/");0<=V&&(S=S.substring(V+1))}40<S.length&&(S=S.substring(0,20)+"..."+S.substring(S.length-20))}L.innerHTML=mxUtils.htmlEntities(D)++(null!=S?" – "+mxUtils.htmlEntities(S):"")+R;L.setAttribute("title",D+(null!=K?" ("+K+")":"")+(null!=m&&decodeURIComponent(m)!=K?" ["+m+"]":""));L.setAttribute("value",O);A[O]={option:L,mode:J,path:K,id:m};SaveDialog.lastValue==O&&null==y&&"disabled"==!L.getAttribute("disabled")?u=!0:null==u&&("root"==M?u=null==y&&b.mode==J||null!=J&&J==y:"pickFolder-"==Q.value.substring(0,11)&&(u=!0));u&&L.setAttribute("selected","selected")}Q.appendChild(L)}}return L}function F(J){b.pickFolder(J,+function(K){var m=null;J==App.MODE_GOOGLE&&null!=K.docs&&0<K.docs.length?m={mode:J,path:K.docs[0].name,id:K.docs[0].id}:J==App.MODE_ONEDRIVE&&null!=K.value&&0<K.value.length?m={mode:J,path:K.value[0].name,id:OneDriveFile.prototype.getIdOf(K.value[0])}:(J==App.MODE_GITHUB||J==App.MODE_GITLAB)&&null!=K&&0<K.length&&(m={mode:J,path:decodeURIComponent(K),id:K});null!=m&&(U.style.display="",b.addRecent(m,"Folders",5),K=H(m.mode,m.path,m.id,!0),Q.innerHTML="",A={},E(),m=Q.selectedIndex,Q.value=K.value,+0>Q.selectedIndex&&(Q.selectedIndex=m))},!0,!0,!0,!0)}function E(){var J=b.getRecent("Folders"),K=0;if(null!=J&&0<J.length){for(var m=0;m<J.length;m++)null!=H(J[m].mode,J[m].path,J[m].id)&&K++;0<K&&Q.appendChild(P.cloneNode(!0))}H(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");H(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(H(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),H(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&H(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);H(App.MODE_GITHUB,null,null,null,null,"pick");H(App.MODE_GITLAB,null,null,null,null,"pick");H(App.MODE_TRELLO);J=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&J&&H(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&H(App.MODE_BROWSER);J&&H("download");Editor.popupsAllowed&&H("_blank",null,null,null,mxResources.get("openInNewWindow"));0<K&&(Q.appendChild(P.cloneNode(!0)),K=Q.value,Q.appendChild(U),Q.value=K);if("pickFolder-"==Q.value.substring(0,11)||"reset"==Q.value)K=document.createElement("option"),K.setAttribute("value",""),K.setAttribute("selected","selected"),mxUtils.write(K,mxResources.get("pickFolder")+"..."),Q.insertBefore(K,Q.firstChild);v=Q.value}function d(){if("reset"==Q.value)b.resetRecent("Folders"),Q.innerHTML="",-Q.value="",pickFolderOption=null,A={},D();else if("pickFolder-"==Q.value.substring(0,11)){var J=Q.value.substring(11);Q.value=v;F(J)}else if(null!=C&&null!=A[Q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){J=b.getExtensionForService(A[Q.value].mode);var K=G.value;null!=J&&0>f.indexOf(".")&&0>K.indexOf(".")&&(G.value=K+J)}N.innerHTML="";mxUtils.write(N,mxResources.get("download"==Q.value||"_blank"==Q.value?"ok":"save"));""==Q.value?N.setAttribute("disabled",+Q.value="",pickFolderOption=null,A={},E();else if("pickFolder-"==Q.value.substring(0,11)){var J=Q.value.substring(11);Q.value=v;F(J)}else if(null!=C&&null!=A[Q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){J=b.getExtensionForService(A[Q.value].mode);var K=G.value;null!=J&&0>f.indexOf(".")&&0>K.indexOf(".")&&(G.value=K+J)}N.innerHTML="";mxUtils.write(N,mxResources.get("download"==Q.value||"_blank"==Q.value?"ok":"save"));""==Q.value?N.setAttribute("disabled","disabled"):N.removeAttribute("disabled")}var g=document.createElement("div");g.style.display="flex";g.style.flexWrap="wrap";g.style.whiteSpace="nowrap";var l=document.createElement("div");l.style.display="grid";l.style.gap="5px 8px";l.style.gridAutoRows="auto auto 44px";l.style.gridAutoColumns="0fr minmax(0,1fr)";l.style.width="100%";var n=null,x=null;if(null!=p&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){l.style.display="inline-grid";l.style.flexBasis="75%";n=document.createElement("div");n.style.display="inline-block";n.style.height="auto";n.style.maxWidth="25%";n.style.margin="auto";var z=document.createElement("img"),B=t?p:btoa(unescape(encodeURIComponent(p))),I="data:"+q+";base64,"+B;z.setAttribute("src",I);z.style.boxSizing="border-box";z.style.maxHeight="50px";z.style.maxWidth="100%";z.style.paddingLeft="10px";n.appendChild(z);"image/png"!=q&&"image/svg+xml"!=q||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(x=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(I,null,null,q,mxUtils.bind(this,function(){"copy"==y?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),mxUtils.bind(this,function(J){b.handleError(J)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(n.setAttribute("title",mxResources.get("openInNewWindow")),n.style.cursor="pointer",mxEvent.addGestureListeners(n,null,null,function(J){mxEvent.isPopupTrigger(J)||b.openInNewWindow(p,q,t)})):n.setAttribute("title",mxResources.get("preview"))}z=document.createElement("div");z.style.display="flex";z.style.padding="1px";z.style.alignItems="center";z.style.justifyContent="flex-end";z.style.gridColumn="1";z.style.whiteSpace="nowrap";B=document.createElement("div");B.style.display="grid";B.style.padding="1px";B.style.alignItems="center";B.style.gridColumn="2";B.style.gridAutoColumns="minmax(0,1fr) auto";B.style.gap="6px";mxUtils.write(z,mxResources.get("saveAs")+":");var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("value",f);G.style.boxSizing="border-box";G.style.width="100%";B.appendChild(G);l.appendChild(z);l.appendChild(B);var C=null;null!=b.editor.diagramFileTypes&&null==q&&(z=z.cloneNode(!1),B=B.cloneNode(!1),mxUtils.write(z,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",B.appendChild(C),l.appendChild(z),l.appendChild(B));z=z.cloneNode(!1);B=B.cloneNode(!1);mxUtils.write(z,mxResources.get("where")+":");var Q=document.createElement("select");Q.style.textOverflow="ellipsis";Q.style.gridColumn="1";var U=document.createElement("option");mxUtils.write(U,mxResources.get("reset"));U.setAttribute("value","reset");var T=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var v=null,A={},N=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=Q.value;var J=A[SaveDialog.lastValue];null!=J&&k(G,J.mode,J.id)},null,"geBtn gePrimaryBtn");-mxEvent.addListener(G,"keypress",function(J){13==J.keyCode&&("copy"==y&&null!=x?x.click():N.click())});mxEvent.addListener(Q,"change",d);D();B.appendChild(Q);null!=SaveDialog.lastValue&&null!=A[SaveDialog.lastValue]&&(Q.value=SaveDialog.lastValue);d();l.appendChild(z);l.appendChild(B);g.appendChild(l);null!=n&&g.appendChild(n);l=document.createElement("div");l.style.flexBasis="100%";l.style.textAlign="right";l.style.marginTop=null!=q?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||l.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&l.appendChild(n);"copy"==y&&null!=x?(x.className="geBtn gePrimaryBtn",N.className="geBtn",l.appendChild(N),l.appendChild(x)):(null!=x&&l.appendChild(x),l.appendChild(N));b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.init=function(){Editor.selectFilename(G)};this.container=g},CreateDialog=function(b,f,k,c,p,q,t,y,H,F,D,d,g,l,n,x,z){function B(v,A,N,J){function K(){mxEvent.addListener(m,+mxEvent.addListener(G,"keypress",function(J){13==J.keyCode&&("copy"==y&&null!=x?x.click():N.click())});mxEvent.addListener(Q,"change",d);E();B.appendChild(Q);null!=SaveDialog.lastValue&&null!=A[SaveDialog.lastValue]&&(Q.value=SaveDialog.lastValue);d();l.appendChild(z);l.appendChild(B);g.appendChild(l);null!=n&&g.appendChild(n);l=document.createElement("div");l.style.flexBasis="100%";l.style.textAlign="right";l.style.marginTop=null!=q?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||l.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));+n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&l.appendChild(n);"copy"==y&&null!=x?(x.className="geBtn gePrimaryBtn",N.className="geBtn",l.appendChild(N),l.appendChild(x)):(null!=x&&l.appendChild(x),l.appendChild(N));b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.init=function(){Editor.selectFilename(G)};this.container=g},CreateDialog=function(b,f,k,c,p,q,t,y,H,F,E,d,g,l,n,x,z){function B(v,A,N,J){function K(){mxEvent.addListener(m,"click",function(){var O=N;if(t){var R=C.value,S=R.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>S){O=null!=O?O:P.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=S&&(R=R.substring(0,S));C.value=R+V}}I(N)})}var m=document.createElement("a");m.style.overflow=-"hidden";var u=document.createElement("img");u.src=v;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";m.style.display="inline-block";m.className="geBaseButton";m.style.position="relative";m.style.margin="4px";m.style.padding="8px 8px 10px 8px";m.style.whiteSpace="nowrap";m.appendChild(u);m.style.color="gray";m.style.fontSize="11px";var E=document.createElement("div");m.appendChild(E);mxUtils.write(E,A);if(null!=-J&&null==b[J]){u.style.visibility="hidden";mxUtils.setOpacity(E,10);var M=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});M.spin(m);var L=window.setTimeout(function(){null==b[J]&&(M.stop(),m.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(L),mxUtils.setOpacity(E,100),u.style.visibility="",M.stop(),K())}))}else K();U.appendChild(m);-++T==d&&(mxUtils.br(U),T=0)}function I(v){var A=C.value;if(null==v||null!=A&&0<A.length)z&&b.hideDialog(),k(A,v,C)}D="1"==urlParams.noDevice?!1:D;t=null!=t?t:!0;y=null!=y?y:!0;d=null!=d?d:4;z=null!=z?z:!0;q=document.createElement("div");q.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(q);var G=document.createElement("h2");mxUtils.write(G,p||mxResources.get("create"));G.style.marginTop="0px";G.style.marginBottom="24px";q.appendChild(G);p=document.createElement("span");mxUtils.write(p,mxResources.get("filename")++"hidden";var u=document.createElement("img");u.src=v;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";m.style.display="inline-block";m.className="geBaseButton";m.style.position="relative";m.style.margin="4px";m.style.padding="8px 8px 10px 8px";m.style.whiteSpace="nowrap";m.appendChild(u);m.style.color="gray";m.style.fontSize="11px";var D=document.createElement("div");m.appendChild(D);mxUtils.write(D,A);if(null!=+J&&null==b[J]){u.style.visibility="hidden";mxUtils.setOpacity(D,10);var M=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});M.spin(m);var L=window.setTimeout(function(){null==b[J]&&(M.stop(),m.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(L),mxUtils.setOpacity(D,100),u.style.visibility="",M.stop(),K())}))}else K();U.appendChild(m);+++T==d&&(mxUtils.br(U),T=0)}function I(v){var A=C.value;if(null==v||null!=A&&0<A.length)z&&b.hideDialog(),k(A,v,C)}E="1"==urlParams.noDevice?!1:E;t=null!=t?t:!0;y=null!=y?y:!0;d=null!=d?d:4;z=null!=z?z:!0;q=document.createElement("div");q.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(q);var G=document.createElement("h2");mxUtils.write(G,p||mxResources.get("create"));G.style.marginTop="0px";G.style.marginBottom="24px";q.appendChild(G);p=document.createElement("span");mxUtils.write(p,mxResources.get("filename")+":");p.style.maxWidth="106px";p.style.overflow="hidden";p.style.textOverflow="ellipsis";p.style.display="inline-block";q.appendChild(p);var C=document.createElement("input");C.setAttribute("value",f);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};q.appendChild(C);null!=x&&null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width="90px",q.appendChild(x));x=null;if("1"!=urlParams.noDevice&&null!=g&&null!=l&&"image/"==l.substring(0,6)&&("image/svg"!=l.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";p=document.createElement("img");var Q=n?g:btoa(unescape(encodeURIComponent(g)));p.setAttribute("src","data:"+l+";base64,"+Q);p.style.position="absolute";p.style.top="70px";p.style.right="100px";p.style.maxWidth="120px";p.style.maxHeight="80px";mxUtils.setPrefixedStyle(p.style,"transform","translate(50%,-50%)");q.appendChild(p);mxClient.IS_FF||"image/png"!=l||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(x=mxUtils.button(mxResources.get("copy"),function(v){v=b.base64ToBlob(Q,"image/png");v=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="data:'+l+";base64,"+Q+'">'],{type:"text/html"})});navigator.clipboard.write([v]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(A){b.handleError(A)}))}),x.style.marginTop="6px",@@ -12183,40 +12187,40 @@ x.className="geBtn");H&&Editor.popupsAllowed&&(p.style.cursor="pointer",mxEvent.mxUtils.write(g,mxResources.get("googleDrive")),P.appendChild(g),B(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),P.appendChild(g),b.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),B(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),P.appendChild(g),b.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),B(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),P.appendChild(g),B(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITLAB),mxUtils.write(g,mxResources.get("gitlab")),P.appendChild(g),B(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),P.appendChild(g),B(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),-App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),P.appendChild(g),b.mode!=App.MODE_DEVICE&&y||g.setAttribute("selected","selected"),D&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),y.setAttribute("value",-App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),P.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=F&&(D=mxUtils.button(mxResources.get("help"),function(){b.openLink(F)}),D.className="geBtn",y.appendChild(D));D=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():-(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});D.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(D);null==c&&(g=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),g.className="geBtn",y.appendChild(g));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),H.className="geBtn",y.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),function(){I("download")}),-H.className="geBtn",y.appendChild(H),null!=x&&(H.style.marginTop="6px",y.style.marginTop="6px"));null!=x&&(mxUtils.br(y),y.appendChild(x));b.editor.cancelFirst&&null==c||y.appendChild(D);mxEvent.addListener(C,"keypress",function(v){13==v.keyCode?I(App.MODE_DEVICE):27==v.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});q.appendChild(y);this.container=q};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),P.appendChild(g),b.mode!=App.MODE_DEVICE&&y||g.setAttribute("selected","selected"),E&&B(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),y.setAttribute("value",+App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),P.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),B(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=F&&(E=mxUtils.button(mxResources.get("help"),function(){b.openLink(F)}),E.className="geBtn",y.appendChild(E));E=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():+(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});E.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(E);null==c&&(g=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),g.className="geBtn",y.appendChild(g));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),H.className="geBtn",y.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),function(){I("download")}),+H.className="geBtn",y.appendChild(H),null!=x&&(H.style.marginTop="6px",y.style.marginTop="6px"));null!=x&&(mxUtils.br(y),y.appendChild(x));b.editor.cancelFirst&&null==c||y.appendChild(E);mxEvent.addListener(C,"keypress",function(v){13==v.keyCode?I(App.MODE_DEVICE):27==v.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});q.appendChild(y);this.container=q};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;var PopupDialog=function(b,f,k,c,p){p=null!=p?p:!0;var q=document.createElement("div");q.style.textAlign="center";q.style.height="100%";mxUtils.write(q,mxResources.get("fileOpenLocation"));mxUtils.br(q);mxUtils.br(q);var t=mxUtils.button(mxResources.get("openInThisWindow"),function(){p&&b.hideDialog();null!=c&&c()});t.className="geBtn";t.style.marginBottom="8px";t.style.width="280px";q.appendChild(t);mxUtils.br(q);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){p&&b.hideDialog();-null!=k&&k();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=t.style.width;q.appendChild(y);mxUtils.br(q);mxUtils.br(q);mxUtils.write(q,mxResources.get("allowPopups"));this.container=q},ImageDialog=function(b,f,k,c,p,q,t,y){function H(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}q=null!=q?q:!0;var F=b.editor.graph,D=document.createElement("div");-mxUtils.write(D,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("value",k);d.setAttribute("type","text");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.marginTop=+null!=k&&k();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=t.style.width;q.appendChild(y);mxUtils.br(q);mxUtils.br(q);mxUtils.write(q,mxResources.get("allowPopups"));this.container=q},ImageDialog=function(b,f,k,c,p,q,t,y){function H(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}q=null!=q?q:!0;var F=b.editor.graph,E=document.createElement("div");+mxUtils.write(E,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("value",k);d.setAttribute("type","text");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.marginTop="6px";d.style.width=(Graph.fileSupport?460:340)-20+"px";d.style.backgroundImage="url('"+Editor.crossImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(k,"click",function(){d.value="";d.focus()});f.appendChild(d);f.appendChild(k);D.appendChild(f);var g=y,l,n,x=function(C,Q,U,T){var P="data:"==C.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(v){b.spinner.stop();b.hideDialog();var A=!1===T?1:null!=Q&&null!=U?Math.max(Q/v.width,U/v.height):Math.min(1,Math.min(520/v.width,520/v.height));q&&(C=b.convertDataUri(C));c(C,+"')";mxEvent.addListener(k,"click",function(){d.value="";d.focus()});f.appendChild(d);f.appendChild(k);E.appendChild(f);var g=y,l,n,x=function(C,Q,U,T){var P="data:"==C.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(v){b.spinner.stop();b.hideDialog();var A=!1===T?1:null!=Q&&null!=U?Math.max(Q/v.width,U/v.height):Math.min(1,Math.min(520/v.width,520/v.height));q&&(C=b.convertDataUri(C));c(C,Math.round(Number(v.width)*A),Math.round(Number(v.height)*A),g,l,n)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(C,null,null,g,l,n)):(C=b.convertDataUri(C),Q=null==Q?120:Q,U=null==U?100:U,b.hideDialog(),c(C,Q,U,g,l,n))},z=function(C,Q){if(null!=C){var U=p?null:F.getModel().getGeometry(F.getSelectionCell());null!=U?x(C,U.width,U.height,Q):x(C,null,null,Q)}else b.hideDialog(),c(null)};this.init=function(){d.focus();-if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=D.parentNode,Q=null;mxEvent.addListener(C,"dragleave",function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==Q&&(Q=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<U.dataTransfer.files.length)b.importFiles(U.dataTransfer.files,+if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=E.parentNode,Q=null;mxEvent.addListener(C,"dragleave",function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==Q&&(Q=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<U.dataTransfer.files.length)b.importFiles(U.dataTransfer.files,0,0,b.maxImageSize,function(P,v,A,N,J,K,m,u){z(P,u)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var v=0;v<P.length;v++)P[v]()},!mxEvent.isControlDown(U),null,null,!0);else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var T=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&z(decodeURIComponent(T))}U.stopPropagation();U.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(d.value=C.url));d.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");mxEvent.addListener(B,"change",function(C){null!=B.files&&(b.importFiles(B.files,0,0,b.maxImageSize,function(Q,U,T,P,v,A){z(Q)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var U=0;U<Q.length;U++)Q[U]()},!0),B.type="",B.type="file",B.value="")});B.style.display="none";document.body.appendChild(B);b.imgDlgFileInputElt=B}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";y.appendChild(f)}mxEvent.addListener(d,"keypress",function(C){13==C.keyCode&&z(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,d.value,g,function(Q,U,T){g=Q;l=U;n=T});b.showDialog(C.container,300,390,!0,!0)});t&&(I.className="geBtn",y.appendChild(I));var G=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(d.value),Q=new Image;Q.onload=function(){b.editor.convertImageToDataUri(C,function(U){b.confirmImageResize(function(T){b.resizeImage(Q,U,mxUtils.bind(this,function(P,v,A){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(d.value=P,H()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},Q.width>b.maxImageSize||Q.height>b.maxImageSize||U.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};Q.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};-Q.src=C}});G.className="geBtn";mxEvent.addListener(d,"change",function(C){g=null;H()});H();y.appendChild(G);t=mxUtils.button(mxResources.get("apply"),function(){z(d.value)});t.className="geBtn gePrimaryBtn";y.appendChild(t);b.editor.cancelFirst||y.appendChild(k);Graph.fileSupport&&(y.style.marginTop="120px",D.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",D.style.backgroundPosition="center 65%",D.style.backgroundRepeat="no-repeat",t=document.createElement("div"),t.style.position="absolute",-t.style.width="420px",t.style.top="58%",t.style.textAlign="center",t.style.fontSize="18px",t.style.color="#a0c3ff",mxUtils.write(t,mxResources.get("dragImagesHere")),D.appendChild(t));D.appendChild(y);this.container=D},LinkDialog=function(b,f,k,c,p,q,t){function y(C,Q){var U=document.createElement("option");mxUtils.write(U,mxResources.get(C));U.value=C;I.appendChild(U);G[C]=Q}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var F=document.createElement("div");-F.className="geUrlLinkContainer";F.style.backgroundColor="transparent";F.style.borderColor="transparent";F.style.whiteSpace="nowrap";F.style.textOverflow="clip";F.style.cursor="default";var D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("dragUrlsHere"));D.setAttribute("type","text");D.style.marginTop="6px";D.style.width="414px";D.style.boxSizing="border-box";D.style.backgroundRepeat="no-repeat";D.style.backgroundPosition="100% 50%";D.style.paddingRight="16px";D.style.marginBottom=-"4px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.backgroundImage="url("+Editor.crossImage+")";d.className="geAdaptiveAsset";d.style.display="inline-block";d.style.position="relative";d.style.top="3px";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";mxEvent.addListener(d,"click",function(){D.value="";D.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value",+Q.src=C}});G.className="geBtn";mxEvent.addListener(d,"change",function(C){g=null;H()});H();y.appendChild(G);t=mxUtils.button(mxResources.get("apply"),function(){z(d.value)});t.className="geBtn gePrimaryBtn";y.appendChild(t);b.editor.cancelFirst||y.appendChild(k);Graph.fileSupport&&(y.style.marginTop="120px",E.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",E.style.backgroundPosition="center 65%",E.style.backgroundRepeat="no-repeat",t=document.createElement("div"),t.style.position="absolute",+t.style.width="420px",t.style.top="58%",t.style.textAlign="center",t.style.fontSize="18px",t.style.color="#a0c3ff",mxUtils.write(t,mxResources.get("dragImagesHere")),E.appendChild(t));E.appendChild(y);this.container=E},LinkDialog=function(b,f,k,c,p,q,t){function y(C,Q){var U=document.createElement("option");mxUtils.write(U,mxResources.get(C));U.value=C;I.appendChild(U);G[C]=Q}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var F=document.createElement("div");+F.className="geUrlLinkContainer";F.style.backgroundColor="transparent";F.style.borderColor="transparent";F.style.whiteSpace="nowrap";F.style.textOverflow="clip";F.style.cursor="default";var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("dragUrlsHere"));E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="414px";E.style.boxSizing="border-box";E.style.backgroundRepeat="no-repeat";E.style.backgroundPosition="100% 50%";E.style.paddingRight="16px";E.style.marginBottom=+"4px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.backgroundImage="url("+Editor.crossImage+")";d.className="geAdaptiveAsset";d.style.display="inline-block";d.style.position="relative";d.style.top="3px";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";mxEvent.addListener(d,"click",function(){E.value="";E.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="414px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=t&&(x.setAttribute("checked","checked"),x.defaultChecked=-!0);t=null!=t?t:"_blank";x.setAttribute("title",t);q&&(D.style.width="200px");if(p&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(D.setAttribute("value",f),g.setAttribute("checked","checked"),g.defaultChecked=!0);F.appendChild(g);F.appendChild(D);F.appendChild(d);q&&(F.appendChild(x),mxUtils.write(F,mxResources.get("openInNewWindow")));mxUtils.br(F);F.appendChild(l);p=!1;for(q=0;q<b.pages.length;q++)d=document.createElement("option"),mxUtils.write(d,+!0);t=null!=t?t:"_blank";x.setAttribute("title",t);q&&(E.style.width="200px");if(p&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(E.setAttribute("value",f),g.setAttribute("checked","checked"),g.defaultChecked=!0);F.appendChild(g);F.appendChild(E);F.appendChild(d);q&&(F.appendChild(x),mxUtils.write(F,mxResources.get("openInNewWindow")));mxUtils.br(F);F.appendChild(l);p=!1;for(q=0;q<b.pages.length;q++)d=document.createElement("option"),mxUtils.write(d,b.pages[q].getName()||mxResources.get("pageWithNumber",[q+1])),d.setAttribute("value","data:page/id,"+b.pages[q].getId()),f==d.getAttribute("value")&&(d.setAttribute("selected","selected"),p=!0),n.appendChild(d);if(!p&&l.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");n.appendChild(z);mxEvent.addListener(n,"change",function(){null==z.parentNode||-z.selected||z.parentNode.removeChild(z)})}F.appendChild(n)}else D.setAttribute("value",f),F.appendChild(D),F.appendChild(d);H.appendChild(F);var B=mxUtils.button(k,function(){b.hideDialog();c(l.checked?"pageNotFound"!==n.value?n.value:f:D.value,LinkDialog.selectedDocs,x.checked?t:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?n.focus():(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",-!1,null));mxEvent.addListener(n,"focus",function(){g.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(D,"focus",function(){l.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var C=H.parentNode,Q=null;mxEvent.addListener(C,"dragleave",function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==-Q&&(Q=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){try{null!=Q&&(Q.parentNode.removeChild(Q),Q=null),0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(U.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,B.click())}catch(T){b.handleError(T)}U.stopPropagation();U.preventDefault()}),!1)}};k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign=+z.selected||z.parentNode.removeChild(z)})}F.appendChild(n)}else E.setAttribute("value",f),F.appendChild(E),F.appendChild(d);H.appendChild(F);var B=mxUtils.button(k,function(){b.hideDialog();c(l.checked?"pageNotFound"!==n.value?n.value:f:E.value,LinkDialog.selectedDocs,x.checked?t:null)});B.style.verticalAlign="middle";B.className="geBtn gePrimaryBtn";this.init=function(){l.checked?n.focus():(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",+!1,null));mxEvent.addListener(n,"focus",function(){g.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(E,"focus",function(){l.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var C=H.parentNode,Q=null;mxEvent.addListener(C,"dragleave",function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){null==+Q&&(Q=b.highlightElement(C));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){try{null!=Q&&(Q.parentNode.removeChild(Q),Q=null),0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(U.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,B.click())}catch(T){b.handleError(T)}U.stopPropagation();U.preventDefault()}),!1)}};k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="right";b.isOffline()||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.style.verticalAlign="middle";F.className="geBtn";b.editor.cancelFirst&&k.appendChild(F);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;var Q=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==-C.docs[0].mimeType.substring(0,23)?Q="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(Q="https://drive.google.com/#folders/"+C.docs[0].id);D.value=Q;D.focus()}else LinkDialog.selectedDocs=null;D.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var G={};p=document.createElement("option");mxUtils.write(p,mxResources.get("select")+"...");p.value="";I.appendChild(p);+C.docs[0].mimeType.substring(0,23)?Q="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(Q="https://drive.google.com/#folders/"+C.docs[0].id);E.value=Q;E.focus()}else LinkDialog.selectedDocs=null;E.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var G={};p=document.createElement("option");mxUtils.write(p,mxResources.get("select")+"...");p.value="";I.appendChild(p);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(Q){LinkDialog.filePicked(Q)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y("dropbox",function(){Dropbox.choose({linkType:"direct",-cancel:function(){},success:function(C){D.value=C[0].link;D.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(C,Q){null!=Q&&null!=Q.value&&0<Q.value.length&&(D.value=Q.value[0].webUrl,D.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var Q=C[0],U=C[1],T=C[2];C=C.slice(3,C.length).join("/");D.value="https://github.com/"+Q+"/"+U+"/blob/"+T+"/"+C;D.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=-C){C=C.split("/");var Q=C[0],U=C[1],T=C[2];C=C.slice(3,C.length).join("/");D.value=DRAWIO_GITLAB_URL+"/"+Q+"/"+U+"/blob/"+T+"/"+C;D.focus()}})});1<I.children.length&&(k.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=G[I.value]&&(G[I.value](),I.value="")}));mxEvent.addListener(D,"keypress",function(C){13==C.keyCode&&B.click()});k.appendChild(B);b.editor.cancelFirst||k.appendChild(F);H.appendChild(k);this.container=H},RevisionDialog=function(b,f,k){var c=document.createElement("div"),+cancel:function(){},success:function(C){E.value=C[0].link;E.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(C,Q){null!=Q&&null!=Q.value&&0<Q.value.length&&(E.value=Q.value[0].webUrl,E.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var Q=C[0],U=C[1],T=C[2];C=C.slice(3,C.length).join("/");E.value="https://github.com/"+Q+"/"+U+"/blob/"+T+"/"+C;E.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=+C){C=C.split("/");var Q=C[0],U=C[1],T=C[2];C=C.slice(3,C.length).join("/");E.value=DRAWIO_GITLAB_URL+"/"+Q+"/"+U+"/blob/"+T+"/"+C;E.focus()}})});1<I.children.length&&(k.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=G[I.value]&&(G[I.value](),I.value="")}));mxEvent.addListener(E,"keypress",function(C){13==C.keyCode&&B.click()});k.appendChild(B);b.editor.cancelFirst||k.appendChild(F);H.appendChild(k);this.container=H},RevisionDialog=function(b,f,k){var c=document.createElement("div"),p=document.createElement("h3");p.style.marginTop="3px";mxUtils.write(p,mxResources.get("revisionHistory"));c.appendChild(p);p=document.createElement("div");p.style.position="absolute";p.style.overflow="auto";p.style.width="170px";p.style.height="378px";c.appendChild(p);var q=document.createElement("div");q.style.position="absolute";q.style.left="200px";q.style.width="470px";q.style.height="376px";q.style.overflow="hidden";q.style.borderWidth="1px";q.style.borderStyle="solid";var t=document.createElement("div");t.style.position="absolute";t.style.display="none";t.style.textAlign="center";t.style.padding="8px";t.style.borderRadius="8px";t.style.left="50%";t.style.top="50%";t.style.whiteSpace="nowrap";t.style.transform="translate(-50%, -50%)";t.style.background="inherit";t.style.border="1px solid";q.appendChild(t);mxEvent.disableContextMenu(q);c.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=-null;y.maxFitScale=null;y.centerZoom=!0;var H=0,F=null,D=0,d=y.getGlobalVariable;y.getGlobalVariable=function(Y){return"page"==Y&&null!=F&&null!=F[D]?F[D].getAttribute("name"):"pagenumber"==Y?D+1:"pagecount"==Y?null!=F?F.length:1:d.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var g=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",+null;y.maxFitScale=null;y.centerZoom=!0;var H=0,F=null,E=0,d=y.getGlobalVariable;y.getGlobalVariable=function(Y){return"page"==Y&&null!=F&&null!=F[E]?F[E].getAttribute("name"):"pagenumber"==Y?E+1:"pagecount"==Y?null!=F?F.length:1:d.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var g=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),l=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),x={},z=0;z<n.length;z++)x[n[z].getAttribute("id")]=n[z];var B=null,I=null,G=null,C=null,Q=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=G&&y.zoomIn()},20);Q.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=G&&y.zoomOut()},20);U.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=G&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);T.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));P.setAttribute("disabled","disabled");var v=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));v.setAttribute("disabled","disabled");var A=q.cloneNode(!1);A.style.pointerEvent="none";q.parentNode.appendChild(A);var N=new Graph(A);N.setTooltips(!1);N.setEnabled(!1);N.setPanning(!0);N.panningHandler.ignoreCell=!0;N.panningHandler.useLeftButtonForPanning=!0;N.minFitScale=null;N.maxFitScale=null;N.centerZoom=!0;var J=document.createElement("div");J.style.textAlign="left";J.style.color="gray";J.style.backgroundColor="transparent";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.style.whiteSpace="nowrap";J.style.cursor="default";J.style.height="100%";J.style.display="inline-flex";J.style.alignItems="center";J.style.flexGrow="1";mxEvent.addListener(J,"click",@@ -12226,64 +12230,64 @@ N.getModel());N.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.trnull,null,null,null,function(aa,ha){if(null!=Z[EditorUi.DIFF_UPDATE]){var ea=document.createElement("select"),ca=document.createElement("option");mxUtils.write(ca,mxResources.get("allPages"));ca.setAttribute("value","allPages");ea.appendChild(ca);for(var fa in Z[EditorUi.DIFF_UPDATE]){ca=document.createElement("option");var ma=b.getPageById(fa);null!=ma&&(mxUtils.write(ca,ma.getName()),ca.setAttribute("value","page-"+fa),ea.appendChild(ca))}ea.style.marginRight="8px";ea.style.order="-1";mxEvent.addListener(ea,"change",function(ba){ba=null;if("allPages"!=ea.value){var ja=ea.value.substring(5);null!=Z[EditorUi.DIFF_UPDATE][ja]&&(ba={},ba[EditorUi.DIFF_UPDATE]={},ba[EditorUi.DIFF_UPDATE][ja]=Z[EditorUi.DIFF_UPDATE][ja])}ha.value=JSON.stringify(null==ba?Z:ba,null,2)});2<ea.children.length&&aa.appendChild(ea)}},!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close"));b.showDialog(Y.container,620,460,!0,!0);Y.init()}}));var m=mxUtils.button(mxResources.get("restore"),function(Y){null!=G&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(m.setAttribute("disabled","disabled"),l.save(!0,function(Z){b.spinner.stop();m.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();m.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");var u=document.createElement("select");-u.setAttribute("disabled","disabled");u.style.userSelect="none";u.style.maxWidth="100px";u.style.marginLeft="10px";u.style.display="none";var E=null;mxEvent.addListener(u,"change",function(Y){null!=E&&(E(Y),mxEvent.consume(Y))});var M=mxUtils.button(mxResources.get("open"),function(){null!=G&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(G.documentElement)),b.openLink(b.getUrl(),null,!0))});M.className="geBtn";M.setAttribute("disabled","disabled");+u.setAttribute("disabled","disabled");u.style.userSelect="none";u.style.maxWidth="100px";u.style.marginLeft="10px";u.style.display="none";var D=null;mxEvent.addListener(u,"change",function(Y){null!=D&&(D(Y),mxEvent.consume(Y))});var M=mxUtils.button(mxResources.get("open"),function(){null!=G&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(G.documentElement)),b.openLink(b.getUrl(),null,!0))});M.className="geBtn";M.setAttribute("disabled","disabled");var L=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});L.className="geBtn";L.setAttribute("disabled","disabled");null!=k&&(M.style.display="none");n=document.createElement("div");n.style.position="absolute";n.style.top="482px";n.style.right="28px";n.style.left="32px";n.style.justifyContent="end";n.style.display="flex";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.left="32px";O.style.right="32px";O.style.border="none";O.style.top="442px";var R=null;if(null!=f&&0<f.length){q.style.cursor="move";var S=document.createElement("table");S.style.borderWidth="1px";S.style.borderStyle="solid";S.style.borderCollapse="collapse";S.style.borderSpacing="0px";S.style.width="100%";var V=document.createElement("tbody"),X=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(H=mxUtils.indexOf(b.pages,b.currentPage));for(z=f.length-1;0<=z;z--){var W=function(Y){var Z=new Date(Y.modifiedDate),aa=null;if(0<=Z.getTime()){var ha=function(ca){g.stop();t.innerText="";var fa=mxUtils.parseXml(ca),ma=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=ma){var ba=function(ra){null!=ra&&(ra=ja(Editor.parseDiagramNode(ra)));return ra},ja=function(ra){var wa=ra.getAttribute("background");if(null==wa||""==wa||wa==mxConstants.NONE)wa=y.defaultPageBackgroundColor;q.style.backgroundColor=mxUtils.getLightDarkColor(wa);(new mxCodec(ra.ownerDocument)).decode(ra,y.getModel());y.maxFitScale=1;y.fit(8);-y.center();y.mathEnabled="1"==ra.getAttribute("math");y.setAdaptiveColors(ra.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return ra};u.style.display="none";u.innerText="";G=fa;C=ca;F=parseSelectFunction=null;D=0;if("mxfile"==ma.nodeName){fa=ma.getElementsByTagName("diagram");F=[];for(ca=0;ca<fa.length;ca++)F.push(fa[ca]);D=Math.min(H,F.length-1);0<F.length&&ba(F[D]);if(1<F.length)for(u.removeAttribute("disabled"),u.style.display="",ca=0;ca<-F.length;ca++){fa=document.createElement("option");fa.setAttribute("title",la+" ("+F[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var la=F[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ma=b.getPageById(F[ca].getAttribute("id"));var da="";if(null!=ma){var va=new DiagramPage(F[ca]);b.getHashValueForPages([ma])!=b.getHashValueForPages([va])&&(da=" (M)")}else da=" (X)";mxUtils.write(fa,la+da);ca==D&&fa.setAttribute("selected","selected");u.appendChild(fa)}E=function(){try{var ra=-parseInt(u.value);D=H=ra;ba(F[ra])}catch(wa){u.value=H,b.handleError(wa)}}}else ja(ma);la=Y.lastModifyingUserName;null!=la&&20<la.length&&(la=la.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=la?la+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());J.setAttribute("title",aa.getAttribute("title"));Q.removeAttribute("disabled");U.removeAttribute("disabled");T.removeAttribute("disabled");P.removeAttribute("disabled");v.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&+y.center();y.mathEnabled="1"==ra.getAttribute("math");y.setAdaptiveColors(ra.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return ra};u.style.display="none";u.innerText="";G=fa;C=ca;F=parseSelectFunction=null;E=0;if("mxfile"==ma.nodeName){fa=ma.getElementsByTagName("diagram");F=[];for(ca=0;ca<fa.length;ca++)F.push(fa[ca]);E=Math.min(H,F.length-1);0<F.length&&ba(F[E]);if(1<F.length)for(u.removeAttribute("disabled"),u.style.display="",ca=0;ca<+F.length;ca++){fa=document.createElement("option");fa.setAttribute("title",la+" ("+F[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var la=F[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ma=b.getPageById(F[ca].getAttribute("id"));var da="";if(null!=ma){var va=new DiagramPage(F[ca]);b.getHashValueForPages([ma])!=b.getHashValueForPages([va])&&(da=" (M)")}else da=" (X)";mxUtils.write(fa,la+da);ca==E&&fa.setAttribute("selected","selected");u.appendChild(fa)}D=function(){try{var ra=+parseInt(u.value);E=H=ra;ba(F[ra])}catch(wa){u.value=H,b.handleError(wa)}}}else ja(ma);la=Y.lastModifyingUserName;null!=la&&20<la.length&&(la=la.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=la?la+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());J.setAttribute("title",aa.getAttribute("title"));Q.removeAttribute("disabled");U.removeAttribute("disabled");T.removeAttribute("disabled");P.removeAttribute("disabled");v.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&m.removeAttribute("disabled"),M.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(Q,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(v,60)}else u.style.display="none",u.innerText="",J.innerText="",t.innerText="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(t,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottomWidth="1px";aa.style.borderBottomStyle="solid";aa.style.fontSize="12px";aa.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";Y==f[f.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===X?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());aa.appendChild(ea);aa.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=Y.fileSize?" "+b.formatFileSize(parseInt(Y.fileSize)):"")+(null!=Y.lastModifyingUserName?" "+Y.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ca){I!=Y&&(g.stop(),null!=B&&(B.style.backgroundColor=""),I=Y,B=aa,B.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=G=null,J.removeAttribute("title"),J.innerText=mxResources.get("loading")+"...",q.style.backgroundColor=y.defaultPageBackgroundColor,t.innerText="",y.getModel().clear(),m.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(v,20),g.spin(q),Y.getXml(function(fa){if(I==Y)try{ha(fa)}catch(ma){J.innerText=mxResources.get("error")+": "+ma.message}},function(fa){g.stop();u.style.display="none";u.innerText="";J.innerText="";mxUtils.write(J,mxResources.get("errorLoadingFile"));mxUtils.write(t,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(aa,"dblclick",function(ca){M.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(aa)}return aa}(f[z]);null!=W&&z==f.length-1&&(R=W)}S.appendChild(V);p.appendChild(S)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(q.style.display="none",O.style.display="none",mxUtils.write(p,mxResources.get("notAvailable"))):(q.style.display="none",O.style.display="none",mxUtils.write(p,mxResources.get("noRevisions")));this.init=function(){null!=R&&R.click()};p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";O.appendChild(J);O.appendChild(P);O.appendChild(U);O.appendChild(T);O.appendChild(Q);O.appendChild(u);O.appendChild(v);b.editor.cancelFirst&&n.appendChild(p);n.appendChild(M);null!=l&&l.constructor==DriveFile&&-n.appendChild(L);n.appendChild(m);b.editor.cancelFirst||n.appendChild(p);c.appendChild(n);c.appendChild(O);this.container=c},DraftDialog=function(b,f,k,c,p,q,t,y,H){var F=document.createElement("div"),D=document.createElement("div");D.style.marginTop="0px";D.style.whiteSpace="nowrap";D.style.overflow="auto";D.style.lineHeight="normal";mxUtils.write(D,f);F.appendChild(D);var d=document.createElement("select"),g=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,g(),b.confirm(mxResources.get("areYouSure"),+n.appendChild(L);n.appendChild(m);b.editor.cancelFirst||n.appendChild(p);c.appendChild(n);c.appendChild(O);this.container=c},DraftDialog=function(b,f,k,c,p,q,t,y,H){var F=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,f);F.appendChild(E);var d=document.createElement("select"),g=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,g(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){for(v=0;v<H.length;v++)p.apply(P,[v,mxUtils.bind(P,function(){})]);b.hideDialog(!0);A.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(H[d.value].data),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,this.init())});if(null!=H){d.style.marginLeft="4px";for(f=0;f<H.length;f++){var l=document.createElement("option");l.setAttribute("value",f);var n=new Date(H[f].created),-x=new Date(H[f].modified);mxUtils.write(l,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());d.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));d.appendChild(l);D.appendChild(d);mxEvent.addListener(d,"change",g)}null==k&&(k=H[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";+x=new Date(H[f].modified);mxUtils.write(l,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());d.appendChild(l)}l=document.createElement("option");l.setAttribute("value","-1");mxUtils.write(l,mxResources.get("deleteAll"));d.appendChild(l);E.appendChild(d);mxEvent.addListener(d,"change",g)}null==k&&(k=H[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.left="40px";z.style.right="40px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);F.appendChild(z);var B=new Graph(z);B.setEnabled(!1);B.setPanning(!0);B.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var I=mxUtils.parseXml(k),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,Q=null,-U=B.getGlobalVariable;B.getGlobalVariable=function(P){return"page"==P&&null!=Q&&null!=Q[C]?Q[C].getAttribute("name"):"pagenumber"==P?C+1:"pagecount"==P?null!=Q?Q.length:1:U.apply(this,arguments)};B.getLinkForCell=function(){return null};k=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);D=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==+U=B.getGlobalVariable;B.getGlobalVariable=function(P){return"page"==P&&null!=Q&&null!=Q[C]?Q[C].getAttribute("name"):"pagenumber"==P?C+1:"pagecount"==P?null!=Q?Q.length:1:U.apply(this,arguments)};B.getLinkForCell=function(){return null};k=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){B.zoomIn()},20);E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){B.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==B.view.scale?(B.maxFitScale=8,B.fit(8)):B.zoomActual();B.center()},20);t=mxUtils.button(t||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){p.apply(P,[d.value,mxUtils.bind(P,function(){null!=d.parentNode&&(d.options[d.selectedIndex].parentNode.removeChild(d.options[d.selectedIndex]),1<d.options.length?(d.value=d.options[0].value,g()):b.hideDialog(!0))})]);v.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});t.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";q=mxUtils.button(q||mxResources.get("edit"),function(){c.apply(this,[d.value])});q.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function P(J){if(null!=J){var K=J.getAttribute("background");if(null==K||""==K||K==mxConstants.NONE)K="light-dark(#ffffff, transparent)";z.style.backgroundColor=K;(new mxCodec(J.ownerDocument)).decode(J,B.getModel());B.maxFitScale=1;B.fit(8);B.center()}return J}function v(J){null!=J&&(J=P(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(T,"change",function(J){C=parseInt(T.value);v(Q[C]);mxEvent.consume(J)});if("mxfile"==G.nodeName){var A=G.getElementsByTagName("diagram");Q=[];for(var N=0;N<A.length;N++)Q.push(A[N]);0<Q.length&&v(Q[C]);T.innerText="";if(1<Q.length)for(T.style.display="",N=0;N<Q.length;N++)A=document.createElement("option"),mxUtils.write(A,Q[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),A.setAttribute("value",N),N==C&&A.setAttribute("selected",-"selected"),T.appendChild(A);else T.style.display="none"}else P(G)};n.appendChild(T);n.appendChild(k);n.appendChild(D);n.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});k.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(l.appendChild(k),null!=y&&l.appendChild(y),l.appendChild(t),l.appendChild(q)):(l.appendChild(q),l.appendChild(t),null!=y&&l.appendChild(y),l.appendChild(k));F.appendChild(l);-F.appendChild(n);this.container=F},FindWindow=function(b,f,k,c,p,q){function t(E,M,L){if("object"===typeof M.value&&null!=M.value.attributes){M=M.value.attributes;for(var O=0;O<M.length;O++)if("label"!=M[O].nodeName){var R=mxUtils.trim(M[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==E&&0<=R.indexOf(L)||null!=E&&E.test(R))return!0}}return!1}function y(){l?(K.removeAttribute("disabled"),m.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),m.setAttribute("disabled",-"disabled"));C.value?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}function H(E,M,L){N.innerText="";var O=D.model.getDescendants(D.model.getRoot()),R=C.value.toLowerCase(),S=U.checked?new RegExp(R):null,V=null;x=null;d!=R&&(d=R,g=null,n=!1);var X=null==g;if(0<R.length){if(n){n=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}E=(W+1)%b.pages.length;g=null;do n=!1,O=b.pages[E],D=b.createTemporaryGraph(D.getStylesheet()),b.updatePageRoot(O),D.model.setRoot(O.root),-E=(E+1)%b.pages.length;while(!H(!0,M,L)&&E!=W);g&&(g=null,L?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));n=!1;D=b.editor.graph;return H(!0,M,L)}for(Y=0;Y<O.length;Y++){W=D.view.getState(O[Y]);M&&(X=X||W==g);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(D.model.isVertex(W.cell)||D.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=D.sanitizeHtml(D.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=D.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,-" ")).toLowerCase();var Z=0;M&&q&&W==g&&(label=label.substr(z),Z=z);var aa=null==Q||""==Q.value;if(null==S&&(0<=label.indexOf(R)||aa&&t(S,W.cell,R))||null!=S&&(S.test(label)||aa&&t(S,W.cell,R)))if(q&&(null!=S?(aa=label.match(S),null!=aa&&0<aa.length&&(x=aa[0].toLowerCase(),z=Z+aa.index+x.length)):(x=R,z=Z+label.indexOf(R)+x.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==g}}if(null!=V){if(Y==O.length&&T.checked)return g=null,n=!0,H(!0,M,L);g=V;D.scrollCellToVisible(g.cell);D.isEnabled()&&!D.isCellLocked(g.cell)?-L||D.getSelectionCell()==g.cell&&1==D.getSelectionCount()||D.setSelectionCell(g.cell):D.highlightCell(g.cell)}else{if(!E&&T.checked)return n=!0,H(!0,M,L);D.isEnabled()&&!L&&D.clearSelection()}l=null!=V;q&&!E&&y();return 0==R.length||null!=V}var F=b.actions.get("findReplace"),D=b.editor.graph,d=null,g=null,l=!1,n=!1,x=null,z=0,B=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var G=q?"260px":"200px",C=document.createElement("input");+"selected"),T.appendChild(A);else T.style.display="none"}else P(G)};n.appendChild(T);n.appendChild(k);n.appendChild(E);n.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});k.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(l.appendChild(k),null!=y&&l.appendChild(y),l.appendChild(t),l.appendChild(q)):(l.appendChild(q),l.appendChild(t),null!=y&&l.appendChild(y),l.appendChild(k));F.appendChild(l);+F.appendChild(n);this.container=F},FindWindow=function(b,f,k,c,p,q){function t(D,M,L){if("object"===typeof M.value&&null!=M.value.attributes){M=M.value.attributes;for(var O=0;O<M.length;O++)if("label"!=M[O].nodeName){var R=mxUtils.trim(M[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==D&&0<=R.indexOf(L)||null!=D&&D.test(R))return!0}}return!1}function y(){l?(K.removeAttribute("disabled"),m.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),m.setAttribute("disabled",+"disabled"));C.value?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}function H(D,M,L){N.innerText="";var O=E.model.getDescendants(E.model.getRoot()),R=C.value.toLowerCase(),S=U.checked?new RegExp(R):null,V=null;x=null;d!=R&&(d=R,g=null,n=!1);var X=null==g;if(0<R.length){if(n){n=!1;for(var W,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){W=Y;break}D=(W+1)%b.pages.length;g=null;do n=!1,O=b.pages[D],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(O),E.model.setRoot(O.root),+D=(D+1)%b.pages.length;while(!H(!0,M,L)&&D!=W);g&&(g=null,L?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));n=!1;E=b.editor.graph;return H(!0,M,L)}for(Y=0;Y<O.length;Y++){W=E.view.getState(O[Y]);M&&(X=X||W==g);if(null!=W&&null!=W.cell.value&&(X||null==V)&&(E.model.isVertex(W.cell)||E.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=E.sanitizeHtml(E.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=E.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,+" ")).toLowerCase();var Z=0;M&&q&&W==g&&(label=label.substr(z),Z=z);var aa=null==Q||""==Q.value;if(null==S&&(0<=label.indexOf(R)||aa&&t(S,W.cell,R))||null!=S&&(S.test(label)||aa&&t(S,W.cell,R)))if(q&&(null!=S?(aa=label.match(S),null!=aa&&0<aa.length&&(x=aa[0].toLowerCase(),z=Z+aa.index+x.length)):(x=R,z=Z+label.indexOf(R)+x.length)),X){V=W;break}else null==V&&(V=W)}X=X||W==g}}if(null!=V){if(Y==O.length&&T.checked)return g=null,n=!0,H(!0,M,L);g=V;E.scrollCellToVisible(g.cell);E.isEnabled()&&!E.isCellLocked(g.cell)?+L||E.getSelectionCell()==g.cell&&1==E.getSelectionCount()||E.setSelectionCell(g.cell):E.highlightCell(g.cell)}else{if(!D&&T.checked)return n=!0,H(!0,M,L);E.isEnabled()&&!L&&E.clearSelection()}l=null!=V;q&&!D&&y();return 0==R.length||null!=V}var F=b.actions.get("findReplace"),E=b.editor.graph,d=null,g=null,l=!1,n=!1,x=null,z=0,B=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var G=q?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=G;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";I.appendChild(C);mxUtils.br(I);if(q){var Q=document.createElement("input");Q.setAttribute("placeholder",mxResources.get("replaceWith"));Q.setAttribute("type","text");Q.style.marginTop="4px";Q.style.marginBottom="6px";Q.style.width=G;Q.style.fontSize="12px";Q.style.borderRadius="4px";Q.style.padding="6px";I.appendChild(Q);mxUtils.br(I);mxEvent.addListener(Q,"input",y)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";I.appendChild(U);G=document.createElement("label");G.setAttribute("for","geFindWinRegExChck");I.appendChild(G);mxUtils.write(G,mxResources.get("regularExpression"));I.appendChild(G);G=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");G.style.position="relative";G.style.marginLeft="6px";I.appendChild(G);mxUtils.br(I);var T=document.createElement("input");T.setAttribute("id","geFindWinAllPagesChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";I.appendChild(T);G=document.createElement("label");G.setAttribute("for","geFindWinAllPagesChck");I.appendChild(G);mxUtils.write(G,mxResources.get("allPages"));I.appendChild(G);var P=document.createElement("div");mxUtils.br(I);G=document.createElement("div");G.style.left="0px";G.style.right="0px";G.style.marginTop="6px";G.style.padding="0 6px 0 6px";I.appendChild(G);var v=mxUtils.button(mxResources.get("reset"),function(){N.innerText="";C.value="";C.style.backgroundColor="";q&&(Q.value="",y());d=g=null;n=!1;C.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";q||G.appendChild(v);var A=mxUtils.button(mxResources.get("find"),-function(){try{C.style.backgroundColor=H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(E){b.handleError(E)}});A.setAttribute("title",mxResources.get("find")+" (Enter)");A.style.float="none";A.style.width="120px";A.style.marginTop="6px";A.style.marginLeft="8px";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.className="geBtn gePrimaryBtn";G.appendChild(A);var N=document.createElement("div");N.style.marginTop="10px";if(q){var J=function(E,M,L,O,R){if(null==R||"1"!=R.html)return O=E.toLowerCase().indexOf(M,-O),0>O?E:E.substr(0,O)+L+E.substr(O+M.length);var S=E;M=mxUtils.htmlEntities(M,!1,!1,!1);R=[];var V=-1;for(E=E.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=E.indexOf("<",V+1));)R.push(V);V=E.match(/<[^>]*>/g);E=E.replace(/<[^>]*>/g,"");O=E.toLowerCase().indexOf(M,O);if(0>O)return S;S=O+M.length;L=mxUtils.htmlEntities(L);E=E.substr(0,O)+L+E.substr(S);for(var X=0,W=0;W<R.length;W++){if(R[W]-X<O)E=E.substr(0,R[W])+V[W]+E.substr(R[W]);-else{var Y=R[W]-X<S?O+X:R[W]+(L.length-M.length);E=E.substr(0,Y)+V[W]+E.substr(Y)}X+=V[W].length}return E.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};G.style.textAlign="center";var K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=g){var E=g.cell,M=D.getLabel(E);D.isCellEditable(E)&&D.model.setValue(E,J(M,x,Q.value,z-x.length,D.getCurrentCellStyle(E)));C.style.backgroundColor=H(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(L){b.handleError(L)}});-K.setAttribute("title",mxResources.get("replFind"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");G.appendChild(K);mxUtils.br(G);var m=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=g){var E=g.cell,M=D.getLabel(E);D.model.setValue(E,J(M,x,Q.value,z-x.length,D.getCurrentCellStyle(E)));K.setAttribute("disabled",-"disabled");m.setAttribute("disabled","disabled")}}catch(L){b.handleError(L)}});m.setAttribute("title",mxResources.get("replace"));m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");G.appendChild(m);var u=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";d=null;var E=b.currentPage,M=b.editor.graph.getSelectionCells();-b.editor.graph.rendering=!1;D.getModel().beginUpdate();try{for(var L=0,O={};H(!1,!0,!0)&&100>L;){var R=g.cell,S=D.getLabel(R),V=O[R.id];if(V&&V.replAllMrk==B&&V.replAllPos>=z)break;O[R.id]={replAllMrk:B,replAllPos:z};D.isCellEditable(R)&&(D.model.setValue(R,J(S,x,Q.value,z-x.length,D.getCurrentCellStyle(R))),L++)}E!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,E));mxUtils.write(N,mxResources.get("matchesRepl",[L]))}catch(X){b.handleError(X)}finally{D.getModel().endUpdate(),b.editor.graph.setSelectionCells(M),+function(){try{C.style.backgroundColor=H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(D){b.handleError(D)}});A.setAttribute("title",mxResources.get("find")+" (Enter)");A.style.float="none";A.style.width="120px";A.style.marginTop="6px";A.style.marginLeft="8px";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.className="geBtn gePrimaryBtn";G.appendChild(A);var N=document.createElement("div");N.style.marginTop="10px";if(q){var J=function(D,M,L,O,R){if(null==R||"1"!=R.html)return O=D.toLowerCase().indexOf(M,+O),0>O?D:D.substr(0,O)+L+D.substr(O+M.length);var S=D;M=mxUtils.htmlEntities(M,!1,!1,!1);R=[];var V=-1;for(D=D.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=D.indexOf("<",V+1));)R.push(V);V=D.match(/<[^>]*>/g);D=D.replace(/<[^>]*>/g,"");O=D.toLowerCase().indexOf(M,O);if(0>O)return S;S=O+M.length;L=mxUtils.htmlEntities(L);D=D.substr(0,O)+L+D.substr(S);for(var X=0,W=0;W<R.length;W++){if(R[W]-X<O)D=D.substr(0,R[W])+V[W]+D.substr(R[W]);+else{var Y=R[W]-X<S?O+X:R[W]+(L.length-M.length);D=D.substr(0,Y)+V[W]+D.substr(Y)}X+=V[W].length}return D.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")};G.style.textAlign="center";var K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=g){var D=g.cell,M=E.getLabel(D);E.isCellEditable(D)&&E.model.setValue(D,J(M,x,Q.value,z-x.length,E.getCurrentCellStyle(D)));C.style.backgroundColor=H(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(L){b.handleError(L)}});+K.setAttribute("title",mxResources.get("replFind"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");G.appendChild(K);mxUtils.br(G);var m=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=g){var D=g.cell,M=E.getLabel(D);E.model.setValue(D,J(M,x,Q.value,z-x.length,E.getCurrentCellStyle(D)));K.setAttribute("disabled",+"disabled");m.setAttribute("disabled","disabled")}}catch(L){b.handleError(L)}});m.setAttribute("title",mxResources.get("replace"));m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");G.appendChild(m);var u=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";d=null;var D=b.currentPage,M=b.editor.graph.getSelectionCells();+b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var L=0,O={};H(!1,!0,!0)&&100>L;){var R=g.cell,S=E.getLabel(R),V=O[R.id];if(V&&V.replAllMrk==B&&V.replAllPos>=z)break;O[R.id]={replAllMrk:B,replAllPos:z};E.isCellEditable(R)&&(E.model.setValue(R,J(S,x,Q.value,z-x.length,E.getCurrentCellStyle(R))),L++)}D!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,D));mxUtils.write(N,mxResources.get("matchesRepl",[L]))}catch(X){b.handleError(X)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(M),b.editor.graph.rendering=!0}B++});u.setAttribute("title",mxResources.get("replaceAll"));u.style.float="none";u.style.width="120px";u.style.marginTop="6px";u.style.marginLeft="8px";u.style.overflow="hidden";u.style.textOverflow="ellipsis";u.className="geBtn gePrimaryBtn";u.setAttribute("disabled","disabled");G.appendChild(u);mxUtils.br(G);G.appendChild(v);v=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));v.setAttribute("title",mxResources.get("close"));-v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";G.appendChild(v);mxUtils.br(G);G.appendChild(N)}else G.style.display="flex",G.style.alignItems="center",v.style.width="",A.style.width="";mxEvent.addListener(C,"keyup",function(E){if(91==E.keyCode||93==E.keyCode||17==E.keyCode)mxEvent.consume(E);else if(27==E.keyCode)F.funct();else if(d!=C.value.toLowerCase()||13==E.keyCode)try{C.style.backgroundColor=-H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(M){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(E){70==E.keyCode&&b.keyHandler.isControlDown(E)&&!mxEvent.isShiftDown(E)&&(F.funct(),mxEvent.consume(E))});this.window=new mxWindow(mxResources.get("find")+(q?"/"+mxResources.get("replace"):""),I,f,k,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):D.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(E){C.focus();C.value=E;A.click()}},FreehandWindow=function(b,f,k,c,p,q){var t=b.editor.graph,y=document.createElement("div");y.style.textAlign=-"center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(q){var H=function(){var l=t.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&D.setAttribute("title",l))},F=document.createElement("input");F.setAttribute("id","geFreehandBrush");F.setAttribute("type","checkbox");F.checked=-t.freehand.isPerfectFreehandMode();F.style.margin="10px 5px 0px 10px";F.style.float="left";y.appendChild(F);t.freehand.setPerfectFreehandMode(F.checked);q=document.createElement("label");q.setAttribute("for","geFreehandBrush");q.style.float="left";q.style.marginTop="10px";y.appendChild(q);mxUtils.write(q,mxResources.get("brush"));y.appendChild(q);var D=document.createElement("tempDiv");D.style.display="block";D.style.width="100%";D.style.height="100%";D.style.borderRadius="2px";D.style.boxSizing=-"border-box";D.style.border="1px solid black";D.style.backgroundColor=t.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){D.style.backgroundColor=t.freehand.getStrokeColor()});H();q=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(t.freehand.getStrokeColor(!0),function(n){t.freehand.setStrokeColor(n);D.style.backgroundColor=t.freehand.getStrokeColor();H()},"default");mxEvent.consume(l)}));q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";-q.style.top="8px";q.style.right="8px";q.style.width="28px";q.style.height="18px";q.className="geColorBtn";q.innerText="";q.appendChild(D);y.appendChild(q);q=document.createElement("img");q.setAttribute("title",mxResources.get("settings"));q.setAttribute("src",Editor.gearImage);q.className="geButton";q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";q.style.top="8px";q.style.right="38px";q.style.width="18px";q.style.height="18px";q.style.opacity="0.6";y.appendChild(q);+v.style.float="none";v.style.width="120px";v.style.marginTop="6px";v.style.marginLeft="8px";v.style.overflow="hidden";v.style.textOverflow="ellipsis";v.className="geBtn";G.appendChild(v);mxUtils.br(G);G.appendChild(N)}else G.style.display="flex",G.style.alignItems="center",v.style.width="",A.style.width="";mxEvent.addListener(C,"keyup",function(D){if(91==D.keyCode||93==D.keyCode||17==D.keyCode)mxEvent.consume(D);else if(27==D.keyCode)F.funct();else if(d!=C.value.toLowerCase()||13==D.keyCode)try{C.style.backgroundColor=+H()?"":"light-dark(#ffcfcf, #ff0000)"}catch(M){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(D){70==D.keyCode&&b.keyHandler.isControlDown(D)&&!mxEvent.isShiftDown(D)&&(F.funct(),mxEvent.consume(D))});this.window=new mxWindow(mxResources.get("find")+(q?"/"+mxResources.get("replace"):""),I,f,k,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):E.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(D){C.focus();C.value=D;A.click()}},FreehandWindow=function(b,f,k,c,p,q){var t=b.editor.graph,y=document.createElement("div");y.style.textAlign=+"center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(q){var H=function(){var l=t.freehand.getStrokeColor(!0);null!=l&&l!=mxConstants.NONE&&1<l.length&&"string"===typeof l&&("default"==l?l=mxResources.get("useBlackAndWhite"):(l="#"==l.charAt(0)?l.substring(1).toUpperCase():l,l=ColorDialog.prototype.colorNames[l]),null!=l&&E.setAttribute("title",l))},F=document.createElement("input");F.setAttribute("id","geFreehandBrush");F.setAttribute("type","checkbox");F.checked=+t.freehand.isPerfectFreehandMode();F.style.margin="10px 5px 0px 10px";F.style.float="left";y.appendChild(F);t.freehand.setPerfectFreehandMode(F.checked);q=document.createElement("label");q.setAttribute("for","geFreehandBrush");q.style.float="left";q.style.marginTop="10px";y.appendChild(q);mxUtils.write(q,mxResources.get("brush"));y.appendChild(q);var E=document.createElement("tempDiv");E.style.display="block";E.style.width="100%";E.style.height="100%";E.style.borderRadius="2px";E.style.boxSizing=+"border-box";E.style.border="1px solid black";E.style.backgroundColor=t.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){E.style.backgroundColor=t.freehand.getStrokeColor()});H();q=mxUtils.button("",mxUtils.bind(this,function(l){b.pickColor(t.freehand.getStrokeColor(!0),function(n){t.freehand.setStrokeColor(n);E.style.backgroundColor=t.freehand.getStrokeColor();H()},"default");mxEvent.consume(l)}));q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";+q.style.top="8px";q.style.right="8px";q.style.width="28px";q.style.height="18px";q.className="geColorBtn";q.innerText="";q.appendChild(E);y.appendChild(q);q=document.createElement("img");q.setAttribute("title",mxResources.get("settings"));q.setAttribute("src",Editor.gearImage);q.className="geButton";q.style.position="absolute";q.style.boxSizing="border-box";q.style.padding="2px";q.style.top="8px";q.style.right="38px";q.style.width="18px";q.style.height="18px";q.style.opacity="0.6";y.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(l){l=t.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",l,function(n){!isNaN(n)&&0<n&&20>=n&&t.freehand.setSmoothing(parseInt(n))})}));mxUtils.br(y);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",t.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";y.appendChild(d);mxUtils.br(y);q=function(){t.freehand.setPerfectFreehandMode(F.checked);d.style.visibility=F.checked?"visible":"hidden"};mxEvent.addListener(F,"change",q);q();mxEvent.addListener(d,"change",function(){t.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.width="90%";g.style.position="relative";g.className="geBtn gePrimaryBtn";y.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),y,f,k,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);t.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,mxResources.get(t.freehand.isDrawing()?"stopDrawing":"startDrawing"));var l=document.createElement("span");l.className="geShortcutKey";l.style.margin="0 2px 4px 0";mxUtils.write(l,"X");g.appendChild(l);g.setAttribute("title",mxResources.get(t.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");g.className="geBtn"+(t.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){t.freehand.isDrawing()&&t.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,k,c,p){var q=b.editor.graph,t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.height="100%";var y=document.createElement("div");-y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginRight="4px";F.checked=!0;var D=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(q.isSelectionEmpty()?q.getVerticesAndEdges():-q.getSelectionCells(),H.checked,F.checked)}));D.setAttribute("title","Convert Colors");D.className="geBtn gePrimaryBtn";y.appendChild(D);t.appendChild(y);y=y.cloneNode(!1);y.appendChild(F);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));t.appendChild(y);y=y.cloneNode(!1);y.appendChild(H);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));t.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),t,f,k,c,p,!0,!0);this.window.destroyOnClose=+y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginRight="4px";F.checked=!0;var E=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(q.isSelectionEmpty()?q.getVerticesAndEdges():+q.getSelectionCells(),H.checked,F.checked)}));E.setAttribute("title","Convert Colors");E.className="geBtn gePrimaryBtn";y.appendChild(E);t.appendChild(y);y=y.cloneNode(!1);y.appendChild(F);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));t.appendChild(y);y=y.cloneNode(!1);y.appendChild(H);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));t.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),t,f,k,c,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,k,c,p){function q(){v=!0;z.value=A;d.isSelectionEmpty()?(I.setAttribute("disabled","disabled"),"selectionOnly"==z.value&&(z.value="includeCopyOfMyDiagram")):I.removeAttribute("disabled");b.isDiagramEmpty()?(B.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==z.value&&(z.value="help")):B.removeAttribute("disabled");v=!1}function t(J,K,m){var u=document.createElement("button");u.className="geBtn gePrimaryBtn";u.style.padding="4px";u.style.height="auto";u.style.position="relative";"flex"==m?(u.style.overflow="hidden",u.style.textOverflow="ellipsis",u.style.whiteSpace="nowrap",u.style.margin="0px",u.style.flexGrow="1"):(u.style.display="block",u.style.margin="8px",u.style.left="50%",u.style.transform="translateX(-50%)");mxUtils.write(u,J);u.setAttribute("title",J);mxEvent.addListener(u,"click",K);return u}function y(J){var K=document.createElement("div");K.style.display="block";K.style.position="relative";K.style.backgroundColor="#e0e0e0";K.style.borderRadius="4px";K.style.wordWrap="break-word";K.style.textAlign="left";K.style.padding="6px";K.style.margin="12px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,J);l.appendChild(K);return K}function H(J){var K=J.indexOf("<mxGraphModel "),m=J.indexOf("</mxGraphModel>");0>K&&-(K=J.indexOf("<mxGraphModel>"));if(0<=K&&m>K){var u=mxUtils,E=u.trim,M=J.substring(0,K),L=M.indexOf("```");0<=L&&(M=M.substring(M,0,L+6));u=E.call(u,M);K=J.substring(K,m+15);E=mxUtils;M=E.trim;J=J.substring(m+15);m=J.lastIndexOf("```");0<=m&&(J=J.substring(m+3));return[u,K,M.call(E,J)]}return null}function F(J){var K=y(J);K.style.cursor="pointer";K.style.marginBottom="2px";K.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(K,"click",function(X){P.value=J;P.focus()});var m=y("");-m.style.marginTop="2px";var u=b.currentPage,E=J,M=[],L=null;if("includeCopyOfMyDiagram"==z.value||"selectionOnly"==z.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==z.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!d.model.isRoot(X)&&!d.model.isLayer(X)&&!d.isCellSelected(X)&&!d.isAncestorSelected(X)});L=O.encode(d.getModel());O.document.appendChild(L);M.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+-mxUtils.getXml(L)})}else"create"==z.value?(E=C.value.replace(/([A-Z])/g," $1").toLowerCase(),E="Write the declaration code for a "+(""!=E?E:"graph")+' that shows "'+(""!=J?J:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):M.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});M.push({role:"user",content:E});+(K=J.indexOf("<mxGraphModel>"));if(0<=K&&m>K){var u=mxUtils,D=u.trim,M=J.substring(0,K),L=M.indexOf("```");0<=L&&(M=M.substring(M,0,L+6));u=D.call(u,M);K=J.substring(K,m+15);D=mxUtils;M=D.trim;J=J.substring(m+15);m=J.lastIndexOf("```");0<=m&&(J=J.substring(m+3));return[u,K,M.call(D,J)]}return null}function F(J){var K=y(J);K.style.cursor="pointer";K.style.marginBottom="2px";K.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(K,"click",function(X){P.value=J;P.focus()});var m=y("");+m.style.marginTop="2px";var u=b.currentPage,D=J,M=[],L=null;if("includeCopyOfMyDiagram"==z.value||"selectionOnly"==z.value){var O=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==z.value&&(O.isObjectIgnored=function(X){return X.constructor==mxCell&&!d.model.isRoot(X)&&!d.model.isLayer(X)&&!d.isCellSelected(X)&&!d.isAncestorSelected(X)});L=O.encode(d.getModel());O.document.appendChild(L);M.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"++mxUtils.getXml(L)})}else"create"==z.value?(D=C.value.replace(/([A-Z])/g," $1").toLowerCase(),D="Write the declaration code for a "+(""!=D?D:"graph")+' that shows "'+(""!=J?J:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):M.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});M.push({role:"user",content:D});var R={model:Editor.gptModel,messages:M},S=0;for(M=0;M<R.messages.length;M++)S+=R.messages[M].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get("loading")+"...");var X=document.createElement("img");X.setAttribute("title","Processing "+S+" tokens");X.setAttribute("src",IMAGE_PATH+"/spin.gif");X.style.marginLeft="6px";m.appendChild(X);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var Y=new mxXmlRequest(Editor.gptUrl,JSON.stringify(R),"POST");Y.setRequestHeaders=mxUtils.bind(this,function(ha,ea){ha.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ha.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ha){W.clear();m.innerHTML="";mxUtils.write(m,ha.message);m.appendChild(t(mxResources.get("tryAgain"),V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ha)}),aa=mxUtils.bind(this,function(ha){var ea=H(ha),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ha=document.createElement("div");ha.style.display="inline-block";ha.style.position="relative";ha.style.transform="translateX(-50%)";ha.style.padding="6px";ha.style.left="50%";var fa=mxUtils.parseXml(ea[1]),ma=new mxCodec(fa),ba=new mxGraphModel;ma.decode(fa.documentElement,ba);var ja=null;null!=L&&(fa=new mxCodec(L.ownerDocument),ja=new mxGraphModel,fa.decode(L,ja));fa=mxUtils.bind(this,function(la){d.model.beginUpdate();@@ -12291,27 +12295,27 @@ try{if(null!=ja&&null!=b.getPageIndex(u)){b.selectPage(u);var da=b.diffCells(ja.m.innerHTML="";K=m;0<ea[0].length&&(mxUtils.write(K,ea[0]),mxUtils.br(K));K.appendChild(ha);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(t(mxResources.get("tryAgain"),V,"flex"));ca.appendChild(t(mxResources.get(null!=L?"apply":"insert"),fa,"flex"));m.appendChild(ca);0<ea[2].length&&(mxUtils.br(K),mxUtils.write(K,ea[2]));K.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else m.innerHTML="",K=m,mxUtils.write(K,ha),m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});Y.send(mxUtils.bind(this,function(ha){if(W.clear())try{if(200<=ha.getStatus()&&299>=ha.getStatus()){var ea=JSON.parse(ha.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",R,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==z.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ja){aa(ja)})),b.generateMermaidImage(fa,null,function(){},function(ja){mxMermaidToDrawio.resetListeners();Z(ja)})):(aa(ca),m.appendChild(t(mxResources.get("tryAgain"),V)))}else aa(ca)}else{var ma="Error: "+ha.getStatus();try{var ba=JSON.parse(ha.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ma=ba.error.message)}catch(ja){}m.innerHTML="";mxUtils.write(m,ma);m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ja){Z(ja)}}),Z)}),function(W){m.innerHTML="";mxUtils.write(m,W.message);m.appendChild(t(mxResources.get("tryAgain"),-V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function D(){""!=mxUtils.trim(P.value)&&(F(P.value),P.value="")}var d=b.editor.graph,g=document.createElement("div");g.style.textAlign="center";g.style.overflow="hidden";g.style.height="100%";var l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.top="0px";l.style.left="0px";l.style.right="0px";l.style.bottom="104px";g.appendChild(l);var n=document.createElement("div");n.style.position=+V));m.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function E(){""!=mxUtils.trim(P.value)&&(F(P.value),P.value="")}var d=b.editor.graph,g=document.createElement("div");g.style.textAlign="center";g.style.overflow="hidden";g.style.height="100%";var l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.top="0px";l.style.left="0px";l.style.right="0px";l.style.bottom="104px";g.appendChild(l);var n=document.createElement("div");n.style.position="absolute";n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.border="1px solid lightgray";n.style.margin="8px 8px 16px 8px";n.style.padding="8px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.padding="6px";n.style.height="80px";var x=document.createElement("div");x.style.display="flex";x.style.gap="6px";x.style.marginBottom="6px";var z=document.createElement("select");z.style.textOverflow="ellipsis";z.style.flexGrow="1";z.style.padding="4px";z.style.minWidth="0";n.appendChild(x);var B=document.createElement("option");B.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(B);var I=document.createElement("option");I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));z.appendChild(I);x.appendChild(z);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var G=document.createElement("option");G.setAttribute("value","create");mxUtils.write(G,mxResources.get("create"));z.appendChild(G)}G=document.createElement("option");G.setAttribute("value","help");mxUtils.write(G,mxResources.get("help"));z.appendChild(G);G=document.createElement("option");G.setAttribute("value","reset");mxUtils.write(G,mxResources.get("reset"));z.appendChild(G);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(G=0;G<EditorUi.mermaidDiagramTypes.length;G++){var Q=document.createElement("option"),U=EditorUi.mermaidDiagramTypes[G],T=U;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));Q.setAttribute("value",U);mxUtils.write(Q,T);C.appendChild(Q)}x.appendChild(C);x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.textOverflow="clip";x.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";x.appendChild(P);G=document.createElement("img");G.setAttribute("src",Editor.sendImage);G.setAttribute("title",mxResources.get("sendMessage"));G.className="geAdaptiveAsset";G.style.position="relative";G.style.cursor="pointer";G.style.opacity="0.5";G.style.height="19px";G.style.left="-24px";G.style.top="5px";G.style.background="url('"+b.editor.transparentImage+"')";x.appendChild(G);n.appendChild(x);d.isSelectionEmpty()?b.isDiagramEmpty()?z.value="help":z.value="includeCopyOfMyDiagram":z.value="selectionOnly";var v=!1,A=z.value,N=function(){P.setAttribute("placeholder",mxResources.get("create"==z.value?"describeYourDiagram":"askMeAnything"));"create"==z.value?(z.style.width="",C.style.display=""):(z.style.width="100%",C.style.display="none")};N();mxEvent.addListener(z,"change",function(){v||("reset"==z.value?(z.value=A,l.innerHTML=""):A=z.value,N())});d.selectionModel.addListener(mxEvent.CHANGE,q);d.getModel().addListener(mxEvent.CHANGE,-q);q();mxEvent.addListener(G,"click",D);mxEvent.addListener(P,"keydown",function(J){13!=J.keyCode||mxEvent.isShiftDown(J)||D()});g.appendChild(n);this.window=new mxWindow(mxResources.get("chatWindowTitle"),g,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(q)}));this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,k,c,p){var q=b.editor.graph,t=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)t=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,F){if(q.isEnabled()){var D=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=-d.split(" ");for(var g=[],l=[],n=0;n<d.length;n++){var x=mxUtils.trim(d[n]);""!=x&&(l.push(x),0>mxUtils.indexOf(H,x)&&g.push(x))}q.isSelectionEmpty()?F(H.concat(g)):q.addTagsForCells(q.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(D.container,320,80,!0,!0);D.init()}},t);t=y.div;this.window=new mxWindow(mxResources.get("tags"),t,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;+q);q();mxEvent.addListener(G,"click",E);mxEvent.addListener(P,"keydown",function(J){13!=J.keyCode||mxEvent.isShiftDown(J)||E()});g.appendChild(n);this.window=new mxWindow(mxResources.get("chatWindowTitle"),g,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(q)}));this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,k,c,p){var q=b.editor.graph,t=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)t=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,F){if(q.isEnabled()){var E=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=+d.split(" ");for(var g=[],l=[],n=0;n<d.length;n++){var x=mxUtils.trim(d[n]);""!=x&&(l.push(x),0>mxUtils.indexOf(H,x)&&g.push(x))}q.isSelectionEmpty()?F(H.concat(g)):q.addTagsForCells(q.getSelectionCells(),l)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(E.container,320,80,!0,!0);E.init()}},t);t=y.div;this.window=new mxWindow(mxResources.get("tags"),t,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){y.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("authorizationRequired"));var t="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(t=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(t=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(t=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(t=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(t=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):f==b.trello&&(t=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[t]));var H=document.createElement("input");H.setAttribute("type","checkbox");t=mxUtils.button(mxResources.get("authorize"),function(){c(H.checked)});t.insertBefore(y,t.firstChild);t.style.marginTop="6px";t.className="geBigButton";t.style.fontSize="18px";t.style.padding="14px";p.appendChild(q);p.appendChild(b);p.appendChild(t);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(H),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberMe")),k.appendChild(q),p.appendChild(k),H.checked=!0,H.defaultChecked=!0,mxEvent.addListener(q,"click",function(F){H.checked=!H.checked;mxEvent.consume(F)}));this.container=p},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var c=document.createElement("div"),p=[];if(null!=b.sidebar.customEntries)for(var q=0;q<b.sidebar.customEntries.length;q++){for(var t=b.sidebar.customEntries[q]||{},y={title:b.getResource(t.title),entries:[]},H=0;null!=t.entries&&H<t.entries.length;H++){var F=t.entries[H];y.entries.push({id:F.id,title:b.getResource(F.title),desc:b.getResource(F.desc),image:F.preview})}0<y.entries.length&&p.push(y)}for(q=0;q<k.length;q++)if(null==b.sidebar.enabledLibraries)p.push(k[q]);else{y={title:k[q].title,entries:[]};for(H=0;H<k[q].entries.length;H++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-k[q].entries[H].id)&&y.entries.push(k[q].entries[H]);0<y.entries.length&&p.push(y)}k=p;if(f){q=mxUtils.bind(this,function(U){for(var T=0;T<U.length;T++)(function(P){var v=n.cloneNode(!1);v.style.fontWeight="bold";v.style.backgroundColor="light-dark(#e5e5e5, #505759)";v.style.padding="6px 0px 6px 20px";mxUtils.write(v,P.title);D.appendChild(v);for(var A=0;A<P.entries.length;A++)(function(N){var J=n.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";-J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",N.title+" ("+N.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(N.id);K.defaultChecked=K.checked;J.appendChild(K);mxUtils.write(J," "+N.title);D.appendChild(J);var m=function(u){if(null==u||"INPUT"!=mxEvent.getSource(u).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=N.desc){var E=document.createElement("pre");-E.style.boxSizing="border-box";E.style.fontFamily="inherit";E.style.margin="20px";E.style.right="0px";E.style.textAlign="left";mxUtils.write(E,N.desc);d.appendChild(E)}null!=N.imageCallback?N.imageCallback(d):null!=N.image?(E=document.createElement("img"),E.setAttribute("border","0"),E.style.maxWidth="100%",E.setAttribute("src",N.image),d.appendChild(E)):null==N.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=g&&(g.style.backgroundColor=+k[q].entries[H].id)&&y.entries.push(k[q].entries[H]);0<y.entries.length&&p.push(y)}k=p;if(f){q=mxUtils.bind(this,function(U){for(var T=0;T<U.length;T++)(function(P){var v=n.cloneNode(!1);v.style.fontWeight="bold";v.style.backgroundColor="light-dark(#e5e5e5, #505759)";v.style.padding="6px 0px 6px 20px";mxUtils.write(v,P.title);E.appendChild(v);for(var A=0;A<P.entries.length;A++)(function(N){var J=n.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";+J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",N.title+" ("+N.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(N.id);K.defaultChecked=K.checked;J.appendChild(K);mxUtils.write(J," "+N.title);E.appendChild(J);var m=function(u){if(null==u||"INPUT"!=mxEvent.getSource(u).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=N.desc){var D=document.createElement("pre");+D.style.boxSizing="border-box";D.style.fontFamily="inherit";D.style.margin="20px";D.style.right="0px";D.style.textAlign="left";mxUtils.write(D,N.desc);d.appendChild(D)}null!=N.imageCallback?N.imageCallback(d):null!=N.image?(D=document.createElement("img"),D.setAttribute("border","0"),D.style.maxWidth="100%",D.setAttribute("src",N.image),d.appendChild(D)):null==N.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=g&&(g.style.backgroundColor="");g=J;g.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=u&&mxEvent.consume(u)}};mxEvent.addListener(J,"click",m);mxEvent.addListener(J,"dblclick",function(u){K.checked=!K.checked;mxEvent.consume(u)});l.push(function(){return K.checked?N.id:null});0==T&&0==A&&m()})(P.entries[A])})(U[T])});H=document.createElement("div");H.className="geDialogTitle";mxUtils.write(H,mxResources.get("shapes"));H.style.position="absolute";H.style.top="0px";H.style.left="0px";H.style.lineHeight="40px";H.style.height=-"40px";H.style.right="0px";var D=document.createElement("div"),d=document.createElement("div");D.style.position="absolute";D.style.top="40px";D.style.left="0px";D.style.width="202px";D.style.bottom="60px";D.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var g=null,l=[],n=document.createElement("div");n.style.position=-"relative";n.style.left="0px";n.style.right="0px";q(k);c.style.padding="30px";c.appendChild(H);c.appendChild(D);c.appendChild(d);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.position="relative";x.style.top="1px";x.checked=b.sidebar.sidebarTitles;+"40px";H.style.right="0px";var E=document.createElement("div"),d=document.createElement("div");E.style.position="absolute";E.style.top="40px";E.style.left="0px";E.style.width="202px";E.style.bottom="60px";E.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var g=null,l=[],n=document.createElement("div");n.style.position=+"relative";n.style.left="0px";n.style.right="0px";q(k);c.style.padding="30px";c.appendChild(H);c.appendChild(E);c.appendChild(d);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.position="relative";x.style.top="1px";x.checked=b.sidebar.sidebarTitles;x.defaultChecked=x.checked;k.appendChild(x);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("labels"));q.style.paddingRight="20px";k.appendChild(q);mxEvent.addListener(q,"click",function(U){x.checked=!x.checked;mxEvent.consume(U)});var z=document.createElement("input");z.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)q=document.createElement("span"),q.style.paddingRight="20px",q.appendChild(z),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),z.style.position="relative",z.style.top="1px",z.checked=!0,z.defaultChecked=!0,mxEvent.addListener(q,"click",function(U){mxEvent.getSource(U)!=z&&(z.checked=!z.checked,mxEvent.consume(U))}),k.appendChild(q);q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],T=0;T<l.length;T++){var P=l[T].apply(this,arguments);null!=P&&U.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<U.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=T&&0<U.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),z.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),z.checked,!0);b.setSidebarTitles(x.checked,z.checked)});H.className="geBtn gePrimaryBtn"}else{var B=document.createElement("table");@@ -12323,62 +12327,62 @@ f,k,c){function p(){H=!0;if(0==y.length)t.innerText=mxResources.get("noPlugins")mxUtils.write(n,y[l]);t.appendChild(n);mxUtils.br(t);mxEvent.addListener(x,"click",function(z){return function(){b.confirm(mxResources.get("delete")+' "'+y[z]+'"?',function(){null!=k&&k(y[z]);y.splice(z,1);p()})}}(l))}}}var q=document.createElement("div"),t=document.createElement("div");t.style.height="180px";t.style.overflow="auto";var y=mxSettings.getPlugins().slice(),H=!1;q.appendChild(t);p();H=!1;var F=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(l){l&&0>mxUtils.indexOf(y,l)&&y.push(l);p()})}:function(){var l=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");l.appendChild(n);var x=document.createElement("select");x.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var z=document.createElement("option");mxUtils.write(z,App.publicPlugin[n]);z.value=App.publicPlugin[n];x.appendChild(z)}l.appendChild(x);mxUtils.br(l);mxUtils.br(l);n=mxUtils.button(mxResources.get("custom")+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var G=0;G<I.length;G++){var C=I[G],Q=App.pluginRegistry[C];null!=Q&&(C=Q);0<C.length&&0>mxUtils.indexOf(y,C)&&y.push(C)}p()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});n.className="geBtn";ALLOW_CUSTOM_PLUGINS||(n.style.display="none");l=new CustomDialog(b,l,mxUtils.bind(this,function(){var B=-App.pluginRegistry[x.value];0>mxUtils.indexOf(y,B)&&(y.push(B),p())}),null,null,null,n);b.showDialog(l.container,360,100,!0,!0)});F.className="geBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var g=document.createElement("div");-g.style.marginTop="14px";g.style.textAlign="right";b.isOffline()||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||g.appendChild(D),g.appendChild(F),g.appendChild(d)):(g.appendChild(F),g.appendChild(d),c||g.appendChild(D));q.appendChild(g);this.container=q},CropImageDialog=function(b,f,k,c){function p(){var U=z.checked,T=B.checked,P=l.geometry,v=H.width,A=H.height,N=(300-v)/2,J=(300-A)/2;P.x<N?(P.width-=N-P.x,P.x=N):P.x+P.width>N+v&&(P.width=N+v-P.x,-P.x=Math.min(P.x,N+v));P.y<J?(P.height-=J-P.y,P.y=J):P.y+P.height>J+A&&(P.height=J+A-P.y,P.y=Math.min(P.y,J+A));var K=(P.x-N)/v*100;v=100-(P.x+P.width-N)/v*100;N=(P.y-J)/A*100;P=100-(P.y+P.height-J)/A*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(v)+"% "+mxUtils.format(P)+"% "+mxUtils.format(K)+"%"+(U?" round "+g+"%":T?" round 50%":"")+")"}function q(U){null!=D&&(!0!==U&&(D.model.setGeometry(l,d.clone()),g=5,G.value=g),D.model.setStyle(l,n+p()),D.selectAll(),I.style.visibility=z.checked?-"visible":"hidden")}var t=document.createElement("div"),y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var H=document.createElement("img");H.onload=function(){function U(){D.model.setStyle(l,n+p())}D=new Graph(F);D.autoExtend=!1;D.autoScroll=!1;D.setGridEnabled(!1);D.setEnabled(!0);D.setPanning(!1);D.setConnectable(!1);D.getRubberband().setEnabled(!1);-D.graphHandler.allowLivePreview=!1;var T=D.createVertexHandler;D.createVertexHandler=function(){var S=T.apply(this,arguments);S.livePreview=!1;return S};if(null!=k)try{if("inset"==k.substring(0,5)){var P=l.geometry,v=H.width,A=H.height,N=(300-v)/2,J=(300-A)/2,K=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),m=parseFloat(K[0]),u=parseFloat(K[1]),E=parseFloat(K[2]),M=parseFloat(K[3]);isFinite(m)&&isFinite(u)&&isFinite(E)&&isFinite(M)?(P.x=M/100*v+N,P.y=m/100*A+J,P.width=(100-u)/100*v+N-P.x,P.height=(100--E)/100*A+J-P.y,"round"==K[4]?"50%"==K[5]?B.setAttribute("checked","checked"):(g=parseInt(K[5]),G.value=g,z.setAttribute("checked","checked"),I.style.visibility="visible"):x.setAttribute("checked","checked")):k=null}else k=null}catch(S){}l.style=n+(k?k:p());l.vertex=!0;D.addCell(l,null,null,null,null);D.selectAll();D.addListener(mxEvent.CELLS_MOVED,U);D.addListener(mxEvent.CELLS_RESIZED,U);var L=D.graphHandler.mouseUp,O=D.graphHandler.mouseDown;D.graphHandler.mouseUp=function(){L.apply(this,arguments);-F.style.backgroundColor="#fff9"};D.graphHandler.mouseDown=function(){O.apply(this,arguments);F.style.backgroundColor=""};D.dblClick=function(){};var R=D.getSelectionModel().changeSelection;D.getSelectionModel().changeSelection=function(){R.call(this,[l],[l])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",f);H.style.maxWidth="300px";H.style.maxHeight="300px";y.appendChild(H);t.appendChild(y);var F=document.createElement("div");F.style.width="300px";F.style.height=-"300px";F.style.overflow="hidden";F.style.backgroundColor="#fff9";t.appendChild(F);var D=null,d=new mxGeometry(100,100,100,100),g=5,l=new mxCell("",d.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRect");x.setAttribute("name","croppingShape");x.setAttribute("checked","checked");x.style.margin="5px";t.appendChild(x);f=document.createElement("label");+App.pluginRegistry[x.value];0>mxUtils.indexOf(y,B)&&(y.push(B),p())}),null,null,null,n);b.showDialog(l.container,360,100,!0,!0)});F.className="geBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var g=document.createElement("div");+g.style.marginTop="14px";g.style.textAlign="right";b.isOffline()||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||g.appendChild(E),g.appendChild(F),g.appendChild(d)):(g.appendChild(F),g.appendChild(d),c||g.appendChild(E));q.appendChild(g);this.container=q},CropImageDialog=function(b,f,k,c){function p(){var U=z.checked,T=B.checked,P=l.geometry,v=H.width,A=H.height,N=(300-v)/2,J=(300-A)/2;P.x<N?(P.width-=N-P.x,P.x=N):P.x+P.width>N+v&&(P.width=N+v-P.x,+P.x=Math.min(P.x,N+v));P.y<J?(P.height-=J-P.y,P.y=J):P.y+P.height>J+A&&(P.height=J+A-P.y,P.y=Math.min(P.y,J+A));var K=(P.x-N)/v*100;v=100-(P.x+P.width-N)/v*100;N=(P.y-J)/A*100;P=100-(P.y+P.height-J)/A*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(v)+"% "+mxUtils.format(P)+"% "+mxUtils.format(K)+"%"+(U?" round "+g+"%":T?" round 50%":"")+")"}function q(U){null!=E&&(!0!==U&&(E.model.setGeometry(l,d.clone()),g=5,G.value=g),E.model.setStyle(l,n+p()),E.selectAll(),I.style.visibility=z.checked?+"visible":"hidden")}var t=document.createElement("div"),y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var H=document.createElement("img");H.onload=function(){function U(){E.model.setStyle(l,n+p())}E=new Graph(F);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);+E.graphHandler.allowLivePreview=!1;var T=E.createVertexHandler;E.createVertexHandler=function(){var S=T.apply(this,arguments);S.livePreview=!1;return S};if(null!=k)try{if("inset"==k.substring(0,5)){var P=l.geometry,v=H.width,A=H.height,N=(300-v)/2,J=(300-A)/2,K=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),m=parseFloat(K[0]),u=parseFloat(K[1]),D=parseFloat(K[2]),M=parseFloat(K[3]);isFinite(m)&&isFinite(u)&&isFinite(D)&&isFinite(M)?(P.x=M/100*v+N,P.y=m/100*A+J,P.width=(100-u)/100*v+N-P.x,P.height=(100-+D)/100*A+J-P.y,"round"==K[4]?"50%"==K[5]?B.setAttribute("checked","checked"):(g=parseInt(K[5]),G.value=g,z.setAttribute("checked","checked"),I.style.visibility="visible"):x.setAttribute("checked","checked")):k=null}else k=null}catch(S){}l.style=n+(k?k:p());l.vertex=!0;E.addCell(l,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,U);E.addListener(mxEvent.CELLS_RESIZED,U);var L=E.graphHandler.mouseUp,O=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){L.apply(this,arguments);+F.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){O.apply(this,arguments);F.style.backgroundColor=""};E.dblClick=function(){};var R=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){R.call(this,[l],[l])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",f);H.style.maxWidth="300px";H.style.maxHeight="300px";y.appendChild(H);t.appendChild(y);var F=document.createElement("div");F.style.width="300px";F.style.height=+"300px";F.style.overflow="hidden";F.style.backgroundColor="#fff9";t.appendChild(F);var E=null,d=new mxGeometry(100,100,100,100),g=5,l=new mxCell("",d.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRect");x.setAttribute("name","croppingShape");x.setAttribute("checked","checked");x.style.margin="5px";t.appendChild(x);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));t.appendChild(f);var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRounded");z.setAttribute("name","croppingShape");z.style.margin="5px";t.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));t.appendChild(f);var B=document.createElement("input");B.setAttribute("type","radio");B.setAttribute("id","croppingEllipse");B.setAttribute("name","croppingShape");B.style.margin="5px";t.appendChild(B);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));t.appendChild(f);mxEvent.addListener(x,"change",q);mxEvent.addListener(z,"change",q);mxEvent.addListener(B,"change",q);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var G=document.createElement("input");G.setAttribute("type","range");G.setAttribute("min","1");G.setAttribute("max","49");G.setAttribute("value",g);G.setAttribute("title",mxResources.get("arcSize"));I.appendChild(G);t.appendChild(I);mxEvent.addListener(G,"change",function(){g=this.value;q(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(p(),l.geometry.width,l.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){c(null,H.width,H.height);b.hideDialog()});C.className="geBtn";var Q=document.createElement("div");Q.style.marginTop="10px";Q.style.textAlign="right";b.editor.cancelFirst?(Q.appendChild(f),Q.appendChild(C),Q.appendChild(y)):(Q.appendChild(C),Q.appendChild(y),Q.appendChild(f));t.appendChild(Q);this.container=t},EditGeometryDialog=function(b,f){var k=b.editor.graph,c=1==f.length?k.getCellGeometry(f[0]):null,p=document.createElement("div"),q=document.createElement("table"),t=document.createElement("tbody"),-y=document.createElement("tr"),H=document.createElement("td"),F=document.createElement("td");q.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var D=document.createElement("input");D.setAttribute("type","checkbox");null!=c&&c.relative&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);this.init=function(){D.focus()};F.appendChild(D);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");+y=document.createElement("tr"),H=document.createElement("td"),F=document.createElement("td");q.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var E=document.createElement("input");E.setAttribute("type","checkbox");null!=c&&c.relative&&(E.setAttribute("checked","checked"),E.defaultChecked=!0);this.init=function(){E.focus()};F.appendChild(E);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("left")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.x:"";F.appendChild(d);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c?c.y:"";F.appendChild(g);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("dx")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c&&null!=c.offset?c.offset.x:"";F.appendChild(l);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("dy")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c&&null!=c.offset?c.offset.y:"";F.appendChild(n);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";F.appendChild(x);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.height:"";F.appendChild(z);y.appendChild(H);y.appendChild(F);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");F=document.createElement("td");mxUtils.write(H,mxResources.get("rotation")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="100px";B.value=1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";F.appendChild(B);y.appendChild(H);y.appendChild(F);t.appendChild(y);q.appendChild(t);p.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var G=0;G<f.length;G++){var C=k.getCellGeometry(f[G]);null!=-C&&(C=C.clone(),k.isCellMovable(f[G])&&(C.relative=D.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(g.value).length&&(C.y=Number(g.value)),0<mxUtils.trim(l.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(n.value))),k.isCellResizable(f[G])&&(0<mxUtils.trim(x.value).length&&(C.width=Number(x.value)),0<mxUtils.trim(z.value).length&&(C.height=Number(z.value))),+C&&(C=C.clone(),k.isCellMovable(f[G])&&(C.relative=E.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(g.value).length&&(C.y=Number(g.value)),0<mxUtils.trim(l.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(n.value))),k.isCellResizable(f[G])&&(0<mxUtils.trim(x.value).length&&(C.width=Number(x.value)),0<mxUtils.trim(z.value).length&&(C.height=Number(z.value))),k.getModel().setGeometry(f[G],C));0<mxUtils.trim(B.value).length&&k.setCellStyles(mxConstants.STYLE_ROTATION,Number(B.value),[f[G]])}}finally{k.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",function(G){13==G.keyCode&&I.click()});q=document.createElement("div");q.style.marginTop="20px";q.style.textAlign="right";b.editor.cancelFirst?(q.appendChild(c),q.appendChild(I)):(q.appendChild(I),q.appendChild(c));p.appendChild(q);this.container=p},LibraryDialog=function(b,-f,k,c,p,q,t){function y(P){for(P=document.elementFromPoint(P.clientX,P.clientY);null!=P&&P.parentNode!=n;)P=P.parentNode;var v=null;if(null!=P){var A=n.firstChild;for(v=0;null!=A&&A!=P;)A=A.nextSibling,v++}return v}function H(P,v,A,N,J,K,m,u,E){try{if(b.spinner.stop(),null==v||"image/"==v.substring(0,6))if(null==P&&null!=m||null==z[P]){var M=function(){Y.innerText="";Y.style.cursor="pointer";Y.style.whiteSpace="nowrap";Y.style.textOverflow="ellipsis";mxUtils.write(Y,null!=Z.title&&0<Z.title.length?+f,k,c,p,q,t){function y(P){for(P=document.elementFromPoint(P.clientX,P.clientY);null!=P&&P.parentNode!=n;)P=P.parentNode;var v=null;if(null!=P){var A=n.firstChild;for(v=0;null!=A&&A!=P;)A=A.nextSibling,v++}return v}function H(P,v,A,N,J,K,m,u,D){try{if(b.spinner.stop(),null==v||"image/"==v.substring(0,6))if(null==P&&null!=m||null==z[P]){var M=function(){Y.innerText="";Y.style.cursor="pointer";Y.style.whiteSpace="nowrap";Y.style.textOverflow="ellipsis";mxUtils.write(Y,null!=Z.title&&0<Z.title.length?Z.title:mxResources.get("untitled"));Y.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};n.style.backgroundImage="";x.style.display="none";var L=J,O=K;if(J>b.maxImageSize||K>b.maxImageSize){var R=Math.min(1,Math.min(b.maxImageSize/Math.max(1,J)),b.maxImageSize/Math.max(1,K));J*=R;K*=R}L>O?(O=Math.round(100*O/L),L=100):(L=Math.round(100*L/O),O=100);var S=document.createElement("div");S.setAttribute("draggable","true");S.style.display="inline-block";S.style.position="relative";S.style.padding="0 12px";S.style.cursor="move";mxUtils.setPrefixedStyle(S.style,"transition","transform .1s ease-in-out");if(null!=P){var V=document.createElement("img");V.setAttribute("src",C.convert(P));V.style.width=L+"px";V.style.height=O+"px";V.style.margin="10px";V.style.paddingBottom=Math.floor((100-O)/2)+"px";V.style.paddingLeft=Math.floor((100-L)/2)+"px";S.appendChild(V)}else if(null!=m){var X=b.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml));0<X.length&&(b.sidebar.createThumb(X,100,100,S,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),S.firstChild.style.display="inline-block",S.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});(function(fa,ma,ba){mxEvent.addListener(W,"click",function(ja){z[ma]=null;for(var la=0;la<d.length;la++)if(null!=d[la].data&&d[la].data==ma||null!=d[la].xml&&null!=ba&&d[la].xml==ba.xml){d.splice(la,1);break}S.parentNode.removeChild(fa);0==d.length&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(ja)});mxEvent.addListener(W,"dblclick",function(ja){mxEvent.consume(ja)})})(S,P,m);S.appendChild(W);S.style.marginBottom="30px";var Y=document.createElement("div");-Y.style.position="absolute";Y.style.boxSizing="border-box";Y.style.bottom="-18px";Y.style.left="10px";Y.style.right="10px";Y.style.backgroundColor="light-dark(#ffffff, transparent)";Y.style.overflow="hidden";Y.style.textAlign="center";Y.setAttribute("title",mxResources.get("rename"));var Z=null;null!=P?(Z={data:P,w:J,h:K,title:E},null!=u&&(Z.aspect=u),z[P]=V,d.push(Z)):null!=m&&(m.aspect="fixed",d.push(m),Z=m);mxEvent.addListener(Y,"keydown",function(fa){13==fa.keyCode&&null!=G&&(G(),G=null,mxEvent.consume(fa))});+Y.style.position="absolute";Y.style.boxSizing="border-box";Y.style.bottom="-18px";Y.style.left="10px";Y.style.right="10px";Y.style.backgroundColor="light-dark(#ffffff, transparent)";Y.style.overflow="hidden";Y.style.textAlign="center";Y.setAttribute("title",mxResources.get("rename"));var Z=null;null!=P?(Z={data:P,w:J,h:K,title:D},null!=u&&(Z.aspect=u),z[P]=V,d.push(Z)):null!=m&&(m.aspect="fixed",d.push(m),Z=m);mxEvent.addListener(Y,"keydown",function(fa){13==fa.keyCode&&null!=G&&(G(),G=null,mxEvent.consume(fa))});M();S.appendChild(Y);mxEvent.addListener(Y,"mousedown",function(fa){"true"!=Y.getAttribute("contentEditable")&&mxEvent.consume(fa)});X=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ma=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(ba){null!=ba&&(Z.title=ba,M())},mxResources.get("enterValue"));b.showDialog(ma.container,300,80,!0,!0);ma.init();mxEvent.consume(fa)}else if("true"!=Y.getAttribute("contentEditable")){null!=G&&(G(),G=null);if(null==Z.title||0==Z.title.length)Y.innerText="";Y.style.textOverflow="";Y.style.whiteSpace="";Y.style.cursor="text";Y.style.color="";Y.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(Y.style,"user-select","text");Y.focus();document.execCommand("selectAll",!1,null);G=function(){Y.removeAttribute("contentEditable");Y.style.cursor="pointer";Z.title=mxUtils.getTextContent(Y);M()};mxEvent.consume(fa)}};mxEvent.addListener(Y,"click",X);mxEvent.addListener(S,"dblclick",X);n.appendChild(S);mxEvent.addListener(S,"dragstart",function(fa){null==G&&(null==P&&null!=m&&(W.style.visibility="hidden",Y.style.visibility="hidden"),mxClient.IS_FF&&null!=m.xml&&fa.dataTransfer.setData("Text",m.xml),B=y(fa),mxClient.IS_GC&&(S.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(S,30);W.style.visibility="";Y.style.visibility=""},0))});mxEvent.addListener(S,"dragend",function(fa){"hidden"==W.style.visibility&&(W.style.visibility="",Y.style.visibility="");B=null;mxUtils.setOpacity(S,100);mxUtils.setPrefixedStyle(S.style,"transform",null)})}else Q||(Q=!0,b.handleError({message:mxResources.get("fileExists")}));else{J=!1;try{if(L=mxUtils.parseXml(P),"mxlibrary"==L.documentElement.nodeName){O=JSON.parse(mxUtils.getTextContent(L.documentElement));if(null!=O&&0<O.length)for(var aa=0;aa<O.length;aa++)null!=O[aa].xml?H(null,null,0,0,0,0,O[aa]):H(O[aa].data,null,0,0,O[aa].w,O[aa].h,null,"fixed",O[aa].title);J=!0}else if("mxfile"==L.documentElement.nodeName){var ha=L.documentElement.getElementsByTagName("diagram");for(aa=0;aa<ha.length;aa++){var ea=Editor.getDiagramNodeXml(ha[aa]);X=b.stringToCells(ea);if(0<X.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(X);null!=ca&&H(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}J=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}J||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&-console.log("Error in library dialog: "+fa)}return null}function F(P){P.dataTransfer.dropEffect=null!=B?"move":"copy";P.stopPropagation();P.preventDefault()}function D(P){P.stopPropagation();P.preventDefault();Q=!1;I=y(P);if(null!=B)null!=I&&I<n.children.length?(d.splice(I>B?I-1:I,0,d.splice(B,1)[0]),n.insertBefore(n.children[B],n.children[I])):(d.push(d.splice(B,1)[0]),n.appendChild(n.children[B]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,U(P));+console.log("Error in library dialog: "+fa)}return null}function F(P){P.dataTransfer.dropEffect=null!=B?"move":"copy";P.stopPropagation();P.preventDefault()}function E(P){P.stopPropagation();P.preventDefault();Q=!1;I=y(P);if(null!=B)null!=I&&I<n.children.length?(d.splice(I>B?I-1:I,0,d.splice(B,1)[0]),n.insertBefore(n.children[B],n.children[I])):(d.push(d.splice(B,1)[0]),n.appendChild(n.children[B]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,U(P));else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var v=decodeURIComponent(P.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(v)||/(\.png)($|\?)/i.test(v)||/(\.gif)($|\?)/i.test(v)||/(\.svg)($|\?)/i.test(v))&&b.loadImage(v,function(A){H(v,null,0,0,A.width,A.height);n.scrollTop=n.scrollHeight})}P.stopPropagation();P.preventDefault()}var d=[];k=document.createElement("div");k.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";k.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var l=document.createElement("input");l.setAttribute("value",f);l.style.marginRight="20px";l.style.marginLeft="10px";l.style.width="500px";null==p||p.isRenamable()||l.setAttribute("disabled","true");this.init=function(){if(null==p||p.isRenamable())l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};g.appendChild(l);Editor.enableUncompressedLibraries&&(l.style.width="420px",f=document.createElement("input"),f.setAttribute("type","checkbox"),f.style.marginRight="10px",g.appendChild(f),mxUtils.write(g,mxResources.get("compressed")));var n=document.createElement("div");n.style.borderWidth="1px 0px 1px 0px";n.style.borderColor="#d3d3d3";n.style.borderStyle="solid";n.style.marginTop="6px";n.style.overflow="auto";n.style.height="340px";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";0==d.length&&Graph.fileSupport&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var x=document.createElement("div");x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));k.appendChild(x);var z={},B=null,I=null,G=null;g=function(P){"true"!=mxEvent.getSource(P).getAttribute("contentEditable")&&null!=G&&(G(),G=null,mxEvent.consume(P))};mxEvent.addListener(n,"mousedown",g);mxEvent.addListener(n,"pointerdown",-g);mxEvent.addListener(n,"touchstart",g);var C=new mxUrlConverter,Q=!1;if(null!=c)for(g=0;g<c.length;g++)f=c[g],H(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(n,"dragleave",function(P){x.style.cursor="";for(var v=mxEvent.getSource(P);null!=v;){if(v==n||v==x){P.stopPropagation();P.preventDefault();break}v=v.parentNode}});var U=function(P){return function(v,A,N,J,K,m,u,E,M){null!=M&&EditorUi.isVisioFilename(M.name)?b.importVisio(M,mxUtils.bind(this,function(L){H(L,A,N,J,K,m,u,"fixed",+g);mxEvent.addListener(n,"touchstart",g);var C=new mxUrlConverter,Q=!1;if(null!=c)for(g=0;g<c.length;g++)f=c[g],H(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(n,"dragleave",function(P){x.style.cursor="";for(var v=mxEvent.getSource(P);null!=v;){if(v==n||v==x){P.stopPropagation();P.preventDefault();break}v=v.parentNode}});var U=function(P){return function(v,A,N,J,K,m,u,D,M){null!=M&&EditorUi.isVisioFilename(M.name)?b.importVisio(M,mxUtils.bind(this,function(L){H(L,A,N,J,K,m,u,"fixed",mxEvent.isAltDown(P)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," "))})):null!=M&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(v,M.name)?b.isExternalDataComms()?b.parseFile(M,mxUtils.bind(this,function(L){4==L.readyState&&(b.spinner.stop(),200<=L.status&&299>=L.status&&(H(L.responseText,A,N,J,K,m,u,"fixed",mxEvent.isAltDown(P)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):-(H(v,A,N,J,K,m,u,"fixed",mxEvent.isAltDown(P)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight)}};mxEvent.addListener(n,"dragover",F);mxEvent.addListener(n,"drop",D);mxEvent.addListener(x,"dragover",F);mxEvent.addListener(x,"drop",D);k.appendChild(n);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.setAttribute("id","btnCancel");g.className="geBtn";b.editor.cancelFirst&&+(H(v,A,N,J,K,m,u,"fixed",mxEvent.isAltDown(P)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight)}};mxEvent.addListener(n,"dragover",F);mxEvent.addListener(n,"drop",E);mxEvent.addListener(x,"dragover",F);mxEvent.addListener(x,"drop",E);k.appendChild(n);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.setAttribute("id","btnCancel");g.className="geBtn";b.editor.cancelFirst&&c.appendChild(g);"draw.io"!=b.getServiceName()||null==p||p.constructor!=DriveLibrary&&p.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(p,function(P){if(null!=P){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(P);P=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(P.container,450,240,!0);P.init()}else p.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(p.getId(),p)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("export"),function(){var P=b.createLibraryDataFromImages(d),v=l.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,v,"text/xml",null,null,null!=t?t:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";c.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var T=document.createElement("input");T.setAttribute("multiple","multiple");T.setAttribute("type","file");mxEvent.addListener(T,-"change",function(P){Q=!1;b.importFiles(T.files,0,0,b.maxImageSize,function(v,A,N,J,K,m,u,E,M){null!=T.files&&(U(P)(v,A,N,J,K,m,u,E,M),T.type="",T.type="file",T.value="")});n.scrollTop=n.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}f=mxUtils.button(mxResources.get("import"),function(){null!=G&&(G(),G=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";c.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),+"change",function(P){Q=!1;b.importFiles(T.files,0,0,b.maxImageSize,function(v,A,N,J,K,m,u,D,M){null!=T.files&&(U(P)(v,A,N,J,K,m,u,D,M),T.type="",T.type="file",T.value="")});n.scrollTop=n.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}f=mxUtils.button(mxResources.get("import"),function(){null!=G&&(G(),G=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";c.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=G&&(G(),G=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(P,v,A){Q=!1;if(null!=P){if("data:image/"==P.substring(0,11)){var N=P.indexOf(",");0<N&&(P=P.substring(0,N)+";base64,"+P.substring(N+1))}H(P,null,0,0,v,A);n.scrollTop=n.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";c.appendChild(f);this.saveBtnClickHandler=function(P,v,A,N){b.saveLibrary(P,v,A,N)};f=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=G&&(G(),G=null);this.saveBtnClickHandler(l.value,d,p,q)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";c.appendChild(f);b.editor.cancelFirst||c.appendChild(g);k.appendChild(c);this.container=k},EditShapeDialog=function(b,f,k,c,p){c=null!=c?c:300;p=null!=p?p:120;var q=document.createElement("table"),t=document.createElement("tbody");q.style.cellPadding="4px";var y=document.createElement("tr");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";mxUtils.write(H,k);y.appendChild(H);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");var F=document.createElement("textarea");F.style.outline="none";F.style.resize="none";F.style.width=c-200+"px";F.style.height=p+"px";this.textarea=F;this.init=function(){F.focus();F.scrollTop=0};H.appendChild(F);y.appendChild(H);H=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top="6px";k.style.width="200px";-k.style.height=p+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);H.appendChild(k);var D=new Graph(k);D.setEnabled(!1);var d=b.editor.graph.cloneCell(f);D.addCells([d]);k=D.view.getState(d);var g="";null!=k.shape&&null!=k.shape.stencil&&(g=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(F,g||"");k=D.getGraphBounds();p=Math.min(160/k.width,(p-40)/k.height);D.view.scaleAndTranslate(p,20/p-k.x,20/p-k.y);y.appendChild(H);t.appendChild(y);y=document.createElement("tr");+k.style.height=p+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);H.appendChild(k);var E=new Graph(k);E.setEnabled(!1);var d=b.editor.graph.cloneCell(f);E.addCells([d]);k=E.view.getState(d);var g="";null!=k.shape&&null!=k.shape.stencil&&(g=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(F,g||"");k=E.getGraphBounds();p=Math.min(160/k.width,(p-40)/k.height);E.view.scaleAndTranslate(p,20/p-k.x,20/p-k.y);y.appendChild(H);t.appendChild(y);y=document.createElement("tr");H=document.createElement("td");H.setAttribute("colspan","2");H.style.paddingTop="2px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),p.className="geBtn",H.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&H.appendChild(p);var l=function(n,x,z){var B=F.value,I=mxUtils.parseXml(B);B=mxUtils.getPrettyXml(I.documentElement);I=I.documentElement.getElementsByTagName("parsererror");if(null!=I&&0<I.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(z&&b.hideDialog(),I=!n.model.contains(x),!z||I||B!=g){B=Graph.compress(B);n.getModel().beginUpdate();try{if(I){var G=b.editor.graph.getFreeInsertPoint();x.geometry.x=G.x;x.geometry.y=G.y;n.addCell(x)}n.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+B+")",[x])}catch(C){throw C;-}finally{n.getModel().endUpdate()}I&&(n.setSelectionCell(x),n.scrollCellToVisible(x))}};k=mxUtils.button(mxResources.get("preview"),function(){l(D,d,!1)});k.className="geBtn";H.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";H.appendChild(k);b.editor.cancelFirst||H.appendChild(p);y.appendChild(H);t.appendChild(y);q.appendChild(t);this.container=q},CustomDialog=function(b,f,k,c,p,q,t,y,H,F,D,d){var g=document.createElement("div");+}finally{n.getModel().endUpdate()}I&&(n.setSelectionCell(x),n.scrollCellToVisible(x))}};k=mxUtils.button(mxResources.get("preview"),function(){l(E,d,!1)});k.className="geBtn";H.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){l(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";H.appendChild(k);b.editor.cancelFirst||H.appendChild(p);y.appendChild(H);t.appendChild(y);q.appendChild(t);this.container=q},CustomDialog=function(b,f,k,c,p,q,t,y,H,F,E,d){var g=document.createElement("div");g.appendChild(f);var l=document.createElement("div");l.style.marginTop=null!=d?d:"30px";l.style.textAlign="right";null!=t&&l.appendChild(t);b.isOffline()||null==q||l.appendChild(b.createHelpIcon(q));f=mxUtils.button(H||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});f.className="geBtn";y&&(f.style.display="none");b.editor.cancelFirst&&l.appendChild(f);p=mxUtils.button(p||mxResources.get("ok"),mxUtils.bind(this,function(){F||b.hideDialog(null,null,this.container);if(null!=k){var n=-k();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}F&&b.hideDialog(null,null,this.container)}));l.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(f);if(null!=D)for(y=0;y<D.length;y++)(function(n,x,z){n=mxUtils.button(n,function(B){x(B)});null!=z&&n.setAttribute("title",z);n.className="geBtn";l.appendChild(n)})(D[y][0],D[y][1],D[y][2]);g.appendChild(l);this.cancelBtn=f;this.okButton=p;this.container=g},BtnDialog=function(b,f,k,c){var p=document.createElement("div");+k();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}F&&b.hideDialog(null,null,this.container)}));l.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(f);if(null!=E)for(y=0;y<E.length;y++)(function(n,x,z){n=mxUtils.button(n,function(B){x(B)});null!=z&&n.setAttribute("title",z);n.className="geBtn";l.appendChild(n)})(E[y][0],E[y][1],E[y][2]);g.appendChild(l);this.cancelBtn=f;this.okButton=p;this.container=g},BtnDialog=function(b,f,k,c){var p=document.createElement("div");p.style.textAlign="center";var q=document.createElement("p");q.style.fontSize="16pt";q.style.padding="0px";q.style.margin="0px";q.style.color="gray";mxUtils.write(q,mxResources.get("done"));var t="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(t=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(t=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(t=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(t=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(t=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(t=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[t],"You are now authorized in {1}"));k=mxUtils.button(k,c);k.insertBefore(y,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";p.appendChild(q);p.appendChild(b);p.appendChild(k);this.container=p},FontDialog=function(b,f,k,c,p){function q(G){this.style.border="";13==G.keyCode&&I.click()}var t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";var H=document.createElement("tr");var F=document.createElement("td");F.colSpan=2;F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.fontWeight=-"bold";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","sysfonts");D.setAttribute("type","radio");D.setAttribute("name","current-fontdialog");D.setAttribute("id","fontdialog-sysfonts");F.appendChild(D);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));F.appendChild(d);H.appendChild(F);y.appendChild(H);H=document.createElement("tr");F=document.createElement("td");+"bold";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","sysfonts");E.setAttribute("type","radio");E.setAttribute("name","current-fontdialog");E.setAttribute("id","fontdialog-sysfonts");F.appendChild(E);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));F.appendChild(d);H.appendChild(F);y.appendChild(H);H=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";F.style.paddingLeft="15px";mxUtils.write(F,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(F);var g=document.createElement("input");"s"==c&&g.setAttribute("value",f);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_s";F=document.createElement("td");F.appendChild(g);H.appendChild(F);y.appendChild(H);H=document.createElement("tr");F=document.createElement("td");F.colSpan=2;F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","googlefonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-googlefonts");F.appendChild(l);d=document.createElement("label");d.setAttribute("for","fontdialog-googlefonts");mxUtils.write(d,mxResources.get("googleFonts",null,"Google Fonts"));F.appendChild(d);if(!b.isOffline()||EditorUi.isElectronApp)d=b.createHelpIcon("https://fonts.google.com/"),F.appendChild(d);H.appendChild(F);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(H);H=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";F.style.paddingLeft="15px";mxUtils.write(F,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(F);var n=document.createElement("input");"g"==c&&n.setAttribute("value",f);n.style.marginLeft="4px";@@ -12386,9 +12390,9 @@ n.style.width="250px";n.className="dlg_fontName_g";F=document.createElement("td""current-fontdialog");x.setAttribute("id","fontdialog-webfonts");F.appendChild(x);d=document.createElement("label");d.setAttribute("for","fontdialog-webfonts");mxUtils.write(d,mxResources.get("webfonts",null,"Web Fonts"));F.appendChild(d);H.appendChild(F);Editor.enableWebFonts&&y.appendChild(H);H=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";F.style.paddingLeft="15px";mxUtils.write(F,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(F);var z=document.createElement("input");"w"==c&&(Editor.enableWebFonts?z.setAttribute("value",f):g.setAttribute("value",f));z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontName_w";F=document.createElement("td");F.appendChild(z);H.appendChild(F);Editor.enableWebFonts&&y.appendChild(H);H=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";F.style.paddingLeft="15px";mxUtils.write(F,mxResources.get("fontUrl",null,"Font URL")+":");H.appendChild(F);var B=document.createElement("input");B.setAttribute("value",k||"");B.style.marginLeft="4px";B.style.width="250px";B.className="dlg_fontUrl";F=document.createElement("td");F.appendChild(B);H.appendChild(F);Editor.enableWebFonts&&y.appendChild(H);this.init=function(){var G=g;"g"==c?G=n:"w"==c&&Editor.enableWebFonts&&(G=z);G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",-!1,null)};H=document.createElement("tr");F=document.createElement("td");F.colSpan=2;F.style.paddingTop="20px";F.style.whiteSpace="nowrap";F.setAttribute("align","right");b.isOffline()||F.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();p()});f.className="geBtn";b.editor.cancelFirst&&F.appendChild(f);var I=mxUtils.button(mxResources.get("apply"),function(){if(D.checked){var G=g.value;var C="s"}else if(l.checked){G=+!1,null)};H=document.createElement("tr");F=document.createElement("td");F.colSpan=2;F.style.paddingTop="20px";F.style.whiteSpace="nowrap";F.setAttribute("align","right");b.isOffline()||F.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();p()});f.className="geBtn";b.editor.cancelFirst&&F.appendChild(f);var I=mxUtils.button(mxResources.get("apply"),function(){if(E.checked){var G=g.value;var C="s"}else if(l.checked){G=n.value;var Q=Editor.GOOGLE_FONTS+encodeURIComponent(G).replace(/%20/g,"+");C="g"}else x.checked&&(G=z.value,Q=B.value,C="w");var U=G;var T=Q,P=C,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,A=t.querySelector(".dlg_fontName_"+P);null==A||null!=U&&0!=U.length?(A=t.querySelector(".dlg_fontUrl"),null==A||"w"!=P||v.test(T)?U=!0:(A.style.border="1px solid red",U=!1)):(A.style.border="1px solid red",U=!1);U&&(p(G,Q,C),b.hideDialog())});I.className="geBtn gePrimaryBtn";-mxEvent.addListener(g,"keypress",q);mxEvent.addListener(n,"keypress",q);mxEvent.addListener(z,"keypress",q);mxEvent.addListener(B,"keypress",q);mxEvent.addListener(g,"focus",function(){D.setAttribute("checked","checked");D.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){x.setAttribute("checked","checked");x.checked=+mxEvent.addListener(g,"keypress",q);mxEvent.addListener(n,"keypress",q);mxEvent.addListener(z,"keypress",q);mxEvent.addListener(B,"keypress",q);mxEvent.addListener(g,"focus",function(){E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(B,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});F.appendChild(I);b.editor.cancelFirst||F.appendChild(f);H.appendChild(F);y.appendChild(H);t.appendChild(y);this.container=t};function AspectDialog(b,f,k,c,p){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("pages"));f.appendChild(q);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);q=document.createElement("h5");q.style.margin="0 0 10px";mxUtils.write(q,mxResources.get("layers"));f.appendChild(q);q=document.createElement("div");q.className="geAspectDlgList";f.appendChild(q);this.pagesContainer=k;this.layersContainer=q;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=p&&p()});q.className="geBtn";b.editor.cancelFirst&&k.appendChild(q);var t=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(t);t.className="geBtn gePrimaryBtn";@@ -12399,8 +12403,8 @@ AspectDialog.prototype.createPageItem=function(b,f,k){var c=document.createElemethis.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var q=p.model;q=q.getChildCells(q.getRoot());for(var t=0;t<q.length;t++)this.createLayerItem(q[t],b,p,k)});mxEvent.addListener(c,"click",f);this.aspect.pageId==b&&f()};AspectDialog.prototype.createLayerItem=function(b,f,k,c){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var p=document.createElement("div");p.setAttribute("data-layer-id",b.id);p.className="geAspectDlgListItem";p.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(p);this.createViewer(p.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=p.className.indexOf("geAspectDlgListItemSelected")?(p.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(p.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(p,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};-var FilePropertiesDialog=function(b,f){function k(C){var Q=F;F=function(U,T){try{C(function(){Q(U,T)},T)}catch(P){T(P)}}}var c=document.createElement("table"),p=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var q=b.getCurrentFile(),t=null!=q&&null!=q.getTitle()?q.getTitle():b.defaultFilename,y=/(\.png)$/i.test(t),H=/(\.svg)$/i.test(t),F=function(C,Q){C()},D=null!=q?q.isLocked():!1;var d=document.createElement("tr");var g=document.createElement("td");-g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("locked")+":");d.appendChild(g);var l=document.createElement("input");l.setAttribute("type","checkbox");D&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(l);d.appendChild(g);p.appendChild(d);this.init=function(){l.focus()};k(function(C,Q){null!=b.fileNode&&D!=l.checked?window.setTimeout(function(){null!=+var FilePropertiesDialog=function(b,f){function k(C){var Q=F;F=function(U,T){try{C(function(){Q(U,T)},T)}catch(P){T(P)}}}var c=document.createElement("table"),p=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var q=b.getCurrentFile(),t=null!=q&&null!=q.getTitle()?q.getTitle():b.defaultFilename,y=/(\.png)$/i.test(t),H=/(\.svg)$/i.test(t),F=function(C,Q){C()},E=null!=q?q.isLocked():!1;var d=document.createElement("tr");var g=document.createElement("td");+g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("locked")+":");d.appendChild(g);var l=document.createElement("input");l.setAttribute("type","checkbox");E&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(l);d.appendChild(g);p.appendChild(d);this.init=function(){l.focus()};k(function(C,Q){null!=b.fileNode&&E!=l.checked?window.setTimeout(function(){null!=q&&q.setLocked(l.checked);C()},0):C()});if(y||H){t=1;y=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(t=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(y=parseInt(d.getAttribute("border"))));d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+":");d.appendChild(g);var n=document.createElement("input");n.setAttribute("value",100*t+"%");n.style.marginLeft="4px";n.style.width="100%";g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(n);d.appendChild(g);p.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var x=document.createElement("input");x.setAttribute("value",y);x.style.marginLeft="4px";x.style.width="100%";g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(x);d.appendChild(g);p.appendChild(d);this.init=this.init||function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k(function(C,Q){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(n.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(x.value))),null!=q&&q.fileChanged());C()})}else if(!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t)){var z=null!=q?q.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");g=document.createElement("td");@@ -12413,20 +12417,20 @@ t.style.textOverflow="ellipsis",t.style.display="block",t.style.margin="2px 0px"10pt",mxUtils.write(g,mxResources.get("pathFilename")+":"),d.appendChild(g),t=document.createElement("input"),t.setAttribute("title",q.fileObject.path),t.setAttribute("value",q.fileObject.path),t.setAttribute("disabled","disabled"),t.style.marginLeft="4px",t.style.width="100%",g=document.createElement("td"),g.appendChild(t),d.appendChild(g),p.appendChild(d));this.init=null!=this.init?this.init:function(){};t=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&F(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});t.className="geBtn gePrimaryBtn";d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&g.appendChild(y);g.appendChild(t);b.editor.cancelFirst||g.appendChild(y);d.appendChild(g);p.appendChild(d);c.appendChild(p);this.container=c},ConnectionPointsDialog=function(b,f){function k(){null!=p&&p.destroy()}var c=document.createElement("div");c.style.userSelect="none";var p=null;this.init=function(){function q(J,K,m){var u="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";J=new mxCell("",new mxGeometry(J,K,6,6),u);J.vertex=!0;J.cp=!0;J.constObj=m;return d.addCell(J)}function t(J){J=d.getSelectionCells();-d.deleteCells(J)}function y(){var J=parseInt(P.value)||0;J=0>J?0:100<J?100:J;P.value=J;var K=parseInt(A.value)||0;K=0>K?0:100<K?100:K;A.value=K;var m=parseInt(v.value)||0,u=parseInt(N.value)||0;m=new mxConnectionConstraint(new mxPoint(J/100,K/100),!1,null,m,u);J=d.getConnectionPoint(n,m);K=d.getSelectionCell();if(null!=K){K.constObj=m;m=K.geometry.clone();u=d.view.scale;var E=d.view.translate;m.x=(J.x-3*u)/u-E.x;m.y=(J.y-3*u)/u-E.y;d.model.setGeometry(K,m)}}function H(J){if(J.constObj)return{x:J.constObj.point.x,-y:J.constObj.point.y,dx:J.constObj.dx,dy:J.constObj.dy};var K=0,m=0,u=g.geometry,E=mxUtils.format((J.geometry.x+3-u.x)/u.width);J=mxUtils.format((J.geometry.y+3-u.y)/u.height);0>E?(K=E*u.width,E=0):1<E&&(K=(E-1)*u.width,E=1);0>J?(m=J*u.height,J=0):1<J&&(m=(J-1)*u.height,J=1);return{x:E,y:J,dx:parseInt(K),dy:parseInt(m)}}function F(J){if(1==d.getSelectionCount()){var K=d.getSelectionCell();J&&(K.constObj=null);J=H(K);P.value=100*J.x;A.value=100*J.y;v.value=J.dx;N.value=J.dy;T.style.visibility=""}else T.style.visibility=-"hidden"}var D=document.createElement("div");D.style.width="350px";D.style.height="350px";D.style.overflow="hidden";D.style.borderStyle="solid";D.style.borderWidth="1px";D.style.boxSizing="border-box";mxEvent.disableContextMenu(D);c.appendChild(D);var d=new Graph(D);d.transparentBackground=!1;d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!0);d.setConnectable(!1);d.setTooltips(!1);d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;d.maxFitScale=2;D=f.geometry;-var g=new mxCell(f.value,new mxGeometry(0,0,D.width,D.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");g.vertex=!0;d.addCell(g);d.dblClick=function(J,K){if(null!=K&&K!=g)d.setSelectionCell(K);else{K=mxUtils.convertPoint(d.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=d.view.scale;var m=d.view.translate;d.setSelectionCell(q((K.x-3*J)/J-m.x,(K.y-3*J)/J-m.y))}};p=new mxKeyHandler(d);p.bindKey(46,t);p.bindKey(8,t);d.getRubberband().isForceRubberbandEvent=-function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==g)};d.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var l=d.isCellSelectable;d.isCellSelectable=function(J){return J==g?!1:l.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(g);D=d.getAllConnectionConstraints(n);for(var x=0;null!=D&&x<D.length;x++){var z=d.getConnectionPoint(n,D[x]);q(z.x-3,z.y-3,D[x])}d.fit(8);d.center();x=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),+d.deleteCells(J)}function y(){var J=parseInt(P.value)||0;J=0>J?0:100<J?100:J;P.value=J;var K=parseInt(A.value)||0;K=0>K?0:100<K?100:K;A.value=K;var m=parseInt(v.value)||0,u=parseInt(N.value)||0;m=new mxConnectionConstraint(new mxPoint(J/100,K/100),!1,null,m,u);J=d.getConnectionPoint(n,m);K=d.getSelectionCell();if(null!=K){K.constObj=m;m=K.geometry.clone();u=d.view.scale;var D=d.view.translate;m.x=(J.x-3*u)/u-D.x;m.y=(J.y-3*u)/u-D.y;d.model.setGeometry(K,m)}}function H(J){if(J.constObj)return{x:J.constObj.point.x,+y:J.constObj.point.y,dx:J.constObj.dx,dy:J.constObj.dy};var K=0,m=0,u=g.geometry,D=mxUtils.format((J.geometry.x+3-u.x)/u.width);J=mxUtils.format((J.geometry.y+3-u.y)/u.height);0>D?(K=D*u.width,D=0):1<D&&(K=(D-1)*u.width,D=1);0>J?(m=J*u.height,J=0):1<J&&(m=(J-1)*u.height,J=1);return{x:D,y:J,dx:parseInt(K),dy:parseInt(m)}}function F(J){if(1==d.getSelectionCount()){var K=d.getSelectionCell();J&&(K.constObj=null);J=H(K);P.value=100*J.x;A.value=100*J.y;v.value=J.dx;N.value=J.dy;T.style.visibility=""}else T.style.visibility=+"hidden"}var E=document.createElement("div");E.style.width="350px";E.style.height="350px";E.style.overflow="hidden";E.style.borderStyle="solid";E.style.borderWidth="1px";E.style.boxSizing="border-box";mxEvent.disableContextMenu(E);c.appendChild(E);var d=new Graph(E);d.transparentBackground=!1;d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!0);d.setConnectable(!1);d.setTooltips(!1);d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;d.maxFitScale=2;E=f.geometry;+var g=new mxCell(f.value,new mxGeometry(0,0,E.width,E.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");g.vertex=!0;d.addCell(g);d.dblClick=function(J,K){if(null!=K&&K!=g)d.setSelectionCell(K);else{K=mxUtils.convertPoint(d.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=d.view.scale;var m=d.view.translate;d.setSelectionCell(q((K.x-3*J)/J-m.x,(K.y-3*J)/J-m.y))}};p=new mxKeyHandler(d);p.bindKey(46,t);p.bindKey(8,t);d.getRubberband().isForceRubberbandEvent=+function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==g)};d.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var l=d.isCellSelectable;d.isCellSelectable=function(J){return J==g?!1:l.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(g);E=d.getAllConnectionConstraints(n);for(var x=0;null!=E&&x<E.length;x++){var z=d.getConnectionPoint(n,E[x]);q(z.x-3,z.y-3,E[x])}d.fit(8);d.center();x=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){d.zoomIn()});z=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var B=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(J){!isNaN(J)&&0<J&&(d.setGridSize(J),d.setGridEnabled(!0),d.refresh())})},G=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(J){mxEvent.isShiftDown(J)?-I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(G,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),t);mxUtils.setOpacity(C,10);D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";D.style.paddingTop="6px";D.appendChild(x);D.appendChild(z);D.appendChild(B);D.appendChild(G);D.appendChild(C);c.appendChild(D);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("value",-"1");Q.style.width="45px";Q.style.position="relative";Q.style.margin="0 4px 0 4px";var U=document.createElement("select");U.style.position="relative";z=["left","right","top","bottom"];for(x=0;x<z.length;x++)B=z[x],G=document.createElement("option"),mxUtils.write(G,mxResources.get(B)),G.value=B,U.appendChild(G);x=mxUtils.button(mxResources.get("add"),function(){var J=parseInt(Q.value);J=1>J?1:100<J?100:J;Q.value=J;for(var K=U.value,m=g.geometry,u=[],E=0;E<J;E++){switch(K){case "left":var M=m.x;var L=-m.y+(E+1)*m.height/(J+1);break;case "right":M=m.x+m.width;L=m.y+(E+1)*m.height/(J+1);break;case "top":M=m.x+(E+1)*m.width/(J+1);L=m.y;break;case "bottom":M=m.x+(E+1)*m.width/(J+1),L=m.y+m.height}u.push(q(M-3,L-3))}d.setSelectionCells(u)});x.style.marginLeft="auto";D.appendChild(x);D.appendChild(Q);D.appendChild(U);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";D=document.createElement("span");mxUtils.write(D,mxResources.get("dx"));-T.appendChild(D);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";T.appendChild(P);mxUtils.write(T,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";T.appendChild(v);mxUtils.write(T,"pt");D=document.createElement("span");mxUtils.write(D,mxResources.get("dy"));D.style.marginLeft="12px";T.appendChild(D);+I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(G,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),t);mxUtils.setOpacity(C,10);E=document.createElement("div");E.style.display="flex";E.style.alignItems="center";E.style.paddingTop="6px";E.appendChild(x);E.appendChild(z);E.appendChild(B);E.appendChild(G);E.appendChild(C);c.appendChild(E);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("value",+"1");Q.style.width="45px";Q.style.position="relative";Q.style.margin="0 4px 0 4px";var U=document.createElement("select");U.style.position="relative";z=["left","right","top","bottom"];for(x=0;x<z.length;x++)B=z[x],G=document.createElement("option"),mxUtils.write(G,mxResources.get(B)),G.value=B,U.appendChild(G);x=mxUtils.button(mxResources.get("add"),function(){var J=parseInt(Q.value);J=1>J?1:100<J?100:J;Q.value=J;for(var K=U.value,m=g.geometry,u=[],D=0;D<J;D++){switch(K){case "left":var M=m.x;var L=+m.y+(D+1)*m.height/(J+1);break;case "right":M=m.x+m.width;L=m.y+(D+1)*m.height/(J+1);break;case "top":M=m.x+(D+1)*m.width/(J+1);L=m.y;break;case "bottom":M=m.x+(D+1)*m.width/(J+1),L=m.y+m.height}u.push(q(M-3,L-3))}d.setSelectionCells(u)});x.style.marginLeft="auto";E.appendChild(x);E.appendChild(Q);E.appendChild(U);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";E=document.createElement("span");mxUtils.write(E,mxResources.get("dx"));+T.appendChild(E);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";T.appendChild(P);mxUtils.write(T,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";T.appendChild(v);mxUtils.write(T,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";T.appendChild(E);var A=document.createElement("input");A.setAttribute("type","number");A.setAttribute("min","0");A.setAttribute("max","100");A.style.width="45px";A.style.margin="0 4px 0 4px";T.appendChild(A);mxUtils.write(T,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";T.appendChild(N);mxUtils.write(T,"pt");c.appendChild(T);F();d.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<d.getSelectionCount()?mxUtils.setOpacity(C,60):-mxUtils.setOpacity(C,10);F()});d.addListener(mxEvent.CELLS_MOVED,F);mxEvent.addListener(P,"change",y);mxEvent.addListener(A,"change",y);mxEvent.addListener(v,"change",y);mxEvent.addListener(N,"change",y);D=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});D.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){var J=d.model.cells,K=[],m=[],u;for(u in J){var E=J[u];E.cp&&m.push(H(E))}m.sort(function(M,L){return M.x!=L.x?M.x-L.x:M.y!=L.y?M.y-L.y:M.dx!=L.dx?M.dx-+mxUtils.setOpacity(C,10);F()});d.addListener(mxEvent.CELLS_MOVED,F);mxEvent.addListener(P,"change",y);mxEvent.addListener(A,"change",y);mxEvent.addListener(v,"change",y);mxEvent.addListener(N,"change",y);E=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});E.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){var J=d.model.cells,K=[],m=[],u;for(u in J){var D=J[u];D.cp&&m.push(H(D))}m.sort(function(M,L){return M.x!=L.x?M.x-L.x:M.y!=L.y?M.y-L.y:M.dx!=L.dx?M.dx-L.dx:M.dy-L.dy});for(J=0;J<m.length;J++)0<J&&m[J].x==m[J-1].x&&m[J].y==m[J-1].y&&m[J].dx==m[J-1].dx&&m[J].dy==m[J-1].dy||K.push("["+m[J].x+","+m[J].y+",0,"+m[J].dx+","+m[J].dy+"]");b.editor.graph.setCellStyles("points","["+K.join(",")+"]",[f]);k();b.hideDialog()});x.className="geBtn gePrimaryBtn";z=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);k();b.hideDialog()});z.className="geBtn";B=document.createElement("div");B.style.marginTop="10px";B.style.textAlign=-"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(D);B.appendChild(z);B.appendChild(x);b.editor.cancelFirst||B.appendChild(D);c.appendChild(B)};this.destroy=k;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=+"right";b.isOffline()||B.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&B.appendChild(E);B.appendChild(z);B.appendChild(x);b.editor.cancelFirst||B.appendChild(E);c.appendChild(B)};this.destroy=k;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";@@ -12476,8 +12480,8 @@ Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tEditor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(m){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=-!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(m,u){return{name:u,dispName:m,type:"bool",defVal:!1,isVisible:function(E,M){return 1==E.vertices.length?(M=M.editorUi.editor.graph.model,E=M.getParent(E.vertices[0]),M.isEdge(E)||M.isVertex(E)):!1},getValue:function(E,M){return"inherit"==mxUtils.getValue(E.style,u)},valueChanged:function(E,M,L,O){M=O.editorUi.editor.graph;-"1"==E?M.setCellStyles(u,"inherit",L.vertices):M.setCellStyles(u,null,L.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,u){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",+!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(m,u){return{name:u,dispName:m,type:"bool",defVal:!1,isVisible:function(D,M){return 1==D.vertices.length?(M=M.editorUi.editor.graph.model,D=M.getParent(D.vertices[0]),M.isEdge(D)||M.isVertex(D)):!1},getValue:function(D,M){return"inherit"==mxUtils.getValue(D.style,u)},valueChanged:function(D,M,L,O){M=O.editorUi.editor.graph;+"1"==D?M.setCellStyles(u,"inherit",L.vertices):M.setCellStyles(u,null,L.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,u){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,u){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",@@ -12500,19 +12504,19 @@ u){m=u.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.lengt{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(m,u){return u.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,u){return 0<m.vertices.length&&0==m.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(m,u){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;u=u.editorUi.editor.graph;return null!=m&&u.isSwimlane(m)},-isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,u){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;u=u.editorUi.editor.graph;return null!=m&&(u.isSwimlane(m)||0<u.model.getChildCount(m))},isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,u){var E=1==m.vertices.length&&0==m.edges.length?-m.vertices[0]:null;u=u.editorUi.editor.graph;return null!=E&&(u.isContainer(E)&&"0"!=m.style.collapsible||!u.isContainer(E)&&"1"==m.style.collapsible)},isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length&&!u.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",+isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,u){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;u=u.editorUi.editor.graph;return null!=m&&(u.isSwimlane(m)||0<u.model.getChildCount(m))},isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,u){var D=1==m.vertices.length&&0==m.edges.length?+m.vertices[0]:null;u=u.editorUi.editor.graph;return null!=D&&(u.isContainer(D)&&"0"!=m.style.collapsible||!u.isContainer(D)&&"1"==m.style.collapsible)},isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(m,u){return 1==m.vertices.length&&0==m.edges.length&&!u.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,u){u=u.editorUi.editor.graph.model;return 0<m.vertices.length?u.isVertex(u.getParent(m.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(m,u){m=0<m.vertices.length?u.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(m,u){return 0<m.vertices.length&&u.editorUi.editor.graph.isAutoSizeCell(m.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",-dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,u){var E=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||u.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==E||E==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,u){var D=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||u.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==D||D==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,u){return 0<m.vertices.length&&u.editorUi.editor.graph.isContainer(m.vertices[0])}},Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].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## An optional data object can be specified to define the metadata for the connector.\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, width 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,,[email protected],default,#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,[email protected],default,#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,[email protected],default,#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,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.canvasSupported=!1;(function(){try{var m=document.createElement("canvas");Editor.canvasSupported=!(!m.getContext||!m.getContext("2d"))}catch(u){}})();Editor.useCanvasForExport=!1;(function(){try{var m=document.createElement("canvas"),u=new Image;u.onload=function(){try{m.getContext("2d").drawImage(u,0,0);var E=m.toDataURL("image/png");Editor.useCanvasForExport=null!=E&&6<E.length}catch(M){}};u.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(E){}})();-Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var m=document.createElement("canvas");m.width=m.height=1;var u=m.toDataURL("image/jpeg");Editor.jpgSupported=null!==u.match("image/jpeg");u=m.toDataURL("image/webp");Editor.webpSupported=null!==u.match("image/webp")}catch(E){}})();Editor.loadCompatibleCss=function(m){mxUtils.lightDarkColorSupported||mxUtils.get(m||"styles/grapheditor.css",mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var E=document.createElement("style");-E.type="text/css";var M=E.appendChild,L=document,O=L.createTextNode;u=u.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(u=u.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(R){}M.call(E,O.call(L,u));document.head.appendChild(E)}}))};Editor.createRoughCanvas=function(m){var u=-rough.canvas({getContext:function(){return m}});u.draw=function(E){var M=E.sets||[];E=E.options||this.getDefaultOptions();for(var L=0;L<M.length;L++){var O=M[L];switch(O.type){case "path":null!=E.stroke&&this._drawToContext(m,O,E);break;case "fillPath":this._drawToContext(m,O,E);break;case "fillSketch":this.fillSketch(m,O,E)}}};u.fillSketch=function(E,M,L){var O=m.state.strokeColor,R=m.state.strokeWidth,S=m.state.strokeAlpha,V=m.state.dashed,X=L.fillWeight;0>X&&(X=L.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);-m.setStrokeColor(L.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(E,M,L);m.setDashed(V);m.setStrokeWidth(R);m.setStrokeColor(O);m.setStrokeAlpha(S)};u._drawToContext=function(E,M,L){E.begin();for(var O=0;O<M.ops.length;O++){var R=M.ops[O],S=R.data;switch(R.op){case "move":E.moveTo(S[0],S[1]);break;case "bcurveTo":E.curveTo(S[0],S[1],S[2],S[3],S[4],S[5]);break;case "lineTo":E.lineTo(S[0],S[1])}}E.end();"fillPath"===M.type&&L.filled?E.fill():E.stroke()};return u};(function(){function m(O,+Editor.canvasSupported=!1;(function(){try{var m=document.createElement("canvas");Editor.canvasSupported=!(!m.getContext||!m.getContext("2d"))}catch(u){}})();Editor.useCanvasForExport=!1;(function(){try{var m=document.createElement("canvas"),u=new Image;u.onload=function(){try{m.getContext("2d").drawImage(u,0,0);var D=m.toDataURL("image/png");Editor.useCanvasForExport=null!=D&&6<D.length}catch(M){}};u.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(D){}})();+Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var m=document.createElement("canvas");m.width=m.height=1;var u=m.toDataURL("image/jpeg");Editor.jpgSupported=null!==u.match("image/jpeg");u=m.toDataURL("image/webp");Editor.webpSupported=null!==u.match("image/webp")}catch(D){}})();Editor.loadCompatibleCss=function(m){mxUtils.lightDarkColorSupported||mxUtils.get(m||"styles/grapheditor.css",mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var D=document.createElement("style");+D.type="text/css";var M=D.appendChild,L=document,O=L.createTextNode;u=u.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(u=u.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(R){}M.call(D,O.call(L,u));document.head.appendChild(D)}}))};Editor.createRoughCanvas=function(m){var u=+rough.canvas({getContext:function(){return m}});u.draw=function(D){var M=D.sets||[];D=D.options||this.getDefaultOptions();for(var L=0;L<M.length;L++){var O=M[L];switch(O.type){case "path":null!=D.stroke&&this._drawToContext(m,O,D);break;case "fillPath":this._drawToContext(m,O,D);break;case "fillSketch":this.fillSketch(m,O,D)}}};u.fillSketch=function(D,M,L){var O=m.state.strokeColor,R=m.state.strokeWidth,S=m.state.strokeAlpha,V=m.state.dashed,X=L.fillWeight;0>X&&(X=L.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);+m.setStrokeColor(L.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(D,M,L);m.setDashed(V);m.setStrokeWidth(R);m.setStrokeColor(O);m.setStrokeAlpha(S)};u._drawToContext=function(D,M,L){D.begin();for(var O=0;O<M.ops.length;O++){var R=M.ops[O],S=R.data;switch(R.op){case "move":D.moveTo(S[0],S[1]);break;case "bcurveTo":D.curveTo(S[0],S[1],S[2],S[3],S[4],S[5]);break;case "lineTo":D.lineTo(S[0],S[1])}}D.end();"fillPath"===M.type&&L.filled?D.fill():D.stroke()};return u};(function(){function m(O,R,S){this.canvas=O;this.rc=R;this.shape=S;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp=@@ -12528,76 +12532,76 @@ X,R),this.lineTo(O+S-X,R),this.quadTo(O+S,R,O+S,R+W),this.lineTo(O+S,R+V-W),thisO.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};m.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(O){return new m(O,Editor.createRoughCanvas(O),this)};var u=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?u.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(O):-this.createRoughCanvas(O)};var E=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,R,S,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||E.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var R=O.addTolerance,S=!0;null!=this.style&&(S="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=+this.createRoughCanvas(O)};var D=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,R,S,V,X){null!=O.handJiggle&&O.handJiggle.passThrough||D.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var R=O.addTolerance,S=!0;null!=this.style&&(S="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();var V=this.fill,X=this.stroke;this.stroke=this.fill=null;var W=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var Z=O.setFillColor;O.setFillColor=function(){};S||null==V||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;M.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=Z;O.setStrokeColor=Y;this.configurePointerEvents=W;this.stroke=X;this.fill=V;O.restore();S&&null!=V&&(O.addTolerance=function(){})}M.apply(this,arguments);O.addTolerance=R};var L=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,R,S,V,X,W){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,L.apply(this,arguments),O.handJiggle.passThrough=!1):L.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),{to:"string"})};-Editor.extractGraphModel=function(m,u,E){if(null!=m&&"undefined"!==typeof pako){var M=m.ownerDocument.getElementsByTagName("div"),L=[];if(null!=M&&0<M.length)for(var O=0;O<M.length;O++)if("mxgraph"==M[O].getAttribute("class")){L.push(M[O]);break}0<L.length&&(M=L[0].getAttribute("data-mxgraph"),null!=M?(L=JSON.parse(M),null!=L&&null!=L.xml&&(m=mxUtils.parseXml(L.xml),m=m.documentElement)):(L=L[0].getElementsByTagName("div"),0<L.length&&(M=mxUtils.getTextContent(L[0]),M=Graph.decompress(M,null,E),0<+Editor.extractGraphModel=function(m,u,D){if(null!=m&&"undefined"!==typeof pako){var M=m.ownerDocument.getElementsByTagName("div"),L=[];if(null!=M&&0<M.length)for(var O=0;O<M.length;O++)if("mxgraph"==M[O].getAttribute("class")){L.push(M[O]);break}0<L.length&&(M=L[0].getAttribute("data-mxgraph"),null!=M?(L=JSON.parse(M),null!=L&&null!=L.xml&&(m=mxUtils.parseXml(L.xml),m=m.documentElement)):(L=L[0].getElementsByTagName("div"),0<L.length&&(M=mxUtils.getTextContent(L[0]),M=Graph.decompress(M,null,D),0<M.length&&(m=mxUtils.parseXml(M),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(M=m.getAttribute("content"),null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(cont,M))),null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M)),null!=M&&0<M.length)m=mxUtils.parseXml(M).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||u||(L=null,"diagram"==m.nodeName?L=m:"mxfile"==m.nodeName&&(M=m.getElementsByTagName("diagram"),0<M.length&&-(L=M[Math.max(0,Math.min(M.length-1,urlParams.page||0))])),null!=L&&(m=Editor.parseDiagramNode(L,E)));null==m||"mxGraphModel"==m.nodeName||u&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,u,E){Editor.validateDiagramNode(m);var M=mxUtils.trim(mxUtils.getTextContent(m)),L=null;0<M.length?(u=Graph.decompress(M,null,u),null!=u&&0<u.length&&(L=mxUtils.parseXml(u).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(L=m[0],E&&(L=Editor.parseDiagramNode(L,u,!1)),u=mxUtils.createXmlDocument(),-u.appendChild(u.importNode(L,!0)),L=u.documentElement));return L};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var u=mxUtils.getNodeValue(m),E=null;0<u.length?E=Graph.decompress(u):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(E=mxUtils.getXml(m[0])));return E};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var u=new mxCodec,E=new mxGraphModel;m.appendChild(u.encode(E))}return m};-Editor.extractGraphModelFromPdf=function(m){var u=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var E=m.indexOf("EmbeddedFile");if(-1<E){var M=m.indexOf("stream",E)+9;if(0<m.substring(E,M).indexOf("application#2Fvnd.jgraph.mxfile")){var L=m.indexOf("endstream",M-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"})}}for(E=m.indexOf("/ObjStm");0<E;){M=m.indexOf("stream",E)+9;L=m.indexOf("endstream",-M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"});L=M.indexOf("/Subject <");if(0<L){E=M.substring(L+14,M.indexOf(">",L));if(null!=E){u=E;E=[];for(M=0;M<u.length;M+=2)L=u.substr(M,2),"00"!=L&&E.push(String.fromCharCode(parseInt(L,16)));u=E.join("")}break}E=m.indexOf("/ObjStm",E+1)}}if(null==u&&"%PDF-1.4"==m.substring(0,8)){E="";L=M=0;for(var O=[],R=null;L<m.length;){var S=m.charCodeAt(L);L+=1;10!=S&&(E+=String.fromCharCode(S));S=="/Subject (%3Cmxfile".charCodeAt(M)?-M++:M=0;if(19==M){var V=m.indexOf("%3C%2Fmxfile%3E",L)+15;L-=9;if(V>L){u=m.substring(L,V);break}}10==S&&("endobj"==E?R=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(R=[],O[E.split(" ")[0]]=R):null!=R&&R.push(E),E="")}}null==u&&null!=O&&(u=Editor.extractGraphModelFromXref(O));null!=u&&(u=decodeURIComponent(u.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return u};Editor.extractGraphModelFromXref=function(m){var u=m.trailer,E=null;null!=u&&(u=/.* \/Info (\d+) (\d+) R/g.exec(u.join("\n")),-null!=u&&0<u.length&&(u=m[u[1]],null!=u&&(u=/.* \/Subject (\d+) (\d+) R/g.exec(u.join("\n")),null!=u&&0<u.length&&(m=m[u[1]],null!=m&&(m=m.join("\n"),E=m.substring(1,m.length-1))))));return E};Editor.extractParserError=function(m,u){var E=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(E=u||mxResources.get("invalidChars"),u=m[0].getElementsByTagName("div"),0<u.length&&(E=mxUtils.getTextContent(u[0])));return null!=E?mxUtils.trim(E):E};Editor.addRetryToError=function(m,-u){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=u))};Editor.mermaidToDrawio=function(m,u,E){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,u,E)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");if(null!=m.customCss){var u=document.createElement("style");u.type="text/css";u.appendChild(document.createTextNode(m.customCss));document.head.appendChild(u)}null!=m.defaultFonts&&(Menus.prototype.defaultFonts=+(L=M[Math.max(0,Math.min(M.length-1,urlParams.page||0))])),null!=L&&(m=Editor.parseDiagramNode(L,D)));null==m||"mxGraphModel"==m.nodeName||u&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,u,D){Editor.validateDiagramNode(m);var M=mxUtils.trim(mxUtils.getTextContent(m)),L=null;0<M.length?(u=Graph.decompress(M,null,u),null!=u&&0<u.length&&(L=mxUtils.parseXml(u).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(L=m[0],D&&(L=Editor.parseDiagramNode(L,u,!1)),u=mxUtils.createXmlDocument(),+u.appendChild(u.importNode(L,!0)),L=u.documentElement));return L};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var u=mxUtils.getNodeValue(m),D=null;0<u.length?D=Graph.decompress(u):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(D=mxUtils.getXml(m[0])));return D};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var u=new mxCodec,D=new mxGraphModel;m.appendChild(u.encode(D))}return m};+Editor.extractGraphModelFromPdf=function(m){var u=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var D=m.indexOf("EmbeddedFile");if(-1<D){var M=m.indexOf("stream",D)+9;if(0<m.substring(D,M).indexOf("application#2Fvnd.jgraph.mxfile")){var L=m.indexOf("endstream",M-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"})}}for(D=m.indexOf("/ObjStm");0<D;){M=m.indexOf("stream",D)+9;L=m.indexOf("endstream",+M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,L)),{to:"string"});L=M.indexOf("/Subject <");if(0<L){D=M.substring(L+14,M.indexOf(">",L));if(null!=D){u=D;D=[];for(M=0;M<u.length;M+=2)L=u.substr(M,2),"00"!=L&&D.push(String.fromCharCode(parseInt(L,16)));u=D.join("")}break}D=m.indexOf("/ObjStm",D+1)}}if(null==u&&"%PDF-1.4"==m.substring(0,8)){D="";L=M=0;for(var O=[],R=null;L<m.length;){var S=m.charCodeAt(L);L+=1;10!=S&&(D+=String.fromCharCode(S));S=="/Subject (%3Cmxfile".charCodeAt(M)?+M++:M=0;if(19==M){var V=m.indexOf("%3C%2Fmxfile%3E",L)+15;L-=9;if(V>L){u=m.substring(L,V);break}}10==S&&("endobj"==D?R=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(R=[],O[D.split(" ")[0]]=R):null!=R&&R.push(D),D="")}}null==u&&null!=O&&(u=Editor.extractGraphModelFromXref(O));null!=u&&(u=decodeURIComponent(u.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return u};Editor.extractGraphModelFromXref=function(m){var u=m.trailer,D=null;null!=u&&(u=/.* \/Info (\d+) (\d+) R/g.exec(u.join("\n")),+null!=u&&0<u.length&&(u=m[u[1]],null!=u&&(u=/.* \/Subject (\d+) (\d+) R/g.exec(u.join("\n")),null!=u&&0<u.length&&(m=m[u[1]],null!=m&&(m=m.join("\n"),D=m.substring(1,m.length-1))))));return D};Editor.extractParserError=function(m,u){var D=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(D=u||mxResources.get("invalidChars"),u=m[0].getElementsByTagName("div"),0<u.length&&(D=mxUtils.getTextContent(u[0])));return null!=D?mxUtils.trim(D):D};Editor.addRetryToError=function(m,+u){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=u))};Editor.mermaidToDrawio=function(m,u,D){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,u,D)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");if(null!=m.customCss){var u=document.createElement("style");u.type="text/css";u.appendChild(document.createTextNode(m.customCss));document.head.appendChild(u)}null!=m.defaultFonts&&(Menus.prototype.defaultFonts=m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=m.templateFile);null!=m.styles&&(Array.isArray(m.styles)?Editor.styles=m.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=m.globalVars&&(Editor.globalVars=m.globalVars);null!=m.compressXml&&(Editor.defaultCompressed=m.compressXml,Editor.compressXml=m.compressXml);null!=m.includeDiagram&&(Editor.defaultIncludeDiagram=m.includeDiagram);null!=m.simpleLabels&&(Editor.simpleLabels=m.simpleLabels);null!=m.pasteAtMousePointer&&(Editor.pasteAtMousePointer=m.pasteAtMousePointer);null!=m.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=m.oneDriveInlinePicker);null!=m.defaultAdaptiveColors?Graph.defaultAdaptiveColors=m.defaultAdaptiveColors:0==m.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=m.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=m.enableLightDarkColors);null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.darkColorVar&&(Editor.darkColorVar=m.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));null!=m.customPresetColors&&-(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){u=document.createElement("style");u.setAttribute("type","text/css");u.appendChild(document.createTextNode(m.css));var E=document.getElementsByTagName("script")[0];E.parentNode.insertBefore(u,E)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=+(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){u=document.createElement("style");u.setAttribute("type","text/css");u.appendChild(document.createTextNode(m.css));var D=document.getElementsByTagName("script")[0];D.parentNode.insertBefore(u,D)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=m.expandLibraries);null!=m.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=m.appendCustomLibraries);null!=m.libraries&&(Sidebar.prototype.customEntries=m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=m.zoomFactor&&(u=parseFloat(m.zoomFactor),!isNaN(u)&&1<u?Graph.prototype.zoomFactor=u:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.defaultGridSize&&(u=parseInt(m.defaultGridSize),!isNaN(u)&&0<u?mxGraph.prototype.gridSize=u:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=m.gridSteps&&(u=parseInt(m.gridSteps),!isNaN(u)&&0<u?mxGraphView.prototype.gridSteps=u:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));-null!=m.pageFormat&&(u=parseInt(m.pageFormat.width),E=parseInt(m.pageFormat.height),!isNaN(u)&&0<u&&!isNaN(E)&&0<E?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,u,E),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=+null!=m.pageFormat&&(u=parseInt(m.pageFormat.width),D=parseInt(m.pageFormat.height),!isNaN(u)&&0<u&&!isNaN(D)&&0<D?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,u,D),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=m.emptyLibraryXml);null!=m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.emptyDiagramXml);null!=m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);null!=m.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=m.updateDefaultStyle);null!=m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);null!=m.sidebarTitleSize&&(u=parseInt(m.sidebarTitleSize),!isNaN(u)&&0<u?Sidebar.prototype.sidebarTitleSize=u:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=m.autosaveDelay&&(u=parseInt(m.autosaveDelay),!isNaN(u)&&0<u?DrawioFile.prototype.autosaveDelay=u:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors);null!=m.restrictExport&&(DrawioFile.RESTRICT_EXPORT=m.restrictExport);null!=m.replaceSvgDataUris&&(Editor.replaceSvgDataUris=m.replaceSvgDataUris);null!=m.foreignObjectImages&&(Editor.foreignObjectImages=m.foreignObjectImages);null!=m.shadowColor&&(mxConstants.SHADOW_COLOR=m.shadowColor);null!=m.shadowOpacity&&(mxConstants.SHADOW_OPACITY=m.shadowOpacity);null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.gptModel&&(Editor.gptModel=m.gptModel);null!=m.gptUrl&&(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var u=document.getElementsByTagName("script")[0];if(null!=u&&null!=u.parentNode){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(m));u.parentNode.insertBefore(E,u);m=m.split("url(");for(E=1;E<m.length;E++){var M=m[E].indexOf(")");M=Editor.trimCssUrl(m[E].substring(0,M));var L=document.createElement("link");+typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var u=document.getElementsByTagName("script")[0];if(null!=u&&null!=u.parentNode){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(m));u.parentNode.insertBefore(D,u);m=m.split("url(");for(D=1;D<m.length;D++){var M=m[D].indexOf(")");M=Editor.trimCssUrl(m[D].substring(0,M));var L=document.createElement("link");L.setAttribute("rel","preload");L.setAttribute("href",M);L.setAttribute("as","font");L.setAttribute("crossorigin","");u.parentNode.insertBefore(L,u)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=-20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var u=[],E=0;E<m;E++)u.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return u.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},+20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var u=[],D=0;D<m;D++)u.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return u.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";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"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;-Editor.prototype.setGraphXml=function(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var u=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(u)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[m],"cause",[u]),Error(mxResources.get("notADiagramFile")+" ("+u+")");if("mxGraphModel"==m.nodeName){u=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=u&&""!=u)u!=this.graph.currentStyle&&(E=null!=this.graph.themes?-this.graph.themes[u]:mxUtils.load(STYLE_PATH+"/"+u+".xml").getDocumentElement(),null!=E&&(M=new mxCodec(E.ownerDocument),M.decode(E,this.graph.getStylesheet())));else{var E=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=E){var M=new mxCodec(E.ownerDocument);M.decode(E,this.graph.getStylesheet())}}this.graph.currentStyle=u;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));-u=m.getAttribute("backgroundImage");null!=u?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(u)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(u=m.getAttribute("extFonts"))try{for(u=u.split("|").map(function(L){L=L.split("^");return{name:L[0],url:L[1]}}),E=0;E<u.length;E++)this.graph.addExtFont(u[E].name,-u[E].url)}catch(L){console.log("ExtFonts format error: "+L.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,u){m=null!=m?m:!0;var E=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&E.setAttribute("style",-this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.backgroundImage,u);null!=M&&E.setAttribute("backgroundImage",JSON.stringify(M));E.setAttribute("math",this.graph.mathEnabled?"1":"0");E.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?E.setAttribute("adaptiveColors",this.graph.adaptiveColors):E.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(M=this.graph.extFonts.map(function(L){return L.name+-"^"+L.url}),E.setAttribute("extFonts",M.join("|")));return E};Editor.prototype.isDataSvg=function(m){try{var u=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=u&&(null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(cont,u))),null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u)),null!=u&&0<u.length)){var E=mxUtils.parseXml(u).documentElement;return"mxfile"==E.nodeName||"mxGraphModel"==E.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=-function(m,u,E){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);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 c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=-function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,u){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var E=function(){M=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var M=null;Editor.doMathJaxRender=-function(R){try{null==M?(MathJax.typesetClear([R]),MathJax.typeset([R]),E()):M!=R&&Editor.mathJaxQueue.push(R)}catch(S){MathJax.typesetClear([R]),null!=S.retry?(M=R,S.retry.then(function(){MathJax.typesetPromise([R]).then(E)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());E()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());E()})):null!=window.console&&console.log("Error in MathJax.typeset: "+S.toString())}};window.MathJax=null!=u?u:+Editor.prototype.setGraphXml=function(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var u=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(u)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[m],"cause",[u]),Error(mxResources.get("notADiagramFile")+" ("+u+")");if("mxGraphModel"==m.nodeName){u=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=u&&""!=u)u!=this.graph.currentStyle&&(D=null!=this.graph.themes?+this.graph.themes[u]:mxUtils.load(STYLE_PATH+"/"+u+".xml").getDocumentElement(),null!=D&&(M=new mxCodec(D.ownerDocument),M.decode(D,this.graph.getStylesheet())));else{var D=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=D){var M=new mxCodec(D.ownerDocument);M.decode(D,this.graph.getStylesheet())}}this.graph.currentStyle=u;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));+u=m.getAttribute("backgroundImage");null!=u?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(u)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(u=m.getAttribute("extFonts"))try{for(u=u.split("|").map(function(L){L=L.split("^");return{name:L[0],url:L[1]}}),D=0;D<u.length;D++)this.graph.addExtFont(u[D].name,+u[D].url)}catch(L){console.log("ExtFonts format error: "+L.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,u){m=null!=m?m:!0;var D=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&D.setAttribute("style",+this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.backgroundImage,u);null!=M&&D.setAttribute("backgroundImage",JSON.stringify(M));D.setAttribute("math",this.graph.mathEnabled?"1":"0");D.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?D.setAttribute("adaptiveColors",this.graph.adaptiveColors):D.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(M=this.graph.extFonts.map(function(L){return L.name++"^"+L.url}),D.setAttribute("extFonts",M.join("|")));return D};Editor.prototype.isDataSvg=function(m){try{var u=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=u&&(null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(cont,u))),null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u)),null!=u&&0<u.length)){var D=mxUtils.parseXml(u).documentElement;return"mxfile"==D.nodeName||"mxGraphModel"==D.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=+function(m,u,D){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);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 c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=+function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,u){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var D=function(){M=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var M=null;Editor.doMathJaxRender=+function(R){try{null==M?(MathJax.typesetClear([R]),MathJax.typeset([R]),D()):M!=R&&Editor.mathJaxQueue.push(R)}catch(S){MathJax.typesetClear([R]),null!=S.retry?(M=R,S.retry.then(function(){MathJax.typesetPromise([R]).then(D)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());D()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());D()})):null!=window.console&&console.log("Error in MathJax.typeset: "+S.toString())}};window.MathJax=null!=u?u:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},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.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var R=mxUtils.bind(this,function(S,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);u[0].parentNode.appendChild(O)}}};-Editor.prototype.csvToArray=function(m){if(0<m.length){var u="",E=[""],M=0,L=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(L&&O===u&&(E[M]+=O),L=!L):","===O&&L?O=E[++M]="":E[M]+=O,u=O;return E}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var u=EditorUi.isVisioFilename(m);u=/\.png$/i.test(m)||/\.pdf$/i.test(m)||u;var E=-"t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+E+(u?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||-"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var u=m.convert,E=this;m.convert=function(M){null!=M&&navigator.onLine&&("http://"!=M.substring(0,7)&&"https://"!=M.substring(0,8)||M.substring(0,m.baseUrl.length)==m.baseUrl||E.crossOriginImages&&E.isCorsEnabledForUrl(M)?"chrome-extension://"!=M.substring(0,19)&&(M=u.apply(this,arguments)):M=PROXY_URL+-"?url="+encodeURIComponent(M));return M};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,u,E,M,L){try{var O=!0,R=window.setTimeout(mxUtils.bind(this,function(){O=!1;u(m)}),this.timeout),S=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(m,u,E,M,!0):u(m)});if(/(\.svg)$/i.test(m)&&!L)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(R);O&&(200>X.getStatus()||-299<X.getStatus()?S():u(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(R);O&&S()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(R);if(O)try{M=null!=M&&L?M:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(M,M);X.height=V.height*M;X.width=V.width*M;W.drawImage(V,0,0);u(X.toDataURL())}catch(Y){u(m)}};V.onerror=function(){window.clearTimeout(R);O&&(null!=E?E():u(m))};V.src=-m}}catch(X){null!=E?E():u(m)}};Editor.prototype.convertImages=function(m,u,E,M){function L(){0<O.length?O.shift()():u(m)}null==M&&(M=this.createImageUrlConverter());var O=[],R=E||{};E=mxUtils.bind(this,function(S,V){S=m.getElementsByTagName(S);for(var X=0;X<S.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=M.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=R[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(R[Y]=-aa,W.setAttribute(V,aa));L()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),L())}else null!=Y&&W.setAttribute(V,Y),L()}}catch(aa){L()}}))})(S[X])});E("image","xlink:href");E("img","src");L()};Editor.base64Encode=function(m){for(var u="",E=0,M=m.length,L,O,R;E<M;){L=m.charCodeAt(E++)&255;if(E==M){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4);u+="==";break}O=m.charCodeAt(E++);-if(E==M){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);u+="=";break}R=m.charCodeAt(E++);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&-15)<<2|(R&192)>>6);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return u};Editor.prototype.loadUrl=function(m,u,E,M,L,O,R,S){try{var V=!R&&(M||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));L=null!=L?L:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=u&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),-u(W)):null!=E&&(0==W.getStatus()?E({message:mxResources.get("accessDenied")},W):404==W.getStatus()?E({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):E({message:this.getErrorMessage(W)},W))}),function(W){null!=E&&E({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){L&&null!=E&&E({code:App.ERROR_TIMEOUT,retry:X})},S)});X()}catch(W){null!=E&&E(W)}};Editor.prototype.getErrorMessage=function(m){var u=mxResources.get("error")+" "+m.getStatus();try{var E=m.getText(),-M=JSON.parse(E);null!=M&&null!=M.error&&null!=M.error.message&&(u=M.error.message+" ("+u+")")}catch(L){}return u};Editor.prototype.absoluteCssFonts=function(m){var u=null;if(null!=m){var E=m.split("url(");if(0<E.length){u=[E[0]];m=window.location.pathname;var M=null!=m?m.lastIndexOf("/"):-1;0<=M&&(m=m.substring(0,M+1));M=document.getElementsByTagName("base");var L=null;null!=M&&0<M.length&&(L=M[0].getAttribute("href"));for(var O=1;O<E.length;O++)if(M=E[O].indexOf(")"),0<M){var R=Editor.trimCssUrl(E[O].substring(0,-M));this.graph.isRelativeUrl(R)&&(R=null!=L?L+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":m)+R);u.push('url("'+R+'"'+E[O].substring(M))}else u.push(E[O])}else u=[m]}return null!=u?u.join(""):null};Editor.prototype.mapFontUrl=function(m,u,E){/^https?:\/\//.test(u)&&!this.isCorsEnabledForUrl(u)&&(u=PROXY_URL+"?url="+encodeURIComponent(u));E(m,u)};Editor.prototype.embedCssFonts=function(m,u){var E=m.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var L=-mxUtils.bind(this,function(){if(0==M){for(var V=[E[0]],X=1;X<E.length;X++){var W=E[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(E[X].substring(0,W))]);V.push('"'+E[X].substring(W))}u(V.join(""))}});if(0<E.length){for(m=1;m<E.length;m++){var O=E[m].indexOf(")"),R=null,S=E[m].indexOf("format(",O);0<S&&(R=Editor.trimCssUrl(E[m].substring(S+7,E[m].indexOf(")",S))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;M++;var X="application/x-font-ttf";+Editor.prototype.csvToArray=function(m){if(0<m.length){var u="",D=[""],M=0,L=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(L&&O===u&&(D[M]+=O),L=!L):","===O&&L?O=D[++M]="":D[M]+=O,u=O;return D}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var u=EditorUi.isVisioFilename(m);u=/\.png$/i.test(m)||/\.pdf$/i.test(m)||u;var D=+"t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+D+(u?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||+"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var u=m.convert,D=this;m.convert=function(M){null!=M&&navigator.onLine&&("http://"!=M.substring(0,7)&&"https://"!=M.substring(0,8)||M.substring(0,m.baseUrl.length)==m.baseUrl||D.crossOriginImages&&D.isCorsEnabledForUrl(M)?"chrome-extension://"!=M.substring(0,19)&&(M=u.apply(this,arguments)):M=PROXY_URL++"?url="+encodeURIComponent(M));return M};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,u,D,M,L){try{var O=!0,R=window.setTimeout(mxUtils.bind(this,function(){O=!1;u(m)}),this.timeout),S=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(m,u,D,M,!0):u(m)});if(/(\.svg)$/i.test(m)&&!L)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(R);O&&(200>X.getStatus()||+299<X.getStatus()?S():u(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(R);O&&S()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(R);if(O)try{M=null!=M&&L?M:1;var X=document.createElement("canvas"),W=X.getContext("2d");W.scale(M,M);X.height=V.height*M;X.width=V.width*M;W.drawImage(V,0,0);u(X.toDataURL())}catch(Y){u(m)}};V.onerror=function(){window.clearTimeout(R);O&&(null!=D?D():u(m))};V.src=+m}}catch(X){null!=D?D():u(m)}};Editor.prototype.convertImages=function(m,u,D,M){function L(){0<O.length?O.shift()():u(m)}null==M&&(M=this.createImageUrlConverter());var O=[],R=D||{};D=mxUtils.bind(this,function(S,V){S=m.getElementsByTagName(S);for(var X=0;X<S.length;X++)mxUtils.bind(this,function(W){O.push(mxUtils.bind(this,function(){try{if(null!=W){var Y=M.convert(W.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var Z=R[Y];null==Z?this.convertImageToDataUri(Y,function(aa){null!=aa&&(R[Y]=+aa,W.setAttribute(V,aa));L()},null,Editor.svgRasterScale):(W.setAttribute(V,Z),L())}else null!=Y&&W.setAttribute(V,Y),L()}}catch(aa){L()}}))})(S[X])});D("image","xlink:href");D("img","src");L()};Editor.base64Encode=function(m){for(var u="",D=0,M=m.length,L,O,R;D<M;){L=m.charCodeAt(D++)&255;if(D==M){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4);u+="==";break}O=m.charCodeAt(D++);+if(D==M){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);u+="=";break}R=m.charCodeAt(D++);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(O&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&+15)<<2|(R&192)>>6);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return u};Editor.prototype.loadUrl=function(m,u,D,M,L,O,R,S){try{var V=!R&&(M||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));L=null!=L?L:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(W){200<=W.getStatus()&&299>=W.getStatus()?null!=u&&(W=W.getText(),V&&(O=null!=O?O:"data:image/png;base64,",W=O+Editor.base64Encode(W)),+u(W)):null!=D&&(0==W.getStatus()?D({message:mxResources.get("accessDenied")},W):404==W.getStatus()?D({message:mxResources.get("fileNotFound"),code:W.getStatus()},W):D({message:this.getErrorMessage(W)},W))}),function(W){null!=D&&D({message:mxResources.get("error")+" "+W.getStatus()})},V,this.timeout,function(){L&&null!=D&&D({code:App.ERROR_TIMEOUT,retry:X})},S)});X()}catch(W){null!=D&&D(W)}};Editor.prototype.getErrorMessage=function(m){var u=mxResources.get("error")+" "+m.getStatus();try{var D=m.getText(),+M=JSON.parse(D);null!=M&&null!=M.error&&null!=M.error.message&&(u=M.error.message+" ("+u+")")}catch(L){}return u};Editor.prototype.absoluteCssFonts=function(m){var u=null;if(null!=m){var D=m.split("url(");if(0<D.length){u=[D[0]];m=window.location.pathname;var M=null!=m?m.lastIndexOf("/"):-1;0<=M&&(m=m.substring(0,M+1));M=document.getElementsByTagName("base");var L=null;null!=M&&0<M.length&&(L=M[0].getAttribute("href"));for(var O=1;O<D.length;O++)if(M=D[O].indexOf(")"),0<M){var R=Editor.trimCssUrl(D[O].substring(0,+M));this.graph.isRelativeUrl(R)&&(R=null!=L?L+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":m)+R);u.push('url("'+R+'"'+D[O].substring(M))}else u.push(D[O])}else u=[m]}return null!=u?u.join(""):null};Editor.prototype.mapFontUrl=function(m,u,D){/^https?:\/\//.test(u)&&!this.isCorsEnabledForUrl(u)&&(u=PROXY_URL+"?url="+encodeURIComponent(u));D(m,u)};Editor.prototype.embedCssFonts=function(m,u){var D=m.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var L=+mxUtils.bind(this,function(){if(0==M){for(var V=[D[0]],X=1;X<D.length;X++){var W=D[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(D[X].substring(0,W))]);V.push('"'+D[X].substring(W))}u(V.join(""))}});if(0<D.length){for(m=1;m<D.length;m++){var O=D[m].indexOf(")"),R=null,S=D[m].indexOf("format(",O);0<S&&(R=Editor.trimCssUrl(D[m].substring(S+7,D[m].indexOf(")",S))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;M++;var X="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==R||"embedded-opentype"==R||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(W,Y){this.loadUrl(Y,-mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;M--;L()}),mxUtils.bind(this,function(Z){M--;L()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(E[m].substring(0,O)),R)}L()}else u(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(u){this.resolvedFontCss=u;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},u;for(u in Graph.fontMapping)Graph.isCssFontUrl(u)&&-(m[u]=Graph.fontMapping[u]);return m};Editor.prototype.embedExtFonts=function(m){var u=this.graph.getCustomFonts();if(0<u.length){var E=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var L=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(E.join(""),m)}),O=0;O<u.length;O++)mxUtils.bind(this,function(R,S){Graph.isCssFontUrl(S)?null==this.cachedGoogleFonts[S]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(S),mxUtils.bind(this,function(V){this.cachedGoogleFonts[S]=-V;E.push(V+"\n");M--;L()}),mxUtils.bind(this,function(V){M--;E.push("@import url("+S+");\n");L()}))):E.push(this.cachedGoogleFonts[S]+"\n"):E.push('@font-face {font-family: "'+R+'";src: url("'+S+'")}\n')})(u[O].name,u[O].url);L()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var u=document.getElementsByTagName("style"),E=0;E<u.length;E++){var M=mxUtils.getTextContent(u[E]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&m[0].appendChild(u[E].cloneNode(!0))}};-Editor.prototype.addFontCss=function(m,u){u=null!=u?u:this.absoluteCssFonts(this.fontCss);if(null!=u){var E=mxUtils.getSvgDefs(m),M=u.split("\n");u=[];for(var L=[],O=0;O<M.length;O++)"@import"==M[O].substring(0,7)?u.push(M[O]):L.push(M[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<u.length&&(mxUtils.setTextContent(m,u.join("\n")),E.appendChild(m));0<L.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,-L.join("\n")),E.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,u,E){var M=mxClient.IS_FF?8192:16384;return Math.min(E,Math.min(M/m,M/u))};Editor.prototype.exportToCanvas=function(m,u,E,M,L,O,R,S,V,X,W,Y,Z,aa,ha,ea,ca,fa){try{O=null!=O?O:!0;R=null!=R?R:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ma=V?null:Y.background;ma==mxConstants.NONE&&(ma=null);null==ma&&(ma=M);null==ma&&0==V&&+mxUtils.bind(this,function(Z){this.cachedFonts[V]=Z;M--;L()}),mxUtils.bind(this,function(Z){M--;L()}),!0,null,"data:"+W+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(D[m].substring(0,O)),R)}L()}else u(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(u){this.resolvedFontCss=u;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},u;for(u in Graph.fontMapping)Graph.isCssFontUrl(u)&&+(m[u]=Graph.fontMapping[u]);return m};Editor.prototype.embedExtFonts=function(m){var u=this.graph.getCustomFonts();if(0<u.length){var D=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var L=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(D.join(""),m)}),O=0;O<u.length;O++)mxUtils.bind(this,function(R,S){Graph.isCssFontUrl(S)?null==this.cachedGoogleFonts[S]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(S),mxUtils.bind(this,function(V){this.cachedGoogleFonts[S]=+V;D.push(V+"\n");M--;L()}),mxUtils.bind(this,function(V){M--;D.push("@import url("+S+");\n");L()}))):D.push(this.cachedGoogleFonts[S]+"\n"):D.push('@font-face {font-family: "'+R+'";src: url("'+S+'")}\n')})(u[O].name,u[O].url);L()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var u=document.getElementsByTagName("style"),D=0;D<u.length;D++){var M=mxUtils.getTextContent(u[D]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&m[0].appendChild(u[D].cloneNode(!0))}};+Editor.prototype.addFontCss=function(m,u){u=null!=u?u:this.absoluteCssFonts(this.fontCss);if(null!=u){var D=mxUtils.getSvgDefs(m),M=u.split("\n");u=[];for(var L=[],O=0;O<M.length;O++)"@import"==M[O].substring(0,7)?u.push(M[O]):L.push(M[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<u.length&&(mxUtils.setTextContent(m,u.join("\n")),D.appendChild(m));0<L.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,+L.join("\n")),D.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,u,D){var M=mxClient.IS_FF?8192:16384;return Math.min(D,Math.min(M/m,M/u))};Editor.prototype.exportToCanvas=function(m,u,D,M,L,O,R,S,V,X,W,Y,Z,aa,ha,ea,ca,fa){try{O=null!=O?O:!0;R=null!=R?R:!0;Y=null!=Y?Y:this.graph;Z=null!=Z?Z:0;var ma=V?null:Y.background;ma==mxConstants.NONE&&(ma=null);null==ma&&(ma=M);null==ma&&0==V&&(ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,Z,aa,null,R,null,null,null,X,null,ea,ca,fa),mxUtils.bind(this,function(ba){try{var ja=new Image;ja.onload=mxUtils.bind(this,function(){try{var da=function(){mxClient.IS_SF?window.setTimeout(function(){oa.drawImage(ja,0,0);m(va,ba)},0):(oa.drawImage(ja,0,0),m(va,ba))},va=document.createElement("canvas"),ra=parseInt(ba.getAttribute("width")),wa=parseInt(ba.getAttribute("height"));S=null!=S?S:1;null!=u&&(S=O?Math.min(1,Math.min(3*u/(4*wa),u/ra)):u/ra);S=this.getMaxCanvasScale(ra,wa,S);ra=Math.ceil(S*ra);wa=Math.ceil(S*wa);va.setAttribute("width",ra);va.setAttribute("height",wa);var oa=va.getContext("2d");if(null!=ma){var ia=mxUtils.getLightDarkColor(ma);oa.beginPath();oa.rect(0,0,ra,wa);oa.fillStyle="dark"==ea&&"none"!=Y.getAdaptiveColors()?ia.dark:ia.light;oa.fill()}1!=S&&oa.scale(S,S);if(ha){var na=Y.view,ua=na.scale;na.scale=1;var qa=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=ua;qa="data:image/svg+xml;base64,"+qa;var Aa=Y.gridSize*na.gridSteps*S,Ca=Y.getGraphBounds(),Da=na.translate.x*ua,za=na.translate.y*ua,Ba=Da+(Ca.x-Da)/ua-Z,Ka=za+(Ca.y-za)/ua-Z,Ma=new Image;Ma.onload=function(){try{for(var Ea=-Math.round(Aa-mxUtils.mod((Da-Ba)*S,Aa)),Ia=-Math.round(Aa-mxUtils.mod((za-Ka)*S,Aa));Ea<ra;Ea+=Aa)for(var Qa=Ia;Qa<wa;Qa+=Aa)oa.drawImage(Ma,Ea/S,Qa/S);da()}catch(La){null!=L&&L(La)}};Ma.onerror=function(Ea){null!=L&&L(Ea)};Ma.src=qa}else da()}catch(Ea){null!=L&&L(Ea)}});ja.onerror=-function(da){null!=L&&L(da)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var la=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ja.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=L&&L(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(la)}catch(va){null!=L&&L(va)}}))}catch(da){null!=L&&L(da)}}),E,W)}catch(ba){null!=L&&L(ba)}};Editor.crcTable=-[];for(var p=0;256>p;p++)for(var q=p,t=0;8>t;t++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[p]=q;Editor.updateCRC=function(m,u,E,M){for(var L=0;L<M;L++)m=Editor.crcTable[(m^u.charCodeAt(E+L))&255]^m>>>8;return m};Editor.crc32=function(m){for(var u=-1,E=0;E<m.length;E++)u=u>>>8^Editor.crcTable[(u^m.charCodeAt(E))&255];return(u^-1)>>>0};Editor.writeGraphModelToPng=function(m,u,E,M,L){function O(W,Y){var Z=V;V+=Y;return W.substring(Z,V)}function R(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<-8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function S(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var V=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=L&&L();else if(O(m,4),"IHDR"!=O(m,4))null!=L&&L();else{O(m,17);L=m.substring(0,V);do{var X=R(m);if("IDAT"==O(m,4)){L=m.substring(0,V-8);"pHYs"==u&&"dpi"==E?(E=Math.round(M/.0254),E=S(E)+S(E)+String.fromCharCode(1)):-E=E+String.fromCharCode(0)+("zTXt"==u?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,u,0,4);M=Editor.updateCRC(M,E,0,E.length);L+=S(E.length)+u+E+S(M^4294967295);L+=m.substring(V-8,m.length);break}L+=m.substring(V-8,V-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(L):Base64.encode(L,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=-function(m,u){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,u){var E=null;null!=m.editor.graph.getModel().getParent(u)?E=u.getId():null!=m.currentPage&&(E=m.currentPage.getId());return E});-if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var D=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?D.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||-"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=d.apply(this,arguments);var u=this.editorUi,E=u.editor.graph;if(E.isEnabled()){var M=u.getCurrentFile();null!=M&&M.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return u.editor.autosave},function(O){u.editor.setAutosave(O);u.editor.autosave&&M.isModified()&&M.fileChanged()},{install:function(O){this.listener=function(){O(u.editor.autosave)};-u.editor.addListener("autosaveChanged",this.listener)},destroy:function(){u.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&E.isEnabled()&&"undefined"!==typeof MathJax){var L=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return E.mathEnabled},function(O){u.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(E.mathEnabled)};u.addListener("mathEnabledChanged",this.listener)},destroy:function(){u.removeListener(this.listener)}});+function(da){null!=L&&L(da)};X&&this.graph.addSvgShadow(ba);this.graph.mathEnabled&&this.addMathCss(ba);var la=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ba,this.resolvedFontCss),ja.src=Editor.createSvgDataUri(mxUtils.getXml(ba))}catch(da){null!=L&&L(da)}});this.embedExtFonts(mxUtils.bind(this,function(da){try{null!=da&&this.addFontCss(ba,da),this.loadFonts(la)}catch(va){null!=L&&L(va)}}))}catch(da){null!=L&&L(da)}}),D,W)}catch(ba){null!=L&&L(ba)}};Editor.crcTable=+[];for(var p=0;256>p;p++)for(var q=p,t=0;8>t;t++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[p]=q;Editor.updateCRC=function(m,u,D,M){for(var L=0;L<M;L++)m=Editor.crcTable[(m^u.charCodeAt(D+L))&255]^m>>>8;return m};Editor.crc32=function(m){for(var u=-1,D=0;D<m.length;D++)u=u>>>8^Editor.crcTable[(u^m.charCodeAt(D))&255];return(u^-1)>>>0};Editor.writeGraphModelToPng=function(m,u,D,M,L){function O(W,Y){var Z=V;V+=Y;return W.substring(Z,V)}function R(W){W=O(W,4);return W.charCodeAt(3)+(W.charCodeAt(2)<<+8)+(W.charCodeAt(1)<<16)+(W.charCodeAt(0)<<24)}function S(W){return String.fromCharCode(W>>24&255,W>>16&255,W>>8&255,W&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var V=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=L&&L();else if(O(m,4),"IHDR"!=O(m,4))null!=L&&L();else{O(m,17);L=m.substring(0,V);do{var X=R(m);if("IDAT"==O(m,4)){L=m.substring(0,V-8);"pHYs"==u&&"dpi"==D?(D=Math.round(M/.0254),D=S(D)+S(D)+String.fromCharCode(1)):+D=D+String.fromCharCode(0)+("zTXt"==u?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,u,0,4);M=Editor.updateCRC(M,D,0,D.length);L+=S(D.length)+u+D+S(M^4294967295);L+=m.substring(V-8,m.length);break}L+=m.substring(V-8,V-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(L):Base64.encode(L,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=+function(m,u){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,u){var D=null;null!=m.editor.graph.getModel().getParent(u)?D=u.getId():null!=m.currentPage&&(D=m.currentPage.getId());return D});+if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var E=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?E.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||+"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=d.apply(this,arguments);var u=this.editorUi,D=u.editor.graph;if(D.isEnabled()){var M=u.getCurrentFile();null!=M&&M.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return u.editor.autosave},function(O){u.editor.setAutosave(O);u.editor.autosave&&M.isModified()&&M.fileChanged()},{install:function(O){this.listener=function(){O(u.editor.autosave)};+u.editor.addListener("autosaveChanged",this.listener)},destroy:function(){u.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&D.isEnabled()&&"undefined"!==typeof MathJax){var L=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return D.mathEnabled},function(O){u.actions.get("mathematicalTypesetting").funct()},{install:function(O){this.listener=function(){O(D.mathEnabled)};u.addListener("mathEnabledChanged",this.listener)},destroy:function(){u.removeListener(this.listener)}});m.appendChild(L);(!u.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&L.appendChild(u.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=@@ -12623,7 +12627,7 @@ stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"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;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=m.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),m.customProperties,m))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var u=-this.editorUi.getSelectionState();1==u.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=u.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);l.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,u,E,M){function L(oa,ia,na,ua,qa){if(null!=na.valueChanged)na.valueChanged(ia,qa,E,Y);else{Z.getModel().beginUpdate();try{qa=[];var Aa=[];if(null!=na.index){for(var Ca=[],Da=na.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==+this.editorUi.getSelectionState();1==u.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=u.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);l.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,u,D,M){function L(oa,ia,na,ua,qa){if(null!=na.valueChanged)na.valueChanged(ia,qa,D,Y);else{Z.getModel().beginUpdate();try{qa=[];var Aa=[];if(null!=na.index){for(var Ca=[],Da=na.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==oa;)Ca.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;na.index<Ca.length?null!=ua?Ca.splice(ua,1):Ca[na.index]=ia:Ca.push(ia);null!=na.size&&Ca.length>na.size&&(Ca=Ca.slice(0,na.size));ia=Ca.join(",");null!=na.countProperty&&(Z.setCellStyles(na.countProperty,Ca.length,Z.getSelectionCells()),qa.push(na.countProperty),Aa.push(Ca.length))}Z.setCellStyles(oa,ia,Z.getSelectionCells());qa.push(oa);Aa.push(ia);if(null!=na.dependentProps)for(oa=0;oa<na.dependentProps.length;oa++){var za=na.dependentPropsDefVal[oa],Ba=na.dependentPropsVals[oa];if(Ba.length>ia)Ba=Ba.slice(0,ia);else for(var Ka=Ba.length;Ka<ia;Ka++)Ba.push(za);Ba=Ba.join(",");Z.setCellStyles(na.dependentProps[oa],Ba,Z.getSelectionCells());qa.push(na.dependentProps[oa]);Aa.push(Ba)}if("function"==typeof na.onChange)na.onChange(Z,ia);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",Aa,"cells",Z.getSelectionCells()))}finally{Z.getModel().endUpdate()}}}function O(oa,ia){ia.style.left="0px";ia.style.top="0px";ia.style.position="relative";ia.style.right="0px";ia.style.bottom="0px";ia.style.width="100%";ia.style.maxWidth="100%";ia.style.maxHeight="100%";ia.style.textAlign="left"}function R(oa,ia,na){function ua(Aa){if(null==Aa||Aa==mxConstants.NONE)qa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Aa)qa.style.background="";else{var Ca=mxUtils.getLightDarkColor(Aa);mxUtils.isLightDarkColor(Aa)&&Ca.light!=Ca.dark?qa.style.background="linear-gradient(to right bottom, "+Ca.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ca).cssText+@@ -12641,14 +12645,14 @@ Ca?parseInt(Ha):Ha)+"")}catch($a){}L(oa,Sa,na,null,La)}var Qa=mxEvent.getSource(Ia()});La.focus();mxEvent.addListener(La,"blur",function(){Ia()})}}))}na.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(Y,function(Ea){L(oa,"",na,na.index);mxEvent.consume(Ea)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",za.appendChild(qa));Da.appendChild(za);return Da}var Y=this,Z=this.editorUi.editor.graph,aa=[],ha=document.createElement("table");ha.className="geProperties geFullWidthElement";var ea=document.createElement("tr");ea.className="gePropHeader";var ca=document.createElement("th");ca.className="gePropHeaderCell";ca.style.paddingLeft="16px";ca.style.backgroundRepeat="no-repeat";ca.style.backgroundPosition="-2px 50%";ca.style.backgroundSize="20px";mxUtils.write(ca,mxResources.get("property"));ea.style.cursor="pointer";var fa=function(){var oa=ha.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ca.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ia="none";for(var na=m.childNodes.length-1;0<=na;na--)try{var ua=m.childNodes[na],qa=ua.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||m.removeChild(ua)}catch(Aa){}}else ca.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ia="";for(na=0;na<oa.length;na++)oa[na].style.display=ia};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;fa()});ea.appendChild(ca);var ma=document.createElement("th");ma.className="gePropHeaderCell";ma.style.paddingLeft="4px";mxUtils.write(ma,mxResources.get("value"));-ea.appendChild(ma);ha.appendChild(ea);var ba=ma=!1;ea=null;1==E.vertices.length&&0==E.edges.length?ea=E.vertices[0].id:0==E.vertices.length&&1==E.edges.length&&(ea=E.edges[0].id);null==ea||M||ha.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1));for(var ja in u)if(M=u[ja],!M.primary&&("function"!=typeof M.isVisible||M.isVisible(E,this))){var la=null!=M.getValue?M.getValue(E,this):null!=E.style[ja]?mxUtils.htmlEntities(E.style[ja]+""):null!=M.getDefaultValue?M.getDefaultValue(E,-this):M.defVal;if("separator"==M.type)ba=!ba;else{if("staticArr"==M.type)M.size=parseInt(E.style[M.sizeProperty]||u[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var da=M.dependentProps,va=[],ra=[];for(ea=0;ea<da.length;ea++){var wa=E.style[da[ea]];ra.push(u[da[ea]].subDefVal);va.push(null!=wa?wa.split(","):[])}M.dependentPropsDefVal=ra;M.dependentPropsVals=va}ha.appendChild(W(ja,la,M,ma,ba));ma=!ma}}for(ea=0;ea<aa.length;ea++)for(M=aa[ea],u=M.parentRow,ja=0;ja<M.values.length;ja++)ma=-W(M.name,M.values[ja],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:ja,defVal:M.defVal,countProperty:M.countProperty,size:M.size},0==ja%2,M.flipBkg),u.parentNode.insertBefore(ma,u.nextSibling),u=ma;m.appendChild(ha);fa();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var u=this.editorUi,E=u.editor.graph,M=document.createElement("div");M.style.padding="6px 20px 0 24px";m.appendChild(M);var L=document.createElement("div");L.className=+ea.appendChild(ma);ha.appendChild(ea);var ba=ma=!1;ea=null;1==D.vertices.length&&0==D.edges.length?ea=D.vertices[0].id:0==D.vertices.length&&1==D.edges.length&&(ea=D.edges[0].id);null==ea||M||ha.appendChild(W("id",mxUtils.htmlEntities(ea),{dispName:"id",type:"readOnly"},!0,!1));for(var ja in u)if(M=u[ja],!M.primary&&("function"!=typeof M.isVisible||M.isVisible(D,this))){var la=null!=M.getValue?M.getValue(D,this):null!=D.style[ja]?mxUtils.htmlEntities(D.style[ja]+""):null!=M.getDefaultValue?M.getDefaultValue(D,+this):M.defVal;if("separator"==M.type)ba=!ba;else{if("staticArr"==M.type)M.size=parseInt(D.style[M.sizeProperty]||u[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var da=M.dependentProps,va=[],ra=[];for(ea=0;ea<da.length;ea++){var wa=D.style[da[ea]];ra.push(u[da[ea]].subDefVal);va.push(null!=wa?wa.split(","):[])}M.dependentPropsDefVal=ra;M.dependentPropsVals=va}ha.appendChild(W(ja,la,M,ma,ba));ma=!ma}}for(ea=0;ea<aa.length;ea++)for(M=aa[ea],u=M.parentRow,ja=0;ja<M.values.length;ja++)ma=+W(M.name,M.values[ja],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:ja,defVal:M.defVal,countProperty:M.countProperty,size:M.size},0==ja%2,M.flipBkg),u.parentNode.insertBefore(ma,u.nextSibling),u=ma;m.appendChild(ha);fa();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var u=this.editorUi,D=u.editor.graph,M=document.createElement("div");M.style.padding="6px 20px 0 24px";m.appendChild(M);var L=document.createElement("div");L.className="geSwitcher";L.style.padding="4px 18px 6px 0px";for(var O=[],R=0;R<this.defaultColorSchemes.length;R++){var S=document.createElement("div");S.className="geSwitcherDot";mxUtils.bind(this,function(Z){mxEvent.addListener(S,"click",mxUtils.bind(this,function(){V(Z)}))})(R);O.push(S);L.appendChild(S)}var V=mxUtils.bind(this,function(Z){null!=O[Z]&&(null!=this.format.currentScheme&&null!=O[this.format.currentScheme]&&(O[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=-Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(E.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:-"default";E.replaceDefaultColors(new mxCell,aa);var ha=mxUtils.bind(this,function(ca){var fa=mxUtils.button("",mxUtils.bind(this,function(ja){E.getModel().beginUpdate();try{for(var la=u.getSelectionState().cells,da=0;da<la.length;da++){var va=E.getModel().getStyle(la[da]);null!=ca?(mxEvent.isShiftDown(ja)||(va=""==ca.fill||null==ca.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,ca.fill),va=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(va,-mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ja)||mxClient.IS_MAC&&mxEvent.isMetaDown(ja)||!E.getModel().isVertex(la[da])||(va=""==ca.font||null==ca.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ja)||(va=""==ca.stroke||null==ca.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,-ca.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),E.getModel().isVertex(la[da])&&(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));E.getModel().setStyle(la[da],va)}}finally{E.getModel().endUpdate()}}));fa.className="geStyleButton";fa.style.width="36px";fa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";fa.style.margin="0px 6px 6px 0px";+Z,X(this.defaultColorSchemes[this.format.currentScheme]),O[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(Z){var aa=mxUtils.clone(D.defaultVertexStyle);aa[mxConstants.STYLE_STROKECOLOR]=null!=aa[mxConstants.STYLE_STROKECOLOR]?aa[mxConstants.STYLE_STROKECOLOR]:"default";aa[mxConstants.STYLE_FILLCOLOR]=null!=aa[mxConstants.STYLE_FILLCOLOR]?aa[mxConstants.STYLE_FILLCOLOR]:"default";aa[mxConstants.STYLE_FONTCOLOR]=null!=aa[mxConstants.STYLE_FONTCOLOR]?aa[mxConstants.STYLE_FONTCOLOR]:+"default";D.replaceDefaultColors(new mxCell,aa);var ha=mxUtils.bind(this,function(ca){var fa=mxUtils.button("",mxUtils.bind(this,function(ja){D.getModel().beginUpdate();try{for(var la=u.getSelectionState().cells,da=0;da<la.length;da++){var va=D.getModel().getStyle(la[da]);null!=ca?(mxEvent.isShiftDown(ja)||(va=""==ca.fill||null==ca.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,ca.fill),va=""==ca.gradient||null==ca.gradient?mxUtils.setStyle(va,+mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,ca.gradient),mxEvent.isControlDown(ja)||mxClient.IS_MAC&&mxEvent.isMetaDown(ja)||!D.getModel().isVertex(la[da])||(va=""==ca.font||null==ca.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,ca.font))),mxEvent.isAltDown(ja)||(va=""==ca.stroke||null==ca.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,+ca.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),D.getModel().isVertex(la[da])&&(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));D.getModel().setStyle(la[da],va)}}finally{D.getModel().endUpdate()}}));fa.className="geStyleButton";fa.style.width="36px";fa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";fa.style.margin="0px 6px 6px 0px";if(null!=ca){var ma="1px solid";null!=ca.border&&(ma=ca.border);if(null!=ca.gradient)fa.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ca.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ca.gradient).cssText+" 100%)";else if(ca.fill==mxConstants.NONE)fa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ca.fill||""==ca.fill)fa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ba=mxUtils.getLightDarkColor(ca.fill);fa.style.backgroundImage="linear-gradient(to right bottom, "+ba.cssText+" 50%, "+ba.light+" 50.3%)"}null==ca.stroke||ca.stroke==mxConstants.NONE?fa.style.border=ma+" transparent":""==ca.stroke?fa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ba=mxUtils.getLightDarkColor(ca.stroke),fa.style.border=ma+" "+ba.cssText,fa.style.borderRightColor=ba.light,fa.style.borderBottomColor=fa.style.borderRightColor);null!=ca.title&&fa.setAttribute("title",ca.title)}else ma=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000"),fa.style.backgroundColor=ma,fa.style.border="1px solid "+ba;fa.style.borderRadius="0";M.appendChild(fa);null!=ca&&null!=ca.gradient&&(ma=fa.cloneNode(!1),ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ca.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ca.gradient).light+") 100%)",ma.style.clipPath=@@ -12656,14 +12660,14 @@ ca.title)}else ma=mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ba=W.className="geButton";W.style.cssText="position:absolute;left:0px;bottom:"+R+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(W,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+R+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(m.appendChild(W),m.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){V(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(L)}return m}}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.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return m};Graph.createFontElement=-function(m,u){var E=Graph.fontMapping[u];null==E&&Graph.isCssFontUrl(u)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(u))):(null==E&&(E='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+u+'");\n}'),m=document.createElement("style"),mxUtils.write(m,E));return m};Graph.addRecentCustomFont=function(m,u){};Graph.addFont=function(m,u,E,M){if(null!=m&&0<m.length&&null!=-u&&0<u.length){M=null!=M?M:Graph.customFontElements;var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var O=M[L];null!=O&&O.url!=u&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=u,"http:"==u.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(u)),O={name:m,url:u,elt:Graph.createFontElement(m,O)},M[L]=O,u=M==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=E&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=E,O.elt.onerror=E):E()),null!=-u&&u.appendChild(O.elt)):null!=E&&E()}else null!=E&&E()}else null!=E&&E();return m};Graph.getFontUrl=function(m,u){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(u=m.url);return u};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var u=0;u<m.length;u++){var E=m[u].getAttribute("data-font-src");if(null!=E){var M="FONT"==m[u].nodeName?m[u].getAttribute("face"):m[u].style.fontFamily;null!=M&&Graph.addFont(M,E)}}};Graph.processFontStyle=function(m){if(null!=m){var u=mxUtils.getValue(m,-"fontSource",null);if(null!=u){var E=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=E)try{Graph.addFont(E,decodeURIComponent(u))}catch(M){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";+function(m,u){var D=Graph.fontMapping[u];null==D&&Graph.isCssFontUrl(u)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(u))):(null==D&&(D='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+u+'");\n}'),m=document.createElement("style"),mxUtils.write(m,D));return m};Graph.addRecentCustomFont=function(m,u){};Graph.addFont=function(m,u,D,M){if(null!=m&&0<m.length&&null!=+u&&0<u.length){M=null!=M?M:Graph.customFontElements;var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var O=M[L];null!=O&&O.url!=u&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=u,"http:"==u.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(u)),O={name:m,url:u,elt:Graph.createFontElement(m,O)},M[L]=O,u=M==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=D&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=D,O.elt.onerror=D):D()),null!=+u&&u.appendChild(O.elt)):null!=D&&D()}else null!=D&&D()}else null!=D&&D();return m};Graph.getFontUrl=function(m,u){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(u=m.url);return u};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var u=0;u<m.length;u++){var D=m[u].getAttribute("data-font-src");if(null!=D){var M="FONT"==m[u].nodeName?m[u].getAttribute("face"):m[u].style.fontFamily;null!=M&&Graph.addFont(M,D)}}};Graph.processFontStyle=function(m){if(null!=m){var u=mxUtils.getValue(m,+"fontSource",null);if(null!=u){var D=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=D)try{Graph.addFont(D,decodeURIComponent(u))}catch(M){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function m(L){u=L}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var u=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(L){u=null});this.isMouseInsertPoint=function(){return null!=-u};var E=this.getInsertPoint;this.getInsertPoint=function(){return null!=u?this.getPointForEvent(u):E.apply(this,arguments)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(L){var O=this.graph.getCellStyle(L);if(null!=O&&"rack"==O.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=O.marginLeft||0;R.marginRight=O.marginRight||0;R.marginTop=-O.marginTop||0;R.marginBottom=O.marginBottom||0;R.allowGaps=O.allowGaps||0;R.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,u){return Graph.processFontStyle(x.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,u,E,M,L,O,R,S,V,X,-W,Y){z.apply(this,arguments);Graph.processFontAttributes(Y)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,u,E,M){function L(){for(var ea=S.getSelectionCells(),ca=[],fa=0;fa<ea.length;fa++)S.isCellVisible(ea[fa])&&ca.push(ea[fa]);S.setSelectionCells(ca)}function O(ea){S.setHiddenTags(ea?[]:V.slice());L();S.refresh()}function R(ea,+u};var D=this.getInsertPoint;this.getInsertPoint=function(){return null!=u?this.getPointForEvent(u):D.apply(this,arguments)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(L){var O=this.graph.getCellStyle(L);if(null!=O&&"rack"==O.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=O.marginLeft||0;R.marginRight=O.marginRight||0;R.marginTop=+O.marginTop||0;R.marginBottom=O.marginBottom||0;R.allowGaps=O.allowGaps||0;R.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,u){return Graph.processFontStyle(x.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,u,D,M,L,O,R,S,V,X,+W,Y){z.apply(this,arguments);Graph.processFontAttributes(Y)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,u,D,M){function L(){for(var ea=S.getSelectionCells(),ca=[],fa=0;fa<ea.length;fa++)S.isCellVisible(ea[fa])&&ca.push(ea[fa]);S.setSelectionCells(ca)}function O(ea){S.setHiddenTags(ea?[]:V.slice());L();S.refresh()}function R(ea,ca){W.innerText="";if(0<ea.length){var fa=document.createElement("table");fa.setAttribute("cellpadding","2");fa.style.boxSizing="border-box";fa.style.tableLayout="fixed";fa.style.width="100%";var ma=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(ja){function la(){var ia=S.getCellsForTags([ja],null,null,!0);S.isEnabled()?S.setSelectionCells(ia):S.highlightCells(ia,null,null,70)}var da=0>mxUtils.indexOf(S.hiddenTags,ja),va=document.createElement("tr"),ra=document.createElement("td");ra.style.align="center";ra.style.width="16px";var wa=document.createElement("img");wa.setAttribute("src",da?Editor.visibleImage:Editor.hiddenImage);wa.setAttribute("title",mxResources.get(da?"hideIt":"show",[ja]));mxUtils.setOpacity(wa,da?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width="16px";if(u||Editor.isDarkMode())wa.style.filter="invert(100%)";ra.appendChild(wa);mxEvent.addListener(wa,"click",function(ia){mxEvent.isShiftDown(ia)?O(0<=mxUtils.indexOf(S.hiddenTags,ja)):(S.toggleHiddenTag(ja),L(),S.refresh());mxEvent.consume(ia)});va.appendChild(ra);ra=document.createElement("td");ra.style.align="center";ra.style.width="16px";wa=document.createElement("img");wa.setAttribute("src",Editor.selectImage);wa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(wa,da?75:25);wa.className="geAdaptiveAsset";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.style.width="16px";if(u||Editor.isDarkMode())wa.style.filter=@@ -12674,38 +12678,38 @@ oa.setAttribute("type","checkbox");oa.style.margin="0px";oa.defaultChecked=null!W.appendChild(fa)}}var S=this,V=S.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var W=document.createElement("div");W.style.position="absolute";W.style.boxSizing="border-box";W.style.userSelect="none";W.style.overflow="auto";W.style.padding="3px";W.style.left="0px";W.style.right="0px";W.style.top="0px";W.style.bottom="0px";X.appendChild(W);S.addListener(mxEvent.ROOT,function(){V=S.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ea,ca){if(m()){ea=S.getAllTags();for(ca=0;ca<ea.length;ca++)0>mxUtils.indexOf(V,ea[ca])&&V.push(ea[ca]);V.sort();S.isSelectionEmpty()?R(V):R(V,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,Y);S.model.addListener(mxEvent.CHANGE,Y);S.addListener(mxEvent.REFRESH,Y);var Z=document.createElement("div");Z.className="geToolbarContainer geDialogToolbar";Z.style.position="absolute";Z.style.display="flex";Z.style.bottom="0px";Z.style.left="0px";Z.style.right="0px";Z.style.height="32px";Z.style.overflow="hidden";Z.style.padding="3px 4px 4px 4px";Z.style.borderWidth="1px 0px 0px 0px";Z.style.borderStyle="solid";Z.style.whiteSpace="nowrap";if(S.isEnabled()){W.style.bottom="32px";var aa=document.createElement("a");aa.className="geButton";var ha=aa.cloneNode(!1);ha.style.backgroundImage="url("+Editor.visibleImage+")";ha.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ha,"click",function(ea){S.setHiddenTags([]);-mxEvent.isShiftDown(ea)||(V=S.hiddenTags.slice());L();S.refresh();mxEvent.consume(ea)});Z.appendChild(ha);null!=E&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){E(V,function(ca){V=ca;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=M&&Z.appendChild(M);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];-for(var u in Graph.customFontElements){var E=Graph.customFontElements[u];m.push({name:E.name,url:E.url})}return m};Graph.prototype.setFont=function(m,u){Graph.addFont(m,u);var E=Editor.guid();document.execCommand("fontname",!1,E);for(var M=this.cellEditor.textarea.getElementsByTagName("font"),L=!1,O=0;O<M.length;O++)M[O].getAttribute("face")==E&&(L=!0,M[O].setAttribute("face",m),null!=u?M[O].setAttribute("data-font-src",u):M[O].removeAttribute("data-font-src"));L||document.execCommand("fontname",-!1,m)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var u in m)this.globalVars[u]=m[u]}catch(E){null!=window.console&&console.log("Error in vars URL parameter: "+-E)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var u=G.apply(this,arguments);null==u&&null!=this.globalVars&&(u=this.globalVars[m]);return u};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};-Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,u,E,M,L,O,R,S,V,X,W,Y,Z,aa,ha,ea){var ca=C.apply(this,arguments);if(null!=Y){var fa=ca.getAttribute("style");null==fa&&(fa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",fa+(" color-scheme: "+Y+";"))}var ma=this.getCustomFonts();if(W&&0<ma.length){var ba=ca.ownerDocument;fa=null!=ba.createElementNS?+mxEvent.isShiftDown(ea)||(V=S.hiddenTags.slice());L();S.refresh();mxEvent.consume(ea)});Z.appendChild(ha);null!=D&&(aa=aa.cloneNode(!1),aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(aa,"click",function(ea){D(V,function(ca){V=ca;Y()});mxEvent.consume(ea)}),Z.appendChild(aa));X.appendChild(Z)}null!=M&&Z.appendChild(M);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];+for(var u in Graph.customFontElements){var D=Graph.customFontElements[u];m.push({name:D.name,url:D.url})}return m};Graph.prototype.setFont=function(m,u){Graph.addFont(m,u);var D=Editor.guid();document.execCommand("fontname",!1,D);for(var M=this.cellEditor.textarea.getElementsByTagName("font"),L=!1,O=0;O<M.length;O++)M[O].getAttribute("face")==D&&(L=!0,M[O].setAttribute("face",m),null!=u?M[O].setAttribute("data-font-src",u):M[O].removeAttribute("data-font-src"));L||document.execCommand("fontname",+!1,m)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var u in m)this.globalVars[u]=m[u]}catch(D){null!=window.console&&console.log("Error in vars URL parameter: "++D)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var u=G.apply(this,arguments);null==u&&null!=this.globalVars&&(u=this.globalVars[m]);return u};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};+Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,u,D,M,L,O,R,S,V,X,W,Y,Z,aa,ha,ea){var ca=C.apply(this,arguments);if(null!=Y){var fa=ca.getAttribute("style");null==fa&&(fa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ca.setAttribute("style",fa+(" color-scheme: "+Y+";"))}var ma=this.getCustomFonts();if(W&&0<ma.length){var ba=ca.ownerDocument;fa=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");null!=ba.setAttributeNS?fa.setAttributeNS("type","text/css"):fa.setAttribute("type","text/css");for(var ja="",la="",da=0;da<ma.length;da++){var va=ma[da].name,ra=ma[da].url;Graph.isCssFontUrl(ra)?ja+="@import url("+Graph.rewriteGoogleFontUrl(ra)+");\n":la+='@font-face {\nfont-family: "'+va+'";\nsrc: url("'+ra+'");\n}\n'}fa.appendChild(ba.createTextNode(ja+la));ca.getElementsByTagName("defs")[0].appendChild(fa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),ca.parentNode.removeChild(ca),fa=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=fa&&ca.getElementsByTagName("defs")[0].appendChild(fa.cloneNode(!0)));return ca};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){Q.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var U=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){U.apply(this,arguments);this.enumerationState=0};var T=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return T.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var u="1"==mxUtils.getValue(m.style,"enumerate",0);u&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,-this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):u||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);u=m.secondLabel;if(null!=u){var E=m.view.scale,M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*E,m.y+4*E,0,0):mxRectangle.fromPoint(m.view.getPoint(m));u.bounds.equals(m)&&u.value==M&&u.scale==E||(u.bounds=m,u.value=M,u.scale=E,u.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();+this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):u||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);u=m.secondLabel;if(null!=u){var D=m.view.scale,M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*D,m.y+4*D,0,0):mxRectangle.fromPoint(m.view.getPoint(m));u.bounds.equals(m)&&u.value==M&&u.scale==D||(u.bounds=m,u.value=M,u.scale=D,u.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,u){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&-this.executeCustomActions(m.actions,null,u))};Graph.prototype.executeCustomActions=function(m,u,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,L=0,O=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,-function(){M&&(M=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<L&&L--;0==L&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var W=this.stoppingCustomActions,Y=m[O++],Z=[];if(null!=Y.open)if(S(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,E))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),L++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,+this.executeCustomActions(m.actions,null,u))};Graph.prototype.executeCustomActions=function(m,u,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,L=0,O=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,+function(){M&&(M=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<L&&L--;0==L&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var W=this.stoppingCustomActions,Y=m[O++],Z=[];if(null!=Y.open)if(S(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,D))return}else this.openLink(Y.open);null==Y.wait||W||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),L++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),S());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,V,W?0:Y.fadeIn.delay));null!=Y.fadeOut&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,W?0:Y.fadeOut.delay));null!=Y.wipeIn&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(Z=Z.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(R(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){R();var aa=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Y.hide&&(R(),aa=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(R(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(R(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));aa=[];null!=Y.select&&this.isEnabled()&&(aa=this.getCellsForAction(Y.select),this.setSelectionCells(aa));null!=Y.highlight&&(aa=this.getCellsForAction(Y.highlight),this.highlightCells(aa,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));-null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);null!=E&&null!=Y.explore&&Graph.exploreFromCell(this,E,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ha=Y.tags.toggle;0==ha.length&&(ha=this.getAllTags());for(aa=0;aa<ha.length;aa++)this.toggleHiddenTag(ha[aa])}ha=null;null!=Y.tags.hidden&&(null==ha&&(ha=[]),ha=ha.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ha&&(ha=[]);var ea=-this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(ha,ea[aa])&&ha.push(ea[aa])}null!=ha&&this.setHiddenTags(ha);this.refresh()}0<Z.length&&(L++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==L?X():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=u&&u()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,u){var E=this.getLinkForCell(u);null!=E&&"data:action/json,"==E.substring(0,17)&&this.setLinkForCell(u,-this.updateCustomLink(m,E));if(this.isHtmlLabel(u)){var M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(this.getLabel(u));for(var L=M.getElementsByTagName("a"),O=!1,R=0;R<L.length;R++)E=L[R].getAttribute("href"),null!=E&&"data:action/json,"==E.substring(0,17)&&(L[R].setAttribute("href",this.updateCustomLink(m,E)),O=!0);O&&this.labelChanged(u,M.innerHTML)}};Graph.prototype.updateCustomLink=function(m,u){if("data:action/json,"==u.substring(0,17))try{var E=JSON.parse(u.substring(17));-null!=E.actions&&(this.updateCustomLinkActions(m,E.actions),u="data:action/json,"+JSON.stringify(E))}catch(M){}return u};Graph.prototype.updateCustomLinkActions=function(m,u){for(var E=0;E<u.length;E++){var M=u[E],L;for(L in M)this.updateCustomLinkAction(m,M[L],"cells"),this.updateCustomLinkAction(m,M[L],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,u,E){if(null!=u&&null!=u[E]){for(var M=[],L=0;L<u[E].length;L++)if("*"==u[E][L])M.push(u[E][L]);else{var O=m[u[E][L]];null!=O?""!=-O&&M.push(O):M.push(u[E][L])}u[E]=M}};Graph.prototype.getCellsForAction=function(m,u){u=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,u));if(null!=m.excludeCells){for(var E=[],M=0;M<u.length;M++)0>m.excludeCells.indexOf(u[M].id)&&E.push(u[M]);u=E}return u};Graph.prototype.getCellsById=function(m){var u=[];if(null!=m)for(var E=0;E<m.length;E++)if("*"==m[E]){var M=this.model.getRoot();u=u.concat(this.model.filterDescendants(function(O){return O!=M},M))}else{var L=this.model.getCell(m[E]);+null!=Y.scroll&&(aa=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);null!=D&&null!=Y.explore&&Graph.exploreFromCell(this,D,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ha=Y.tags.toggle;0==ha.length&&(ha=this.getAllTags());for(aa=0;aa<ha.length;aa++)this.toggleHiddenTag(ha[aa])}ha=null;null!=Y.tags.hidden&&(null==ha&&(ha=[]),ha=ha.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ha&&(ha=[]);var ea=+this.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(Y.tags.visible,ea[aa])&&0>mxUtils.indexOf(ha,ea[aa])&&ha.push(ea[aa])}null!=ha&&this.setHiddenTags(ha);this.refresh()}0<Z.length&&(L++,this.executeAnimations(Z,V,W?1:Y.steps,W?0:Y.delay));0==L?X():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=u&&u()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,u){var D=this.getLinkForCell(u);null!=D&&"data:action/json,"==D.substring(0,17)&&this.setLinkForCell(u,+this.updateCustomLink(m,D));if(this.isHtmlLabel(u)){var M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(this.getLabel(u));for(var L=M.getElementsByTagName("a"),O=!1,R=0;R<L.length;R++)D=L[R].getAttribute("href"),null!=D&&"data:action/json,"==D.substring(0,17)&&(L[R].setAttribute("href",this.updateCustomLink(m,D)),O=!0);O&&this.labelChanged(u,M.innerHTML)}};Graph.prototype.updateCustomLink=function(m,u){if("data:action/json,"==u.substring(0,17))try{var D=JSON.parse(u.substring(17));+null!=D.actions&&(this.updateCustomLinkActions(m,D.actions),u="data:action/json,"+JSON.stringify(D))}catch(M){}return u};Graph.prototype.updateCustomLinkActions=function(m,u){for(var D=0;D<u.length;D++){var M=u[D],L;for(L in M)this.updateCustomLinkAction(m,M[L],"cells"),this.updateCustomLinkAction(m,M[L],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,u,D){if(null!=u&&null!=u[D]){for(var M=[],L=0;L<u[D].length;L++)if("*"==u[D][L])M.push(u[D][L]);else{var O=m[u[D][L]];null!=O?""!=+O&&M.push(O):M.push(u[D][L])}u[D]=M}};Graph.prototype.getCellsForAction=function(m,u){u=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,u));if(null!=m.excludeCells){for(var D=[],M=0;M<u.length;M++)0>m.excludeCells.indexOf(u[M].id)&&D.push(u[M]);u=D}return u};Graph.prototype.getCellsById=function(m){var u=[];if(null!=m)for(var D=0;D<m.length;D++)if("*"==m[D]){var M=this.model.getRoot();u=u.concat(this.model.filterDescendants(function(O){return O!=M},M))}else{var L=this.model.getCell(m[D]);null!=L&&u.push(L)}return u};var A=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return A.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var u=mxUtils.indexOf(this.hiddenTags,m);0>u?this.hiddenTags.push(m):0<=u&&this.hiddenTags.splice(u,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};-Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var u=0;u<m.length;u++)if(0>mxUtils.indexOf(this.hiddenTags,m[u]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,u,E,M){var L=[];if(null!=m){u=null!=u?u:this.model.getDescendants(this.model.getRoot());for(var O=0,R={},S=0;S<m.length;S++)0<m[S].length&&(R[m[S]]=!0,O++);for(S=0;S<u.length;S++)if(E&&this.model.getParent(u[S])==-this.model.root||this.model.isVertex(u[S])||this.model.isEdge(u[S])){var V=this.getTagsForCell(u[S]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=m.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=R[V[W]]&&X++;X=X==O}X&&(1!=M||this.isCellVisible(u[S]))&&L.push(u[S])}}return L};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var u=null,E=[],M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);-E=[];if(0<L.length){L=L.split(" ");for(var O={},R=0;R<L.length;R++)if(null==u||null!=u[L[R]])O[L[R]]=!0,E.push(L[R]);u=O}else return[]}return E};Graph.prototype.getTagsForCells=function(m){for(var u=[],E={},M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);if(0<L.length){L=L.split(" ");for(var O=0;O<L.length;O++)null==E[L[O]]&&(E[L[O]]=!0,u.push(L[O]))}}return u};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,u){if(0<-m.length&&0<u.length){this.model.beginUpdate();try{for(var E=0;E<m.length;E++){for(var M=this.getTagsForCell(m[E]),L=M.split(" "),O=!1,R=0;R<u.length;R++){var S=mxUtils.trim(u[R]);""!=S&&0>mxUtils.indexOf(L,S)&&(M=0<M.length?M+" "+S:S,O=!0)}O&&this.setAttributeForCell(m[E],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,u){if(0<m.length&&0<u.length){this.model.beginUpdate();try{for(var E=0;E<m.length;E++){var M=this.getTagsForCell(m[E]);if(0<M.length){for(var L=-M.split(" "),O=!1,R=0;R<u.length;R++){var S=mxUtils.indexOf(L,u[R]);0<=S&&(L.splice(S,1),O=!0)}O&&this.setAttributeForCell(m[E],"tags",L.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var u=0;u<m.length;u++)this.model.setVisible(m[u],!this.model.isVisible(m[u]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,u){this.model.beginUpdate();try{for(var E=0;E<m.length;E++)this.model.setVisible(m[E],u)}finally{this.model.endUpdate()}};-Graph.prototype.highlightCells=function(m,u,E,M){for(var L=0;L<m.length;L++)this.highlightCell(m[L],u,E,M)};Graph.prototype.highlightCell=function(m,u,E,M,L){u=null!=u?u:mxConstants.DEFAULT_VALID_COLOR;E=null!=E?E:1E3;m=this.view.getState(m);var O=null;null!=m&&(L=null!=L?L:4,L=Math.max(L+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+L),O=new mxCellHighlight(this,u,L,!1),null!=M&&(O.opacity=M),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,-"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},E));return O};Graph.prototype.addSvgShadow=function(m,u,E,M){M=null!=M?M:!0;var L=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=E&&E||(u=null!=u?u:m.getElementsByTagName("g")[0],null!=u&&(this.updateShadowFilter(u,!0),!isNaN(parseInt(m.getAttribute("width")))&&M&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+L),m.setAttribute("height",parseInt(m.getAttribute("height"))++Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var u=0;u<m.length;u++)if(0>mxUtils.indexOf(this.hiddenTags,m[u]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,u,D,M){var L=[];if(null!=m){u=null!=u?u:this.model.getDescendants(this.model.getRoot());for(var O=0,R={},S=0;S<m.length;S++)0<m[S].length&&(R[m[S]]=!0,O++);for(S=0;S<u.length;S++)if(D&&this.model.getParent(u[S])==+this.model.root||this.model.isVertex(u[S])||this.model.isEdge(u[S])){var V=this.getTagsForCell(u[S]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=m.length)){for(var W=X=0;W<V.length&&X<O;W++)null!=R[V[W]]&&X++;X=X==O}X&&(1!=M||this.isCellVisible(u[S]))&&L.push(u[S])}}return L};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var u=null,D=[],M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);+D=[];if(0<L.length){L=L.split(" ");for(var O={},R=0;R<L.length;R++)if(null==u||null!=u[L[R]])O[L[R]]=!0,D.push(L[R]);u=O}else return[]}return D};Graph.prototype.getTagsForCells=function(m){for(var u=[],D={},M=0;M<m.length;M++){var L=this.getTagsForCell(m[M]);if(0<L.length){L=L.split(" ");for(var O=0;O<L.length;O++)null==D[L[O]]&&(D[L[O]]=!0,u.push(L[O]))}}return u};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,u){if(0<+m.length&&0<u.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){for(var M=this.getTagsForCell(m[D]),L=M.split(" "),O=!1,R=0;R<u.length;R++){var S=mxUtils.trim(u[R]);""!=S&&0>mxUtils.indexOf(L,S)&&(M=0<M.length?M+" "+S:S,O=!0)}O&&this.setAttributeForCell(m[D],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,u){if(0<m.length&&0<u.length){this.model.beginUpdate();try{for(var D=0;D<m.length;D++){var M=this.getTagsForCell(m[D]);if(0<M.length){for(var L=+M.split(" "),O=!1,R=0;R<u.length;R++){var S=mxUtils.indexOf(L,u[R]);0<=S&&(L.splice(S,1),O=!0)}O&&this.setAttributeForCell(m[D],"tags",L.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var u=0;u<m.length;u++)this.model.setVisible(m[u],!this.model.isVisible(m[u]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,u){this.model.beginUpdate();try{for(var D=0;D<m.length;D++)this.model.setVisible(m[D],u)}finally{this.model.endUpdate()}};+Graph.prototype.highlightCells=function(m,u,D,M){for(var L=0;L<m.length;L++)this.highlightCell(m[L],u,D,M)};Graph.prototype.highlightCell=function(m,u,D,M,L){u=null!=u?u:mxConstants.DEFAULT_VALID_COLOR;D=null!=D?D:1E3;m=this.view.getState(m);var O=null;null!=m&&(L=null!=L?L:4,L=Math.max(L+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+L),O=new mxCellHighlight(this,u,L,!1),null!=M&&(O.opacity=M),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,+"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},D));return O};Graph.prototype.addSvgShadow=function(m,u,D,M){M=null!=M?M:!0;var L=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=D&&D||(u=null!=u?u:m.getElementsByTagName("g")[0],null!=u&&(this.updateShadowFilter(u,!0),!isNaN(parseInt(m.getAttribute("width")))&&M&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+L),m.setAttribute("height",parseInt(m.getAttribute("height"))+L),u=m.getAttribute("viewBox"),null!=u&&0<u.length&&(u=u.split(" "),3<u.length&&(w=parseFloat(u[2])+L,h=parseFloat(u[3])+L,m.setAttribute("viewBox",u[0]+" "+u[1]+" "+w+" "+h))))));return L};Graph.prototype.updateShadowFilter=function(m,u){mxClient.IS_SF||(u?(u=mxUtils.getLightDarkColor(this.svgShadowColor,this.svgShadowOpacity),m.style.filter="drop-shadow("+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowSize)/100+"px "+Math.round(100*this.svgShadowBlur)/100+"px "+u.cssText+")"):m.style.filter="")};Graph.prototype.setShadowVisible=function(m,u){u=null!=u?u:!0;this.shadowVisible=m;this.updateShadowFilter(this.view.getDrawPane(),this.shadowVisible);u&&this.fireEvent(new mxEventObject("shadowVisibleChanged"))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),-u=0;do var E=this.model.getChildAt(this.model.root,u);while(u++<m&&"1"==mxUtils.getValue(this.getCellStyle(E),"locked","0"));null!=E&&this.setDefaultParent(E)}};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++u=0;do var D=this.model.getChildAt(this.model.root,u);while(u++<m&&"1"==mxUtils.getValue(this.getCellStyle(D),"locked","0"));null!=D&&this.setDefaultParent(D)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",@@ -12717,10 +12721,10 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];-mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var u=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?u="mxgraph.er":"sysML"==m.substring(0,5)&&(u="mxgraph.sysml"));return u};var N=mxMarker.createMarker;mxMarker.createMarker=function(m,u,E,M,L,O,R,S,V,X){if(null!=E&&null==mxMarker.markers[E]){var W=this.getPackageForType(E);null!=W&&mxStencilRegistry.getStencil(W)}return N.apply(this,-arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,u,E,M,L,O){"1"==mxUtils.getValue(u.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(u.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(m,u,E,M){function L(){ha.value=Math.max(1,Math.min(W,Math.max(parseInt(ha.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(ha.value),parseInt(aa.value))))}function O(Ea){m.lastPrintPagesRadioChecked=+mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var u=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?u="mxgraph.er":"sysML"==m.substring(0,5)&&(u="mxgraph.sysml"));return u};var N=mxMarker.createMarker;mxMarker.createMarker=function(m,u,D,M,L,O,R,S,V,X){if(null!=D&&null==mxMarker.markers[D]){var W=this.getPackageForType(D);null!=W&&mxStencilRegistry.getStencil(W)}return N.apply(this,+arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,u,D,M,L,O){"1"==mxUtils.getValue(u.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(u.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(m,u,D,M){function L(){ha.value=Math.max(1,Math.min(W,Math.max(parseInt(ha.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(W,Math.min(parseInt(ha.value),parseInt(aa.value))))}function O(Ea){m.lastPrintPagesRadioChecked=Z.checked;m.lastPrintSelectionOnlyChecked=ca.checked;m.lastPrintCropRadioChecked=ma.checked;m.lastPrintFitRadioChecked=ba.checked;Z.checked&&aa.value<ha.value?(m.lastPrintPagesFromInput=aa.value,m.lastPrintPagesToInput=ha.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);Aa.value=Math.max(1,Math.min(1600,parseInt(Aa.value)))+"%";m.lastPrintZoom=Aa.value;m.lastPrintBorder=qa.value;m.lastPrintGrid=Ca.checked;m.lastPrintTransparent=za.checked;m.lastPrintInclude=Ba.checked;m.lastPrintSheetsAcross=-na.value;m.lastPrintSheetsDown=ua.value;var Ia={};Ia.border=parseInt(qa.value);Ia.scale=parseInt(Aa.value)/100;Ia.grid=Ca.checked;Ia.shadows=Da.checked;Ia.transparent=za.checked;Ia.includeCopy=Ba.checked;Ia.sheetsAcross=parseInt(na.value);Ia.sheetsDown=parseInt(ua.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(ha.value);Ia.allPages=Y.checked;Ia.selection=ca.checked;Ia.pageView=fa.checked;Ia.crop=ma.checked;Ia.fit=ba.checked;return null!=E?E(!Ea,Ia):m.print(!Ea,Ia)}var R=m.editor.graph,+na.value;m.lastPrintSheetsDown=ua.value;var Ia={};Ia.border=parseInt(qa.value);Ia.scale=parseInt(Aa.value)/100;Ia.grid=Ca.checked;Ia.shadows=Da.checked;Ia.transparent=za.checked;Ia.includeCopy=Ba.checked;Ia.sheetsAcross=parseInt(na.value);Ia.sheetsDown=parseInt(ua.value);Ia.pagesFrom=parseInt(aa.value);Ia.pagesTo=parseInt(ha.value);Ia.allPages=Y.checked;Ia.selection=ca.checked;Ia.pageView=fa.checked;Ia.crop=ma.checked;Ia.fit=ba.checked;return null!=D?D(!Ea,Ia):m.print(!Ea,Ia)}var R=m.editor.graph,S=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,u||mxResources.get("print"));S.appendChild(V);var X=1,W=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);u=document.createElement("span");mxUtils.write(u,mxResources.get("allPages"));mxEvent.addListener(u,"click",function(){Y.checked=!0});V.appendChild(u);mxUtils.br(V);var Z=Y.cloneNode(!0);V.appendChild(Z);u=document.createElement("span");mxUtils.write(u,mxResources.get("pages")+":");V.appendChild(u);mxEvent.addListener(u,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";V.appendChild(aa);u=document.createElement("span");mxUtils.write(u,mxResources.get("to"));V.appendChild(u);var ha=aa.cloneNode(!0);V.appendChild(ha);mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",L);mxEvent.addListener(ha,"change",L);if(null!=m.pages&&(W=m.pages.length,null!=m.currentPage))for(var ea=0;ea<W;ea++)if(m.currentPage==m.pages[ea]){X=ea+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(aa.value=Math.min(W,Math.max(1,@@ -12735,14 +12739,14 @@ m.lastPrintSheetsAcross||"1");na.setAttribute("min","1");na.setAttribute("type",R.style.whiteSpace="nowrap";R.style.paddingTop="12px";R.style.marginTop="12px";R.style.paddingLeft="8px";mxUtils.write(R,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","number");qa.setAttribute("min","0");qa.style.width="40px";qa.style.marginLeft="4px";qa.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;R.appendChild(qa);u=document.createElement("span");u.style.marginLeft="8px";mxUtils.write(u,mxResources.get("zoom")+":");R.appendChild(u);var Aa=document.createElement("input");Aa.style.width="60px";Aa.style.marginLeft="4px";Aa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";R.appendChild(Aa);mxUtils.br(R);var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="12px";Ca.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;R.appendChild(Ca);u=document.createElement("span");u.style.marginLeft="4px";u.style.marginRight="8px";mxUtils.write(u,mxResources.get("grid"));R.appendChild(u);mxEvent.addListener(u,"click",function(Ea){Ca.checked=!0;mxEvent.consume(Ea)});var Da=document.createElement("input");Da.setAttribute("type","checkbox");Da.style.marginTop="12px";Da.checked=null!=m.lastPrintShadow?m.lastPrintShadow:!1;R.appendChild(Da);u=document.createElement("span");u.style.marginLeft="4px";u.style.marginRight="8px";mxUtils.write(u,mxResources.get("shadows"));R.appendChild(u);m.isOffline()&&!mxClient.IS_CHROMEAPP||u.appendChild(m.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));-mxEvent.addListener(u,"click",function(Ea){Da.checked=!0;mxEvent.consume(Ea)});Editor.enableShadowOption?null!=E&&mxUtils.br(R):(Da.style.display="none",u.style.display="none");var za=document.createElement("input");za.setAttribute("type","checkbox");za.style.marginTop="10px";za.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=E&&(R.appendChild(za),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("transparentBackground")),R.appendChild(u),-mxEvent.addListener(u,"click",function(Ea){za.checked=!0;mxEvent.consume(Ea)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==E||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(R),R.appendChild(Ba),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram")),R.appendChild(u),mxEvent.addListener(u,-"click",function(Ea){Ba.checked=!0;mxEvent.consume(Ea)}));S.appendChild(R);u=document.createElement("div");u.style.marginTop="30px";u.style.textAlign="right";u.style.whiteSpace="nowrap";m.isOffline()&&!mxClient.IS_CHROMEAPP||null!=E||u.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));R=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});R.className="geBtn";m.editor.cancelFirst&&u.appendChild(R);PrintDialog.previewEnabled&&null==E&&(V=mxUtils.button(mxResources.get("preview"),-function(){try{m.hideDialog(),O(!1)}catch(Ea){m.handleError(Ea)}}),V.className="geBtn",u.appendChild(V));M=null!=M?M:null!=E?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{m.hideDialog(),O(!0)}catch(Ea){m.handleError(Ea)}});M.className="geBtn gePrimaryBtn";u.appendChild(M);m.editor.cancelFirst||u.appendChild(R);S.appendChild(u);if(m.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme=+mxEvent.addListener(u,"click",function(Ea){Da.checked=!0;mxEvent.consume(Ea)});Editor.enableShadowOption?null!=D&&mxUtils.br(R):(Da.style.display="none",u.style.display="none");var za=document.createElement("input");za.setAttribute("type","checkbox");za.style.marginTop="10px";za.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=D&&(R.appendChild(za),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("transparentBackground")),R.appendChild(u),+mxEvent.addListener(u,"click",function(Ea){za.checked=!0;mxEvent.consume(Ea)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==D||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(R),R.appendChild(Ba),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram")),R.appendChild(u),mxEvent.addListener(u,+"click",function(Ea){Ba.checked=!0;mxEvent.consume(Ea)}));S.appendChild(R);u=document.createElement("div");u.style.marginTop="30px";u.style.textAlign="right";u.style.whiteSpace="nowrap";m.isOffline()&&!mxClient.IS_CHROMEAPP||null!=D||u.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));R=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});R.className="geBtn";m.editor.cancelFirst&&u.appendChild(R);PrintDialog.previewEnabled&&null==D&&(V=mxUtils.button(mxResources.get("preview"),+function(){try{m.hideDialog(),O(!1)}catch(Ea){m.handleError(Ea)}}),V.className="geBtn",u.appendChild(V));M=null!=M?M:null!=D?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{m.hideDialog(),O(!0)}catch(Ea){m.handleError(Ea)}});M.className="geBtn gePrimaryBtn";u.appendChild(M);m.editor.cancelFirst||u.appendChild(R);S.appendChild(u);if(m.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Ka);Ka();var Ma=function(Ea,Ia){Ea=Ia.getProperty("dialog");S.parentNode==Ea.container&&(m.editor.removeListener(Ma),m.removeListener(Ka))};m.editor.addListener("hideDialog",Ma)}this.container=S};var K=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else K.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.4";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.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||"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -12800,17 +12804,17 @@ if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(z=0;z<B.length;z++)g[B[z]]=!0;var I=this.editor.graph.getModel(),G=I.getChildren(I.root);for(z=0;z<G.length;z++){var C=G[z];I.setVisible(C,g[C.id]||!1)}}catch(Q){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename(!x),K=J+("xml"==d||"pdf"==d&&Q?".drawio":"")+"."+d;if("xml"==d){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(K,d,m,"text/xml")}else if("html"==d)m=this.getHtml2(this.getFileData(!0),this.editor.graph,J),this.saveData(K,d,m,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,R){try{return this.createDownloadRequest(O,d,n,R,B,x,I,G,C,Q,U,void 0,void 0,!z,T,P,v,A,N)}catch(S){this.handleError(S)}}));else{var u=null,E=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==d){var M=this.editor.graph.background;-if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();E(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();E(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,g,l,n,x,z,B,I,G,-C,Q,U,T,P,v,A,N,J,K){d=this.downloadRequestBuilder(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K);g="";for(var m in d)l=d[m],null!=l&&(g+=m+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K){var m=this.editor.graph,u=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==z?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var E=null,M=null,L=null;if(!EditorUi.isElectronApp&&(u.width*-u.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==g&&(null!=Q?(E=Q.from,M=Q.to):0==z&&(L="1"));"xmlpng"==g&&(C="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==this.currentPage){E=z;break}z=m.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=Q&&null!=-Q.from&&(x.globalVars.pagenumber=Q.from+1);G&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:E,to:M,allPages:L,bg:null!=z?z:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=+d?K=J+".png":"jpeg"==d&&(K=J+".jpg"),this.saveRequest(K,d,mxUtils.bind(this,function(O,R){try{return this.createDownloadRequest(O,d,n,R,B,x,I,G,C,Q,U,void 0,void 0,!z,T,P,v,A,N)}catch(S){this.handleError(S)}}));else{var u=null,D=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==d){var M=this.editor.graph.background;+if(B||M==mxConstants.NONE)M=null;var L=this.editor.graph.getSvg(M,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();D(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else K=J+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();D(O)}),n)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,g,l,n,x,z,B,I,G,+C,Q,U,T,P,v,A,N,J,K){d=this.downloadRequestBuilder(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K);g="";for(var m in d)l=d[m],null!=l&&(g+=m+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P,v,A,N,J,K){var m=this.editor.graph,u=m.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==z?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var D=null,M=null,L=null;if(!EditorUi.isElectronApp&&(u.width*+u.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==g&&(null!=Q?(D=Q.from,M=Q.to):0==z&&(L="1"));"xmlpng"==g&&(C="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==this.currentPage){D=z;break}z=m.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;x={globalVars:m.getExportVariables()};null!=Q&&null!=+Q.from&&(x.globalVars.pagenumber=Q.from+1);G&&(x.grid={size:m.gridSize,steps:m.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:m.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:D,to:M,allPages:L,bg:null!=z?z:mxConstants.NONE,base64:n,embedXml:C,xml:l,filename:null!=d?d:"",extras:JSON.stringify(x),scale:B,border:I,pageMargin:v,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=A&&A?"1":"0",shadows:null!=K&&K?"1":"0",sheetsAcross:N,sheetsDown:J}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{g=JSON.parse(d)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var l=g.lastIndexOf("#");0<l&&(g=g.substring(0,l));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<l&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,l){var n=window.location.hash,x=mxUtils.bind(this,function(B){var I=null!=d.data?d.data:"";null!=B&&0<B.length&&(0<I.length&&(I+="\n"),I+=B);B=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=d.update){var G=null!=d.interval?parseInt(d.interval):6E4,C=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(Q,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();Q()}));U();Q()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var z=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(z,mxUtils.bind(this,function(B){x(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function g(m){var u=-new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);u.addListener(mxEvent.CLICK,function(E,M){n.alert(m.tooltip)});return u}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,z=x.getModel();z.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=z.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=+new mxCellOverlay(m.image||x.warningImage,m.tooltip,m.align,m.valign,m.offset);u.addListener(mxEvent.CLICK,function(D,M){n.alert(m.tooltip)});return u}var l=null,n=this;if(null!=d&&0<d.length&&(l=mxUtils.parseXml(d),d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,z=x.getModel();z.beginUpdate();var B=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=z.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=mxUtils.parseXml(G).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))z.setValue(I,C);else for(var Q=C.attributes,U=0;U<Q.length;U++)x.setAttributeForCell(I,Q[U].nodeName,0<Q[U].nodeValue.length?Q[U].nodeValue:null)}}catch(m){null!=window.console&&console.log("Error in value for "+I.id+": "+m)}try{var T=d.getAttribute("style");null!=T&&x.model.setStyle(I,T)}catch(m){null!=window.console&&console.log("Error in style for "+I.id+": "+m)}try{var P=d.getAttribute("icon");if(null!=P){var v=0<P.length?JSON.parse(P):null;null!=v&&v.append||x.removeCellOverlays(I);null!=v&&x.addCellOverlay(I,g(v))}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}try{var A=d.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var N=x.getCellGeometry(I);if(null!=N){N=N.clone();for(key in A){var J=parseFloat(A[key]);"dx"==key?N.x+=J:"dy"==key?N.y+=J:"dw"==key?N.width+=J:"dh"==key?N.height+=J:N[key]=parseFloat(A[key])}x.model.setGeometry(I,N)}}}catch(m){null!=window.console&&console.log("Error in icon for "+I.id+": "+m)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,z)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(B=d.hasAttribute("max-scale")?@@ -12836,12 +12840,12 @@ null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var G=this.document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var K=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K();mxEvent.consume(J)}}));if(d.isEditable()){var T=this.editor.graph,P=null;l=mxUtils.bind(this,function(J){this.showLibraryDialog(d.getTitle(),G,g,d,d.getMode());mxEvent.consume(J)});var v=mxUtils.bind(this,function(J){d.setModified(!0);d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",C.insertBefore(P,C.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=Q.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),C.insertBefore(U,C.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(K){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(U.parentNode.removeChild(U),-U=null)});mxEvent.consume(K)})))}),A=mxUtils.bind(this,function(J,K,m,u){J=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(J)));for(var E=0;E<J.length;E++){var M=T.getCellGeometry(J[E]);null!=M&&M.translate(-K.x,-K.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,u||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=u&&(K.title=u);g.push(K);v(m);null!=B&&null!=+U=null)});mxEvent.consume(K)})))}),A=mxUtils.bind(this,function(J,K,m,u){J=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(J)));for(var D=0;D<J.length;D++){var M=T.getCellGeometry(J[D]);null!=M&&M.translate(-K.x,-K.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(J,K.width,K.height,u||"",!0,null,!1));J=mxUtils.getXml(this.editor.graph.encodeCells(J));Editor.defaultCompressed&&(J=Graph.compress(J));K={xml:J,w:K.width,h:K.height};null!=u&&(K.title=u);g.push(K);v(m);null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)}),N=mxUtils.bind(this,function(J){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(J),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var K=T.getSelectionCells(),m=T.view.getBounds(K);if(null!=m&&0<m.width&&0<m.height){var u=T.view.scale;m.x/=u;m.y/=u;m.width/=u;m.height/=u;m.x-=T.view.translate.x;m.y-=T.view.translate.y;A(K,m)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(J)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(J))}),mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,N(J),mxEvent.consume(J))}));mxEvent.addListener(G,"mouseleave",mxUtils.bind(this,function(J){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor="",G.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(J){G.style.backgroundColor="light-dark(#fefefe, #000000)";J.dataTransfer.dropEffect="copy";G.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(J){G.style.cursor="";G.style.backgroundColor="";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,-function(K,m,u,E,M,L,O,R,S){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,A(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==+function(K,m,u,D,M,L,O,R,S){if(null!=K&&"image/"==m.substring(0,6))K="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(K),K=[new mxCell("",new mxGeometry(0,0,M,L),K)],K[0].vertex=!0,A(K,new mxRectangle(0,0,M,L),J,mxEvent.isAltDown(J)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null);else{var V=!1,X=mxUtils.bind(this,function(W,Y){null!=W&&"application/pdf"==Y&&(Y=Editor.extractGraphModelFromPdf(W),null!=Y&&0<Y.length&&(W=Y));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,G);g=g.concat(Z);v(J);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var aa=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ha=this.stringToCells(Editor.getDiagramNodeXml(aa[Z])),ea=this.editor.graph.getBoundingBoxFromGeometry(ha);null!=ea&&A(ha,new mxRectangle(0,0,ea.width,ea.height),J)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<g.length&&(B.parentNode.removeChild(B),B=null)});null!=S&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(S,function(W){X(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,O)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?X(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(K,m)}}));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(G,"dragleave",function(J){G.style.cursor="";G.style.backgroundColor=@@ -12890,13 +12894,13 @@ function(C,Q,U,T){if("_blank"==Q||null!=C&&0<C.length){var P=l("_blank"==Q?null:if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),C,z,!0,Q,v)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}))}),null!=T?U(T):this.pickFolder(Q,U)))}});x=[App.MODE_BROWSER];B||x.push("_blank");var G=new SaveDialog(this,d,mxUtils.bind(this,function(C,Q,U){I(C.value,Q,C,U);this.hideDialog(null,null,G.container)}),x,null,"application/pdf");this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,l,n,x,z){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,l){g(null)};EditorUi.prototype.exportSvg=function(d,g,l,n,x,z,B,I,G,C,Q,U,T,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(d,g,l,n,x,z,B,I,G,C,Q,U,T,P)}));this.handleError(W)})))try{var v=this.editor.graph.isSelectionEmpty();l=null!=l?l:v;var A=g?null:this.editor.graph.background;A==mxConstants.NONE&&(A=null);null==A&&0==g&&(A=this.editor.graph.shapeBackgroundColor);var N=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var J=mxUtils.lightDarkColorSupported,K=mxUtils.preferDarkColor;if("light"==Q||"dark"==Q)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Q;var m=Graph.addFont,u={};Graph.addFont=function(W,Y,Z,aa){m.call(this,W,Y,Z,u)};var E=this.editor.graph.createSvgImageExport(x),M=E.drawCellState;E.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);M.apply(this,arguments)};var L=this.editor.graph.getSvg(A,d,B,I,null,-l,null,E,"blank"==C?"_blank":"self"==C?"_top":null,null,!T,Q,U);mxUtils.lightDarkColorSupported=J;mxUtils.preferDarkColor=K;this.editor.graph.addForeignObjectWarning=N;n&&this.editor.graph.addSvgShadow(L);var O=this.getBaseFilename()+(x?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});+(this.editor.graph.addForeignObjectWarning=function(){});var J=mxUtils.lightDarkColorSupported,K=mxUtils.preferDarkColor;if("light"==Q||"dark"==Q)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Q;var m=Graph.addFont,u={};Graph.addFont=function(W,Y,Z,aa){m.call(this,W,Y,Z,u)};var D=this.editor.graph.createSvgImageExport(x),M=D.drawCellState;D.drawCellState=function(W,Y){null!=W&&Graph.processFontStyle(W.style);M.apply(this,arguments)};var L=this.editor.graph.getSvg(A,d,B,I,null,+l,null,D,"blank"==C?"_blank":"self"==C?"_top":null,null,!T,Q,U);mxUtils.lightDarkColorSupported=J;mxUtils.preferDarkColor=K;this.editor.graph.addForeignObjectWarning=N;n&&this.editor.graph.addSvgShadow(L);var O=this.getBaseFilename()+(x?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});var R=mxUtils.bind(this,function(W){this.spinner.stop();x&&W.setAttribute("content",this.getFileData(!0,null,null,null,l,G,null,null,null,null,null,d,B));P(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var S=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&z&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&T?this.replaceAlternateContent(W,Q,R):R(W)}),V=Graph.customFontElements;Graph.customFontElements=u;var X=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=m;z&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,S,this.thumbImageCache)):S(W)});T?this.embedFonts(L,X):(this.editor.addFontCss(L),X(L))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(d,g,l){function n(U,T,P,v,A){var N=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");N.setAttribute("x",T);N.setAttribute("y",P+.5);N.setAttribute("width",v.width);N.setAttribute("height",v.height);null==N.setAttributeNS?N.setAttribute("xlink:href",A):N.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",A);U.replaceChild(N,U.lastChild);I()}function x(){if(B<Q.length)Q[B++](x)}var z="";g=d.getElementsByTagName("style");for(var B=0;B<g.length;B++)z+=g[B].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&l(d)}),G={},-C={},Q=[];for(B=0;B<g.length;B++)mxUtils.bind(this,function(U){var T=U.getElementsByTagName("div");if(0<T.length)try{var P=T[0].cloneNode(!0),v=parseInt(P.style.marginLeft),A=parseInt(P.style.paddingTop),N=P.getElementsByTagName("div")[1],J=T=!1,K=P.style.alignItems,m=P.style.justifyContent;if(null!=P.style.writingMode){var u=P.style.writingMode;J="vertical-"==u.substring(0,9);T="-rl"==u.substring(u.length-3)}var E=!J&&"1px"==P.style.width||J&&"1px"==P.style.height;if(!J&&"1px"==P.style.height||J&&-"1px"==P.style.width)P.style.alignItems=J&&T?"unsafe flex-end":"unsafe flex-start";E&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var M=P.outerHTML,L=G[M];null==L&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),u=1,u="1px"==P.style.width?N.offsetWidth:parseInt(P.style.width),E=1,E="1px"==P.style.height?N.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),L=new mxRectangle(v,A,u,E),G[M]=L);"1px"==P.style.height&&+C={},Q=[];for(B=0;B<g.length;B++)mxUtils.bind(this,function(U){var T=U.getElementsByTagName("div");if(0<T.length)try{var P=T[0].cloneNode(!0),v=parseInt(P.style.marginLeft),A=parseInt(P.style.paddingTop),N=P.getElementsByTagName("div")[1],J=T=!1,K=P.style.alignItems,m=P.style.justifyContent;if(null!=P.style.writingMode){var u=P.style.writingMode;J="vertical-"==u.substring(0,9);T="-rl"==u.substring(u.length-3)}var D=!J&&"1px"==P.style.width||J&&"1px"==P.style.height;if(!J&&"1px"==P.style.height||J&&+"1px"==P.style.width)P.style.alignItems=J&&T?"unsafe flex-end":"unsafe flex-start";D&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var M=P.outerHTML,L=G[M];null==L&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),u=1,u="1px"==P.style.width?N.offsetWidth:parseInt(P.style.width),D=1,D="1px"==P.style.height?N.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),L=new mxRectangle(v,A,u,D),G[M]=L);"1px"==P.style.height&&("unsafe center"==K?A-=L.height/2:"unsafe flex-end"==K&&(A-=L.height));if("1px"==P.style.width)if(!J&&"unsafe center"==m||J&&"unsafe center"==K)v-=L.width/2;else if(!J&&"unsafe flex-end"==m||J&&(!T&&"unsafe flex-end"==K||T&&"unsafe flex-start"==K))v-=L.width;L=new mxRectangle(v,A,L.width,L.height+parseInt(N.style.fontSize)/4);Q.push(mxUtils.bind(this,function(O){var R=C[M];null==R?Graph.htmlToPng(M,L.width,L.height,mxUtils.bind(this,function(S){n(U,v,A,L,S);C[M]=S;O()}),z):(n(U,v,A,L,R),O())}))}catch(O){I()}else I()})(g[B]);0==counter&&l(d);B=0;x()};EditorUi.prototype.addRadiobox=function(d,g,l,n,x,z,B){return this.addCheckbox(d,l,n,x,z,B,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,l,n,x,z,B,I){z=null!=z?z:!0;var G=document.createElement("input");G.style.marginRight="8px";G.style.marginTop="16px";G.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();G.id=B;null!=I&&G.setAttribute("name",I);l&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");z&&(d.appendChild(G),l=document.createElement("label"),mxUtils.write(l,g),l.setAttribute("for",B),d.appendChild(l),x||mxUtils.br(d));return G};EditorUi.prototype.addEditButton=function(d,g){var l=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var z=document.createElement("select");z.style.maxWidth="200px";z.style.width="auto";z.style.marginLeft=@@ -12917,28 +12921,29 @@ C)})));z.setAttribute("checked","checked");null==l&&I.setAttribute("disabled","dG=document.createElement("option");G.setAttribute("value","auto");mxUtils.write(G,mxResources.get("automatic"));G.setAttribute("selected","selected");U.appendChild(G);G.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+":");x.appendChild(U);mxUtils.br(x);B+=26;var T=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";x.appendChild(P);var v=this.addCheckbox(x,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var A=A=this.addCheckbox(x,mxResources.get("allPages"),G,!G),N=this.addCheckbox(x,mxResources.get("layers"),!0),J=this.addCheckbox(x,mxResources.get("tags"),!0),K=this.addCheckbox(x,mxResources.get("lightbox"),!0),m=null;if(EditorUi.enableHtmlEditOption){m=this.addEditButton(x,K);var u=m.getEditInput();u.style.marginBottom="16px";B+=50;mxEvent.addListener(K,"change",function(){K.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");u.checked&&K.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,function(){n(I.checked?l:null,T.checked,P.value,Q.getTarget(),Q.getColor(),v.checked,A.checked,N.checked,J.checked,K.checked,null!=m?m.getLink():null,null!=U?U.value:null)}),null,d,g);this.showDialog(d.container,340,B,!0,!0);z.focus()};-EditorUi.prototype.showPublishLinkDialog=function(d,g,l,n,x,z,B,I,G,C,Q){var U=document.createElement("div");U.style.whiteSpace="nowrap";var T=document.createElement("h3");mxUtils.write(T,d||mxResources.get("publish"));T.style.width="100%";T.style.textAlign="center";T.style.marginTop="2px";T.style.marginBottom="20px";U.appendChild(T);var P=document.createElement("select");d=30;P.className="geBtn";P.style.marginBottom="8px";P.style.marginLeft="0px";P.style.width="100%";P.style.boxSizing="border-box";-if(null==I||""==I.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",T=document.createElement("option"),mxUtils.write(T,mxResources.get("makeCopy")),T.setAttribute("value","copy"),P.appendChild(T);T=document.createElement("option");mxUtils.write(T,mxResources.get("authorizationRequired"));T.setAttribute("value","auth");P.appendChild(T);null!=I&&""!=I.getHash()||T.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");P.appendChild(I);-null!=B?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",B),P.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));U.appendChild(P);mxUtils.br(U);P.focus();var v=null,A=null;if(null!=g||null!=l)d+=30,mxUtils.write(U,mxResources.get("width")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft=-"6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",U.appendChild(v),mxUtils.write(U,mxResources.get("height")+":"),A=document.createElement("input"),A.setAttribute("type","text"),A.style.width="50px",A.style.marginLeft="6px",A.style.marginBottom="10px",A.value=l+"px",U.appendChild(A),mxUtils.br(U);var N=this.addLinkSection(U,n),J=C?this.addCheckbox(U,mxResources.get("transparentBackground"),!1):null;null!=J&&(d+=20);var K=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&-(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),K=this.addCheckbox(U,mxResources.get("selectedPage")+": "+g));var m=document.createElement("select");m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));m.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));-m.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");m.appendChild(g);Q&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(m),mxUtils.br(U),d+=30);var u=this.addCheckbox(U,mxResources.get("lightbox"),!0,null,null,!n),E=this.addEditButton(U,u),M=E.getEditInput();n&&(M.style.marginLeft=u.style.marginLeft,u.style.display="none",d-=20);var L=this.addCheckbox(U,mxResources.get("layers"),-!0);L.style.marginLeft=M.style.marginLeft;L.style.marginTop="8px";var O=this.addCheckbox(U,mxResources.get("tags"),!0);O.style.marginLeft=M.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(u,"change",function(){u.checked?(L.removeAttribute("disabled"),M.removeAttribute("disabled"),O.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));M.checked&&u.checked?E.getEditSelect().removeAttribute("disabled"):-E.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,U,mxUtils.bind(this,function(){G(N.getTarget(),N.getColor(),null==K?!1:K.checked,u.checked,E.getLink(),L.checked,null!=v?v.value:null,null!=A?A.value:null,O.checked,P.value,null!=J?J.checked:!1,m.value)}),null,mxResources.get("create"),x,z);this.showDialog(n.container,340,296+d,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):null==-P.parentNode;N.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,l,n,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";z.appendChild(B);if(x){mxUtils.write(z,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";-I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";z.appendChild(I);mxUtils.write(z,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder||"0";z.appendChild(G);mxUtils.br(z)}var C=this.addCheckbox(z,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Q=n?null:this.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),+EditorUi.prototype.showPublishLinkDialog=function(d,g,l,n,x,z,B,I,G,C,Q,U){var T=document.createElement("div");T.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,d||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";P.style.marginTop="2px";P.style.marginBottom="20px";T.appendChild(P);var v=document.createElement("select");d=30;v.className="geBtn";v.style.marginBottom="8px";v.style.marginLeft="0px";v.style.width="100%";v.style.boxSizing="border-box";+if(null==I||""==I.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),v.appendChild(P);P=document.createElement("option");mxUtils.write(P,mxResources.get("authorizationRequired"));P.setAttribute("value","auth");v.appendChild(P);null!=I&&""!=I.getHash()||P.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");v.appendChild(I);+null!=B?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",B),v.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));T.appendChild(v);mxUtils.br(T);v.focus();var A=null,N=null;if(null!=g||null!=l)d+=30,mxUtils.write(T,mxResources.get("width")+":"),A=document.createElement("input"),A.setAttribute("type","text"),A.style.marginRight="16px",A.style.width="50px",A.style.marginLeft=+"6px",A.style.marginRight="16px",A.style.marginBottom="10px",A.value="100%",T.appendChild(A),mxUtils.write(T,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=l+"px",T.appendChild(N),mxUtils.br(T);var J=this.addLinkSection(T,n),K=C?this.addCheckbox(T,mxResources.get("transparentBackground"),!1):null;null!=K&&(d+=20);var m=document.createElement("select");m.className="geBtn";+m.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");m.appendChild(g);g=document.createElement("option");mxUtils.write(g,mxResources.get("currentPage"));g.setAttribute("value","currentPage");m.appendChild(g);var u=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),U&&(mxUtils.write(T,+mxResources.get("pages")+":"),T.appendChild(m),mxUtils.br(T),d+=30),u=this.addCheckbox(T,mxResources.get("selectedPage")+": "+g));var D=document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginTop="16px";U=document.createElement("option");U.setAttribute("value","0");mxUtils.write(U,mxResources.get("light"));D.appendChild(U);U=document.createElement("option");U.setAttribute("value","1");mxUtils.write(U,mxResources.get("dark"));D.appendChild(U);U=document.createElement("option");+U.setAttribute("value","auto");mxUtils.write(U,mxResources.get("automatic"));U.setAttribute("selected","selected");D.appendChild(U);Q&&(mxUtils.write(T,mxResources.get("appearance")+":"),T.appendChild(D),mxUtils.br(T),d+=30);var M=this.addCheckbox(T,mxResources.get("lightbox"),!0,null,null,!n),L=this.addEditButton(T,M),O=L.getEditInput();n&&(O.style.marginLeft=M.style.marginLeft,M.style.display="none",d-=20);var R=this.addCheckbox(T,mxResources.get("layers"),!0);R.style.marginLeft=O.style.marginLeft;+R.style.marginTop="8px";var S=this.addCheckbox(T,mxResources.get("tags"),!0);S.style.marginLeft=O.style.marginLeft;S.style.marginBottom="16px";S.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(R.removeAttribute("disabled"),O.removeAttribute("disabled"),S.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"));O.checked&&M.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled",+"disabled")});n=new CustomDialog(this,T,mxUtils.bind(this,function(){G(J.getTarget(),J.getColor(),null==u?!1:u.checked,M.checked,L.getLink(),R.checked,null!=A?A.value:null,null!=N?N.value:null,S.checked,v.value,null!=K?K.checked:!1,D.value,"allPages"==m.value)}),null,mxResources.get("create"),x,z);this.showDialog(n.container,340,296+d,!0,!0);null!=A?(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)):null==v.parentNode;J.focus()};+EditorUi.prototype.showRemoteExportDialog=function(d,g,l,n,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";z.appendChild(B);if(x){mxUtils.write(z,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft=+"4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";z.appendChild(I);mxUtils.write(z,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder||"0";z.appendChild(G);mxUtils.br(z)}var C=this.addCheckbox(z,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Q=n?null:this.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var U=n?null:this.addCheckbox(z,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,z,mxUtils.bind(this,function(){var T=parseInt(I.value)/100||1,P=parseInt(G.value)||0;l(!C.checked,null!=Q?Q.checked:!1,null!=U?U.checked:!1,T,P)}),null,d,g);this.showDialog(d.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,l,n,x,z,B,I,G){B=null!=B?B:Editor.defaultIncludeDiagram;var C=document.createElement("div");C.style.whiteSpace="nowrap";var Q=this.editor.graph,U="jpeg"==I||"webp"==I?220:320,T=document.createElement("h3");mxUtils.write(T,d);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";C.appendChild(T);mxUtils.write(C,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";C.appendChild(P);mxUtils.write(C,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";C.appendChild(v);mxUtils.br(C);var A=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,Q.isSelectionEmpty()),N=document.createElement("input");N.style.marginTop="16px";N.style.marginRight="8px";N.style.marginLeft="24px";N.setAttribute("disabled","disabled");N.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(T=0;T<d.length;T++)if(!Q.isSelectionEmpty()||"selectionOnly"!=d[T]){var K=document.createElement("option");mxUtils.write(K,mxResources.get(d[T]));K.setAttribute("value",d[T]);J.appendChild(K)}G?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(J),mxUtils.br(C),U+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(A.checked=!0)})):z&&(C.appendChild(N),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),U+=30,mxEvent.addListener(A,"change",function(){A.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}));Q.isSelectionEmpty()?G&&(A.style.display="none",A.nextSibling.style.display="none",A.nextSibling.nextSibling.style.display="none",U-=30):(J.value="diagram",N.setAttribute("checked","checked"),N.defaultChecked=!0,mxEvent.addListener(A,"change",function(){J.value=A.checked?"selectionOnly":"diagram"}));var m=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginTop="16px";z=document.createElement("option");z.setAttribute("value","light");mxUtils.write(z,mxResources.get("light"));u.appendChild(z);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,-mxResources.get("dark"));u.appendChild(G);"svg"==I&&mxUtils.lightDarkColorSupported?(z=document.createElement("option"),z.setAttribute("value","auto"),mxUtils.write(z,mxResources.get("automatic")),z.setAttribute("selected","selected"),u.appendChild(z)):Editor.isDarkMode()?G.setAttribute("selected","selected"):z.setAttribute("selected","selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(u);mxUtils.br(C);U+=26;var E=this.addCheckbox(C,mxResources.get("shadow"),Q.shadowVisible),+mxResources.get("dark"));u.appendChild(G);"svg"==I&&mxUtils.lightDarkColorSupported?(z=document.createElement("option"),z.setAttribute("value","auto"),mxUtils.write(z,mxResources.get("automatic")),z.setAttribute("selected","selected"),u.appendChild(z)):Editor.isDarkMode()?G.setAttribute("selected","selected"):z.setAttribute("selected","selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(u);mxUtils.br(C);U+=26;var D=this.addCheckbox(C,mxResources.get("shadow"),Q.shadowVisible),M=null;if("png"==I||"jpeg"==I||"webp"==I)M=this.addCheckbox(C,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),U+=30;Q=null!=this.pages?this.pages.length:1;var L=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+(1<Q?":":""),B,null,null,"jpeg"!=I&&"webp"!=I),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==I||"svg"==I?(B=function(){L.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},z=document.createElement("option"),z.setAttribute("value","allPages"),mxUtils.write(z,mxResources.get("allPages")),O.appendChild(z),z=document.createElement("option"),z.setAttribute("value","currentPage"),mxUtils.write(z,mxResources.get("currentPage")),O.appendChild(z),1<Q?(L.style.marginBottom="12px",O.style.marginBottom="16px",C.appendChild(O),mxUtils.br(C),U+=20):L.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",B),B()):L.style.marginBottom="16px";var R=document.createElement("input");R.style.marginBottom="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(R.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,C.appendChild(R),mxUtils.write(C,mxResources.get("embedImages")),mxUtils.br(C),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(S),mxUtils.write(C,mxResources.get("embedFonts")),mxUtils.br(C),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));V.appendChild(z);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));V.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");mxUtils.write(B,mxResources.get("openInThisWindow"));V.appendChild(B);B=document.createElement("div");-mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";B.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(V),C.appendChild(B),mxUtils.br(C),mxUtils.br(C),U+=50);l=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=P.value;this.lastEmbedImages=R.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=O.value;x(P.value,m.checked,!A.checked,E.checked,L.checked,R.checked&&g,v.value,N.checked,+mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";B.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(V),C.appendChild(B),mxUtils.br(C),mxUtils.br(C),U+=50);l=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=P.value;this.lastEmbedImages=R.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=O.value;x(P.value,m.checked,!A.checked,D.checked,L.checked,R.checked&&g,v.value,N.checked,("png"==I||"svg"==I)&&"currentPage"==O.value,V.value,null!=M?M.checked:null,null!=u?u.value:null,J.value,S.checked)}),null,l,n);this.showDialog(l.container,340,U,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,l,n,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var B=this.editor.graph;if(null!=g){var I=document.createElement("h3");mxUtils.write(I,g);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(I)}var G=this.addCheckbox(z,mxResources.get("fit"),!0),C=this.addCheckbox(z,mxResources.get("shadow"),B.shadowVisible&&n,!n),Q=this.addCheckbox(z,l),U=this.addCheckbox(z,mxResources.get("lightbox"),!0),T=this.addEditButton(z,U),P=T.getEditInput(),v=1<B.model.getChildCount(B.model.getRoot()),A=this.addCheckbox(z,mxResources.get("layers"),v,!v);A.style.marginLeft=P.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(v&&A.removeAttribute("disabled"),P.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&U.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){d(G.checked,C.checked,Q.checked,U.checked,T.getLink(),A.checked)}),null,mxResources.get("embed"),@@ -13004,8 +13009,8 @@ Q=d.indexOf(";"),0<Q&&(d=d.substring(0,Q)+d.substring(d.indexOf(",",Q+1))),C&&G.this.isRemoteFileFormat(d,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,g=mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?v(A.responseText):null!=I&&(I(null),this.showError(mxResources.get("error"),413==A.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,B):this.parseFile(G,g,B)):0==d.indexOf("PK")&&null!=G?(T=!0,this.importZipFile(G,v,mxUtils.bind(this,function(){P=this.insertTextAt(this.validateFileData(d),l,n,!0,null,C);I(P)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(P=this.insertTextAt(this.validateFileData(d),l,n,!0,null,C,null,null!=U?mxEvent.isControlDown(U):null));T||null==I||I(P);return P};EditorUi.prototype.importFiles=function(d,g,l,n,x,z,B,I,G,C,Q,U,T){n=null!=n?n:this.maxImageSize;C=null!=C?C:this.maxImageBytes;var P=null!=g&&null!=l,v=!0;g=null!=g?g:0;l=null!=l?l:0;var A=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var N=Q||this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>N){A=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[d],"x",[g],"y",[l],"maxSize",[n],"maxBytes",[C],"resampleThreshold",[this.resampleThreshold],"largeImages",[A],"crop",[P],"resizeImages",[v],"ignoreEmbeddedXml",[U],"evt",[T]);var K=mxUtils.bind(this,function(){var m=this.editor.graph,u=m.gridSize;x=null!=x?x:mxUtils.bind(this,function(S,V,X,W,Y,Z,aa,-ha,ea){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,aa)),this.showSidebar(),null;this.isCompatibleString(S)&&1==d.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=X=0);return this.importFile(S,V,X,W,Y,Z,aa,ha,ea,P,U,T)}catch(ca){return this.handleError(ca),null}});z=null!=z?z:mxUtils.bind(this,function(S){m.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var E=-d.length,M=E,L=[],O=mxUtils.bind(this,function(S,V){L[S]=V;if(0==--M){this.spinner.stop();if(null!=I)I(L);else{var X=[];m.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var W=L[S]();null!=W&&(X=X.concat(W))}}finally{m.getModel().endUpdate()}}z(X)}}),R=0;R<E;R++)mxUtils.bind(this,function(S){var V=d[S];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),+ha,ea){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,aa)),this.showSidebar(),null;this.isCompatibleString(S)&&1==d.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=X=0);return this.importFile(S,V,X,W,Y,Z,aa,ha,ea,P,U,T)}catch(ca){return this.handleError(ca),null}});z=null!=z?z:mxUtils.bind(this,function(S){m.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var D=+d.length,M=D,L=[],O=mxUtils.bind(this,function(S,V){L[S]=V;if(0==--M){this.spinner.stop();if(null!=I)I(L);else{var X=[];m.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var W=L[S]();null!=W&&(X=X.concat(W))}}finally{m.getModel().endUpdate()}}z(X)}}),R=0;R<D;R++)mxUtils.bind(this,function(S){var V=d[S];if(null!=V){var X=new FileReader;X.onload=mxUtils.bind(this,function(W){if(null==B||B(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Y=Graph.clipSvgDataUri(W.target.result),Z=Y.indexOf(","),aa=decodeURIComponent(escape(atob(Y.substring(Z+1)))),ha=mxUtils.parseXml(aa),ea=ha.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],fa=U?null:ca.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel>"!==fa.substring(0,14)&&"<mxGraphModel "!==fa.substring(0,14)?O(S,mxUtils.bind(this,function(){try{if(null!=ha){var ja=ha.getElementsByTagName("svg");if(0<ja.length){var la=ja[0],da=la.getAttribute("width"),va=la.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;var ra=la.getAttribute("viewBox");if(null==ra||0==ra.length)la.setAttribute("viewBox","0 0 "+da+" "+va);else if(isNaN(da)||isNaN(va)){var wa=ra.split(" ");3<wa.length&&(da=parseFloat(wa[2]),va=parseFloat(wa[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(la));var oa=Math.min(1,Math.min(n/Math.max(1,da)),n/Math.max(1,va)),ia=x(Y,V.type,g+S*u,l+S*u,Math.max(1,Math.round(da*oa)),Math.max(1,Math.round(va*oa)),V.name);if(null!=ia&&(isNaN(da)||isNaN(va))){var na=new Image;na.onload=mxUtils.bind(this,function(){da=Math.max(1,na.width);va=Math.max(1,na.height);ia[0].geometry.width=da;ia[0].geometry.height=va;la.setAttribute("viewBox","0 0 "+da+" "+va);Y=Editor.createSvgDataUri(mxUtils.getXml(la));var ua=Y.indexOf(";");0<ua&&(Y=Y.substring(0,ua)+Y.substring(Y.indexOf(",",@@ -13019,43 +13024,43 @@ function(d,g,l){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeaB){x=null!=x?x:this.maxImageSize;var I=Math.max(1,d.width),G=Math.max(1,d.height),C=g;if(n&&this.isResampleImageSize(null!=B?B:g.length,z))try{var Q=Math.max(I/x,G/x);if(1<Q){var U=Math.round(I/Q),T=Math.round(G/Q),P=document.createElement("canvas");P.width=U;P.height=T;P.getContext("2d").drawImage(d,0,0,U,T);var v=P.toDataURL();if(v.length<g.length){var A=document.createElement("canvas");A.width=U;A.height=T;var N=A.toDataURL();v!==N&&(g=v,I=U,G=T)}}}catch(J){}n&&C!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,l,n,x/1.5,z,B):l(g,I,G)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,l){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=l&&(n.onerror=l);n.src=d}catch(x){if(null!=l)l(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var p=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());p.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=-EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,l=g.isEnabled;g.isEnabled=function(){return l.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(u){var E=u.getEvent();return null==u.getState()&&!mxEvent.isMouseEvent(E)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(E)&&(null==u.getState()||mxEvent.isControlDown(E)||mxEvent.isShiftDown(E))});-g.cellEditor.editPlantUmlData=function(u,E,M){var L=JSON.parse(M);E=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(O,L.format,function(R,S,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(u,"<pre>"+R+"</pre>"),g.updateCellSize(u,!0);else{g.setCellStyles("image",d.convertDataUri(R),[u]);var X=g.model.getGeometry(u);null!=X&&(X=X.clone(),X.width=S,-X.height=V,g.cellsResized([u],[X],!1))}g.setAttributeForCell(u,"plantUmlData",JSON.stringify({data:O,format:L.format}))}finally{g.getModel().endUpdate()}},function(R){d.handleError(R)})},null,null,400,220);d.showDialog(E.container,420,300,!0,!0);E.init()};g.cellEditor.editMermaidData=function(u,E,M){var L=JSON.parse(M);E=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(O,L.config,function(R,-S,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",R,[u]);var X=g.model.getGeometry(u);null!=X&&(X=X.clone(),X.width=Math.max(X.width,S),X.height=Math.max(X.height,V),g.cellsResized([u],[X],!1));g.setAttributeForCell(u,"mermaidData",JSON.stringify({data:O,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(R){d.handleError(R)})},null,null,400,220);d.showDialog(E.container,420,300,!0,!0);E.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=-function(u,E){try{var M=this.graph.getAttributeForCell(u,"plantUmlData");if(null!=M)this.editPlantUmlData(u,E,M);else if(M=this.graph.getAttributeForCell(u,"mermaidData"),null!=M&&window.isMermaidEnabled)this.editMermaidData(u,E,M);else{var L=g.getCellStyle(u);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(u):n.apply(this,arguments)}}catch(O){d.handleError(O)}};g.getLinkTitle=function(u){return d.getLinkTitle(u)};g.customLinkClicked=function(u,E){var M=!1;try{var L=this.getGraphBounds();-d.handleCustomLink(u,E);M=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(E))}catch(O){d.handleError(O)}return M};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(u){var E=x.apply(this,arguments);null!=E&&null!=E.src&&Graph.isPageLink(E.src)&&(E={originalSrc:E.src});return E};var z=g.setBackgroundImage;g.setBackgroundImage=function(u){null!=u&&null!=u.originalSrc&&(u=d.createImageForPageLink(u.originalSrc,d.currentPage,this));z.apply(this,-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(u,E){u=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=u){var M=u.indexOf(",");if(0<M)for(u=u.substring(M+1),E=E.getProperty("patches"),M=0;M<E.length;M++)if(null!=E[M][EditorUi.DIFF_UPDATE]&&null!=E[M][EditorUi.DIFF_UPDATE][u]||-null!=E[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(E[M][EditorUi.DIFF_REMOVE],u)){g.refreshBackgroundImage();break}}}));var B=g.getBackgroundImageObject;g.getBackgroundImageObject=function(u,E){var M=B.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=E?d.createImageForPageLink(M.originalSrc,null,null,!0):{src:M.originalSrc});return M};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(u){u=null!=u?u:"";"1"==urlParams.dev&&(u+=(0<u.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(u,E,M){var L=E;E=function(O,R,S){if(null==R){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(R=V.getAttribute("href"))}null!=-R&&g.isCustomLink(R)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&g.customLinkClicked(R,S)&&mxEvent.consume(O);null!=L&&L(O,R,S)};G.call(this,u,E,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(u,E,M){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(u,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);g.isSelectionEmpty()||-null==d.addSelectionToScratchpad||this.addMenuItems(u,["-","addToScratchpad"],null,M);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(u,["-","exitGroup","home"],null,M)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(u,E,M){if(d.editor.graph.isSelectionEmpty())Q.apply(this,arguments),d.menus.addMenuItems(u,["copyAsImage","copyAsSvg"],null,M);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(u,E,M):this.addPopupMenuArrangeItems(u,E,-M),this.addMenuItems(u,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,M),this.isShowCellEditItems()||this.addPopupDeleteItem(u,E,M),this.addMenuItems(u,["lockUnlock","-"],null,M),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(E)&&g.isCellEditable(E)&&(this.addSubmenu("editCell",u,null,mxResources.get("edit")),u.addSeparator(),g.getModel().isEdge(E))){this.addSubmenu("line",u);var L=g.getModel().getGeometry(E);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(u,+EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,l=g.isEnabled;g.isEnabled=function(){return l.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(u){var D=u.getEvent();return null==u.getState()&&!mxEvent.isMouseEvent(D)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(D)&&(null==u.getState()||mxEvent.isControlDown(D)||mxEvent.isShiftDown(D))});+g.cellEditor.editPlantUmlData=function(u,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(O,L.format,function(R,S,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(u,"<pre>"+R+"</pre>"),g.updateCellSize(u,!0);else{g.setCellStyles("image",d.convertDataUri(R),[u]);var X=g.model.getGeometry(u);null!=X&&(X=X.clone(),X.width=S,X.height=V,g.cellsResized([u],+[X],!1))}g.setAttributeForCell(u,"plantUmlData",JSON.stringify({data:O,format:L.format}))}finally{g.getModel().endUpdate()}},function(R){d.handleError(R)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};g.cellEditor.editMermaidData=function(u,D,M){var L=JSON.parse(M);D=new SimpleTextareaDialog(d,L.data,function(O){null!=O&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(O,L.config,function(R,S,V){d.spinner.stop();+g.getModel().beginUpdate();try{g.setCellStyles("image",R,[u]);var X=g.model.getGeometry(u);null!=X&&(X=X.clone(),X.width=Math.max(X.width,S),X.height=Math.max(X.height,V),g.cellsResized([u],[X],!1));g.setAttributeForCell(u,"mermaidData",JSON.stringify({data:O,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(R){d.handleError(R)})});d.showDialog(D.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));D.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=+function(u,D){try{var M=this.graph.getAttributeForCell(u,"plantUmlData");if(null!=M)this.editPlantUmlData(u,D,M);else if(M=this.graph.getAttributeForCell(u,"mermaidData"),null!=M&&window.isMermaidEnabled)this.editMermaidData(u,D,M);else{var L=g.getCellStyle(u);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(u):n.apply(this,arguments)}}catch(O){d.handleError(O)}};g.getLinkTitle=function(u){return d.getLinkTitle(u)};g.customLinkClicked=function(u,D){var M=!1;try{var L=this.getGraphBounds();+d.handleCustomLink(u,D);M=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(D))}catch(O){d.handleError(O)}return M};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(u){var D=x.apply(this,arguments);null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src});return D};var z=g.setBackgroundImage;g.setBackgroundImage=function(u){null!=u&&null!=u.originalSrc&&(u=d.createImageForPageLink(u.originalSrc,d.currentPage,this));z.apply(this,+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(u,D){u=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=u){var M=u.indexOf(",");if(0<M)for(u=u.substring(M+1),D=D.getProperty("patches"),M=0;M<D.length;M++)if(null!=D[M][EditorUi.DIFF_UPDATE]&&null!=D[M][EditorUi.DIFF_UPDATE][u]||+null!=D[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(D[M][EditorUi.DIFF_REMOVE],u)){g.refreshBackgroundImage();break}}}));var B=g.getBackgroundImageObject;g.getBackgroundImageObject=function(u,D){var M=B.apply(this,arguments);null!=M&&null!=M.originalSrc&&(M=D?d.createImageForPageLink(M.originalSrc,null,null,!0):{src:M.originalSrc});return M};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(u){u=null!=u?u:"";"1"==urlParams.dev&&(u+=(0<u.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(u,D,M){var L=D;D=function(O,R,S){if(null==R){var V=mxEvent.getSource(O);"a"==V.nodeName.toLowerCase()&&(R=V.getAttribute("href"))}null!=+R&&g.isCustomLink(R)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&g.customLinkClicked(R,S)&&mxEvent.consume(O);null!=L&&L(O,R,S)};G.call(this,u,D,M)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(u,D,M){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(u,["zoomIn","zoomOut","-"],null,M);C.apply(this,arguments);g.isSelectionEmpty()||+null==d.addSelectionToScratchpad||this.addMenuItems(u,["-","addToScratchpad"],null,M);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(u,["-","exitGroup","home"],null,M)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(u,D,M){if(d.editor.graph.isSelectionEmpty())Q.apply(this,arguments),d.menus.addMenuItems(u,["copyAsImage","copyAsSvg"],null,M);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(u,D,M):this.addPopupMenuArrangeItems(u,D,+M),this.addMenuItems(u,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,M),this.isShowCellEditItems()||this.addPopupDeleteItem(u,D,M),this.addMenuItems(u,["lockUnlock","-"],null,M),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(D)&&g.isCellEditable(D)&&(this.addSubmenu("editCell",u,null,mxResources.get("edit")),u.addSeparator(),g.getModel().isEdge(D))){this.addSubmenu("line",u);var L=g.getModel().getGeometry(D);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(u,["clearWaypoints"],null,M)}1==g.getSelectionCount()&&this.addMenuItems(u,["enterGroup"],null,M);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(u,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(u,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=g.getExportVariables;g.getExportVariables=function(){var u=U.apply(this,arguments),E=d.getCurrentFile();null!=E&&(u.filename=E.getTitle());u.pagecount=null!=d.pages?d.pages.length:1;u.page=null!=d.currentPage?d.currentPage.getName():"";u.pagenumber=null!=d.pages&&null!=-d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return u};var T=g.getGlobalVariable;g.getGlobalVariable=function(u){var E=d.getCurrentFile();return"filename"==u&&null!=E?E.getTitle():"page"==u&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==u?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==u?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var P=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var u=-this.getCurrentFile(),E=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;P!=E&&u==v&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=E;v=u}));var A=g.labelLinkClicked;g.labelLinkClicked=function(u,E,M){var L=E.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))A.apply(this,arguments);else{if(!g.isEnabled()||null!=u&&g.isCellLocked(u.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(M)}};-this.editor.getOrCreateFilename=function(){var u=d.defaultFilename,E=d.getCurrentFile();null!=E&&(u=null!=E.getTitle()?E.getTitle():u);return u};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(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=g.getExportVariables;g.getExportVariables=function(){var u=U.apply(this,arguments),D=d.getCurrentFile();null!=D&&(u.filename=D.getTitle());u.pagecount=null!=d.pages?d.pages.length:1;u.page=null!=d.currentPage?d.currentPage.getName():"";u.pagenumber=null!=d.pages&&null!=+d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return u};var T=g.getGlobalVariable;g.getGlobalVariable=function(u){var D=d.getCurrentFile();return"filename"==u&&null!=D?D.getTitle():"page"==u&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==u?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==u?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var P=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var u=+this.getCurrentFile(),D=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;P!=D&&u==v&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=D;v=u}));var A=g.labelLinkClicked;g.labelLinkClicked=function(u,D,M){var L=D.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))A.apply(this,arguments);else{if(!g.isEnabled()||null!=u&&g.isCellLocked(u.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(M)}};+this.editor.getOrCreateFilename=function(){var u=d.defaultFilename,D=d.getCurrentFile();null!=D&&(u=null!=D.getTitle()?D.getTitle():u);return u};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(77,!0,"editGeometry",!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=-"synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(u,E){null!=E&&g.isEnabled()&&!g.isEditing()&&null!=E.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(u){var E=g.cellEditor.text2,M=null;null!=-E&&(mxEvent.addListener(E,"dragleave",function(L){null!=M&&(M.parentNode.removeChild(M),M=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(E));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(E,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(R,S,V,X,W,Y){g.insertImage(R,+"synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(u,D){null!=D&&g.isEnabled()&&!g.isEditing()&&null!=D.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(u){var D=g.cellEditor.text2,M=null;null!=+D&&(mxEvent.addListener(D,"dragleave",function(L){null!=M&&(M.parentNode.removeChild(M),M=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==M&&(M=this.highlightElement(D));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(R,S,V,X,W,Y){g.insertImage(R,W,Y)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var S=0;S<R.length;S++)R[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var O=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(R){var S=Math.max(1,R.width);R=Math.max(1,R.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,S)),V/Math.max(1,R));g.insertImage(decodeURIComponent(O),S*V,R*V)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){N=this.editor.graph.view;var J=mxSettings.getUnit();N.setUnit(J);Editor.pageSizeUnit=-J==mxConstants.METERS?mxConstants.MILLIMETERS:J;N.addListener("unitChanged",function(u,E){u=E.getProperty("unit");mxSettings.setUnit(u);mxSettings.save();Editor.pageSizeUnit=u==mxConstants.METERS?mxConstants.MILLIMETERS:u});this.ruler=!Editor.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");+J==mxConstants.METERS?mxConstants.MILLIMETERS:J;N.addListener("unitChanged",function(u,D){u=D.getProperty("unit");mxSettings.setUnit(u);mxSettings.save();Editor.pageSizeUnit=u==mxConstants.METERS?mxConstants.MILLIMETERS:u});this.ruler=!Editor.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(u,E){0<this.editor.graph.getSelectionCount()?(u=this.editor.graph.getSelectionCell(),u=this.editor.graph.getModel().getStyle(u),this.styleInput.value=u||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==this.styleInput?!0:K.apply(this,arguments)}}N=document.getElementById("geInfo");+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,D){0<this.editor.graph.getSelectionCount()?(u=this.editor.graph.getSelectionCell(),u=this.editor.graph.getModel().getStyle(u),this.styleInput.value=u||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==this.styleInput?!0:K.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var m=null;mxEvent.addListener(g.container,"dragleave",function(u){g.isEnabled()&&(null!=m&&(m.parentNode.removeChild(m),m=null),u.stopPropagation(),u.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(u){null==m&&(m=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();u.stopPropagation();u.preventDefault()}));mxEvent.addListener(g.container,-"drop",mxUtils.bind(this,function(u){null!=m&&(m.parentNode.removeChild(m),m=null);if(g.isEnabled()){var E=mxUtils.convertPoint(g.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),M=u.dataTransfer.files,L=g.view.translate,O=g.view.scale,R=E.x/O-L.x,S=E.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(u)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(u)&&(S=R=null),this.importFiles(M,R,S,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(u),null,null,mxEvent.isShiftDown(u),u));else{mxEvent.isAltDown(u)&&(S=R=0);var V=0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):null;E=this.extractGraphModelFromEvent(u,null!=this.pages);if(null!=E)g.setSelectionCells(this.importXml(E,R,S,!0));else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/html")){var X=u.dataTransfer.getData("text/html");E=document.createElement("div");E.innerHTML=Graph.sanitizeHtml(X);-var W=null;M=E.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(W=!0)):(M=E.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(E=E.getElementsByTagName("pre"),null!=E&&1==E.length&&(X=mxUtils.getTextContent(E[0]))));var Y=!0,Z=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(X,R,S,!0,W,null,Y,mxEvent.isControlDown(u)))});W&&null!=X&&X.length>this.resampleThreshold?+"drop",mxUtils.bind(this,function(u){null!=m&&(m.parentNode.removeChild(m),m=null);if(g.isEnabled()){var D=mxUtils.convertPoint(g.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),M=u.dataTransfer.files,L=g.view.translate,O=g.view.scale,R=D.x/O-L.x,S=D.y/O-L.y;if(0<M.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(u)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(u)&&(S=R=null),this.importFiles(M,R,S,this.maxImageSize,+null,null,null,null,mxEvent.isControlDown(u),null,null,mxEvent.isShiftDown(u),u));else{mxEvent.isAltDown(u)&&(S=R=0);var V=0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):null;D=this.extractGraphModelFromEvent(u,null!=this.pages);if(null!=D)g.setSelectionCells(this.importXml(D,R,S,!0));else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/html")){var X=u.dataTransfer.getData("text/html");D=document.createElement("div");D.innerHTML=Graph.sanitizeHtml(X);+var W=null;M=D.getElementsByTagName("img");null!=M&&1==M.length?(X=M[0].getAttribute("src"),null==X&&(X=M[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(W=!0)):(M=D.getElementsByTagName("a"),null!=M&&1==M.length?X=M[0].getAttribute("href"):(D=D.getElementsByTagName("pre"),null!=D&&1==D.length&&(X=mxUtils.getTextContent(D[0]))));var Y=!0,Z=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(X,R,S,!0,W,null,Y,mxEvent.isControlDown(u)))});W&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(aa){Y=aa;Z()},mxEvent.isControlDown(u)):Z()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(aa){var ha=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ea=this.maxImageSize;ea=Math.min(1,Math.min(ea/Math.max(1,ha)),ea/Math.max(1,aa));g.setSelectionCell(g.insertVertex(null,null,"",R,S,ha*ea,aa*ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(aa){g.setSelectionCells(this.insertTextAt(V,R,S,!0))})):0<=mxUtils.indexOf(u.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(u.dataTransfer.getData("text/plain"),R,S,!0))}}u.stopPropagation();u.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();-this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var u=parseInt(this.div.offsetLeft),E=parseInt(this.div.offsetWidth),-M=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),R=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(u,M-E))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,R-O))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(N=+this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var u=parseInt(this.div.offsetLeft),D=parseInt(this.div.offsetWidth),+M=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),R=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(u,M-D))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,R-O))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(N=Editor.currentTheme,"simple"==N||"sketch"==N)this.doSetCurrentTheme(N,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));N=!1;if(null!=urlParams.dark)N=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)N="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||N&&"auto"!=mxSettings.settings.darkMode||(N=mxSettings.settings.darkMode);"auto"==N&&this.isAutoDarkModeSupported()&&(N=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof N?"1"==N:N);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(u){this.isAutoDarkMode()&&this.setDarkMode(u.matches)}))}catch(u){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",-mxUtils.bind(this,function(u,E){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var t=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,+mxUtils.bind(this,function(u,D){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var t=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=d}t.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var z=null,B=null,I=null,G=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);z=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();@@ -13146,14 +13151,14 @@ function(d,g){this.readTypeFromClipboardData(d,"image/svg+xml",mxUtils.bind(thisfunction(d){var g=null;if(null!=d&&0<d.length){var l="<meta "==d.substring(0,6);g=document.createElement("div");g.innerHTML=(l?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(d);asHtml=!0;l=g.getElementsByTagName("style");if(null!=l)for(;0<l.length;)l[0].parentNode.removeChild(l[0]);if(null!=g.firstChild&&g.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(l=g.getElementsByTagName("img"),1==l.length&&(n=l[0].getAttribute("src"),l=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(l=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(l=x)}catch(z){}}null!=l&&(mxUtils.setTextContent(g,l),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[d],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(d,g,l){var n=-330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,d,g,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,g){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),z=null!=x?x+1:1,B=mxUtils.bind(this,function(J,K,m,u){var E=J.useCssTransforms,M=J.currentTranslate,L=J.currentScale,O=J.view.translate,+330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,d,g,l)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,g){var l=this.editor,n=l.graph,x=this.getPageIndex(this.currentPage),z=null!=x?x+1:1,B=mxUtils.bind(this,function(J,K,m,u){var D=J.useCssTransforms,M=J.currentTranslate,L=J.currentScale,O=J.view.translate,R=J.view.scale;J.useCssTransforms&&(J.useCssTransforms=!1,J.currentTranslate=new mxPoint(0,0),J.currentScale=1,J.view.translate=new mxPoint(0,0),J.view.scale=1);var S=J.getGraphBounds(),V=0,X=0,W=mxRectangle.fromRectangle(J.pageFormat),Y=g.fit||g.crop||!J.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*J.pageScale);W.height=Math.ceil(W.height*J.pageScale);var aa=1;if(g.fit){aa=g.sheetsAcross;var ha=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));aa=Math.min(W.height*ha/(S.height/J.view.scale),W.width*aa/(S.width/J.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&J.pageVisible?(Z=J.getPageLayout(),V-=Z.x*W.width,X-=Z.y*W.height):Y=!0;g.crop&&(g.selection&&(S=n.getBoundingBox(n.getSelectionCells())),W.width=(S.width+1)*aa/J.view.scale,W.height=(S.height+1)*aa/J.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);u=null!=u?"page/id,"+u:null;if(null==K){K=PrintDialog.createPrintPreview(J,aa,null,0,V,X,Y);K.title=this.getBaseFilename(!0);K.pageSelector=!1;K.mathEnabled=!1;V=g.border;isNaN(V)||(K.pageMargin=V);g.selection&&(K.isCellVisible=function(ma){return J.isCellSelected(ma)});var ea=K.writeHead;K.writeHead=function(ma,ba){ba=null!=ba?ba:"";g.shadows||(ba+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ba+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=l.fontCss&&(ba+=l.fontCss);ea.apply(this,arguments);for(var ja=J.getCustomFonts(),la=0;la<ja.length;la++){var da=ja[la].name,va=ja[la].url;Graph.isCssFontUrl(va)?ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(va))+'" charset="UTF-8" type="text/css">'):(ma.writeln('<style type="text/css">'),ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(da)+'";\nsrc: url("'+mxUtils.htmlEntities(va)+'");\n}'),ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=K.drawBackgroundImage;K.drawBackgroundImage=function(ma){ca.apply(this,arguments);null!=ma.node&&(EditorUi.embedSvgImages(ma.node),n.disableSvgLinks(ma.node,function(ba){ba.setAttribute("href","javascript:void(0)")}))}}var fa=K.addGraphFragment;K.addGraphFragment=function(ma,ba,ja,la,da,va){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var ra=da.getElementsByTagName("svg"),wa=0;wa<ra.length;wa++)J.addSvgShadow(ra[wa])};g.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.open(null,null,m,!0,u,W,g.selection?J.getSelectionCells():null)}else{S=J.background;if(null==S||""==S||S==mxConstants.NONE)S="#ffffff";K.backgroundColor=S;K.autoOrigin=Y;g.grid&&(K.gridSize=J.gridSize,K.gridSteps=J.view.gridSteps,K.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:J.view.gridColor);K.appendGraph(J,aa,V,X,m,!0,u,W,g.selection?J.getSelectionCells():null);m=J.getCustomFonts();if(null!=K.wnd)for(W=0;W<m.length;W++)V=m[W].name,X=m[W].url,Graph.isCssFontUrl(X)?-K.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(K.wnd.document.writeln('<style type="text/css">'),K.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),K.wnd.document.writeln("</style>"))}E&&(J.useCssTransforms=E,J.currentTranslate=M,J.currentScale=L,J.view.translate=O,J.view.scale=R);return K}),I=g.pagesFrom,G=g.pagesTo,C=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,+K.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):(K.wnd.document.writeln('<style type="text/css">'),K.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),K.wnd.document.writeln("</style>"))}D&&(J.useCssTransforms=D,J.currentTranslate=M,J.currentScale=L,J.view.translate=O,J.view.scale=R);return K}),I=g.pagesFrom,G=g.pagesTo,C=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{C&&(C=g.selection||I==z&&G==z);if(!C&&null!=this.pages&&this.pages.length){C=0;z=this.pages.length-1;g.allPages||(C=parseInt(I)-1,z=parseInt(G)-1);for(var Q=C;Q<=z;Q++){var U=this.pages[Q];I=U==this.currentPage?n:null;if(null==I){I=this.createTemporaryGraph(n.stylesheet);I.shapeForegroundColor=n.shapeForegroundColor;I.shapeBackgroundColor=n.shapeBackgroundColor;G=!0;var T=C=!1,P=null,v=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(G=U.viewState.pageVisible,C=U.viewState.mathEnabled,T=U.viewState.shadowVisible,P=U.viewState.background,v=U.viewState.backgroundImage,I.pageFormat=U.viewState.pageFormat,I.gridSize=U.viewState.gridSize);null!=v&&null!=v.originalSrc&&(v=this.createImageForPageLink(v.originalSrc,U));I.background=P;I.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height,v.x,v.y):null;I.pageVisible=G;I.mathEnabled=C;I.shadowVisible=T;var A=I.getGraphBounds;I.getGraphBounds=function(){var J=A.apply(this,arguments),K=this.backgroundImage;if(null!=K&&null!=K.width&&null!=K.height){var m=this.view.translate,u=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((m.x+K.x)*u,(m.y+K.y)*u,K.width*u,K.height*u))}return J};var N=I.getGlobalVariable;I.getGlobalVariable=function(J){return"page"==J?U.getName():"pagenumber"==J?Q+1:"pagecount"==J?null!=this.pages?this.pages.length:1:N.apply(this,arguments)};document.body.appendChild(I.container);this.updatePageRoot(U);I.model.setRoot(U.root)}x=B(I,x,Q!=z,U.getId());I!=n&&I.container.parentNode.removeChild(I.container)}}else x=@@ -13189,8 +13194,8 @@ mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({eve!1:null!=C.callback,mxUtils.bind(this,function(ba,ja,la,da){ba=ba||this.emptyDiagramXml;null!=C.callback?B.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ja,tempUrl:la,libs:da,builtIn:!0,message:C}),"*"):(d(ba,G,ba!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):null,N?mxUtils.bind(this,function(ba,ja){this.remoteInvoke("searchDiagrams",[ba,null],null,ja,function(){ja(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ja,la){B.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ja,name:la}),"*")}),null,null,J?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==C.withoutType,null,C.templatesOnly);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&this.sidebar.hideTooltip();ba&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==C.action){var K=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:K,message:C}),"*");return}if("status"==C.action){this.updateStatus(mxUtils.bind(this,function(){null!=C.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(C.messageKey))):null!=C.message&&this.editor.setStatus(mxUtils.htmlEntities(C.message))}));null!=C.modified&&(this.editor.modified=-C.modified);return}if("spinner"==C.action){var m=null!=C.messageKey?mxResources.get(C.messageKey):C.message;null==C.show||C.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("exit"==C.action){this.actions.get("exit").funct();return}if("viewport"==C.action){if(null!=C.viewport){var u=this.editor.graph,E=u.view.translate.x,M=u.view.translate.y;this.embedViewport=C.viewport;u.refresh();this.diagramContainer.scrollTop-=(M-u.view.translate.y)*u.view.scale;this.diagramContainer.scrollLeft-=-(E-u.view.translate.x)*u.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){P=null;try{var L=this.diagramContainer.getAttribute("data-scrollState");null!=L&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(L))}catch(ba){}Editor.inlineFullscreen=C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==+C.modified);return}if("spinner"==C.action){var m=null!=C.messageKey?mxResources.get(C.messageKey):C.message;null==C.show||C.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("exit"==C.action){this.actions.get("exit").funct();return}if("viewport"==C.action){if(null!=C.viewport){var u=this.editor.graph,D=u.view.translate.x,M=u.view.translate.y;this.embedViewport=C.viewport;u.refresh();this.diagramContainer.scrollTop-=(M-u.view.translate.y)*u.view.scale;this.diagramContainer.scrollLeft-=+(D-u.view.translate.x)*u.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){P=null;try{var L=this.diagramContainer.getAttribute("data-scrollState");null!=L&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(L))}catch(ba){}Editor.inlineFullscreen=C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var O=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);u=this.editor.graph;var R=mxUtils.bind(this,function(ba,ja){if(C.withSvg)C.withSvg=!1,this.getEmbeddedSvg(O,this.editor.graph,null,!0,function(da){R(ba,da)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var la=this.createLoadMessage("export");la.format=C.format;la.message=C;la.data=ba;la.svg=ja;la.xml=O;B.postMessage(JSON.stringify(la),"*")}}),S=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==C.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(O)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);R(ba)}),V=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());for(var ja,la=0;la<this.pages.length;la++)if(this.pages[la].getId()==V){ja=this.updatePageRoot(this.pages[la]);break}null==ja&&(ja=this.currentPage);u.getGlobalVariable=function(wa){return"page"==wa?ja.getName():"pagenumber"==wa?1:ba.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(ja.root)}if(null!=C.layerIds){var da=@@ -13221,20 +13226,20 @@ function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new Textn.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=z}catch(B){this.handleError(B)}}));x.setAttribute("title","copy");x.className="geBtn";l.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():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",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var l=d.split("\n"),n=[],x=[],z=[],B={};if(0<l.length){var I=-{},G=this.editor.graph,C=null,Q=null,U=null,T=null,P=null,v=null,A=null,N="whiteSpace=wrap;html=1;",J=null,K=null,m="",u="auto",E="auto",M=!1,L=null,O=null,R=40,S=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=g?g(Ma):(G.setSelectionCells(Ma),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var ha=null,ea="auto";K=null;for(var ca=[],fa=null,ma=null,+{},G=this.editor.graph,C=null,Q=null,U=null,T=null,P=null,v=null,A=null,N="whiteSpace=wrap;html=1;",J=null,K=null,m="",u="auto",D="auto",M=!1,L=null,O=null,R=40,S=40,V=100,X=0,W=mxUtils.bind(this,function(){null!=g?g(Ma):(G.setSelectionCells(Ma),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),Z=Y.x,aa=Y.y;Y=aa;var ha=null,ea="auto";K=null;for(var ca=[],fa=null,ma=null,ba=0;ba<l.length&&"#"==l[ba].charAt(0);){d=l[ba].replace(/\r$/,"");for(ba++;ba<l.length&&"\\"==d.charAt(d.length-1)&&"#"==l[ba].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(l[ba].substring(1)),ba++;if("#"!=d.charAt(1)){var ja=d.indexOf(":");if(0<ja){var la=mxUtils.trim(d.substring(1,ja)),da=mxUtils.trim(d.substring(ja+1));"label"==la?ha=Graph.sanitizeHtml(da):"labelname"==la&&0<da.length&&"-"!=da?P=da:"labels"==la&&0<da.length&&"-"!=da?A=JSON.parse(da):"style"==la?Q=da:"parentstyle"==la?N=-da:"unknownStyle"==la&&"-"!=da?v=da:"stylename"==la&&0<da.length&&"-"!=da?T=da:"styles"==la&&0<da.length&&"-"!=da?U=JSON.parse(da):"vars"==la&&0<da.length&&"-"!=da?C=JSON.parse(da):"identity"==la&&0<da.length&&"-"!=da?J=da:"parent"==la&&0<da.length&&"-"!=da?K=da:"namespace"==la&&0<da.length&&"-"!=da?m=da:"width"==la?u=da:"height"==la?E=da:"collapsed"==la&&"-"!=da?M="true"==da:"left"==la&&0<da.length?L=da:"top"==la&&0<da.length?O=da:"ignore"==la?ma=da.split(","):"connect"==la?ca.push(JSON.parse(da)):+da:"unknownStyle"==la&&"-"!=da?v=da:"stylename"==la&&0<da.length&&"-"!=da?T=da:"styles"==la&&0<da.length&&"-"!=da?U=JSON.parse(da):"vars"==la&&0<da.length&&"-"!=da?C=JSON.parse(da):"identity"==la&&0<da.length&&"-"!=da?J=da:"parent"==la&&0<da.length&&"-"!=da?K=da:"namespace"==la&&0<da.length&&"-"!=da?m=da:"width"==la?u=da:"height"==la?D=da:"collapsed"==la&&"-"!=da?M="true"==da:"left"==la&&0<da.length?L=da:"top"==la&&0<da.length?O=da:"ignore"==la?ma=da.split(","):"connect"==la?ca.push(JSON.parse(da)):"link"==la?fa=da:"padding"==la?X=parseFloat(da):"edgespacing"==la?R=parseFloat(da):"nodespacing"==la?S=parseFloat(da):"levelspacing"==la?V=parseFloat(da):"layout"==la&&(ea=da)}}}if(null==l[ba])throw Error(mxResources.get("invalidOrMissingFile"));var va=this.editor.csvToArray(l[ba].replace(/\r$/,""));ja=d=null;la=[];for(da=0;da<va.length;da++)J==va[da]&&(d=da),K==va[da]&&(ja=da),la.push(mxUtils.trim(va[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ha&&(ha="%"+la[0]+"%");if(null!=ca)for(var ra=0;ra<ca.length;ra++)null==I[ca[ra].to]&&(I[ca[ra].to]={});J=[];for(da=ba+1;da<l.length;da++){var wa=this.editor.csvToArray(l[da].replace(/\r$/,""));if(null==wa){var oa=40<l[da].length?l[da].substring(0,40)+"...":l[da];throw Error(oa+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<wa.length&&J.push(wa)}G.model.beginUpdate();try{for(da=0;da<J.length;da++){wa=J[da];var ia=null,na=null!=d?m+wa[d]:null;l=!1;null!=na&&(ia=G.model.getCell(na),l=null==ia||0<=mxUtils.indexOf(n,ia));var ua=new mxCell(ha,new mxGeometry(Z,Y,0,0),Q||"whiteSpace=wrap;html=1;");ua.collapsed=M;ua.vertex=!0;ua.id=na;null==ia||l||G.model.setCollapsed(ia,M);for(var qa=0;qa<wa.length;qa++)G.setAttributeForCell(ua,la[qa],wa[qa]),null==ia||l||G.setAttributeForCell(ia,la[qa],wa[qa]);if(null!=P&&null!=A){var Aa=A[ua.getAttribute(P)];null!=Aa&&(G.labelChanged(ua,Aa),null==ia||l||G.cellLabelChanged(ia,Aa))}if(null!=T&&null!=U){var Ca=U[ua.getAttribute(T)];null!=Ca&&(ua.style=Ca)}G.setAttributeForCell(ua,"placeholders","1");ua.style=G.replacePlaceholders(ua,ua.style,C);null==ia||l?G.fireEvent(new mxEventObject("cellsInserted","cells",[ua])):(G.model.setStyle(ia,ua.style),0>mxUtils.indexOf(z,ia)&&z.push(ia),G.fireEvent(new mxEventObject("cellsInserted","cells",[ia])));l=null!=ia;ia=ua;if(!l)for(ra=0;ra<ca.length;ra++)I[ca[ra].to][ia.getAttribute(ca[ra].to)]=ia;null!=fa&&"link"!=fa&&(G.setLinkForCell(ia,ia.getAttribute(fa)),G.setAttributeForCell(ia,fa,null));var Da=this.editor.graph.getPreferredSizeForCell(ia);-K=null!=ja?G.model.getCell(m+wa[ja]):null;if(ia.vertex){oa=null!=K?0:Z;ba=null!=K?0:aa;null!=L&&null!=ia.getAttribute(L)&&(ia.geometry.x=oa+parseFloat(ia.getAttribute(L)));null!=O&&null!=ia.getAttribute(O)&&(ia.geometry.y=ba+parseFloat(ia.getAttribute(O)));var za="@"==u.charAt(0)?ia.getAttribute(u.substring(1)):null;ia.geometry.width=null!=za&&"auto"!=za?parseFloat(ia.getAttribute(u.substring(1))):"auto"==u||"auto"==za?Da.width+X:parseFloat(u);var Ba="@"==E.charAt(0)?ia.getAttribute(E.substring(1)):-null;ia.geometry.height=null!=Ba&&"auto"!=Ba&&"width"!=E?parseFloat(Ba):"auto"==E||"auto"==Ba?Da.height+X:"width"==E?ia.geometry.width:parseFloat(E);Y+=ia.geometry.height+S}l?(null==B[na]&&(B[na]=[]),B[na].push(ia)):(n.push(ia),null!=K?(K.style=G.replacePlaceholders(K,N,C),G.addCell(ia,K),x.push(K)):z.push(G.addCell(ia)))}for(da=0;da<x.length;da++)za="@"==u.charAt(0)?x[da].getAttribute(u.substring(1)):null,Ba="@"==E.charAt(0)?x[da].getAttribute(E.substring(1)):null,"auto"!=u&&"auto"!=za||"auto"!=-E&&"auto"!=Ba||G.updateGroupBounds([x[da]],X,!0);var Ka=z.slice(),Ma=z.slice();for(ra=0;ra<ca.length;ra++){var Ea=ca[ra];for(da=0;da<n.length;da++){ia=n[da];var Ia=mxUtils.bind(this,function(Ta,Wa,ka){var xa=Wa.getAttribute(ka.from);if(null!=xa&&""!=xa){xa=xa.split(",");for(var ta=0;ta<xa.length;ta++){var pa=I[ka.to][xa[ta]];if(null==pa&&null!=v){pa=new mxCell(xa[ta],new mxGeometry(Z,aa,0,0),v);pa.style=G.replacePlaceholders(Wa,pa.style,C);var sa=this.editor.graph.getPreferredSizeForCell(pa);pa.geometry.width=+K=null!=ja?G.model.getCell(m+wa[ja]):null;if(ia.vertex){oa=null!=K?0:Z;ba=null!=K?0:aa;null!=L&&null!=ia.getAttribute(L)&&(ia.geometry.x=oa+parseFloat(ia.getAttribute(L)));null!=O&&null!=ia.getAttribute(O)&&(ia.geometry.y=ba+parseFloat(ia.getAttribute(O)));var za="@"==u.charAt(0)?ia.getAttribute(u.substring(1)):null;ia.geometry.width=null!=za&&"auto"!=za?parseFloat(ia.getAttribute(u.substring(1))):"auto"==u||"auto"==za?Da.width+X:parseFloat(u);var Ba="@"==D.charAt(0)?ia.getAttribute(D.substring(1)):+null;ia.geometry.height=null!=Ba&&"auto"!=Ba&&"width"!=D?parseFloat(Ba):"auto"==D||"auto"==Ba?Da.height+X:"width"==D?ia.geometry.width:parseFloat(D);Y+=ia.geometry.height+S}l?(null==B[na]&&(B[na]=[]),B[na].push(ia)):(n.push(ia),null!=K?(K.style=G.replacePlaceholders(K,N,C),G.addCell(ia,K),x.push(K)):z.push(G.addCell(ia)))}for(da=0;da<x.length;da++)za="@"==u.charAt(0)?x[da].getAttribute(u.substring(1)):null,Ba="@"==D.charAt(0)?x[da].getAttribute(D.substring(1)):null,"auto"!=u&&"auto"!=za||"auto"!=+D&&"auto"!=Ba||G.updateGroupBounds([x[da]],X,!0);var Ka=z.slice(),Ma=z.slice();for(ra=0;ra<ca.length;ra++){var Ea=ca[ra];for(da=0;da<n.length;da++){ia=n[da];var Ia=mxUtils.bind(this,function(Ta,Wa,ka){var xa=Wa.getAttribute(ka.from);if(null!=xa&&""!=xa){xa=xa.split(",");for(var ta=0;ta<xa.length;ta++){var pa=I[ka.to][xa[ta]];if(null==pa&&null!=v){pa=new mxCell(xa[ta],new mxGeometry(Z,aa,0,0),v);pa.style=G.replacePlaceholders(Wa,pa.style,C);var sa=this.editor.graph.getPreferredSizeForCell(pa);pa.geometry.width=sa.width+X;pa.geometry.height=sa.height+X;I[ka.to][xa[ta]]=pa;pa.vertex=!0;pa.id=xa[ta];z.push(G.addCell(pa))}if(null!=pa){sa=ka.label;null!=ka.fromlabel&&(sa=(Wa.getAttribute(ka.fromlabel)||"")+(sa||""));null!=ka.sourcelabel&&(sa=G.replacePlaceholders(Wa,ka.sourcelabel,C)+(sa||""));null!=ka.tolabel&&(sa=(sa||"")+(pa.getAttribute(ka.tolabel)||""));null!=ka.targetlabel&&(sa=(sa||"")+G.replacePlaceholders(pa,ka.targetlabel,C));var ya="target"==ka.placeholders==!ka.invert?pa:Ta;ya=null!=ka.style?G.replacePlaceholders(ya,ka.style,C):G.createCurrentEdgeStyle();sa=G.insertEdge(null,null,sa||"",ka.invert?pa:Ta,ka.invert?Ta:pa,ya);if(null!=ka.labels)for(ya=0;ya<ka.labels.length;ya++){var Ga=ka.labels[ya],Ja=new mxCell(Ga.label||ya,new mxGeometry(null!=Ga.x?Ga.x:0,null!=Ga.y?Ga.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Ga.placeholders&&(Ja.value=G.replacePlaceholders("target"==Ga.placeholders==!ka.invert?pa:Ta,Ja.value,C));if(null!=Ga.dx||null!=Ga.dy)Ja.geometry.offset=new mxPoint(null!=Ga.dx?Ga.dx:0,null!=Ga.dy?Ga.dy:0);sa.insert(Ja)}if(null!=ka.data)for(var Na in ka.data)G.setAttributeForCell(sa,Na,ka.data[Na]);Ma.push(sa);mxUtils.remove(ka.invert?Ta:pa,Ka)}}}});Ia(ia,ia,Ea);if(null!=B[ia.id])for(qa=0;qa<B[ia.id].length;qa++)Ia(ia,B[ia.id][qa],Ea)}}if(null!=ma)for(da=0;da<n.length;da++)for(ia=n[da],qa=0;qa<ma.length;qa++)G.setAttributeForCell(ia,mxUtils.trim(ma[qa]),null);if(0<z.length){var Qa=new mxParallelEdgeLayout(G);Qa.spacing=R;Qa.checkOverlap=!0;var La=-function(){0<Qa.spacing&&Qa.execute(G.getDefaultParent());for(var Ta=0;Ta<z.length;Ta++){var Wa=G.getCellGeometry(z[Ta]);Wa.x=Math.round(G.snap(Wa.x));Wa.y=Math.round(G.snap(Wa.y));"auto"==u&&(Wa.width=Math.round(G.snap(Wa.width)));"auto"==E&&(Wa.height=Math.round(G.snap(Wa.height)))}};if("["==ea.charAt(0)){var Ha=W;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(ea)),function(){La();Ha()});W=null}else if("circle"==ea){var Sa=new mxCircleLayout(G);Sa.disableEdgeStyle=!1;Sa.resetEdges=+function(){0<Qa.spacing&&Qa.execute(G.getDefaultParent());for(var Ta=0;Ta<z.length;Ta++){var Wa=G.getCellGeometry(z[Ta]);Wa.x=Math.round(G.snap(Wa.x));Wa.y=Math.round(G.snap(Wa.y));"auto"==u&&(Wa.width=Math.round(G.snap(Wa.width)));"auto"==D&&(Wa.height=Math.round(G.snap(Wa.height)))}};if("["==ea.charAt(0)){var Ha=W;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(ea)),function(){La();Ha()});W=null}else if("circle"==ea){var Sa=new mxCircleLayout(G);Sa.disableEdgeStyle=!1;Sa.resetEdges=!1;var $a=Sa.isVertexIgnored;Sa.isVertexIgnored=function(Ta){return $a.apply(this,arguments)||0>mxUtils.indexOf(z,Ta)};this.executeLayout(function(){Sa.execute(G.getDefaultParent());La()},!0,W);W=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&Ma.length==2*z.length-1&&1==Ka.length){G.view.validate();var db=new mxCompactTreeLayout(G,"horizontaltree"==ea);db.levelDistance=S;db.edgeRouting=!1;db.resetEdges=!1;db.sortEdges=!0;this.executeLayout(function(){db.execute(G.getDefaultParent(),0<Ka.length?Ka[0]:null)},!0,W);W=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==Ka.length){G.view.validate();var fb=new mxHierarchicalLayout(G,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=S;fb.parallelEdgeSpacing=R;fb.interRankCellSpacing=V;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(G.getDefaultParent(),Ma);G.moveCells(Ma,Z,aa)},!0,W);W=null}else if("orgchart"==ea){G.view.validate();var Ya=new mxOrgChartLayout(G,2,V,S),eb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(Ta){return eb.apply(this,arguments)||0>mxUtils.indexOf(z,Ta)};this.executeLayout(function(){Ya.execute(G.getDefaultParent());La()},!0,W);W=null}else if("organic"==ea||"auto"==ea&&Ma.length>z.length){G.view.validate();var Xa=new mxFastOrganicLayout(G);Xa.forceConstant=3*S;Xa.disableEdgeStyle=!1;Xa.resetEdges=!1;var jb=Xa.isVertexIgnored;Xa.isVertexIgnored=function(Ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(z,Ta)};this.executeLayout(function(){Xa.execute(G.getDefaultParent());@@ -13249,7 +13254,7 @@ x);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosavethis.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<l.cells.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(d.isEnabled()?-"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,l,n,+"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,l,n,x,z,B,I){var G=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(G.getSvg(n,x,z)),"image/svg+xml");else{var C=d.getFileData(!0,null,null,null,null,!0),Q=G.getGraphBounds(),U=Math.floor(Q.width*x/G.view.scale),T=Math.floor(Q.height*x/G.view.scale);if(C.length<=MAX_REQUEST_SIZE&&U*T<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.editor.isExportToCanvas()){var P={globalVars:G.getExportVariables()};I&&(P.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});d.saveRequest(g,l,function(v,A){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(A||"0")+(null!=v?"&filename="+encodeURIComponent(v):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<B?"&dpi="+B:"")+"&bg="+(null!=n?n:"none")+"&w="+U+"&h="+T+"&border="+z+"&xml="+encodeURIComponent(C))})}else"png"==l?d.exportImage(x,null==n||"none"==n,!0,!1,!1,z,!0,!1,null,I,B):d.exportImage(x,!1,!0,!1,!1,z,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=d;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));g+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();@@ -13279,49 +13284,49 @@ return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(return this.editor.convertImages(d,g,l,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,l,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,l,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,l,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var l=localStorage.key(g),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var x="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&d.push(l)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,f,k,c,p,q){function t(){for(var A=I.getElementsByTagName("div"),N=0,J=0;J<A.length;J++)"none"!=A[J].style.display&&A[J].parentNode==I&&N++;G.style.display=0==N?"block":"none"}function y(A,N,J,K){function m(){N.removeChild(M);N.removeChild(L);E.style.display="block";u.style.display="block"}x={div:N,comment:A,saveCallback:J,deleteOnCancel:K};var u=N.querySelector(".geCommentTxt"),E=N.querySelector(".geCommentActionsList"),M=document.createElement("textarea");M.className=+var CommentsWindow=function(b,f,k,c,p,q){function t(){for(var A=I.getElementsByTagName("div"),N=0,J=0;J<A.length;J++)"none"!=A[J].style.display&&A[J].parentNode==I&&N++;G.style.display=0==N?"block":"none"}function y(A,N,J,K){function m(){N.removeChild(M);N.removeChild(L);D.style.display="block";u.style.display="block"}x={div:N,comment:A,saveCallback:J,deleteOnCancel:K};var u=N.querySelector(".geCommentTxt"),D=N.querySelector(".geCommentActionsList"),M=document.createElement("textarea");M.className="geCommentEditTxtArea";M.style.minHeight=u.offsetHeight+"px";M.value=A.content;N.insertBefore(M,u);var L=document.createElement("div");L.className="geCommentEditBtns";var O=mxUtils.button(mxResources.get("cancel"),function(){K?(N.parentNode.removeChild(N),t()):m();x=null});O.className="geCommentEditBtn";L.appendChild(O);var R=mxUtils.button(mxResources.get("save"),function(){u.innerText="";A.content=M.value;mxUtils.write(u,A.content);m();J(A);x=null});mxEvent.addListener(M,"keydown",mxUtils.bind(this,-function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(R.click(),mxEvent.consume(S)):27==S.keyCode&&(O.click(),mxEvent.consume(S)))}));R.focus();R.className="geCommentEditBtn gePrimaryBtn";L.appendChild(R);N.insertBefore(L,u);E.style.display="none";u.style.display="none";M.focus()}function H(A,N){N.innerText="";A=new Date(A.modifiedDate);var J=b.timeSince(A);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(N,mxResources.get("timeAgo",-[J],"{1} ago"));N.setAttribute("title",A.toLocaleDateString()+" "+A.toLocaleTimeString())}function F(A){var N=document.createElement("img");N.className="geCommentBusyImg";N.src=IMAGE_PATH+"/spin.gif";A.appendChild(N);A.busyImg=N}function D(A){A.style.border="1px solid red";A.busyImg.parentNode==A&&A.removeChild(A.busyImg)}function d(A){A.style.border="";A.busyImg.parentNode==A&&A.removeChild(A.busyImg)}function g(A,N,J,K,m){function u(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";-var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(ha){W(ha,A);ha.preventDefault();mxEvent.consume(ha)});V.appendChild(Z);Y&&(Z.style.display="none")}function E(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=L;X(A);return{pdiv:Y,replies:W}}function M(X,W,Y,Z,aa){function ha(){F(ma);A.addReply(fa,function(ba){fa.id=ba;A.replies.push(fa);-d(ma);Y&&Y()},function(ba){ea();D(ma);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){y(fa,ma,function(ba){ha()},!0)}var ca=E().pdiv,fa=b.newComment(X,b.getCurrentUser());fa.pCommentId=A.id;null==A.replies&&(A.replies=[]);var ma=g(fa,A.replies,ca,K+1);W?ea():ha()}if(m||!A.isResolved){G.style.display="none";var L=document.createElement("div");L.className="geCommentContainer";L.setAttribute("data-commentId",A.id);L.style.marginLeft=20*K++function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(R.click(),mxEvent.consume(S)):27==S.keyCode&&(O.click(),mxEvent.consume(S)))}));R.focus();R.className="geCommentEditBtn gePrimaryBtn";L.appendChild(R);N.insertBefore(L,u);D.style.display="none";u.style.display="none";M.focus()}function H(A,N){N.innerText="";A=new Date(A.modifiedDate);var J=b.timeSince(A);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(N,mxResources.get("timeAgo",+[J],"{1} ago"));N.setAttribute("title",A.toLocaleDateString()+" "+A.toLocaleTimeString())}function F(A){var N=document.createElement("img");N.className="geCommentBusyImg";N.src=IMAGE_PATH+"/spin.gif";A.appendChild(N);A.busyImg=N}function E(A){A.style.border="1px solid red";A.busyImg.parentNode==A&&A.removeChild(A.busyImg)}function d(A){A.style.border="";A.busyImg.parentNode==A&&A.removeChild(A.busyImg)}function g(A,N,J,K,m){function u(X,W,Y){var Z=document.createElement("li");Z.className="geCommentAction";+var aa=document.createElement("a");aa.className="geCommentActionLnk";mxUtils.write(aa,X);Z.appendChild(aa);mxEvent.addListener(aa,"click",function(ha){W(ha,A);ha.preventDefault();mxEvent.consume(ha)});V.appendChild(Z);Y&&(Z.style.display="none")}function D(){function X(Z){W.push(Y);if(null!=Z.replies)for(var aa=0;aa<Z.replies.length;aa++)Y=Y.nextSibling,X(Z.replies[aa])}var W=[],Y=L;X(A);return{pdiv:Y,replies:W}}function M(X,W,Y,Z,aa){function ha(){F(ma);A.addReply(fa,function(ba){fa.id=ba;A.replies.push(fa);+d(ma);Y&&Y()},function(ba){ea();E(ma);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,aa)}function ea(){y(fa,ma,function(ba){ha()},!0)}var ca=D().pdiv,fa=b.newComment(X,b.getCurrentUser());fa.pCommentId=A.id;null==A.replies&&(A.replies=[]);var ma=g(fa,A.replies,ca,K+1);W?ea():ha()}if(m||!A.isResolved){G.style.display="none";var L=document.createElement("div");L.className="geCommentContainer";L.setAttribute("data-commentId",A.id);L.style.marginLeft=20*K+5+"px";A.isResolved&&(z.style.opacity="0.7");var O=document.createElement("div");O.className="geCommentHeader";var R=document.createElement("img");R.className="geCommentUserImg";R.src=null!=A.user&&null!=A.user.pictureUrl?A.user.pictureUrl:Editor.userImage;O.appendChild(R);R=document.createElement("div");R.className="geCommentHeaderTxt";O.appendChild(R);var S=document.createElement("div");S.className="geCommentUsername";mxUtils.write(S,null!=A.user?A.user.displayName:mxResources.get("unknownUser"));R.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",A.id);H(A,S);R.appendChild(S);L.appendChild(O);O=document.createElement("div");O.className="geCommentTxt";mxUtils.write(O,A.content||"");L.appendChild(O);A.isLocked&&(L.style.opacity="0.5");O=document.createElement("div");O.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";O.appendChild(V);l||A.isLocked||0!=K&&!n||u(mxResources.get("reply"),-function(){M("",!0)},A.isResolved);R=b.getCurrentUser();null==R||null==A.user||R.id!=A.user.id||l||A.isLocked||(u(mxResources.get("edit"),function(){function X(){y(A,L,function(){F(L);A.editComment(A.content,function(){d(L)},function(W){D(L);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},A.isResolved),u(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(L);A.deleteComment(function(X){if(!0===X){X=L.querySelector(".geCommentTxt");-X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=L.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);d(L);L.style.opacity="0.5"}else{W=E(A).replies;for(X=0;X<W.length;X++)I.removeChild(W[X]);for(X=0;X<N.length;X++)if(N[X]==A){N.splice(X,1);break}G.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(X){D(L);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},A.isResolved));-l||A.isLocked||0!=K||u(A.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";A.isResolved=!A.isResolved;mxUtils.write(Y,A.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=A.isResolved?"none":"",aa=E(A).replies,ha="light-dark("+(A.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=ha;for(var ca=aa[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=+function(){M("",!0)},A.isResolved);R=b.getCurrentUser();null==R||null==A.user||R.id!=A.user.id||l||A.isLocked||(u(mxResources.get("edit"),function(){function X(){y(A,L,function(){F(L);A.editComment(A.content,function(){d(L)},function(W){E(L);X();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},A.isResolved),u(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(L);A.deleteComment(function(X){if(!0===X){X=L.querySelector(".geCommentTxt");+X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var W=L.querySelectorAll(".geCommentAction");for(X=0;X<W.length;X++)W[X].parentNode.removeChild(W[X]);d(L);L.style.opacity="0.5"}else{W=D(A).replies;for(X=0;X<W.length;X++)I.removeChild(W[X]);for(X=0;X<N.length;X++)if(N[X]==A){N.splice(X,1);break}G.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(X){E(L);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},A.isResolved));+l||A.isLocked||0!=K||u(A.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function W(){var Y=X.target;Y.innerText="";A.isResolved=!A.isResolved;mxUtils.write(Y,A.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=A.isResolved?"none":"",aa=D(A).replies,ha="light-dark("+(A.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<aa.length;ea++){aa[ea].style.backgroundColor=ha;for(var ca=aa[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=Y.parentNode&&(ca[fa].style.display=Z);T||(aa[ea].style.display="none")}t()}A.isResolved?M(mxResources.get("reOpened")+": ",!0,W,!1,!0):M(mxResources.get("markedAsResolved"),!1,W,!0)});L.appendChild(O);null!=J?I.insertBefore(L,J.nextSibling):I.appendChild(L);for(J=0;null!=A.replies&&J<A.replies.length;J++)O=A.replies[J],O.isResolved=A.isResolved,g(O,A.replies,null,K+1,m);null!=x&&(x.comment.id==A.id?(m=A.content,A.content=x.comment.content,y(A,L,x.saveCallback,x.deleteOnCancel),A.content=m):null==x.comment.id&&x.comment.pCommentId==A.id&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return L}}var l=!b.canComment(),n=b.canReplyToReplies(),x=null,z=document.createElement("div");z.className="geCommentsWin";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(B)+7+"px";z.appendChild(I);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,-mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=B;C.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var Q=B.cloneNode();Q.style.backgroundImage="url("+Editor.plusImage+")";Q.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Q,"click",function(A){function N(){y(J,K,function(m){F(K);b.addComment(m,function(u){m.id=u;P.push(m);d(K)},function(u){D(K);+mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=B;C.style.padding="3px 4px 4px 4px";B=document.createElement("a");B.className="geButton";if(!l){var Q=B.cloneNode();Q.style.backgroundImage="url("+Editor.plusImage+")";Q.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Q,"click",function(A){function N(){y(J,K,function(m){F(K);b.addComment(m,function(u){m.id=u;P.push(m);d(K)},function(u){E(K);N();b.handleError(u,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),K=g(J,P,null,0);N();A.preventDefault();mxEvent.consume(A)});C.appendChild(Q)}var U=B.cloneNode();U.style.backgroundImage="url("+Editor.checkImage+")";U.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(U,"click",function(A){(T=!T)?U.classList.add("geActiveItem"):U.classList.remove("geActiveItem");v();A.preventDefault();mxEvent.consume(A)});C.appendChild(U);b.commentsRefreshNeeded()&&(Q=B.cloneNode(),Q.style.backgroundImage="url("+Editor.refreshImage+")",Q.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Q,"click",function(A){v();A.preventDefault();mxEvent.consume(A)}),C.appendChild(Q));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geButton geAdaptiveAsset",mxEvent.addListener(B,"click",function(A){q();A.preventDefault();mxEvent.consume(A)}),C.appendChild(B));z.appendChild(C);var P=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var A=x.div.querySelector(".geCommentEditTxtArea"),N=x.div.querySelector(".geCommentEditBtns");x.comment.content=A.value;A.parentNode.removeChild(A);N.parentNode.removeChild(N)}catch(J){b.handleError(J)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function K(m){if(null!=m){m.sort(function(E,M){return new Date(E.modifiedDate)-new Date(M.modifiedDate)});for(var u=0;u<m.length;u++)K(m[u].replies)}}J.sort(function(m,u){return new Date(m.modifiedDate)-new Date(u.modifiedDate)});I.innerText="";I.appendChild(G);G.style.display="block";P=J;for(J=0;J<P.length;J++)K(P[J].replies),g(P[J],P,null,0,T);null!=x&&null==x.comment.id&&-null==x.comment.pCommentId&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(J){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});v();this.refreshComments=v;C=mxUtils.bind(this,function(){function A(u){var E=J[u.id];if(null!=E)for(H(u,E),E=0;null!=u.replies&&E<u.replies.length;E++)A(u.replies[E])}if(this.window.isVisible()){for(var N=+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function K(m){if(null!=m){m.sort(function(D,M){return new Date(D.modifiedDate)-new Date(M.modifiedDate)});for(var u=0;u<m.length;u++)K(m[u].replies)}}J.sort(function(m,u){return new Date(m.modifiedDate)-new Date(u.modifiedDate)});I.innerText="";I.appendChild(G);G.style.display="block";P=J;for(J=0;J<P.length;J++)K(P[J].replies),g(P[J],P,null,0,T);null!=x&&null==x.comment.id&&+null==x.comment.pCommentId&&(I.appendChild(x.div),y(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(J){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});v();this.refreshComments=v;C=mxUtils.bind(this,function(){function A(u){var D=J[u.id];if(null!=D)for(H(u,D),D=0;null!=u.replies&&D<u.replies.length;D++)A(u.replies[D])}if(this.window.isVisible()){for(var N=I.querySelectorAll(".geCommentDate"),J={},K=0;K<N.length;K++){var m=N[K];J[m.getAttribute("data-commentId")]=m}for(K=0;K<P.length;K++)A(P[K])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),z,f,k,c,p,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,-function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,c,p,q,t,y,H,F,D){var d=document.createElement("div");d.style.textAlign="center";D=null!=D?D:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=D+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);d.appendChild(g);null!=F&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",F),g.appendChild(f),+function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,c,p,q,t,y,H,F,E){var d=document.createElement("div");d.style.textAlign="center";E=null!=E?E:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=E+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);d.appendChild(g);null!=F&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",F),g.appendChild(f),d.appendChild(g));F=document.createElement("div");F.style.textAlign="center";F.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(l.checked)});q.className="geBtn";null!=y&&(q.innerHTML=y+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&F.appendChild(q);var n=mxUtils.button(p||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(l.checked)});F.appendChild(n);null!=t?(n.innerHTML=t+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||F.appendChild(q);d.appendChild(F);H?(F.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom="0px",g.appendChild(l),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),g.appendChild(p),d.appendChild(g),mxEvent.addListener(p,"click",function(x){l.checked=!l.checked;mxEvent.consume(x)})):F.style.marginTop="12px";this.init=function(){n.focus()};this.container=d},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,c,p){if(null!=f)for(var q=0;q<f.length;q++)null!=f[q]&&(b=this.patchPages(b,f[q],k,c,p));return b};-EditorUi.prototype.patchPages=function(b,f,k,c,p){var q={},t=[],y={},H={},F={},D={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])q[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=f[EditorUi.DIFF_REMOVE])for(c=0;c<f[EditorUi.DIFF_REMOVE].length;c++)H[f[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)y[f[EditorUi.DIFF_INSERT][c].previous]=f[EditorUi.DIFF_INSERT][c];if(null!=f[EditorUi.DIFF_UPDATE])for(d in f[EditorUi.DIFF_UPDATE])c=-f[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(D[c.previous]=d);if(null!=b){var g="";for(c=0;c<b.length;c++){var l=b[c].getId();F[l]=b[c];null!=D[g]||H[l]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][l]&&null!=f[EditorUi.DIFF_UPDATE][l].previous||(D[g]=l);g=l}}var n={},x=mxUtils.bind(this,function(B){var I=null!=B?B.getId():"";if(null!=B&&!n[I]){n[I]=!0;t.push(B);var G=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][I]:null;null!=G&&(this.updatePageRoot(B),null!=G.name&&B.setName(G.name),-null!=G.view&&this.patchViewState(B,G.view),null!=G.cells&&this.patchPage(B,G.cells,q[B.getId()],p),!k||null==G.cells&&null==G.view||(B.needsUpdate=!0))}B=D[I];null!=B&&(delete D[I],x(F[B]));B=y[I];null!=B&&(delete y[I],z(B))}),z=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var I=F[B.getId()];null==I?x(B):(this.patchPage(I,this.diffPages([I],[B]),q[I.getId()],p),k&&(I.needsUpdate=!0))});x();for(d in D)x(F[D[d]]),delete D[d];for(d in y)z(y[d]),+EditorUi.prototype.patchPages=function(b,f,k,c,p){var q={},t=[],y={},H={},F={},E={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])q[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=f[EditorUi.DIFF_REMOVE])for(c=0;c<f[EditorUi.DIFF_REMOVE].length;c++)H[f[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)y[f[EditorUi.DIFF_INSERT][c].previous]=f[EditorUi.DIFF_INSERT][c];if(null!=f[EditorUi.DIFF_UPDATE])for(d in f[EditorUi.DIFF_UPDATE])c=+f[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(E[c.previous]=d);if(null!=b){var g="";for(c=0;c<b.length;c++){var l=b[c].getId();F[l]=b[c];null!=E[g]||H[l]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][l]&&null!=f[EditorUi.DIFF_UPDATE][l].previous||(E[g]=l);g=l}}var n={},x=mxUtils.bind(this,function(B){var I=null!=B?B.getId():"";if(null!=B&&!n[I]){n[I]=!0;t.push(B);var G=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][I]:null;null!=G&&(this.updatePageRoot(B),null!=G.name&&B.setName(G.name),+null!=G.view&&this.patchViewState(B,G.view),null!=G.cells&&this.patchPage(B,G.cells,q[B.getId()],p),!k||null==G.cells&&null==G.view||(B.needsUpdate=!0))}B=E[I];null!=B&&(delete E[I],x(F[B]));B=y[I];null!=B&&(delete y[I],z(B))}),z=mxUtils.bind(this,function(B){B=mxUtils.parseXml(B.data).documentElement;B=new DiagramPage(B);this.updatePageRoot(B);var I=F[B.getId()];null==I?x(B):(this.patchPage(I,this.diffPages([I],[B]),q[I.getId()],p),k&&(I.needsUpdate=!0))});x();for(d in E)x(F[E[d]]),delete E[d];for(d in y)z(y[d]),delete y[d];return t};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};-EditorUi.prototype.createParentLookup=function(b,f){function k(F){var D=c[F];null==D&&(D={inserted:[],moved:{}},c[F]=D);return D}var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++){var q=f[EditorUi.DIFF_INSERT][p],t=null!=q.parent?q.parent:"",y=null!=q.previous?q.previous:"";k(t).inserted[y]=q}if(null!=f[EditorUi.DIFF_UPDATE])for(var H in f[EditorUi.DIFF_UPDATE])q=f[EditorUi.DIFF_UPDATE][H],null!=q.previous&&(t=q.parent,null==t&&(p=b.getCell(H),null!=p&&(p=+EditorUi.prototype.createParentLookup=function(b,f){function k(F){var E=c[F];null==E&&(E={inserted:[],moved:{}},c[F]=E);return E}var c={};if(null!=f[EditorUi.DIFF_INSERT])for(var p=0;p<f[EditorUi.DIFF_INSERT].length;p++){var q=f[EditorUi.DIFF_INSERT][p],t=null!=q.parent?q.parent:"",y=null!=q.previous?q.previous:"";k(t).inserted[y]=q}if(null!=f[EditorUi.DIFF_UPDATE])for(var H in f[EditorUi.DIFF_UPDATE])q=f[EditorUi.DIFF_UPDATE][H],null!=q.previous&&(t=q.parent,null==t&&(p=b.getCell(H),null!=p&&(p=b.getParent(p),null!=p&&(t=p.getId()))),null!=t&&(k(t).moved[q.previous]=H));return c};-EditorUi.prototype.patchPage=function(b,f,k,c){var p=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),q=this.createParentLookup(p,f);p.beginUpdate();try{var t=p.updateEdgeParent,y=new mxDictionary,H=[];p.updateEdgeParent=function(z,B){!y.get(z)&&c&&(y.put(z,!0),H.push(z))};var F=q[""],D=null!=F&&null!=F.inserted?F.inserted[""]:null,d=null;null!=D&&(d=this.getCellForJson(D));if(null==d){var g=null!=F&&null!=F.moved?F.moved[""]:null;null!=g&&(d=p.getCell(g))}null!=d&&(p.setRoot(d),+EditorUi.prototype.patchPage=function(b,f,k,c){var p=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),q=this.createParentLookup(p,f);p.beginUpdate();try{var t=p.updateEdgeParent,y=new mxDictionary,H=[];p.updateEdgeParent=function(z,B){!y.get(z)&&c&&(y.put(z,!0),H.push(z))};var F=q[""],E=null!=F&&null!=F.inserted?F.inserted[""]:null,d=null;null!=E&&(d=this.getCellForJson(E));if(null==d){var g=null!=F&&null!=F.moved?F.moved[""]:null;null!=g&&(d=p.getCell(g))}null!=d&&(p.setRoot(d),b.root=d,EditorUi.debug("EditorUi.patchPage: Root changed",d.id));this.patchCellRecursive(b,p,p.root,q,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var l=0;l<f[EditorUi.DIFF_REMOVE].length;l++){g=f[EditorUi.DIFF_REMOVE][l];var n=p.getCell(g);null!=n&&p.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var x=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(g in f[EditorUi.DIFF_UPDATE])n=p.getCell(g),null!=n?this.patchCell(p,n,f[EditorUi.DIFF_UPDATE][g],null!=x?x[g]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",-g,"diff",[f[EditorUi.DIFF_UPDATE][g]])}if(null!=f[EditorUi.DIFF_INSERT])for(l=0;l<f[EditorUi.DIFF_INSERT].length;l++)D=f[EditorUi.DIFF_INSERT][l],n=p.getCell(D.id),null!=n&&(p.setTerminal(n,p.getCell(D.source),!0),p.setTerminal(n,p.getCell(D.target),!1));p.updateEdgeParent=t;if(c&&0<H.length)for(l=0;l<H.length;l++)p.contains(H[l])&&p.updateEdgeParent(H[l])}finally{p.endUpdate()}};-EditorUi.prototype.patchCellRecursive=function(b,f,k,c,p){if(null!=k){var q=c[k.getId()],t=null!=q&&null!=q.inserted?q.inserted:{};q=null!=q&&null!=q.moved?q.moved:{};for(var y=0,H=f.getChildCount(k),F="",D=0;D<H;D++){var d=f.getChildAt(k,D).getId();null==q[F]&&(null==p[EditorUi.DIFF_UPDATE]||null==p[EditorUi.DIFF_UPDATE][d]||null==p[EditorUi.DIFF_UPDATE][d].previous&&null==p[EditorUi.DIFF_UPDATE][d].parent)&&(q[F]=d);F=d}H=mxUtils.bind(this,function(g,l){var n=null!=g?g.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",-"cell",g);null!=g&&l&&(l=f.getCell(n),null!=l&&l!=g&&(g=null));null!=g&&(f.getChildAt(k,y)!=g&&f.add(k,g,y),this.patchCellRecursive(b,f,g,c,p),y++);return n});for(F=[null];0<F.length;)if(D=F.shift(),D=H(null!=D?D.child:null,null!=D?D.insert:!1),d=q[D],null!=d&&(delete q[D],F.push({child:f.getCell(d)})),d=t[D],null!=d&&(delete t[D],F.push({child:this.getCellForJson(d),insert:!0})),0==F.length){for(D in q)F.push({child:f.getCell(q[D])}),delete q[D];for(D in t)F.push({child:this.getCellForJson(t[D]),-insert:!0}),delete t[D]}}};+g,"diff",[f[EditorUi.DIFF_UPDATE][g]])}if(null!=f[EditorUi.DIFF_INSERT])for(l=0;l<f[EditorUi.DIFF_INSERT].length;l++)E=f[EditorUi.DIFF_INSERT][l],n=p.getCell(E.id),null!=n&&(p.setTerminal(n,p.getCell(E.source),!0),p.setTerminal(n,p.getCell(E.target),!1));p.updateEdgeParent=t;if(c&&0<H.length)for(l=0;l<H.length;l++)p.contains(H[l])&&p.updateEdgeParent(H[l])}finally{p.endUpdate()}};+EditorUi.prototype.patchCellRecursive=function(b,f,k,c,p){if(null!=k){var q=c[k.getId()],t=null!=q&&null!=q.inserted?q.inserted:{};q=null!=q&&null!=q.moved?q.moved:{};for(var y=0,H=f.getChildCount(k),F="",E=0;E<H;E++){var d=f.getChildAt(k,E).getId();null==q[F]&&(null==p[EditorUi.DIFF_UPDATE]||null==p[EditorUi.DIFF_UPDATE][d]||null==p[EditorUi.DIFF_UPDATE][d].previous&&null==p[EditorUi.DIFF_UPDATE][d].parent)&&(q[F]=d);F=d}H=mxUtils.bind(this,function(g,l){var n=null!=g?g.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",+"cell",g);null!=g&&l&&(l=f.getCell(n),null!=l&&l!=g&&(g=null));null!=g&&(f.getChildAt(k,y)!=g&&f.add(k,g,y),this.patchCellRecursive(b,f,g,c,p),y++);return n});for(F=[null];0<F.length;)if(E=F.shift(),E=H(null!=E?E.child:null,null!=E?E.insert:!1),d=q[E],null!=d&&(delete q[E],F.push({child:f.getCell(d)})),d=t[E],null!=d&&(delete t[E],F.push({child:this.getCellForJson(d),insert:!0})),0==F.length){for(E in q)F.push({child:f.getCell(q[E])}),delete q[E];for(E in t)F.push({child:this.getCellForJson(t[E]),+insert:!0}),delete t[E]}}};EditorUi.prototype.patchCell=function(b,f,k,c){if(null!=f&&null!=k){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=c&&null!=c.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var p in k)this.cellProperties[p]||(f[p]=k[p])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,c);var p=b[k].node.cloneNode(!1);p.appendChild(c);f.appendChild(p)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var c=new DiagramPage(f[b]);this.updatePageRoot(c,!0);k.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),k.push(c));return k};-EditorUi.prototype.diffPages=function(b,f){var k=[],c=[],p={},q={},t={},y=null;if(null!=b&&null!=f){for(var H=0;H<f.length;H++)q[f[H].getId()]={page:f[H],prev:y},y=f[H];y=null;for(H=0;H<b.length;H++){var F=b[H].getId();f=q[F];if(null==f)c.push(F);else{this.updatePageRoot(b[H]);this.updatePageRoot(f.page);var D=this.diffCells(b[H].root,f.page.root),d={};mxUtils.isEmptyObject(D)||(d.cells=D);D=this.diffViewState(b[H],f.page);mxUtils.isEmptyObject(D)||(d.view=D);if((null!=f.prev?null==y:null!=y)||null!=+EditorUi.prototype.diffPages=function(b,f){var k=[],c=[],p={},q={},t={},y=null;if(null!=b&&null!=f){for(var H=0;H<f.length;H++)q[f[H].getId()]={page:f[H],prev:y},y=f[H];y=null;for(H=0;H<b.length;H++){var F=b[H].getId();f=q[F];if(null==f)c.push(F);else{this.updatePageRoot(b[H]);this.updatePageRoot(f.page);var E=this.diffCells(b[H].root,f.page.root),d={};mxUtils.isEmptyObject(E)||(d.cells=E);E=this.diffViewState(b[H],f.page);mxUtils.isEmptyObject(E)||(d.view=E);if((null!=f.prev?null==y:null!=y)||null!=y&&null!=f.prev&&y.getId()!=f.prev.getId())d.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[H].getName()!=f.page.getName()&&(d.name=f.page.getName());mxUtils.isEmptyObject(d)||(t[F]=d)}delete q[b[H].getId()];y=b[H]}for(F in q)f=q[F],k.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(t)||(p[EditorUi.DIFF_UPDATE]=t);0<c.length&&(p[EditorUi.DIFF_REMOVE]=c);0<k.length&&(p[EditorUi.DIFF_INSERT]=k)}return p};EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):k[b.getId()]={cell:b,prev:f};var c=b.getChildCount();f=null;for(var p=0;p<c;p++){var q=b.getChildAt(p);this.createCellLookup(q,f,k);f=q}return k};EditorUi.prototype.diffCellRecursive=function(b,f,k,c,p){c=null!=c?c:{};var q=k[b.getId()];delete k[b.getId()];if(null==q)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):p.push(b.getId());else{var t=this.diffCell(b,q.cell);if(null!=t.parent||(null!=q.prev?null==f:null!=f)||null!=f&&null!=q.prev&&f.getId()!=q.prev.getId())t.previous=null!=q.prev?q.prev.getId():"";mxUtils.isEmptyObject(t)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",@@ -13402,8 +13407,8 @@ DrawioFileSync.prototype.patchRealtime=function(b,f,k,c){var p=null;if(this.file"all",p,"local",q,"applied",t,"immediate",c)}return p};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;var k=this.ui.resolveCrossReferences(f,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,k,!0);this.isRealtimeActive()&&this.doSendLocalChanges([k,f])}this.localFileWasChanged=!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};-DrawioFileSync.prototype.merge=function(b,f,k,c,p,q,t){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var H=this.ui.clonePages(this.file.getShadowPages()),F=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(H,this.ui.pages):null,D=this.file.isRealtime()?this.ui.diffPages(H,this.file.ownPages):null;H=this.ui.applyPatches(H,b);var d=null==f?null:this.ui.getHashValueForPages(H);-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",F,"pending",D,"checksum",f,"current",d,"valid",f==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(k),"immediate",t);if(null!=f&&f!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=p&&p()}),q,null,t);return}this.file.setShadowPages(H);null==this.patchRealtime(b,null,D,t)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?+DrawioFileSync.prototype.merge=function(b,f,k,c,p,q,t){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var H=this.ui.clonePages(this.file.getShadowPages()),F=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(H,this.ui.pages):null,E=this.file.isRealtime()?this.ui.diffPages(H,this.file.ownPages):null;H=this.ui.applyPatches(H,b);var d=null==f?null:this.ui.getHashValueForPages(H);+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",F,"pending",E,"checksum",f,"current",d,"valid",f==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(k),"immediate",t);if(null!=f&&f!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=p&&p()}),q,null,t);return}this.file.setShadowPages(H);null==this.patchRealtime(b,null,E,t)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?F:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);null!=c&&c(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=p&&p(n);try{var g=this.file.getCurrentUser(),l=null!=g?g.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),l,n)}catch(x){}}};DrawioFileSync.prototype.fileChanged=function(b,f,k,c,p){var q=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",p,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(t){null!=k&&k()||(this.isValidState()?this.catchup(t,b,f,k,p):null!=f&&f())}),f)):null!=f&&f())}),c?this.cacheReadyDelay:0);return this.notifyThread=q};@@ -13412,19 +13417,19 @@ this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastDrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};DrawioFileSync.prototype.catchup=function(b,f,k,c,p){if(null!=b&&(null==c||!c())){var q=this.file.getCurrentRevisionId(),t=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",q,"to",t,"immediate",p,"valid",this.isValidState());if(q==t)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),H=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=H&&"1"!=urlParams.lockdown){var F=0,D=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(q!=this.file.getCurrentRevisionId())null!=f&&+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),H=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=H&&"1"!=urlParams.lockdown){var F=0,E=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(q!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(f,k,c,null,p)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(q)+"&to="+encodeURIComponent(t)+(null!=H?"&secret="+encodeURIComponent(H):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(l);if(g&&(null==c||!c()))if(q!=this.file.getCurrentRevisionId())null!=-f&&f(!0);else if(this.isValidState()){var x=null,z=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",F,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var B=JSON.parse(n.getText());if(null!=B&&0<B.length)for(var I=0;I<B.length;I++){var G=this.stringToObject(B[I]);if(G.v>DrawioFileSync.PROTOCOL){D=!0;z=[];break}else if(G.v===DrawioFileSync.PROTOCOL&&null!=G.d)x=G.d.checksum,-z.push(G.d.patch);else{D=!0;z=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",D?"failed":"ok","temp",z,"checksum",x)}catch(C){z=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<z.length?(this.file.stats.cacheHits++,this.merge(z,x,b,f,k,c,p)):F<=this.maxCacheReadyRetries-1&&!D&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(F++,this.file.stats.cacheMiss++,window.setTimeout(d,(F+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,+f&&f(!0);else if(this.isValidState()){var x=null,z=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",F,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var B=JSON.parse(n.getText());if(null!=B&&0<B.length)for(var I=0;I<B.length;I++){var G=this.stringToObject(B[I]);if(G.v>DrawioFileSync.PROTOCOL){E=!0;z=[];break}else if(G.v===DrawioFileSync.PROTOCOL&&null!=G.d)x=G.d.checksum,+z.push(G.d.patch);else{E=!0;z=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[B],"status",E?"failed":"ok","temp",z,"checksum",x)}catch(C){z=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<z.length?(this.file.stats.cacheHits++,this.merge(z,x,b,f,k,c,p)):F<=this.maxCacheReadyRetries-1&&!E&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(F++,this.file.stats.cacheMiss++,window.setTimeout(d,(F+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(f,k,c,null,p))}catch(C){null!=k&&k(C)}}else null!=k&&k()}),k)}else null!=k&&k()});window.setTimeout(d,this.cacheReadyDelay)}else this.reload(f,k,c,null,p)}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,c,p){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",p);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(q){null!=f&&f(q)}),k,c,p)};DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};DrawioFileSync.prototype.createToken=function(b,f,k){var c=!0,p=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(q){window.clearTimeout(p);c&&(200<=q.getStatus()&&299>=q.getStatus()?f(q.getText()):k({code:q.getStatus(),message:"Token Error "+q.getStatus()}))}),k)};DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};DrawioFileSync.prototype.fileSaved=function(b,f,k,c,p,q){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var t=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.createMessage({m:this.lastModified.getTime()}),H=this.file.getDescriptorRevisionId(f),F=this.file.getCurrentRevisionId();if(null!=t&&null!=p&&-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var D=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);q=null!=q?q:this.ui.getHashValueForPages(b);var d=this.objectToString(this.createMessage({patch:D,checksum:q}));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()++"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var E=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);q=null!=q?q:this.ui.getHashValueForPages(b);var d=this.objectToString(this.createMessage({patch:E,checksum:q}));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(H)+"&to="+encodeURIComponent(F)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(y)))+(null!=t?"&secret="+encodeURIComponent(t):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=p?"&token="+encodeURIComponent(p):""),mxUtils.bind(this,function(n){window.clearTimeout(l);g&&(200<=n.getStatus()&&299>=n.getStatus()?(Editor.p2pSyncNotify&&this.notify(y),null!=k&&k()):c({message:mxResources.get("realtimeCollaboration")+-(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",F,"etag",this.file.getCurrentEtag(),"diff",D,d.length,"bytes","msg",y,"checksum",q)}else this.notify(y),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",F,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};+(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",F,"etag",this.file.getCurrentEtag(),"diff",E,d.length,"bytes","msg",y,"checksum",q)}else this.notify(y),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",H,"to",F,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),@@ -13437,7 +13442,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waimxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,f,k,c){};mxAsyncCanvas.prototype.roundrect=function(b,f,k,c,p,q){};mxAsyncCanvas.prototype.ellipse=function(b,f,k,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};mxAsyncCanvas.prototype.image=function(b,f,k,c,p,q,t,y){p=this.rewriteImageSource(p);b=this.htmlCanvas.images[p];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[p]=b,b.src=p)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};-mxAsyncCanvas.prototype.text=function(b,f,k,c,p,q,t,y,H,F,D,d){if(null!=p&&0!=p.length&&(b=this.state.scale,"html"==H&&"function"===typeof html2canvas)){this.incWaitCounter();var g=this.canvasIndex++;html2canvas(p,{onrendered:mxUtils.bind(this,function(l){this.htmlCanvas.subCanvas[g]=l;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;+mxAsyncCanvas.prototype.text=function(b,f,k,c,p,q,t,y,H,F,E,d){if(null!=p&&0!=p.length&&(b=this.state.scale,"html"==H&&"function"===typeof html2canvas)){this.incWaitCounter();var g=this.canvasIndex++;html2canvas(p,{onrendered:mxUtils.bind(this,function(l){this.htmlCanvas.subCanvas[g]=l;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(f,k,c,p){return k+k+c+c+p+p});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,f){this.state.dx+=b;this.state.dy+=f;this.ctx.translate(b,f)};@@ -13452,9 +13457,9 @@ mxJsCanvas.prototype.setShadowOffset=function(b,f){this.state.shadowDx=b;this.stmxJsCanvas.prototype.arcTo=function(b,f,k,c,p,q,t){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,f,k,c,p,q,t);if(null!=b)for(f=0;f<b.length;f+=6)this.curveTo(b[f],b[f+1],b[f+2],b[f+3],b[f+4],b[f+5])};mxJsCanvas.prototype.curveTo=function(b,f,k,c,p,q){this.ctx.bezierCurveTo(b,f,k,c,p,q);this.lastMoveX=p;this.lastMoveY=q};mxJsCanvas.prototype.rect=function(b,f,k,c){this.begin();this.moveTo(b,f);this.lineTo(b+k,f);this.lineTo(b+k,f+c);this.lineTo(b,f+c);this.close()};mxJsCanvas.prototype.roundrect=function(b,f,k,c,p,q){this.begin();this.moveTo(b+p,f);this.lineTo(b+k-p,f);this.quadTo(b+k,f,b+k,f+q);this.lineTo(b+k,f+c-q);this.quadTo(b+k,f+c,b+k-p,f+c);this.lineTo(b+p,f+c);this.quadTo(b,f+c,b,f+c-q);this.lineTo(b,f+q);this.quadTo(b,f,b+p,f)};mxJsCanvas.prototype.ellipse=function(b,f,k,c){this.ctx.save();this.ctx.translate(b+k/2,f+c/2);this.ctx.scale(k/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};-mxJsCanvas.prototype.image=function(b,f,k,c,p,q,t,y){p=this.rewriteImageSource(p);p=this.images[p];if(null!=p&&0<p.height&&0<p.width){var H=this.ctx;H.save();if(q){q=p.width;var F=p.height,D=Math.min(k/q,c/F);b+=(k-q*D)/2;f+=(c-F*D)/2;k=q*D;c=F*D}t&&(H.translate(2*b+k,0),H.scale(-1,1));y&&(H.translate(0,2*f+c),H.scale(1,-1));H.drawImage(p,b,f,k,c);H.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};+mxJsCanvas.prototype.image=function(b,f,k,c,p,q,t,y){p=this.rewriteImageSource(p);p=this.images[p];if(null!=p&&0<p.height&&0<p.width){var H=this.ctx;H.save();if(q){q=p.width;var F=p.height,E=Math.min(k/q,c/F);b+=(k-q*E)/2;f+=(c-F*E)/2;k=q*E;c=F*E}t&&(H.translate(2*b+k,0),H.scale(-1,1));y&&(H.translate(0,2*f+c),H.scale(1,-1));H.drawImage(p,b,f,k,c);H.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,f=this.ctx.shadowOffsetX,k=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=f;this.ctx.shadowOffsetY=k}else this.ctx.fill(),this.ctx.stroke()};-mxJsCanvas.prototype.text=function(b,f,k,c,p,q,t,y,H,F,D,d){if(null!=p&&0!=p.length){k=this.state.scale;0!=d&&(this.ctx.translate(Math.round(b),Math.round(f)),this.ctx.rotate(d*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-f)));if("html"==H){p=this.subCanvas[this.canvasIndex++];H=p.height;d=p.width;switch(t){case mxConstants.ALIGN_MIDDLE:f-=H/2/k;break;case mxConstants.ALIGN_BOTTOM:f-=H/k}switch(q){case mxConstants.ALIGN_CENTER:b-=d/2/k;break;case mxConstants.ALIGN_RIGHT:b-=d/k}this.ctx.save();+mxJsCanvas.prototype.text=function(b,f,k,c,p,q,t,y,H,F,E,d){if(null!=p&&0!=p.length){k=this.state.scale;0!=d&&(this.ctx.translate(Math.round(b),Math.round(f)),this.ctx.rotate(d*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-f)));if("html"==H){p=this.subCanvas[this.canvasIndex++];H=p.height;d=p.width;switch(t){case mxConstants.ALIGN_MIDDLE:f-=H/2/k;break;case mxConstants.ALIGN_BOTTOM:f-=H/k}switch(q){case mxConstants.ALIGN_CENTER:b-=d/2/k;break;case mxConstants.ALIGN_RIGHT:b-=d/k}this.ctx.save();if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/k),Math.round(p.height/k))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(f)-.5,Math.round(p.width/k),Math.round(p.height/k)));this.ctx.scale(1/k,1/k);this.ctx.drawImage(p,Math.round(b*k),Math.round(f*k))}else{this.ctx.save();this.updateFont();d=document.createElement("div");d.innerHTML=p;d.style.position="absolute";d.style.top="-9999px";d.style.left="-9999px";d.style.fontFamily=this.state.fontFamily;d.style.fontWeight="bold";d.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(d);H=[d.offsetWidth,d.offsetHeight];document.body.removeChild(d);p=p.split("\n");d=H[1];this.ctx.textBaseline="top";H=f;switch(t){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline="middle";f-=(p.length-1)*d/2;H=f-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",f-=d*(p.length-1),H=f-this.state.fontSize}t=[];d=[];for(k=0;k<p.length;k++)d[k]=b,t[k]=this.ctx.measureText(p[k]).width,null!=q&&q!=mxConstants.ALIGN_LEFT&&(d[k]-=t[k],q==mxConstants.ALIGN_CENTER&&(d[k]+=t[k]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=d[0];q=t[0];for(k=1;k<p.length;k++)b=Math.min(b,d[k]),q=Math.max(q,t[k]);this.ctx.save();@@ -13467,7 +13472,7 @@ DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==bDriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(f){if(null!=f&&null!=f.items)for(var k=0;k<f.items.length;k++)if("anyoneWithLink"===f.items[k].id||"anyone"===f.items[k].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,f,k,c,p){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,f,k,c,p)}),k,c,p])};-DriveFile.prototype.saveFile=function(b,f,k,c,p,q){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(t,y){var H=mxUtils.bind(this,function(F,D){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,D,mxUtils.bind(this,function(g,l,n,x){try{this.savingFile=!1,0!=g?(this.setModified(this.getShadowModified()),f&&(this.lastAutosaveRevision=(new Date).getTime()),+DriveFile.prototype.saveFile=function(b,f,k,c,p,q){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(t,y){var H=mxUtils.bind(this,function(F,E){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,E,mxUtils.bind(this,function(g,l,n,x){try{this.savingFile=!1,0!=g?(this.setModified(this.getShadowModified()),f&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=g,this.fileSaved(l,d,mxUtils.bind(this,function(){this.contentChanged();null!=k&&k(g)}),c,y,n,x)):null!=c&&c(g)}catch(z){if(this.savingFile=!1,null!=c)c(z);else throw z;}}),mxUtils.bind(this,function(g,l){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(l,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();this.setShadowModified(!1);H(F,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(g)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}}),p,p,F,null,t)}catch(g){if(this.savingFile=!1,null!=c)c(g);else throw g;}});H(q,f)}))):null!=k&&k()}catch(t){if(null!=c)c(t);else throw t;}};DriveFile.prototype.copyFile=function(b,f){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,f)}catch(k){f(k)}}),f,!0)};@@ -13493,59 +13498,59 @@ null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirfunction(){return this.user};DriveClient.prototype.getUsersList=function(){var k=[],c=JSON.parse(this.getPersistentToken(!0)),p=null;if(null!=c){null!=c.current&&(p=c.current.userId,k.push(c[p].user),k[0].isCurrent=!0);for(var q in c)"current"!=q&&q!=p&&k.push(c[q].user)}return k};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null};DriveClient.prototype.execute=function(k){var c=mxUtils.bind(this,function(p){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,t){this.authorize(!1,mxUtils.bind(this,function(){null!=t&&t();k()}),mxUtils.bind(this,function(y){var H=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(H=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),H,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),q)}))});this.authorize(!0,k,c)};DriveClient.prototype.executeRequest=function(k,c,p){try{var q=!0,t=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var H=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=k;null!=t&&window.clearTimeout(t);t=window.setTimeout(mxUtils.bind(this,-function(){q=!1;null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:H})}),this.ui.timeout);var F=null,D=!1;"string"===typeof k.params?F=k.params:null!=k.params&&(F=JSON.stringify(k.params),D=!0);var d=k.fullUrl||this.GDriveBaseUrl+k.url;D&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var g=new mxXmlRequest(d,F,k.method||"GET");g.setRequestHeaders=mxUtils.bind(this,function(l,n){if(null!=k.headers)for(var x in k.headers)l.setRequestHeader(x,k.headers[x]);else null!=k.contentType?-l.setRequestHeader("Content-Type",k.contentType):D&&l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b)});g.send(mxUtils.bind(this,function(l){try{if(window.clearTimeout(t),q){try{var n=JSON.parse(l.getText())}catch(B){n=null}if(200<=l.getStatus()&&299>=l.getStatus())null!=c&&c(n);else{var x=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,z=null!=x&&0<x.length?x[0].reason:null;null==p||null==n||null==n.error||-1!=n.error.code&&+function(){q=!1;null!=p&&p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:H})}),this.ui.timeout);var F=null,E=!1;"string"===typeof k.params?F=k.params:null!=k.params&&(F=JSON.stringify(k.params),E=!0);var d=k.fullUrl||this.GDriveBaseUrl+k.url;E&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var g=new mxXmlRequest(d,F,k.method||"GET");g.setRequestHeaders=mxUtils.bind(this,function(l,n){if(null!=k.headers)for(var x in k.headers)l.setRequestHeader(x,k.headers[x]);else null!=k.contentType?+l.setRequestHeader("Content-Type",k.contentType):E&&l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b)});g.send(mxUtils.bind(this,function(l){try{if(window.clearTimeout(t),q){try{var n=JSON.parse(l.getText())}catch(B){n=null}if(200<=l.getStatus()&&299>=l.getStatus())null!=c&&c(n);else{var x=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,z=null!=x&&0<x.length?x[0].reason:null;null==p||null==n||null==n.error||-1!=n.error.code&&(403!=n.error.code||"domainPolicy"!=z&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=z)?403==n.error.code&&this.retryAuth||401==n.error.code&&this.retryAuth&&"authError"==z?(null!=p&&p(n),this.retryAuth=!1):(this.retryAuth=!0,this.execute(H)):null!=n&&null!=n.error&&412!=n.error.code&&404!=n.error.code&&400!=n.error.code&&this.currentRequest==k&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(H,Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=p&&p(n):p(n)}}}catch(B){if(null!=p)p(B);else throw B;}}))}catch(l){if(null!=p)p(l);else throw l;}});null!=b&&this.authCalled?H():this.execute(H)}catch(F){if(null!=p)p(F);else throw F;}};DriveClient.prototype.createAuthWin=function(k){return window.open(k?k:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};DriveClient.prototype.authorize=function(k,c,p,q,t){this.isExtAuth&&!k?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,p)}),p):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),k,c,p,q,t):null!=p&&p(y)}),p)};DriveClient.prototype.updateAuthInfo=function(k,c,p,q,t){b=k.access_token;delete k.access_token;k.expires=Date.now()+1E3*parseInt(k.expires_in);k.remember=c;this.resetTokenRefresh(k);this.authCalled=!0;if(p||null==this.user){var y=JSON.stringify(k);this.updateUser(mxUtils.bind(this,function(){var H=JSON.parse(y);this.setPersistentToken(H,!c);null!=q&&q()}),t)}else null!=q&&(this.setPersistentToken(k,!c),q())};DriveClient.prototype.authorizeStep2=function(k,c,p,q,t,y){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var H=-JSON.parse(this.getPersistentToken(!0));H&&null!=H.current&&(this.userId=H.current.userId)}if(c&&null==this.userId)null!=q&&q();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+k)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(D){try{if(200<=D.getStatus()&&299>=D.getStatus()){var d=JSON.parse(D.getText());this.updateAuthInfo(d,!0,!1,p,q)}else 0!=D.getStatus()&&this.logout(),null!=q&&q(D)}catch(g){if(null!=+JSON.parse(this.getPersistentToken(!0));H&&null!=H.current&&(this.userId=H.current.userId)}if(c&&null==this.userId)null!=q&&q();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+k)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(E){try{if(200<=E.getStatus()&&299>=E.getStatus()){var d=JSON.parse(E.getText());this.updateAuthInfo(d,!0,!1,p,q)}else 0!=E.getStatus()&&this.logout(),null!=q&&q(E)}catch(g){if(null!=window.console&&console.log("DriveClient.authorizeStep2",g),null!=q)q(g);else throw g;}}),q);else{var F="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(t?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+k+(this.sameWinRedirectUrl?-"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(F),y=null):null==y?y=this.createAuthWin(F):y.location=F;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(D,d){window.onGoogleDriveCallback=null;try{null==D?null!=q&&q({message:mxResources.get("accessDenied")}):this.updateAuthInfo(D,t,!0,p,q)}catch(g){null!=q&&q(g)}finally{null!=d&&d.close()}}),y.focus()):null!=q&&q({message:mxResources.get("allowPopups")})}}catch(D){if(null!=q)q(D);else throw D;+"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(F),y=null):null==y?y=this.createAuthWin(F):y.location=F;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(E,d){window.onGoogleDriveCallback=null;try{null==E?null!=q&&q({message:mxResources.get("accessDenied")}):this.updateAuthInfo(E,t,!0,p,q)}catch(g){null!=q&&q(g)}finally{null!=d&&d.close()}}),y.focus()):null!=q&&q({message:mxResources.get("allowPopups")})}}catch(E){if(null!=q)q(E);else throw E;}};DriveClient.prototype.resetTokenRefresh=function(k){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=k&&null==k.error&&0<k.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(k.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*k.expires_in))};DriveClient.prototype.checkToken=function(k){var c=0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){k();c&&this.fireEvent(new mxEventObject("disconnected"))})):k()};DriveClient.prototype.updateUser=function(k,c){try{var p={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(q){try{var t=JSON.parse(q);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var H=-mxResources.get("notAvailable"),F=H,D=null;null!=y&&null!=y.user&&(H=y.user.emailAddress,F=y.user.displayName,D=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(t.id,H,F,D,t.locale));this.userId=t.id;null!=k&&k()}),c)}catch(y){null!=c&&c(y)}}),c,null,null,null,null,p)}catch(q){if(null!=c)c(q);else throw q;}};DriveClient.prototype.copyFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest({url:"/files/"+k+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",+mxResources.get("notAvailable"),F=H,E=null;null!=y&&null!=y.user&&(H=y.user.emailAddress,F=y.user.displayName,E=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(t.id,H,F,E,t.locale));this.userId=t.id;null!=k&&k()}),c)}catch(y){null!=c&&c(y)}}),c,null,null,null,null,p)}catch(q){if(null!=c)c(q);else throw q;}};DriveClient.prototype.copyFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest({url:"/files/"+k+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},p,q)};DriveClient.prototype.renameFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest(this.createDriveRequest(k,{title:c}),p,q)};DriveClient.prototype.moveFile=function(k,c,p,q){null!=k&&null!=c&&this.executeRequest(this.createDriveRequest(k,{parents:[{kind:"drive#fileLink",id:c}]}),p,q)};DriveClient.prototype.createDriveRequest=function(k,c){return{url:"/files/"+k+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(k,c,p){return this.getFile(k,c,p,!0,!0)};DriveClient.prototype.loadDescriptor=function(k,c,p,q){this.executeRequest({url:"/files/"+k+"?supportsAllDrives=true&fields="+(null!=q?q:this.allFields)},c,p)};DriveClient.prototype.listFiles=function(k,c,p,q,t){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(k?" and (title contains '"+k+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(p?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},q,t)};DriveClient.prototype.getCustomProperty=function(k,c){k=k.properties;var p=null;if(null!=k)for(var q=0;q<k.length;q++)if(k[q].key==c){p=k[q].value;break}return p};DriveClient.prototype.getFile=function(k,c,p,q,t){q=null!=q?q:!1;t=null!=t?t:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+k+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=k;this.getXmlFile(y,c,p)}),p):this.loadDescriptor(k,mxUtils.bind(this,function(y){try{if(null!=this.user){var H=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!Editor.useCanvasForExport&&H?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,p,null,{Authorization:"Bearer "+b}):q||t||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,-c,p,!0,t):this.getXmlFile(y,c,p)}else p({message:mxResources.get("loggedOut")})}catch(F){if(null!=p)p(F);else throw F;}}),p)};DriveClient.prototype.isGoogleRealtimeMimeType=function(k){return null!=k&&"application/vnd.jgraph.mxfile."==k.substring(0,30)};DriveClient.prototype.getXmlFile=function(k,c,p,q,t){try{var y={Authorization:"Bearer "+b},H=k.downloadUrl;if(null==H)null!=p&&p({message:mxResources.get("exportOptionsDisabledDetails")});else{var F=0,D=mxUtils.bind(this,function(){this.ui.editor.loadUrl(H,+c,p,!0,t):this.getXmlFile(y,c,p)}else p({message:mxResources.get("loggedOut")})}catch(F){if(null!=p)p(F);else throw F;}}),p)};DriveClient.prototype.isGoogleRealtimeMimeType=function(k){return null!=k&&"application/vnd.jgraph.mxfile."==k.substring(0,30)};DriveClient.prototype.getXmlFile=function(k,c,p,q,t){try{var y={Authorization:"Bearer "+b},H=k.downloadUrl;if(null==H)null!=p&&p({message:mxResources.get("exportOptionsDisabledDetails")});else{var F=0,E=mxUtils.bind(this,function(){this.ui.editor.loadUrl(H,mxUtils.bind(this,function(d){try{if(null==d)p({message:mxResources.get("invalidOrMissingFile")});else if(k.mimeType==this.libraryMimeType||t)k.mimeType!=this.libraryMimeType||t?c(new DriveLibrary(this.ui,d,k)):p({message:mxResources.get("notADiagramFile")});else{var g=!1;if(/\.png$/i.test(k.title)){var l=d.lastIndexOf(",");if(0<l){var n=this.ui.extractGraphModelFromPng(d);if(null!=n&&0<n.length)d=n;else try{n=d.substring(l+1);var x=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n),z=this.ui.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0);null==z||0<z.getElementsByTagName("parsererror").length?g=!0:d=x}catch(B){g=!0}}}else/\.pdf$/i.test(k.title)?(n=Editor.extractGraphModelFromPdf(d),null!=n&&0<n.length&&(g=!0,d=n)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(x=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,H)?this.ui.parseFileData(d,mxUtils.bind(this,-function(B){try{4==B.readyState&&(200<=B.status&&299>=B.status?c(new LocalFile(this.ui,B.responseText,k.title+this.extension,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}catch(I){if(null!=p)p(I);else throw I;}}),k.title):c(g?new LocalFile(this.ui,d,k.title,!0):new DriveFile(this.ui,d,k))}}catch(B){if(null!=p)p(B);else throw B;}}),mxUtils.bind(this,function(d,g){if(F<this.maxRetries&&null!=g&&403==g.getStatus())F++,window.setTimeout(D,2*F*this.coolOff*(1+.1*(Math.random()-.5)));-else if(null!=p)p(d);else throw d;}),null!=k.mimeType&&"image/"==k.mimeType.substring(0,6)&&"image/svg"!=k.mimeType.substring(0,9)||/\.png$/i.test(k.title)||/\.jpe?g$/i.test(k.title)||/\.pdf$/i.test(k.title),null,null,null,y)});D()}}catch(d){if(null!=p)p(d);else throw d;}};DriveClient.prototype.saveFile=function(k,c,p,q,t,y,H,F,D){try{var d=0;k.saveLevel=1;var g=mxUtils.bind(this,function(T){if(null!=q)q(T);else throw T;}),l=mxUtils.bind(this,function(T){g(T);try{EditorUi.logError(T.message,null,+function(B){try{4==B.readyState&&(200<=B.status&&299>=B.status?c(new LocalFile(this.ui,B.responseText,k.title+this.extension,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}catch(I){if(null!=p)p(I);else throw I;}}),k.title):c(g?new LocalFile(this.ui,d,k.title,!0):new DriveFile(this.ui,d,k))}}catch(B){if(null!=p)p(B);else throw B;}}),mxUtils.bind(this,function(d,g){if(F<this.maxRetries&&null!=g&&403==g.getStatus())F++,window.setTimeout(E,2*F*this.coolOff*(1+.1*(Math.random()-.5)));+else if(null!=p)p(d);else throw d;}),null!=k.mimeType&&"image/"==k.mimeType.substring(0,6)&&"image/svg"!=k.mimeType.substring(0,9)||/\.png$/i.test(k.title)||/\.jpe?g$/i.test(k.title)||/\.pdf$/i.test(k.title),null,null,null,y)});E()}}catch(d){if(null!=p)p(d);else throw d;}};DriveClient.prototype.saveFile=function(k,c,p,q,t,y,H,F,E){try{var d=0;k.saveLevel=1;var g=mxUtils.bind(this,function(T){if(null!=q)q(T);else throw T;}),l=mxUtils.bind(this,function(T){g(T);try{EditorUi.logError(T.message,null,null,null,T)}catch(P){}});if(k.isEditable()&&null!=k.desc){var n=Date.now(),x=k.desc.etag,z=k.desc.modifiedDate,B=k.desc.headRevisionId,I=Editor.useCanvasForExport&&/(\.png)$/i.test(k.getTitle());y=null!=y?y:!1;var G=null,C=!1,Q={mimeType:k.desc.mimeType,title:k.getTitle()};if(this.isGoogleRealtimeMimeType(Q.mimeType))Q.mimeType=this.xmlMimeType,G=k.desc,C=c=!0;else if("application/octet-stream"==Q.mimeType||"1"==urlParams["override-mime"]&&Q.mimeType!=this.xmlMimeType)Q.mimeType=this.xmlMimeType;-var U=mxUtils.bind(this,function(T,P,v){try{k.saveLevel=3;var A=k.getData(),N=null,J=null;k.constructor==DriveFile&&(null==F&&(F=[]),null==k.getChannelId()&&F.push({key:"channel",value:Editor.guid(32)}),null==k.getChannelKey()&&F.push({key:"key",value:Editor.guid(32)}),D=null!=D?D:Editor.guid(32),F.push({key:"secret",value:D}),J=this.ui.getPagesForXml(A),N=this.ui.getHashValueForPages(J),F.push({key:"checksum",value:D+":"+N}));v||(null!=T||y||(T=this.placeholderThumbnail,P=this.placeholderMimeType),-null!=T&&null!=P&&(Q.thumbnail={image:T,mimeType:P}));var K=mxUtils.bind(this,function(E){try{if(k.saveDelay=Date.now()-n,k.saveLevel=null,p(E,A,J,N),null!=G){this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(M){M.pinned=!0;this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId,method:"PUT",params:M})})));try{EditorUi.logEvent({category:k.convertedFrom+"-CONVERT-FILE-"+k.getHash(),action:"from_"+-G.id+"."+G.headRevisionId+"-to_"+k.desc.id+"."+k.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=k.sync?"-client_"+k.sync.clientId:"nosync")})}catch(M){}}}catch(M){l(M)}}),m=mxUtils.bind(this,function(E,M){k.saveLevel=4;try{null!=F&&(Q.properties=F);var L=H||k.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:k.getCurrentEtag(),O=mxUtils.bind(this,function(V){k.saveLevel=5;try{var X=k.desc.mimeType!=this.xmlMimeType&&k.desc.mimeType!=this.mimeType&&-k.desc.mimeType!=this.libraryMimeType,W=!0,Y=null;try{Y=window.setTimeout(mxUtils.bind(this,function(){W=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(k.getId(),Q,E,c||V||X,M,V?null:L,C),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){var aa=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(z)).getTime():0;if(0>=aa||x==Z.etag||c&&B==Z.headRevisionId){var ha=[];null==Z?ha.push("Empty response"):(0>=aa&&ha.push("Invalid modified time"),+var U=mxUtils.bind(this,function(T,P,v){try{k.saveLevel=3;var A=k.getData(),N=null,J=null;k.constructor==DriveFile&&(null==F&&(F=[]),null==k.getChannelId()&&F.push({key:"channel",value:Editor.guid(32)}),null==k.getChannelKey()&&F.push({key:"key",value:Editor.guid(32)}),E=null!=E?E:Editor.guid(32),F.push({key:"secret",value:E}),J=this.ui.getPagesForXml(A),N=this.ui.getHashValueForPages(J),F.push({key:"checksum",value:E+":"+N}));v||(null!=T||y||(T=this.placeholderThumbnail,P=this.placeholderMimeType),+null!=T&&null!=P&&(Q.thumbnail={image:T,mimeType:P}));var K=mxUtils.bind(this,function(D){try{if(k.saveDelay=Date.now()-n,k.saveLevel=null,p(D,A,J,N),null!=G){this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(M){M.pinned=!0;this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId,method:"PUT",params:M})})));try{EditorUi.logEvent({category:k.convertedFrom+"-CONVERT-FILE-"+k.getHash(),action:"from_"++G.id+"."+G.headRevisionId+"-to_"+k.desc.id+"."+k.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=k.sync?"-client_"+k.sync.clientId:"nosync")})}catch(M){}}}catch(M){l(M)}}),m=mxUtils.bind(this,function(D,M){k.saveLevel=4;try{null!=F&&(Q.properties=F);var L=H||k.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:k.getCurrentEtag(),O=mxUtils.bind(this,function(V){k.saveLevel=5;try{var X=k.desc.mimeType!=this.xmlMimeType&&k.desc.mimeType!=this.mimeType&&+k.desc.mimeType!=this.libraryMimeType,W=!0,Y=null;try{Y=window.setTimeout(mxUtils.bind(this,function(){W=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(k.getId(),Q,D,c||V||X,M,V?null:L,C),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){var aa=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(z)).getTime():0;if(0>=aa||x==Z.etag||c&&B==Z.headRevisionId){var ha=[];null==Z?ha.push("Empty response"):(0>=aa&&ha.push("Invalid modified time"),x==Z.etag&&ha.push("Stale etag"),c&&B==Z.headRevisionId&&ha.push("Stale revision"),L=Z.etag);0==ha.length&&ha.push(mxResources.get("unknownError"));aa=ha.join(", ");if(d<this.staleEtagMaxRetries)d++,ha=Math.round(Math.pow(2,d)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(O,ha),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",d,"delay",ha,"rev",null!=Z?Z.headRevisionId:"null","errors",aa);else{k.saveLevel=12;g({message:mxResources.get("error")+": "+aa},Z);try{EditorUi.logError("Saving to Google Drive failed",null,"id-"+k.desc.id+"-from-"+B+"."+z+"-"+this.ui.hashValue(x)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<aa.length?"-errors-"+aa:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=k.sync?"-client_"+k.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-n))}catch(ea){}}}else K(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(Y);if(W){k.saveLevel=6;try{k.isConflict(Z)?this.executeRequest({url:"/files/"+k.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(aa){k.saveLevel=7;try{if(null!=aa&&aa.etag==L)if(d<this.staleEtagMaxRetries){d++;var ha=Math.round(2*d*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(R,ha);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",ha)}else{R(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+k.getHash(),action:"rev_"+k.desc.headRevisionId+"-mod_"+k.desc.modifiedDate+"-size_"+k.getSize()+"-mime_"+k.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(k.isAutosave()?"":"-noauto")+(k.changeListenerEnabled?"":"-nolisten")+(k.inConflictState?"-conflict":"")+(k.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=k.sync?"-client_"+k.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&aa.headRevisionId==B&&EditorUi.debug("DriveClient: Remote Etag Changed","local",L,"remote",aa.etag,"rev",k.desc.headRevisionId,"response",[aa],"file",[k]),g(Z,aa)}catch(ea){l(ea)}}),mxUtils.bind(this,function(){g(Z)})):g(Z)}catch(aa){l(aa)}}}))}catch(Z){l(Z)}}),R=mxUtils.bind(this,function(V){k.saveLevel=9;if(V||null==L)O(V);else{var X=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){X=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Y){}this.executeRequest({url:"/files/"+k.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Y){window.clearTimeout(W);if(X){k.saveLevel=10;try{null!=Y&&Y.headRevisionId==B?("1"==urlParams.test&&L!=Y.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",L,"to",Y.etag,"rev",k.desc.headRevisionId,"response",[Y],"file",[k]),L=Y.etag,O(V)):g({error:{code:412}},Y)}catch(Z){l(Z)}}}),mxUtils.bind(this,function(Y){window.clearTimeout(W);X&&(k.saveLevel=11,g(Y))}))}});if(I&&null==T){k.saveLevel=8;var S=new Image;S.onload=mxUtils.bind(this,function(){try{var V=this.thumbnailWidth/S.width,X=document.createElement("canvas");X.width=this.thumbnailWidth;X.height=Math.floor(S.height*V);X.getContext("2d").drawImage(S,0,0,X.width,X.height);var W=X.toDataURL();-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");Q.thumbnail={image:W,mimeType:"image/png"};R(!1)}catch(Y){try{R(!1)}catch(Z){l(Z)}}});S.src="data:image/png;base64,"+E}else R(!1)}catch(V){l(V)}});if(I){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){m(E,!0)}),g,this.ui.getCurrentFile()!=k?A:null,u.scale,u.border)}else m(A,!1)}catch(E){l(E)}});try{k.saveLevel=2,(y||I||k.constructor==DriveLibrary||!this.enableThumbnails||+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");Q.thumbnail={image:W,mimeType:"image/png"};R(!1)}catch(Y){try{R(!1)}catch(Z){l(Z)}}});S.src="data:image/png;base64,"+D}else R(!1)}catch(V){l(V)}});if(I){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){m(D,!0)}),g,this.ui.getCurrentFile()!=k?A:null,u.scale,u.border)}else m(A,!1)}catch(D){l(D)}});try{k.saveLevel=2,(y||I||k.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=Q.mimeType&&"application/vnd.jgraph.mxfile"!=Q.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(T){try{var P=null;try{null!=T&&(P=T.toDataURL("image/png")),null!=P&&(P=P.length>this.maxThumbnailSize?null:P.substring(P.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(v){P=null}U(P,"image/png")}catch(v){l(v)}}),20))&&U(null,null,k.constructor!=DriveLibrary)}catch(T){l(T)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(T){l(T)}};DriveClient.prototype.insertFile=function(k,c,p,q,t,y,H){y=null!=y?y:this.xmlMimeType;k={mimeType:y,title:k};null!=p&&(k.parents=[{kind:"drive#fileLink",id:p}]);this.executeRequest(this.createUploadRequest(null,k,c,!1,H),mxUtils.bind(this,function(F){y==this.libraryMimeType?q(new DriveLibrary(this.ui,c,F)):0==F?null!=t&&t({message:mxResources.get("errorSavingFile")}):q(new DriveFile(this.ui,c,F))}),t)};DriveClient.prototype.createUploadRequest=function(k,c,p,q,t,y,H){t=null!=t?t:!1;var F={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=y&&(F["If-Match"]=y);k={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=k?"/"+k:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=k?"PUT":"POST",headers:F,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=p?t?p:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(p):Graph.base64EncodeUnicode(p):"")+"\r\n---------314159265358979323846--"};q||(k.fullUrl+="&newRevision=false");H&&(k.fullUrl+="&pinned=true");return k};DriveClient.prototype.createLinkPicker=function(){var k=f.linkPicker;if(null==k||f.linkPickerToken!=b){f.linkPickerToken=b;k=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),p=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);k=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(f.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(k).addView(c).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED)}return k};DriveClient.prototype.pickFile=function(k,c,p){this.filePickerCallback=null!=k?k:mxUtils.bind(this,function(q){this.ui.loadFile("G"+q)});this.filePicked=mxUtils.bind(this,function(q){q.action==google.picker.Action.PICKED&&this.filePickerCallback(q.docs[0].id,q.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=c?"genericPicker":"filePicker",t=mxUtils.bind(this,function(g){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(g).className&&(mxEvent.removeListener(document,"click",t),this[q].setVisible(!1),p&&p())});if(null==f[q]||f[q+"Token"]!=-b){f[q+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),H=(new google.picker.DocsView).setIncludeFolders(!0),F=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),D=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),H.setMimeTypes("*/*"),F.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes),F.setMimeTypes(this.mimeTypes));f[q]=(new google.picker.PickerBuilder).setOAuthToken(f[q+-"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(H).addView(F).addView(google.picker.ViewId.RECENTLY_PICKED).addView(D);if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");f[q]=f[q].setSize(d[0],d[1])}urlParams.topBaseUrl&&(f[q]=f[q].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f[q]=f[q].setCallback(mxUtils.bind(this,function(g){if(g.action==google.picker.Action.PICKED||g.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,+b){f[q+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),H=(new google.picker.DocsView).setIncludeFolders(!0),F=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),E=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),H.setMimeTypes("*/*"),F.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes),F.setMimeTypes(this.mimeTypes));f[q]=(new google.picker.PickerBuilder).setOAuthToken(f[q++"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(H).addView(F).addView(google.picker.ViewId.RECENTLY_PICKED).addView(E);if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");f[q]=f[q].setSize(d[0],d[1])}urlParams.topBaseUrl&&(f[q]=f[q].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f[q]=f[q].setCallback(mxUtils.bind(this,function(g){if(g.action==google.picker.Action.PICKED||g.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",t),p&&g.action==google.picker.Action.CANCEL&&p();g.action==google.picker.Action.PICKED&&this.filePicked(g)})).build()}mxEvent.addListener(document,"click",t);f[q].setVisible(!0)}catch(g){this.ui.spinner.stop(),this.ui.handleError(g)}}))};DriveClient.prototype.pickFolder=function(k,c){this.folderPickerCallback=k;var p=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var q=-mxUtils.bind(this,function(D){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(D).className&&(mxEvent.removeListener(document,"click",q),f.folderPicker.setVisible(!1))});if(null==f.folderPicker||f.folderPickerToken!=b){f.folderPickerToken=b;var t=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),+mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(E).className&&(mxEvent.removeListener(document,"click",q),f.folderPicker.setVisible(!1))});if(null==f.folderPicker||f.folderPickerToken!=b){f.folderPickerToken=b;var t=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),H=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");f.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(f.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(t).addView(y).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));-if(urlParams.gPickerSize){var F=urlParams.gPickerSize.split(",");f.folderPicker=f.folderPicker.setSize(F[0],F[1])}urlParams.topBaseUrl&&(f.folderPicker=f.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.folderPicker=f.folderPicker.setCallback(mxUtils.bind(this,function(D){D.action!=google.picker.Action.PICKED&&D.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",q);this.folderPickerCallback(D)})).build()}mxEvent.addListener(document,"click",q);f.folderPicker.setVisible(!0)}catch(D){this.ui.spinner.stop(),-this.ui.handleError(D)}}))}catch(q){this.ui.handleError(q)}});c?p():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){p()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(q){this.ui.handleError(q)}}))};+if(urlParams.gPickerSize){var F=urlParams.gPickerSize.split(",");f.folderPicker=f.folderPicker.setSize(F[0],F[1])}urlParams.topBaseUrl&&(f.folderPicker=f.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.folderPicker=f.folderPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",q);this.folderPickerCallback(E)})).build()}mxEvent.addListener(document,"click",q);f.folderPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),+this.ui.handleError(E)}}))}catch(q){this.ui.handleError(q)}});c?p():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){p()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(q){this.ui.handleError(q)}}))};DriveClient.prototype.pickLibrary=function(k){this.filePickerCallback=k;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(F){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(F).className&&(mxEvent.removeListener(document,"click",c),f.libraryPicker.setVisible(!1))});if(null==f.libraryPicker||f.libraryPickerToken!=b){f.libraryPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),q=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),t=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),y=(new google.picker.DocsUploadView).setIncludeFolders(!0);f.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(f.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(q).addView(t).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var H=urlParams.gPickerSize.split(",");f.libraryPicker=f.libraryPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(f.libraryPicker=f.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));f.libraryPicker=f.libraryPicker.setCallback(mxUtils.bind(this,function(F){F.action!=google.picker.Action.PICKED&&F.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);F.action==google.picker.Action.PICKED&&this.filePicked(F)})).build()}mxEvent.addListener(document,"click",c);f.libraryPicker.setVisible(!0)}catch(F){this.ui.spinner.stop(),this.ui.handleError(F)}}))};DriveClient.prototype.showPermissions=function(k,c){var p=mxUtils.bind(this,function(){var q=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var t=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+k;this.ui.editor.graph.openLink(t)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(q.container,400,150,!0,!0);q.init()});this.sharingFailed?p():this.checkToken(mxUtils.bind(this,-function(){try{var q=new gapi.drive.share.ShareClient(this.appId);q.setOAuthToken(b);q.setItemIds([k]);q.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(t){for(var y=!1,H=0;H<t.length;H++)for(var F=0;F<t[H].addedNodes.length;F++){var D=t[H].addedNodes[F];"BUTTON"==D.nodeName&&"ok"==D.getAttribute("name")&&null!=D.parentNode&&null!=D.parentNode.parentNode&&-"dialog"==D.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,D.click(),p(),y=!0):"DIV"==D.nodeName&&"shr-q-shr-r-shr-xb"==D.className&&(y=!0)}y&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(t){this.ui.handleError(t)}}))};DriveClient.prototype.clearPersistentToken=function(){var k=JSON.parse(this.getPersistentToken(!0))||{};delete k.current;delete k[this.userId];for(var c in k){k.current={userId:c,+function(){try{var q=new gapi.drive.share.ShareClient(this.appId);q.setOAuthToken(b);q.setItemIds([k]);q.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(t){for(var y=!1,H=0;H<t.length;H++)for(var F=0;F<t[H].addedNodes.length;F++){var E=t[H].addedNodes[F];"BUTTON"==E.nodeName&&"ok"==E.getAttribute("name")&&null!=E.parentNode&&null!=E.parentNode.parentNode&&+"dialog"==E.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,E.click(),p(),y=!0):"DIV"==E.nodeName&&"shr-q-shr-r-shr-xb"==E.className&&(y=!0)}y&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(t){this.ui.handleError(t)}}))};DriveClient.prototype.clearPersistentToken=function(){var k=JSON.parse(this.getPersistentToken(!0))||{};delete k.current;delete k[this.userId];for(var c in k){k.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(k))};DriveClient.prototype.setPersistentToken=function(k,c){var p=JSON.parse(this.getPersistentToken(!0))||{};k.userId=this.userId;p.current=k;p[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(p),c)}})();DropboxFile=function(b,f,k){DrawioFile.call(this,b,f);this.stat=k};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};DropboxFile.prototype.getFileUrl=function(){return"https://www.dropbox.com/home/Apps"+this.ui.dropbox.appPath+this.stat.path_display};DropboxFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};DropboxFile.prototype.getRevisions=function(b,f){var k=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});k.then(mxUtils.bind(this,function(c){try{for(var p=[],q=c.entries.length-1;0<=q;q--)mxUtils.bind(this,function(t){p.push({modifiedDate:t.client_modified,fileSize:t.size,getXml:mxUtils.bind(this,function(y,H){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:t.rev},y,H)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+@@ -13558,22 +13563,22 @@ function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURt.then(mxUtils.bind(this,function(y){window.clearTimeout(q);p&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),f())}));t["catch"](mxUtils.bind(this,function(y){window.clearTimeout(q);p&&(null==y||401!==y.status||c?k({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(f,k,!0)}),k)))}))};DropboxClient.prototype.authenticate=function(f,k){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,k):null!=k&&k(c)}),k)};DropboxClient.prototype.authenticateStep2=function(f,k,c){if(null==window.onDropboxCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus())try{b=JSON.parse(t.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),k()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==t.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+-(t?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(H,F){if(q){window.onDropboxCallback=null;q=!1;try{null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.client.setAccessToken(b),this.setUser(null),t&&this.setPersistentToken("remembered"),k())}catch(D){c(D)}finally{null!=+(t?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(H,F){if(q){window.onDropboxCallback=null;q=!1;try{null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.client.setAccessToken(b),this.setUser(null),t&&this.setPersistentToken("remembered"),k())}catch(E){c(E)}finally{null!=F&&F.close()}}else null!=F&&F.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onDropboxCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(f,k,c){var p=mxUtils.bind(this,function(t){var y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),F=f();F.then(mxUtils.bind(this,-function(D){window.clearTimeout(H);y&&null!=k&&k(D)}));F["catch"](mxUtils.bind(this,function(D){window.clearTimeout(H);y&&(null==D||500!=D.status&&400!=D.status&&401!=D.status?c({message:mxResources.get("error")+" "+D.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,t?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(t){null==this.user?+function(E){window.clearTimeout(H);y&&null!=k&&k(E)}));F["catch"](mxUtils.bind(this,function(E){window.clearTimeout(H);y&&(null==E||500!=E.status&&400!=E.status&&401!=E.status?c({message:mxResources.get("error")+" "+E.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,t?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(t){null==this.user?this.updateUser(function(){q(!0)},c,t):p(t)});null==b?this.authenticate(function(){q(!0)},c):q(!1)};DropboxClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!0)};DropboxClient.prototype.getFile=function(f,k,c,p){p=null!=p?p:!1;var q=/\.png$/i.test(f);if(/^https:\/\//i.test(f)||/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&q){var t=mxUtils.bind(this,function(){var y=f.split("/");this.ui.convertFile(f,0<y.length?y[y.length-1]:f,null,this.extension,-k,c)});null!=b?t():this.authenticate(t,c)}else t={path:"/"+f},null!=urlParams.rev&&(t.rev=urlParams.rev),this.readFile(t,mxUtils.bind(this,function(y,H){var F=null;if(0<(q?y.lastIndexOf(","):-1)){var D=this.ui.extractGraphModelFromPng(y);null!=D&&0<D.length?y=D:F=new LocalFile(this,y,f,!0)}k(null!=F?F:p?new DropboxLibrary(this.ui,y,H):new DropboxFile(this.ui,y,H))}),c,q)};DropboxClient.prototype.readFile=function(f,k,c,p){var q=mxUtils.bind(this,function(y){var H=!0,F=window.setTimeout(mxUtils.bind(this,-function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),D=this.client.filesGetMetadata({path:"/"+f.path.substring(1),include_deleted:!1});D.then(mxUtils.bind(this,function(d){}));D["catch"](function(d){window.clearTimeout(F);H&&null!=d&&409==d.status&&(H=!1,c({message:mxResources.get("fileNotFound")}))});D=this.client.filesDownload(f);D.then(mxUtils.bind(this,function(d){window.clearTimeout(F);if(H){H=!1;try{var g=new FileReader;g.onload=mxUtils.bind(this,function(l){k(g.result,d)});p?g.readAsDataURL(d.fileBlob):-g.readAsText(d.fileBlob)}catch(l){c(l)}}}));D["catch"](mxUtils.bind(this,function(d){window.clearTimeout(F);H&&(H=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){q(!0)},c)))}))}),t=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){t(!0)},+k,c)});null!=b?t():this.authenticate(t,c)}else t={path:"/"+f},null!=urlParams.rev&&(t.rev=urlParams.rev),this.readFile(t,mxUtils.bind(this,function(y,H){var F=null;if(0<(q?y.lastIndexOf(","):-1)){var E=this.ui.extractGraphModelFromPng(y);null!=E&&0<E.length?y=E:F=new LocalFile(this,y,f,!0)}k(null!=F?F:p?new DropboxLibrary(this.ui,y,H):new DropboxFile(this.ui,y,H))}),c,q)};DropboxClient.prototype.readFile=function(f,k,c,p){var q=mxUtils.bind(this,function(y){var H=!0,F=window.setTimeout(mxUtils.bind(this,+function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),E=this.client.filesGetMetadata({path:"/"+f.path.substring(1),include_deleted:!1});E.then(mxUtils.bind(this,function(d){}));E["catch"](function(d){window.clearTimeout(F);H&&null!=d&&409==d.status&&(H=!1,c({message:mxResources.get("fileNotFound")}))});E=this.client.filesDownload(f);E.then(mxUtils.bind(this,function(d){window.clearTimeout(F);if(H){H=!1;try{var g=new FileReader;g.onload=mxUtils.bind(this,function(l){k(g.result,d)});p?g.readAsDataURL(d.fileBlob):+g.readAsText(d.fileBlob)}catch(l){c(l)}}}));E["catch"](mxUtils.bind(this,function(d){window.clearTimeout(F);H&&(H=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){q(!0)},c)))}))}),t=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){t(!0)},c,y):q(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};DropboxClient.prototype.checkExists=function(f,k,c){var p=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+f.toLowerCase(),include_deleted:!1})});this.executePromise(p,mxUtils.bind(this,function(q){c?k(!1,!0,q):this.ui.confirm(mxResources.get("replaceIt",[f]),function(){k(!0,!0,q)},function(){k(!1,!0,q)})}),function(q){k(!0,!1)})};DropboxClient.prototype.renameFile=function(f,k,c,p){if(/[\\\/:\?\*"\|]/.test(k))p({message:mxResources.get("dropboxCharsNotAllowed")});-else{if(null!=f&&null!=k){var q=f.stat.path_display.substring(1),t=q.lastIndexOf("/");0<t&&(k=q.substring(0,t+1)+k)}null!=f&&null!=k&&f.stat.path_lower.substring(1)!==k.toLowerCase()?this.checkExists(k,mxUtils.bind(this,function(y,H,F){y?(y=mxUtils.bind(this,function(D){D=mxUtils.bind(this,function(){return this.client.filesMove({from_path:f.stat.path_display,to_path:"/"+k,autorename:!1})});this.executePromise(D,c,p)}),H&&F.path_lower.substring(1)!==k.toLowerCase()?(H=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"++else{if(null!=f&&null!=k){var q=f.stat.path_display.substring(1),t=q.lastIndexOf("/");0<t&&(k=q.substring(0,t+1)+k)}null!=f&&null!=k&&f.stat.path_lower.substring(1)!==k.toLowerCase()?this.checkExists(k,mxUtils.bind(this,function(y,H,F){y?(y=mxUtils.bind(this,function(E){E=mxUtils.bind(this,function(){return this.client.filesMove({from_path:f.stat.path_display,to_path:"/"+k,autorename:!1})});this.executePromise(E,c,p)}),H&&F.path_lower.substring(1)!==k.toLowerCase()?(H=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+k.toLowerCase()})}),this.executePromise(H,y,p)):y()):p()})):p({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(f,k,c,p){this.insertFile(f,k,c,p,!0)};DropboxClient.prototype.insertFile=function(f,k,c,p,q){q=null!=q?q:!1;this.checkExists(f,mxUtils.bind(this,function(t){t?this.saveFile(f,k,mxUtils.bind(this,function(y){q?c(new DropboxLibrary(this.ui,k,y)):c(new DropboxFile(this.ui,k,y))}),p):p()}))};DropboxClient.prototype.saveFile=function(f,k,c,p,q){if(/[\\\/:\?\*"\|]/.test(f))p({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=k.length)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(k.length)+" / 150 MB)"});else{q=null!=q?q:"";var t=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+q+f,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([k],{type:"text/plain"})})});this.executePromise(t,c,p)}};DropboxClient.prototype.pickLibrary=function(f){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(k){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError(t)}),p=null!=k[0].link?k[0].link.indexOf(this.appPath):-1;if(0<p){var q=decodeURIComponent(k[0].link.substring(p+this.appPath.length-1));this.readFile({path:q},mxUtils.bind(this,function(t,y){if(null!=y&&y.id==k[0].id)try{this.ui.spinner.stop(),f(q.substring(1),new DropboxLibrary(this.ui,t,y))}catch(H){this.ui.handleError(H)}else this.createLibrary(k[0],f,c)}),c)}else this.createLibrary(k[0],f,c)}})})};DropboxClient.prototype.createLibrary=function(f,k,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(p){this.insertFile(f.name,p,mxUtils.bind(this,function(q){try{this.ui.spinner.stop(),k(q.getHash().substring(1),q)}catch(t){c(t)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(f,k){null!=-Dropbox.choose?(f=null!=f?f:mxUtils.bind(this,function(c,p){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):p.getHash(),null,p)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(k)this.ui.spinner.stop(),f(c[0].link);else{var p=mxUtils.bind(this,function(F){this.ui.spinner.stop();this.ui.handleError(F)}),q=mxUtils.bind(this,function(F,D){this.ui.spinner.stop();f(F,-D)}),t=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!Editor.useCanvasForExport&&t)q(c[0].link);else{var y=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<y){var H=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:H},mxUtils.bind(this,function(F,D){if(null!=D&&D.id==c[0].id){var d=t?F.lastIndexOf(","):-1;this.ui.spinner.stop();var g=null;0<d&&(d=this.ui.extractGraphModelFromPng(F),null!=d&&0<d.length?F=d:g=new LocalFile(this,-F,H,!0));f(H.substring(1),null!=g?g:new DropboxFile(this.ui,F,D))}else this.createFile(c[0],q,p)}),p,t)}else this.createFile(c[0],q,p)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(f,k,c){var p=/(\.png)$/i.test(f.name);this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(q){null!=q&&0<q.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,+Dropbox.choose?(f=null!=f?f:mxUtils.bind(this,function(c,p){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):p.getHash(),null,p)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(k)this.ui.spinner.stop(),f(c[0].link);else{var p=mxUtils.bind(this,function(F){this.ui.spinner.stop();this.ui.handleError(F)}),q=mxUtils.bind(this,function(F,E){this.ui.spinner.stop();f(F,+E)}),t=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!Editor.useCanvasForExport&&t)q(c[0].link);else{var y=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<y){var H=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:H},mxUtils.bind(this,function(F,E){if(null!=E&&E.id==c[0].id){var d=t?F.lastIndexOf(","):-1;this.ui.spinner.stop();var g=null;0<d&&(d=this.ui.extractGraphModelFromPng(F),null!=d&&0<d.length?F=d:g=new LocalFile(this,+F,H,!0));f(H.substring(1),null!=g?g:new DropboxFile(this.ui,F,E))}else this.createFile(c[0],q,p)}),p,t)}else this.createFile(c[0],q,p)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(f,k,c){var p=/(\.png)$/i.test(f.name);this.ui.editor.loadUrl(f.link,mxUtils.bind(this,function(q){null!=q&&0<q.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[f.name]),mxUtils.bind(this,function(){var t=p?q.lastIndexOf(","):-1;0<t&&(t=this.ui.extractGraphModelFromPng(q.substring(t+1)),null!=t&&0<t.length&&(q=t));this.insertFile(f.name,q,mxUtils.bind(this,function(y){k(f.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,p)}})();OneDriveFile=function(b,f,k){DrawioFile.call(this,b,f);this.meta=k};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var f=this.meta.parentReference.path;f=f.substring(f.indexOf("/root:")+6);var k=this.meta.webUrl;b=k.substring(0,k.length-f.length-encodeURIComponent(this.meta.name).length-1);k=k.substring(k.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+k+"&parent="+k.substring(0,k.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");f=k=this.meta.webUrl;k=k.substring(8);k=k.substring(k.indexOf("/"));f=f.substring(0,f.lastIndexOf("/"));f=f.substring(f.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+@@ -13584,8 +13589,8 @@ OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?tOneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,f){b.eTag=f};OneDriveFile.prototype.loadPatchDescriptor=function(b,f){var k=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(k+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):f(this.ui.oneDrive.parseRequestText(c))}),f)};OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,f,k,c,p){this.doSave(this.getTitle(),b,f,k,c,p)};OneDriveFile.prototype.saveAs=function(b,f,k){this.doSave(b,!1,f,k)};OneDriveFile.prototype.doSave=function(b,f,k,c,p,q){var t=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=t;this.saveFile(b,f,k,c,p,q)}),c,p,q])};-OneDriveFile.prototype.saveFile=function(b,f,k,c,p,q){if(!this.isEditable())null!=k&&k();else if(!this.savingFile)if(this.getTitle()==b){var t=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=q||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),H=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(F,D){this.setModified(this.getShadowModified());-this.savingFile=!1;this.meta=F;this.fileSaved(D,H,mxUtils.bind(this,function(){this.contentChanged();null!=k&&k()}),c)}),mxUtils.bind(this,function(F,D){try{this.savingFile=!1,this.isConflict(D)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();t()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&+OneDriveFile.prototype.saveFile=function(b,f,k,c,p,q){if(!this.isEditable())null!=k&&k();else if(!this.savingFile)if(this.getTitle()==b){var t=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=q||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),H=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(F,E){this.setModified(this.getShadowModified());+this.savingFile=!1;this.meta=F;this.fileSaved(E,H,mxUtils.bind(this,function(){this.contentChanged();null!=k&&k()}),c)}),mxUtils.bind(this,function(F,E){try{this.savingFile=!1,this.isConflict(E)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();t()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(F)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}}),y)}catch(F){if(this.savingFile=!1,null!=c)c(F);else throw F;}});t()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=k&&k();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};OneDriveFile.prototype.rename=function(b,f,k){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(p){this.hasSameExtension(b,this.getTitle())?(this.meta=p,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=f&&f(p)):(this.meta=p,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,f,k))}),k)};OneDriveFile.prototype.move=function(b,f,k){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=f&&f(c)}),k)};OneDriveLibrary=function(b,f,k){OneDriveFile.call(this,b,f,k)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,f,k){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=f&&f(c)}),k)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(f,k,c,p){null==k&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(k=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==p&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(p=!0);DrawioClient.call(this,f,k?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=k;this.inlinePicker=c;this.noLogout=p;f=JSON.parse(this.token);null!=f&&(this.endpointHint=null!=f.endpointHint?f.endpointHint.replace("/Documents",@@ -13597,31 +13602,31 @@ this.get(this.baseUrl+"/me",mxUtils.bind(this,function(t){window.clearTimeout(q)this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<f&&(this.tokenRefreshInterval=1E3*f,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*f))};OneDriveClient.prototype.authenticate=function(f,k,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(p){this.updateAuthInfo(p,!0,null==this.endpointHint,f,k)}),k,null!=window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(p){200<=p.getStatus()&&299>=p.getStatus()?this.authenticateStep2(p.getText(),f,k,c):null!=k&&k(p)}),k)};OneDriveClient.prototype.updateAuthInfo=function(f,k,c,p,q){c&&this.setUser(null);b=f.access_token;delete f.access_token;f.expiresOn=Date.now()+1E3*f.expires_in;this.tokenExpiresOn=f.expiresOn;f.remember=k;this.setPersistentToken(JSON.stringify(f),!k);this.resetTokenRefresh(f.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){p()}),q):p()};OneDriveClient.prototype.authenticateStep2=function(f,k,c,p){if(null==window.onOneDriveCallback){var q=mxUtils.bind(this,function(){var t=!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(H){if(200<=H.getStatus()&&-299>=H.getStatus())try{this.updateAuthInfo(JSON.parse(H.getText()),y.remember,!1,k,c)}catch(F){c({message:mxResources.get("authFailed"),retry:q})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=H.getStatus()&&400!=H.getStatus()||p?c({message:mxResources.get("accessDenied"),retry:q}):q()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(H,F){var D=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+-"&scope="+encodeURIComponent(this.scopes+(H?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f);D=window.open(D,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=D&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,g){if(t){window.onOneDriveCallback=-null;t=!1;try{null==d?c({message:mxResources.get("accessDenied"),retry:q}):(null!=F&&F(),this.updateAuthInfo(d,H,!0,k,c))}catch(l){c(l)}finally{null!=g&&g.close()}}else null!=g&&g.close()}),D.focus())}),mxUtils.bind(this,function(){t&&(window.onOneDriveCallback=null,t=!1,c({message:mxResources.get("accessDenied"),retry:q}))}))});q()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(f,k){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=+299>=H.getStatus())try{this.updateAuthInfo(JSON.parse(H.getText()),y.remember,!1,k,c)}catch(F){c({message:mxResources.get("authFailed"),retry:q})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=H.getStatus()&&400!=H.getStatus()||p?c({message:mxResources.get("accessDenied"),retry:q}):q()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(H,F){var E=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)++"&scope="+encodeURIComponent(this.scopes+(H?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f);E=window.open(E,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=E&&(window.onOneDriveCallback=mxUtils.bind(this,function(d,g){if(t){window.onOneDriveCallback=+null;t=!1;try{null==d?c({message:mxResources.get("accessDenied"),retry:q}):(null!=F&&F(),this.updateAuthInfo(d,H,!0,k,c))}catch(l){c(l)}finally{null!=g&&g.close()}}else null!=g&&g.close()}),E.focus())}),mxUtils.bind(this,function(){t&&(window.onOneDriveCallback=null,t=!1,c({message:mxResources.get("accessDenied"),retry:q}))}))});q()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(f,k){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var p=JSON.parse(c.getText());0<p.webUrl.indexOf(".sharepoint.com")?this.endpointHint=p.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var q=JSON.parse(this.getPersistentToken(!0));null!=q&&(q.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(q),!q.remember));f();return}}catch(t){}k({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),k)};OneDriveClient.prototype.executeRequest=function(f,k,c){var p=mxUtils.bind(this,function(q){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout);this.get(f,mxUtils.bind(this,function(H){window.clearTimeout(y);t&&(200<=H.getStatus()&&299>=H.getStatus()||404==H.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(H)):q||401!==H.getStatus()&&400!==H.getStatus()?c(this.parseRequestText(H)):this.authenticate(function(){p(!0)},c,q))}),mxUtils.bind(this,function(H){window.clearTimeout(y);t&&c(H)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){p(!0)},c):p(!1)};OneDriveClient.prototype.checkToken=function(f,k){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(f,null!=k?k:this.emptyFn):f()};OneDriveClient.prototype.getItemRef=function(f){var k=f.split("/");return 1<k.length?{driveId:k[0],id:k[1]}:{id:f}};OneDriveClient.prototype.getItemURL=function(f,k){var c=f.split("/");return 1<c.length?(f=c[1],(k?"":this.baseUrl)+"/drives/"+c[0]+("root"==f?"/root":"/items/"+f)):(k?"":this.baseUrl)+"/me/drive/items/"+f};OneDriveClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(f){var k=f.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<k&&(f=f.substring(0,k));return f};OneDriveClient.prototype.getFile=function(f,k,c,p,q){q=null!=q?q:!1;this.executeRequest(this.getItemURL(f),-mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var y=JSON.parse(t.getText()),H=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!Editor.useCanvasForExport&&H)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,k,c);else{var F=!0,D=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],-mxUtils.bind(this,function(d){try{if(window.clearTimeout(D),F){/\.html$/i.test(y.name)&&(d=this.removeExtraHtmlContent(d));var g=null;if(0<(H?d.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(d);null!=l&&0<l.length?d=l:g=new LocalFile(this.ui,d,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,y["@microsoft.graph.downloadUrl"])?-this.ui.parseFileData(d,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?k(new LocalFile(this.ui,x.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),y.name):null!=g?k(g):q?k(new OneDriveLibrary(this.ui,d,y)):k(new OneDriveFile(this.ui,d,y))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(d){window.clearTimeout(D);F&&c(this.parseRequestText(d))}),H||null!=+mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var y=JSON.parse(t.getText()),H=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!Editor.useCanvasForExport&&H)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,k,c);else{var F=!0,E=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],+mxUtils.bind(this,function(d){try{if(window.clearTimeout(E),F){/\.html$/i.test(y.name)&&(d=this.removeExtraHtmlContent(d));var g=null;if(0<(H?d.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(d);null!=l&&0<l.length?d=l:g=new LocalFile(this.ui,d,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,y["@microsoft.graph.downloadUrl"])?+this.ui.parseFileData(d,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?k(new LocalFile(this.ui,x.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),y.name):null!=g?k(g):q?k(new OneDriveLibrary(this.ui,d,y)):k(new OneDriveFile(this.ui,d,y))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(d){window.clearTimeout(E);F&&c(this.parseRequestText(d))}),H||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(t))}),function(t){null!=c&&(null!=t&&null!=t.error&&"ObjectHandle is Invalid"===t.error.message&&(t.error.message=mxResources.get("fileNotFoundOrDenied")),c(t))})};OneDriveClient.prototype.renameFile=function(f,k,c,p){null!=f&&null!=k&&(this.isValidFilename(k)?this.checkExists(f.getParentId(),k,!1,mxUtils.bind(this,function(q){q?this.writeFile(this.getItemURL(f.getId()),JSON.stringify({name:k}),"PATCH","application/json",c,p):p()})):p({message:this.invalidFilenameRegExs[0].test(k)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(f,k,c,p){k=this.getItemRef(k);var q=this.getItemRef(f);k.driveId!=q.driveId?p({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(f),JSON.stringify({parentReference:k}),"PATCH","application/json",c,p)};OneDriveClient.prototype.insertLibrary=function(f,k,c,p,q){this.insertFile(f,k,c,p,!0,q)};OneDriveClient.prototype.insertFile=function(f,k,c,p,q,t){this.isValidFilename(f)?(q=null!=q?q:!1,this.checkExists(t,f,!0,mxUtils.bind(this,function(y){if(y){y="/me/drive/root";null!=t&&(y=this.getItemURL(t,!0));var H=mxUtils.bind(this,function(F){q?c(new OneDriveLibrary(this.ui,k,F)):c(new OneDriveFile(this.ui,k,F))});y=this.baseUrl+y+"/children/"+encodeURIComponent(f)+"/content";4E6<=k.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(F){this.writeLargeFile(this.getItemURL(F.id),k,H,p)}),p):this.writeFile(y,k,"PUT",null,H,p)}else p()}))):p({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(f,k,c,p){var q="/me/drive/root";null!=f&&(q=this.getItemURL(f,!0));this.executeRequest(this.baseUrl+q+"/children/"+encodeURIComponent(k),mxUtils.bind(this,function(t){404==t.getStatus()?p(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[k]),function(){p(!0)},function(){p(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){p(!1)}))}),function(t){p(!1)},!0)};OneDriveClient.prototype.saveFile=function(f,-k,c,p){try{var q=f.getData(),t=mxUtils.bind(this,function(H){var F=mxUtils.bind(this,function(d){k(d,q)}),D=this.getItemURL(f.getId());4E6<=H.length?this.writeLargeFile(D,H,F,c,p):this.writeFile(D+"/content/",H,"PUT",null,F,c,p)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(f.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){t(this.ui.base64ToBlob(H,"image/png"))}),c,this.ui.getCurrentFile()!=f?q:null,y.scale,y.border)}else t(q)}catch(H){c(H)}};-OneDriveClient.prototype.writeLargeFile=function(f,k,c,p,q){try{if(null!=k){var t=(new TextEncoder).encode(k).length,y=mxUtils.bind(this,function(F,D,d,g){try{g=g||0;var l=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){l=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=k.substr(D,4194304),z=(new TextEncoder).encode(x).length,B=new mxXmlRequest(F,x,"PUT");B.setRequestHeaders=mxUtils.bind(this,function(I,G){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+z-1)+"/"+t)});B.send(mxUtils.bind(this,-function(I){window.clearTimeout(n);if(l){var G=I.getStatus();200<=G&&299>=G?(G=D+x.length,G==k.length?c(JSON.parse(I.getText())):y(F,G,d+z,g)):500<=G&&599>=G&&2>g?(g++,y(F,D,d,g)):p(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);l&&p(this.parseRequestText(I))}))}catch(I){p(I)}}),H=mxUtils.bind(this,function(F){try{var D=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){D=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var g=new mxXmlRequest(f+-"/createUploadSession","{}","POST");g.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b);null!=q&&l.setRequestHeader("If-Match",q)});g.send(mxUtils.bind(this,function(l){window.clearTimeout(d);D&&(200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),y(l.uploadUrl,0,0)):F||401!==l.getStatus()?p(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},p,F))}),mxUtils.bind(this,function(l){window.clearTimeout(d);-D&&p(this.parseRequestText(l))}))}catch(l){p(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},p):H(!1)}else p({message:mxResources.get("unknownError")})}catch(F){p(F)}};OneDriveClient.prototype.writeFile=function(f,k,c,p,q,t,y){try{if(null!=f&&null!=k){var H=mxUtils.bind(this,function(F){try{var D=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){D=!1;t({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var g=new mxXmlRequest(f,k,c);g.setRequestHeaders=-mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type",p||" ");l.setRequestHeader("Authorization","Bearer "+b);null!=y&&l.setRequestHeader("If-Match",y)});g.send(mxUtils.bind(this,function(l){window.clearTimeout(d);D&&(200<=l.getStatus()&&299>=l.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),q(JSON.parse(l.getText()))):F||401!==l.getStatus()?t(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},t,F))}),mxUtils.bind(this,function(l){window.clearTimeout(d);-D&&t(this.parseRequestText(l))}))}catch(l){t(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},t):H(!1)}else t({message:mxResources.get("unknownError")})}catch(F){t(F)}};OneDriveClient.prototype.parseRequestText=function(f){var k={message:mxResources.get("unknownError")};try{k=JSON.parse(f.getText()),k.status=f.getStatus(),k.error&&(k.error.status=k.status,k.error.code=k.status)}catch(c){}return k};OneDriveClient.prototype.pickLibrary=function(f){this.pickFile(function(k){f(k)})};+k,c,p){try{var q=f.getData(),t=mxUtils.bind(this,function(H){var F=mxUtils.bind(this,function(d){k(d,q)}),E=this.getItemURL(f.getId());4E6<=H.length?this.writeLargeFile(E,H,F,c,p):this.writeFile(E+"/content/",H,"PUT",null,F,c,p)});if(Editor.useCanvasForExport&&/(\.png)$/i.test(f.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){t(this.ui.base64ToBlob(H,"image/png"))}),c,this.ui.getCurrentFile()!=f?q:null,y.scale,y.border)}else t(q)}catch(H){c(H)}};+OneDriveClient.prototype.writeLargeFile=function(f,k,c,p,q){try{if(null!=k){var t=(new TextEncoder).encode(k).length,y=mxUtils.bind(this,function(F,E,d,g){try{g=g||0;var l=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){l=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var x=k.substr(E,4194304),z=(new TextEncoder).encode(x).length,B=new mxXmlRequest(F,x,"PUT");B.setRequestHeaders=mxUtils.bind(this,function(I,G){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+z-1)+"/"+t)});B.send(mxUtils.bind(this,+function(I){window.clearTimeout(n);if(l){var G=I.getStatus();200<=G&&299>=G?(G=E+x.length,G==k.length?c(JSON.parse(I.getText())):y(F,G,d+z,g)):500<=G&&599>=G&&2>g?(g++,y(F,E,d,g)):p(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);l&&p(this.parseRequestText(I))}))}catch(I){p(I)}}),H=mxUtils.bind(this,function(F){try{var E=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){E=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var g=new mxXmlRequest(f++"/createUploadSession","{}","POST");g.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type","application/json");l.setRequestHeader("Authorization","Bearer "+b);null!=q&&l.setRequestHeader("If-Match",q)});g.send(mxUtils.bind(this,function(l){window.clearTimeout(d);E&&(200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),y(l.uploadUrl,0,0)):F||401!==l.getStatus()?p(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},p,F))}),mxUtils.bind(this,function(l){window.clearTimeout(d);+E&&p(this.parseRequestText(l))}))}catch(l){p(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},p):H(!1)}else p({message:mxResources.get("unknownError")})}catch(F){p(F)}};OneDriveClient.prototype.writeFile=function(f,k,c,p,q,t,y){try{if(null!=f&&null!=k){var H=mxUtils.bind(this,function(F){try{var E=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){E=!1;t({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(l){}var g=new mxXmlRequest(f,k,c);g.setRequestHeaders=+mxUtils.bind(this,function(l,n){l.setRequestHeader("Content-Type",p||" ");l.setRequestHeader("Authorization","Bearer "+b);null!=y&&l.setRequestHeader("If-Match",y)});g.send(mxUtils.bind(this,function(l){window.clearTimeout(d);E&&(200<=l.getStatus()&&299>=l.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),q(JSON.parse(l.getText()))):F||401!==l.getStatus()?t(this.parseRequestText(l),l):this.authenticate(function(){H(!0)},t,F))}),mxUtils.bind(this,function(l){window.clearTimeout(d);+E&&t(this.parseRequestText(l))}))}catch(l){t(l)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){H(!0)},t):H(!1)}else t({message:mxResources.get("unknownError")})}catch(F){t(F)}};OneDriveClient.prototype.parseRequestText=function(f){var k={message:mxResources.get("unknownError")};try{k=JSON.parse(f.getText()),k.status=f.getStatus(),k.error&&(k.error.status=k.status,k.error.code=k.status)}catch(c){}return k};OneDriveClient.prototype.pickLibrary=function(f){this.pickFile(function(k){f(k)})};OneDriveClient.prototype.createInlinePicker=function(f,k,c){return mxUtils.bind(this,function(){var p=null,q=document.createElement("div");q.style.position="relative";var t=new CustomDialog(this.ui,q,mxUtils.bind(this,function(){var y=p.getSelectedItem();if(null!=y)if(k&&"object"==typeof y.folder)f({value:[y]});else{if(!y.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var H=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(H),mxUtils.bind(this,function(F){this.ui.spinner.stop();200<=F.getStatus()&&299>=F.getStatus()?(F=JSON.parse(F.getText()),f(H,{value:[F]})):this.ui.handleError({code:F.getStatus()})}),mxUtils.bind(this,function(F){this.ui.spinner.stop();this.ui.handleError(F)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(k?"select":"open"),null,null,null,null,!0);this.ui.showDialog(t.container,550,500,!0,!0);q.style.width=parseInt(t.container.parentNode.style.width)-60+"px";q.style.height=parseInt(t.container.parentNode.style.height)--120+"px";p=new mxODPicker(q,null,mxUtils.bind(this,function(y,H,F,D){this.executeRequest(D?y:this.baseUrl+y,function(d){H(JSON.parse(d.getText()))},F)}),mxUtils.bind(this,function(y,H,F,D){this.executeRequest(this.baseUrl+"/drives/"+H+"/items/"+y,function(d){F(JSON.parse(d.getText()))},D)}),null,null,function(y){k?f({value:[y]}):f(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),k,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=+120+"px";p=new mxODPicker(q,null,mxUtils.bind(this,function(y,H,F,E){this.executeRequest(E?y:this.baseUrl+y,function(d){H(JSON.parse(d.getText()))},F)}),mxUtils.bind(this,function(y,H,F,E){this.executeRequest(this.baseUrl+"/drives/"+H+"/items/"+y,function(d){F(JSON.parse(d.getText()))},E)}),null,null,function(y){k?f({value:[y]}):f(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),k,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(f,k){var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("error"),q&&q.message?q.message:q)}),p=mxUtils.bind(this,function(q){var t=this.inlinePicker?this.createInlinePicker(f,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(y){f(y);mxClient.IS_IE11&&(b=y.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});q?t():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){f({value:[this.rootId]})}),t,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){p(this.inlinePicker&&k)}),c):p(k)};OneDriveClient.prototype.pickFile=function(f,k){f=null!=f?f:mxUtils.bind(this,function(q){this.ui.loadFile("W"+encodeURIComponent(q))});var c=mxUtils.bind(this,function(q){this.ui.showError(mxResources.get("error"),q&&q.message?q.message:q)}),p=this.inlinePicker?this.createInlinePicker(f,null,k):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",@@ -13633,7 +13638,7 @@ GitHubFile.prototype.getFolderUrl=function(){return"https://github.com/"+encodeUGitHubFile.prototype.getPublicUrl=function(b){if(null!=this.meta.download_url)try{""!=(new URL(this.meta.download_url)).search?b(null):mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)}))}catch(f){b(null)}else b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,f){this.peer.getFile(this.getId(),b,f)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,f){b.sha=f};GitHubFile.prototype.save=function(b,f,k,c,p,q){this.doSave(this.getTitle(),f,k,c,p,q)};GitHubFile.prototype.saveAs=function(b,f,k){this.doSave(b,f,k)};GitHubFile.prototype.doSave=function(b,f,k,c,p,q){var t=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=t;this.saveFile(b,!1,f,k,c,p,q)}),k,c,p])};-GitHubFile.prototype.saveFile=function(b,f,k,c,p,q,t){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(H){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var F=this.getCurrentEtag(),D=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,d);this.fileSaved(D,F,mxUtils.bind(this,function(){this.contentChanged();+GitHubFile.prototype.saveFile=function(b,f,k,c,p,q,t){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(H){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var F=this.getCurrentEtag(),E=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,d);this.fileSaved(E,F,mxUtils.bind(this,function(){this.contentChanged();null!=k&&k()}),c)}),mxUtils.bind(this,function(d){this.savingFile=!1;this.isConflict(d)?(this.inConflictState=!0,null!=c&&(d.commitMessage=H,c(d))):null!=c&&c(d)}),q,H)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;null!=k&&k();this.ui.fileLoaded(g)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,d,H)}))});null!=t?y(t):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(H){y(H)}),c)}else null!=k&&k()};GitHubLibrary=function(b,f,k){GitHubFile.call(this,b,f,k)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(f,k){DrawioClient.call(this,f,k||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(f){b=f};GitHubClient.prototype.updateUser=function(f,k,c){var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;t.setRequestHeaders=function(H,F){H.setRequestHeader("Authorization",y)};t.send(mxUtils.bind(this,function(){window.clearTimeout(q);p&&(401===@@ -13642,96 +13647,96 @@ t.getStatus()?c?k({code:t.getStatus(),message:this.getErrorMessage(t,mxResourcest.getStatus()&&299>=t.getStatus())try{b=JSON.parse(t.getText()).access_token,this.setUser(null),k()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,401==t.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(H,F){q?(window.onGitHubCallback=null,q=!1,null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.setUser(null),t&&this.setPersistentToken("remembered"),k(),null!=F&&F.close())):null!=F&&F.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitHubCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(f,k){try{var c=JSON.parse(f.getText());null!=c&&null!=c.message&&(k=c.message)}catch(p){}return k};GitHubClient.prototype.showAuthorizeDialog=function(f,k){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),f,mxResources.get("authorize"),-mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),k,480,null,!1)};GitHubClient.prototype.executeRequest=function(f,k,c,p,q){var t=mxUtils.bind(this,function(H){var F=!0,D=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),d=this.authToken+" "+b;f.setRequestHeaders=function(g,l){g.setRequestHeader("Authorization",-d)};f.send(mxUtils.bind(this,function(){window.clearTimeout(D);var g=mxUtils.bind(this,function(){var x=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){x();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(F)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())k(f);else if(401===f.getStatus())H?c({code:f.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},+mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),k,480,null,!1)};GitHubClient.prototype.executeRequest=function(f,k,c,p,q){var t=mxUtils.bind(this,function(H){var F=!0,E=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),d=this.authToken+" "+b;f.setRequestHeaders=function(g,l){g.setRequestHeader("Authorization",+d)};f.send(mxUtils.bind(this,function(){window.clearTimeout(E);var g=mxUtils.bind(this,function(){var x=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){x();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(F)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())k(f);else if(401===f.getStatus())H?c({code:f.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},c)})}):this.authenticate(function(){t(!0)},c);else if(403===f.getStatus()){var l=!1;try{var n=JSON.parse(f.getText());null!=n&&"Resource not accessible by integration"==n.message?g():(null!=n&&null!=n.errors&&0<n.errors.length&&(l="too_large"==n.errors[0].code),c({message:mxResources.get(l?"drawingTooLarge":"forbidden")}))}catch(x){c({message:mxResources.get(l?"drawingTooLarge":"forbidden")})}}else 404===f.getStatus()?q?c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):-g():409===f.getStatus()?c({code:f.getStatus(),status:409}):c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(g){window.clearTimeout(D);F&&c(g)}))}),y=mxUtils.bind(this,function(H){null==this.user?this.updateUser(function(){y(!0)},c,H):t(H)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!0)};GitHubClient.prototype.getSha=function(f,k,c,p,q,t,y){var H=-"&t="+(new Date).getTime();f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+k+"/contents/"+c+"?ref="+p+H,null,"HEAD");this.executeRequest(f,mxUtils.bind(this,function(F){try{q(F.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(D){t(D)}}),t,null,y)};GitHubClient.prototype.getFile=function(f,k,c,p,q){p=null!=p?p:!1;var t=f.split("/"),y=t[0],H=t[1],F=t[2];f=t.slice(3,t.length).join("/");t=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&-t))if(null!=b){q=this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+F;var D={Authorization:"token "+b};t=f.split("/");this.ui.convertFile(q,0<t.length?t[t.length-1]:f,null,this.extension,k,c,null,D)}else c({message:mxResources.get("accessDenied")});else t="&t="+(new Date).getTime(),f=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+F+t,null,"GET"),this.executeRequest(f,mxUtils.bind(this,function(d){try{var g=JSON.parse(d.getText());if(""==g.content&&null!=g.git_url){var l=+g():409===f.getStatus()?c({code:f.getStatus(),status:409}):c({code:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(g){window.clearTimeout(E);F&&c(g)}))}),y=mxUtils.bind(this,function(H){null==this.user?this.updateUser(function(){y(!0)},c,H):t(H)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(f,k,c){this.getFile(f,k,c,!0)};GitHubClient.prototype.getSha=function(f,k,c,p,q,t,y){var H=+"&t="+(new Date).getTime();f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+k+"/contents/"+c+"?ref="+p+H,null,"HEAD");this.executeRequest(f,mxUtils.bind(this,function(F){try{q(F.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(E){t(E)}}),t,null,y)};GitHubClient.prototype.getFile=function(f,k,c,p,q){p=null!=p?p:!1;var t=f.split("/"),y=t[0],H=t[1],F=t[2];f=t.slice(3,t.length).join("/");t=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&+t))if(null!=b){q=this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+F;var E={Authorization:"token "+b};t=f.split("/");this.ui.convertFile(q,0<t.length?t[t.length-1]:f,null,this.extension,k,c,null,E)}else c({message:mxResources.get("accessDenied")});else t="&t="+(new Date).getTime(),f=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+H+"/contents/"+f+"?ref="+F+t,null,"GET"),this.executeRequest(f,mxUtils.bind(this,function(d){try{var g=JSON.parse(d.getText());if(""==g.content&&null!=g.git_url){var l=new mxXmlRequest(g.git_url,null,"GET");this.executeRequest(l,mxUtils.bind(this,function(n){n=JSON.parse(n.getText());""!=n.content?(g.content=n.content,g.encoding=n.encoding,k(this.createGitHubFile(y,H,F,g,p))):c({message:mxResources.get("errorLoadingFile")})}),c)}else k(this.createGitHubFile(y,H,F,g,p))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(f,k,c,p,q){f={org:f,repo:k,ref:c,name:p.name,path:p.path,sha:p.sha,html_url:p.html_url,download_url:p.download_url};k=p.content;"base64"===p.encoding&&(/\.jpe?g$/i.test(p.name)?k="data:image/jpeg;base64,"+k:/\.gif$/i.test(p.name)?k="data:image/gif;base64,"+k:/\.png$/i.test(p.name)?(p=this.ui.extractGraphModelFromPng(k),k=null!=p&&0<p.length?p:"data:image/png;base64,"+k):k=Base64.decode(k));return q?new GitHubLibrary(this.ui,k,f):new GitHubFile(this.ui,k,f)};GitHubClient.prototype.insertLibrary=function(f,k,c,p,q){this.insertFile(f,k,c,p,!0,q,!1)};GitHubClient.prototype.insertFile=function(f,k,c,p,q,t,y){q=null!=q?q:!1;t=t.split("/");-var H=t[0],F=t[1],D=t[2],d=t.slice(3,t.length).join("/");0<d.length&&(d+="/");d+=f;this.checkExists(H+"/"+F+"/"+D+"/"+d,!0,mxUtils.bind(this,function(g,l){g?q?(y||(k=Base64.encode(k)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(n){this.writeFile(H,F,D,d,n,k,l,mxUtils.bind(this,function(x){try{var z=JSON.parse(x.getText());c(this.createGitHubFile(H,F,D,z.content,q))}catch(B){p(B)}}),p)}),p)):c(new GitHubFile(this.ui,k,{org:H,repo:F,ref:D,name:f,path:d,sha:l,isNew:!0})):p()}))};GitHubClient.prototype.showCommitDialog=+var H=t[0],F=t[1],E=t[2],d=t.slice(3,t.length).join("/");0<d.length&&(d+="/");d+=f;this.checkExists(H+"/"+F+"/"+E+"/"+d,!0,mxUtils.bind(this,function(g,l){g?q?(y||(k=Base64.encode(k)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(n){this.writeFile(H,F,E,d,n,k,l,mxUtils.bind(this,function(x){try{var z=JSON.parse(x.getText());c(this.createGitHubFile(H,F,E,z.content,q))}catch(B){p(B)}}),p)}),p)):c(new GitHubFile(this.ui,k,{org:H,repo:F,ref:E,name:f,path:d,sha:l,isNew:!0})):p()}))};GitHubClient.prototype.showCommitDialog=function(f,k,c,p){var q=this.ui.spinner.pause();f=new FilenameDialog(this.ui,mxResources.get(k?"addedFile":"updateFile",[f]),mxResources.get("ok"),mxUtils.bind(this,function(t){q(function(){c(t)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){p()}));this.ui.showDialog(f.container,400,80,!0,!1);f.init()};GitHubClient.prototype.writeFile=function(f,k,c,p,q,t,y,H,F){t.length>=this.maxFileSize?F({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+-" / 1 MB)"}):(c={path:p,branch:decodeURIComponent(c),message:q,content:t},null!=y&&(c.sha=y),f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+k+"/contents/"+p,JSON.stringify(c),"PUT"),this.executeRequest(f,mxUtils.bind(this,function(D){H(D)}),mxUtils.bind(this,function(D){404==D.code&&(D.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,D.code=null);F(D)})))};GitHubClient.prototype.checkExists=function(f,k,c){var p=f.split("/"),q=p[0],t=p[1],y=p[2];f=p.slice(3,p.length).join("/");-this.getSha(q,t,f,y,mxUtils.bind(this,function(H){if(k){var F=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){F();c(!0,H)},function(){F();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(H){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(f,k,c,p,q){var t=f.meta.org,y=f.meta.repo,H=f.meta.ref,F=f.meta.path,D=mxUtils.bind(this,function(g,-l){this.writeFile(t,y,H,F,q,l,g,mxUtils.bind(this,function(n){delete f.meta.isNew;k(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(F)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){D(f.meta.sha,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,g.scale,g.border)}else D(f.meta.sha,Base64.encode(f.getData()))});p?this.getSha(t,y,F,+" / 1 MB)"}):(c={path:p,branch:decodeURIComponent(c),message:q,content:t},null!=y&&(c.sha=y),f=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+k+"/contents/"+p,JSON.stringify(c),"PUT"),this.executeRequest(f,mxUtils.bind(this,function(E){H(E)}),mxUtils.bind(this,function(E){404==E.code&&(E.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,E.code=null);F(E)})))};GitHubClient.prototype.checkExists=function(f,k,c){var p=f.split("/"),q=p[0],t=p[1],y=p[2];f=p.slice(3,p.length).join("/");+this.getSha(q,t,f,y,mxUtils.bind(this,function(H){if(k){var F=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){F();c(!0,H)},function(){F();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(H){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(f,k,c,p,q){var t=f.meta.org,y=f.meta.repo,H=f.meta.ref,F=f.meta.path,E=mxUtils.bind(this,function(g,+l){this.writeFile(t,y,H,F,q,l,g,mxUtils.bind(this,function(n){delete f.meta.isNew;k(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(F)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){E(f.meta.sha,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,g.scale,g.border)}else E(f.meta.sha,Base64.encode(f.getData()))});p?this.getSha(t,y,F,H,mxUtils.bind(this,function(g){f.meta.sha=g;d()}),c):d()};GitHubClient.prototype.pickLibrary=function(f){this.pickFile(f)};GitHubClient.prototype.pickFolder=function(f){this.showGitHubDialog(!1,f,!0)};GitHubClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(k){this.ui.loadFile("H"+encodeURIComponent(k))});this.showGitHubDialog(!0,f)};GitHubClient.prototype.showGitHubDialog=function(f,k,c){var p=null,q=null,t=null,y=null,H=document.createElement("div");H.style.whiteSpace=-"nowrap";H.style.overflow="hidden";H.style.height="320px";var F=document.createElement("h3");mxUtils.write(F,mxResources.get(f?"selectFile":"selectFolder"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(F);F=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){C()}));F.style.position="absolute";F.style.right="40px";F.style.top="26px";H.appendChild(F);var D=document.createElement("div");D.style.whiteSpace=-"nowrap";D.style.border="1px solid lightgray";D.style.boxSizing="border-box";D.style.padding="4px";D.style.overflow="auto";D.style.lineHeight="1.2em";D.style.height="290px";H.appendChild(D);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var g=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){k(p+"/"+q+"/"+encodeURIComponent(t)+"/"+y)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",+"nowrap";H.style.overflow="hidden";H.style.height="320px";var F=document.createElement("h3");mxUtils.write(F,mxResources.get(f?"selectFile":"selectFolder"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(F);F=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){C()}));F.style.position="absolute";F.style.right="40px";F.style.top="26px";H.appendChild(F);var E=document.createElement("div");E.style.whiteSpace=+"nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="290px";H.appendChild(E);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var g=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){k(p+"/"+q+"/"+encodeURIComponent(t)+"/"+y)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(g.container,420,370,!0,!0);f&&g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(Q,U,T,P){var v=document.createElement("a");v.setAttribute("title",Q);v.style.cursor="pointer";mxUtils.write(v,Q);mxEvent.addListener(v,"click",U);P&&(v.style.textDecoration="underline");null!=T&&(Q=d.cloneNode(),Q.style.padding=T,Q.appendChild(v),v=Q);return v}),n=mxUtils.bind(this,function(Q){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));Q||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(t),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var T=y.split("/");for(Q=0;Q<T.length;Q++)(function(P){mxUtils.write(U,-" / ");U.appendChild(l(T[P],mxUtils.bind(this,function(){y=T.slice(0,P+1).join("/");I()}),null,!0))})(Q)}D.appendChild(U)}),x=mxUtils.bind(this,function(Q){this.ui.handleError(Q,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=t=q=p=null,C()):this.ui.hideDialog()}),null,{})}),z=null,B=null,I=mxUtils.bind(this,function(Q){null==Q&&(D.innerText="",Q=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/contents/"+y+"?ref="+encodeURIComponent(t)+"&per_page=100&page="+-Q,null,"GET");this.ui.spinner.spin(D,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(D,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){I(Q+1)});mxEvent.addListener(z,"click",T);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,-function(){this.ui.spinner.stop();1==Q&&(n(),D.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(P.getText());if(null==v||0==v.length)c||(mxUtils.br(D),mxUtils.write(D,mxResources.get("noFiles")));else{var A=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(u,E){if(K==("dir"==u.type)){E=d.cloneNode();E.style.backgroundColor=A?Editor.isDarkMode()?-"#000000":"#eeeeee":"";A=!A;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("dir"==u.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;E.appendChild(M);E.appendChild(l(u.name+("dir"==u.type?"/":""),mxUtils.bind(this,function(){"dir"==u.type?(y=u.path,I()):f&&"file"==u.type&&(this.ui.hideDialog(),k(p+"/"+q+"/"+encodeURIComponent(t)+"/"+u.path))})));D.appendChild(E);N++}})(v[m],m)});J(!0);f&&J(!1)}}))}),x,!0)}),-G=mxUtils.bind(this,function(Q,U){null==Q&&(D.innerText="",Q=1);var T=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/branches?per_page=100&page="+Q,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(D,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(D,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var P=-mxUtils.bind(this,function(){G(Q+1)});mxEvent.addListener(z,"click",P);this.executeRequest(T,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==Q&&(n(!0),D.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var A=JSON.parse(v.getText());if(null==A||0==A.length)mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));else if(1==A.length&&U)t=A[0].name,y="",I();else{for(var N=0;N<A.length;N++)mxUtils.bind(this,-function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){t=J.name;y="";I()})));D.appendChild(m)})(A[N],N);100==A.length&&(D.appendChild(z),B=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&P()},mxEvent.addListener(D,"scroll",B))}}))}),x)}),C=mxUtils.bind(this,function(Q){null==Q&&(D.innerText="",Q=1);var U=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+Q,null,"GET");g.okButton.setAttribute("disabled",-"disabled");this.ui.spinner.spin(D,mxResources.get("loading"));null!=B&&mxEvent.removeListener(D,"scroll",B);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){C(Q+1)});mxEvent.addListener(z,"click",T);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var v=JSON.parse(P.getText());-if(null==v||0==v.length)mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));else{1==Q&&(D.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var m=K[1];3>K.length?(p=J,q=m,y=t=null,G()):this.ui.spinner.spin(D,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+-"/"+m+"/"+K,mxUtils.bind(this,function(u){this.ui.spinner.stop();p=u.meta.org;q=u.meta.repo;t=decodeURIComponent(u.meta.ref);y="";I()}),mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(D),mxUtils.br(D));for(var A=0;A<v.length;A++)mxUtils.bind(this,-function(N,J){var K=d.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(l(N.full_name,mxUtils.bind(this,function(){p=N.owner.login;q=N.name;y="";G(null,!0)})));D.appendChild(K)})(v[A],A)}100==v.length&&(D.appendChild(z),B=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&T()},mxEvent.addListener(D,"scroll",B))}))}),x)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,f,k){DrawioFile.call(this,b,f);this.meta=k;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};+" / ");U.appendChild(l(T[P],mxUtils.bind(this,function(){y=T.slice(0,P+1).join("/");I()}),null,!0))})(Q)}E.appendChild(U)}),x=mxUtils.bind(this,function(Q){this.ui.handleError(Q,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=t=q=p=null,C()):this.ui.hideDialog()}),null,{})}),z=null,B=null,I=mxUtils.bind(this,function(Q){null==Q&&(E.innerText="",Q=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/contents/"+y+"?ref="+encodeURIComponent(t)+"&per_page=100&page="++Q,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=B&&(mxEvent.removeListener(E,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){I(Q+1)});mxEvent.addListener(z,"click",T);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,+function(){this.ui.spinner.stop();1==Q&&(n(),E.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(P.getText());if(null==v||0==v.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var A=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(u,D){if(K==("dir"==u.type)){D=d.cloneNode();D.style.backgroundColor=A?Editor.isDarkMode()?+"#000000":"#eeeeee":"";A=!A;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("dir"==u.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(u.name+("dir"==u.type?"/":""),mxUtils.bind(this,function(){"dir"==u.type?(y=u.path,I()):f&&"file"==u.type&&(this.ui.hideDialog(),k(p+"/"+q+"/"+encodeURIComponent(t)+"/"+u.path))})));E.appendChild(D);N++}})(v[m],m)});J(!0);f&&J(!1)}}))}),x,!0)}),+G=mxUtils.bind(this,function(Q,U){null==Q&&(E.innerText="",Q=1);var T=new mxXmlRequest(this.baseUrl+"/repos/"+p+"/"+q+"/branches?per_page=100&page="+Q,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(E,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var P=+mxUtils.bind(this,function(){G(Q+1)});mxEvent.addListener(z,"click",P);this.executeRequest(T,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==Q&&(n(!0),E.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var A=JSON.parse(v.getText());if(null==A||0==A.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==A.length&&U)t=A[0].name,y="",I();else{for(var N=0;N<A.length;N++)mxUtils.bind(this,+function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){t=J.name;y="";I()})));E.appendChild(m)})(A[N],N);100==A.length&&(E.appendChild(z),B=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&P()},mxEvent.addListener(E,"scroll",B))}}))}),x)}),C=mxUtils.bind(this,function(Q){null==Q&&(E.innerText="",Q=1);var U=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+Q,null,"GET");g.okButton.setAttribute("disabled",+"disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=B&&mxEvent.removeListener(E,"scroll",B);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){C(Q+1)});mxEvent.addListener(z,"click",T);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var v=JSON.parse(P.getText());+if(null==v||0==v.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else{1==Q&&(E.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var m=K[1];3>K.length?(p=J,q=m,y=t=null,G()):this.ui.spinner.spin(E,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J++"/"+m+"/"+K,mxUtils.bind(this,function(u){this.ui.spinner.stop();p=u.meta.org;q=u.meta.repo;t=decodeURIComponent(u.meta.ref);y="";I()}),mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(E),mxUtils.br(E));for(var A=0;A<v.length;A++)mxUtils.bind(this,+function(N,J){var K=d.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(l(N.full_name,mxUtils.bind(this,function(){p=N.owner.login;q=N.name;y="";G(null,!0)})));E.appendChild(K)})(v[A],A)}100==v.length&&(E.appendChild(z),B=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&T()},mxEvent.addListener(E,"scroll",B))}))}),x)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,f,k){DrawioFile.call(this,b,f);this.meta=k;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};TrelloFile.prototype.save=function(b,f,k){this.doSave(this.getTitle(),f,k)};TrelloFile.prototype.saveAs=function(b,f,k){this.doSave(b,f,k)};TrelloFile.prototype.doSave=function(b,f,k){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,f,k)}),k])};TrelloFile.prototype.saveFile=function(b,f,k,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(p){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=p;this.contentChanged();null!=k&&k();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,k,c))}),mxUtils.bind(this,function(p){this.savingFile=!1;null!=c&&c(p)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(p){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(q){this.savingFile=!1;null!=k&&k();this.ui.fileLoaded(q);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,f,k,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,p)}))):null!=k&&k()};TrelloLibrary=function(b,f,k){TrelloFile.call(this,b,f,k)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";TrelloClient.prototype.authenticate=function(b,f,k){k&&this.logout();k=mxUtils.bind(this,function(c,p){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=p&&p();b()},error:function(){null!=p&&p();null!=f&&f(mxResources.get("loggedOut"))}})});this.isAuthorized()?k(!0):this.ui.showAuthDialog(this,!0,k)};TrelloClient.prototype.getLibrary=function(b,f,k){this.getFile(b,f,k,!1,!0)};-TrelloClient.prototype.getFile=function(b,f,k,c,p){p=null!=p?p:!1;var q=mxUtils.bind(this,function(){var t=b.split(this.SEPARATOR),y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;k({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout);Trello.cards.get(t[0]+"/attachments/"+t[1],mxUtils.bind(this,function(F){window.clearTimeout(H);if(y){var D=/\.png$/i.test(F.name),d={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(F.name)||-/\.gliffy$/i.test(F.name)||!Editor.useCanvasForExport&&D?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(F.url),F.name,F.mimeType,this.extension,f,k,null,d):(y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(F.url),mxUtils.bind(this,function(g){window.clearTimeout(H);if(y){F.compoundId=b;if(0<(D?g.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(g);null!=l&&0<l.length&&-(g=l)}p?f(new TrelloLibrary(this.ui,g,F)):f(new TrelloFile(this.ui,g,F))}}),mxUtils.bind(this,function(g,l){window.clearTimeout(H);y&&(401==l.status?this.authenticate(q,k,!0):k())}),D||null!=F.mimeType&&"image/"==F.mimeType.substring(0,6),null,null,null,d))}}),mxUtils.bind(this,function(F){window.clearTimeout(H);y&&(null!=F&&401==F.status?this.authenticate(q,k,!0):k())}))});this.authenticate(q,k)};TrelloClient.prototype.insertLibrary=function(b,f,k,c,p){this.insertFile(b,f,k,c,!0,p)};+TrelloClient.prototype.getFile=function(b,f,k,c,p){p=null!=p?p:!1;var q=mxUtils.bind(this,function(){var t=b.split(this.SEPARATOR),y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;k({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout);Trello.cards.get(t[0]+"/attachments/"+t[1],mxUtils.bind(this,function(F){window.clearTimeout(H);if(y){var E=/\.png$/i.test(F.name),d={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(F.name)||+/\.gliffy$/i.test(F.name)||!Editor.useCanvasForExport&&E?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(F.url),F.name,F.mimeType,this.extension,f,k,null,d):(y=!0,H=window.setTimeout(mxUtils.bind(this,function(){y=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(F.url),mxUtils.bind(this,function(g){window.clearTimeout(H);if(y){F.compoundId=b;if(0<(E?g.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(g);null!=l&&0<l.length&&+(g=l)}p?f(new TrelloLibrary(this.ui,g,F)):f(new TrelloFile(this.ui,g,F))}}),mxUtils.bind(this,function(g,l){window.clearTimeout(H);y&&(401==l.status?this.authenticate(q,k,!0):k())}),E||null!=F.mimeType&&"image/"==F.mimeType.substring(0,6),null,null,null,d))}}),mxUtils.bind(this,function(F){window.clearTimeout(H);y&&(null!=F&&401==F.status?this.authenticate(q,k,!0):k())}))});this.authenticate(q,k)};TrelloClient.prototype.insertLibrary=function(b,f,k,c,p){this.insertFile(b,f,k,c,!0,p)};TrelloClient.prototype.insertFile=function(b,f,k,c,p,q){p=null!=p?p:!1;var t=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(H){this.writeFile(b,H,q,mxUtils.bind(this,function(F){p?k(new TrelloLibrary(this.ui,f,F)):k(new TrelloFile(this.ui,f,F))}),c)});Editor.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){y(this.ui.base64ToBlob(H,"image/png"))}),c,f):y(f)});this.authenticate(t,c)};TrelloClient.prototype.saveFile=function(b,f,k){var c=b.meta.compoundId.split(this.SEPARATOR),p=mxUtils.bind(this,function(t){this.writeFile(b.meta.name,t,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){f(y)}),mxUtils.bind(this,function(H){null!=H&&401==H.status?this.authenticate(q,k,!0):k()}))},k)}),q=mxUtils.bind(this,function(){Editor.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){p(this.ui.base64ToBlob(t,"image/png"))}),k,this.ui.getCurrentFile()!=b?b.getData():null):p(b.getData())});this.authenticate(q,k)};TrelloClient.prototype.writeFile=function(b,f,k,c,p){if(null!=b&&null!=f)if(f.length>=this.maxFileSize)p({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var q=mxUtils.bind(this,function(){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;p({code:App.ERROR_TIMEOUT,retry:q})}),this.ui.timeout),H=new FormData;H.append("key",Trello.key());H.append("token",Trello.token());H.append("file","string"===typeof f?new Blob([f]):f,b);H.append("name",-b);var F=new XMLHttpRequest;F.responseType="json";F.onreadystatechange=mxUtils.bind(this,function(){if(4===F.readyState&&(window.clearTimeout(y),t))if(200==F.status){var D=F.response;D.compoundId=k+this.SEPARATOR+D.id;c(D)}else 401==F.status?this.authenticate(q,p,!0):p()});F.open("POST",this.baseUrl+"cards/"+k+"/attachments");F.send(H)});this.authenticate(q,p)}else p({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};+b);var F=new XMLHttpRequest;F.responseType="json";F.onreadystatechange=mxUtils.bind(this,function(){if(4===F.readyState&&(window.clearTimeout(y),t))if(200==F.status){var E=F.response;E.compoundId=k+this.SEPARATOR+E.id;c(E)}else 401==F.status?this.authenticate(q,p,!0):p()});F.open("POST",this.baseUrl+"cards/"+k+"/attachments");F.send(H)});this.authenticate(q,p)}else p({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f)}))};TrelloClient.prototype.pickFile=function(b,f){b=null!=b?b:mxUtils.bind(this,function(k){this.ui.loadFile("T"+encodeURIComponent(k))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(k){this.ui.showError(mxResources.get("error"),k,mxResources.get("ok"))}))};TrelloClient.prototype.showTrelloDialog=function(b,f){var k=null,c="@me",p=0,q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.overflow="hidden";q.style.height="224px";var t=document.createElement("h3");mxUtils.write(t,b?mxResources.get("selectFile"):mxResources.get("selectCard"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(t);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height="194px";q.appendChild(y);q=new CustomDialog(this.ui,q);this.ui.showDialog(q.container,340,290,!0,!0);q.okButton.parentNode.removeChild(q.okButton);var H=mxUtils.bind(this,function(n,x,z){p++;var B=document.createElement("div");B.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==p%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=z){var G=document.createElement("img");-G.src=z.url;G.width=z.width;G.height=z.height;G.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(G)}mxUtils.write(I,n);mxEvent.addListener(I,"click",x);B.appendChild(I);return B}),F=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),D=mxUtils.bind(this,function(){p=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(k++G.src=z.url;G.width=z.width;G.height=z.height;G.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(G)}mxUtils.write(I,n);mxEvent.addListener(I,"click",x);B.appendChild(I);return B}),F=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),E=mxUtils.bind(this,function(){p=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(k+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(x){this.ui.spinner.stop();y.appendChild(H("../ [Up]",mxUtils.bind(this,function(){l()})));mxUtils.br(y);null==x||0==x.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var z=0;z<x.length;z++)mxUtils.bind(this,function(B){y.appendChild(H(B.name,mxUtils.bind(this,function(){this.ui.hideDialog();f(k+this.SEPARATOR+B.id)}),null!=B.previews?B.previews[0]:null))})(x[z])})()}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(n,F,!0):null!=F&&F(x)}))});n()}),d=null,g=null,l=mxUtils.bind(this,function(n){null==n&&(p=0,y.innerText="",n=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",g);l(n+1)});mxEvent.addListener(d,"click",x);var z=mxUtils.bind(this,function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:n-1},mxUtils.bind(this,function(B){this.ui.spinner.stop();B=null!=B?B.cards:null;if(null==B||0==B.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==n&&(y.appendChild(H(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(C){null!=C&&(c=C,l())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");-this.ui.showDialog(G.container,300,80,!0,!1);G.init()}))),mxUtils.br(y));for(var I=0;I<B.length;I++)mxUtils.bind(this,function(G){y.appendChild(H(G.name,mxUtils.bind(this,function(){b?(k=G.id,D()):(this.ui.hideDialog(),f(G.id))})))})(B[I]);100==B.length&&(y.appendChild(d),g=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&x()},mxEvent.addListener(y,"scroll",g))}}),mxUtils.bind(this,function(B){401==B.status?this.authenticate(z,F,!0):null!=F&&F({message:B.responseText})}))});z()});l()};+this.ui.showDialog(G.container,300,80,!0,!1);G.init()}))),mxUtils.br(y));for(var I=0;I<B.length;I++)mxUtils.bind(this,function(G){y.appendChild(H(G.name,mxUtils.bind(this,function(){b?(k=G.id,E()):(this.ui.hideDialog(),f(G.id))})))})(B[I]);100==B.length&&(y.appendChild(d),g=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&x()},mxEvent.addListener(y,"scroll",g))}}),mxUtils.bind(this,function(B){401==B.status?this.authenticate(z,F,!0):null!=F&&F({message:B.responseText})}))});z()});l()};TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(f){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,f,k){GitHubFile.call(this,b,f,k);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(b,f){b.last_commit_id=f};GitLabLibrary=function(b,f,k){GitLabFile.call(this,b,f,k)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,f,k){this.saveFile(b,!1,f,k)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(f){GitHubClient.call(this,f,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=function(f,k){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),f,k):null!=k&&k(c)}),k)};GitLabClient.prototype.authenticateStep2=function(f,k,c){if(null==window.onGitLabCallback){var p=mxUtils.bind(this,function(){var q=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),null,"GET")).send(mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus())try{b=JSON.parse(t.getText()).access_token,this.setToken(b),this.setUser(null),k()}catch(y){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==t.getStatus()?p():c({message:mxResources.get("accessDenied"),retry:p})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(H,F){q?(window.onGitLabCallback=null,q=!1,null==H?c({message:mxResources.get("accessDenied"),retry:p}):(null!=y&&y(),b=H.access_token,this.setToken(b),this.setUser(null),t&&this.setPersistentToken("remembered"),k(),null!=F&&F.close())):-null!=F&&F.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitLabCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(f,k,c,p){var q=mxUtils.bind(this,function(y){var H=!0,F=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),D=this.authToken+-" "+b;f.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",D);d.setRequestHeader("PRIVATE_TOKEN",D);d.setRequestHeader("Content-Type","application/json")};f.send(mxUtils.bind(this,function(){window.clearTimeout(F);if(H)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())k(f);else if(401===f.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){q(!0)},c);else if(403===+null!=F&&F.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:p})}),mxUtils.bind(this,function(){q&&(window.onGitLabCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(f,k,c,p){var q=mxUtils.bind(this,function(y){var H=!0,F=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),E=this.authToken++" "+b;f.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",E);d.setRequestHeader("PRIVATE_TOKEN",E);d.setRequestHeader("Content-Type","application/json")};f.send(mxUtils.bind(this,function(){window.clearTimeout(F);if(H)if(200<=f.getStatus()&&299>=f.getStatus()||p&&404==f.getStatus())k(f);else if(401===f.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){q(!0)},c);else if(403===f.getStatus()){var d=!1;try{var g=JSON.parse(f.getText());null!=g&&null!=g.errors&&0<g.errors.length&&(d="too_large"==g.errors[0].code)}catch(l){}c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}else 404===f.getStatus()?c({message:this.getErrorMessage(f,mxResources.get("fileNotFound"))}):c({status:f.getStatus(),message:this.getErrorMessage(f,mxResources.get("error")+" "+f.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(F);H&&c(d)}))}),t=mxUtils.bind(this,function(y){null==-this.user?this.updateUser(function(){t(!0)},c,y):q(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};GitLabClient.prototype.getRefIndex=function(f,k,c,p,q,t){if(null!=q)c(f,q);else{var y=f.length-2,H=mxUtils.bind(this,function(){if(2>y)p({message:mxResources.get("fileNotFound")});else{var F=Math.max(y-1,0),D=f.slice(0,F).join("/");F=f[F];var d=f[y],g=f.slice(y+1,f.length).join("/");D=this.baseUrl+"/projects/"+encodeURIComponent(D+"/"+F)+"/repository/"+(k?t?"branches?per_page=1&page=1&ref="+-d:"tree?path="+g+"&ref="+d:"files/"+encodeURIComponent(g)+"?ref="+d);var l=new mxXmlRequest(D,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==l.getStatus()?c(f,y):p({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(y--,H()):p({message:mxResources.get("fileNotFound")})}))}});H()}};GitLabClient.prototype.getFile=function(f,k,c,p,q,t){p=null!=p?p:!1;this.getRefIndex(f.split("/"),!1,mxUtils.bind(this,function(y,H){var F=Math.max(H-1,0),-D=y.slice(0,F).join("/"),d=y[F],g=y[H];f=y.slice(H+1,y.length).join("/");y=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&y))if(null!=b){F="&t="+(new Date).getTime();var l=this.baseUrl+"/projects/"+encodeURIComponent(D+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+g;y=f.split("/");this.ui.convertFile(l+F,0<y.length?y[y.length-1]:f,null,this.extension,k,c,mxUtils.bind(this,function(n,x,z){n=new mxXmlRequest(n,null,-"GET");this.executeRequest(n,mxUtils.bind(this,function(B){try{x(this.getFileContent(JSON.parse(B.getText())))}catch(I){z(I)}}),z)}))}else c({message:mxResources.get("accessDenied")});else F="&t="+(new Date).getTime(),l=this.baseUrl+"/projects/"+encodeURIComponent(D+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+g,y=new mxXmlRequest(l+F,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(n){try{k(this.createGitLabFile(D,d,g,JSON.parse(n.getText()),p,H))}catch(x){c(x)}}),c)}),c,+this.user?this.updateUser(function(){t(!0)},c,y):q(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};GitLabClient.prototype.getRefIndex=function(f,k,c,p,q,t){if(null!=q)c(f,q);else{var y=f.length-2,H=mxUtils.bind(this,function(){if(2>y)p({message:mxResources.get("fileNotFound")});else{var F=Math.max(y-1,0),E=f.slice(0,F).join("/");F=f[F];var d=f[y],g=f.slice(y+1,f.length).join("/");E=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+F)+"/repository/"+(k?t?"branches?per_page=1&page=1&ref="++d:"tree?path="+g+"&ref="+d:"files/"+encodeURIComponent(g)+"?ref="+d);var l=new mxXmlRequest(E,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==l.getStatus()?c(f,y):p({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(y--,H()):p({message:mxResources.get("fileNotFound")})}))}});H()}};GitLabClient.prototype.getFile=function(f,k,c,p,q,t){p=null!=p?p:!1;this.getRefIndex(f.split("/"),!1,mxUtils.bind(this,function(y,H){var F=Math.max(H-1,0),+E=y.slice(0,F).join("/"),d=y[F],g=y[H];f=y.slice(H+1,y.length).join("/");y=/\.png$/i.test(f);if(!q&&(/\.v(dx|sdx?)$/i.test(f)||/\.gliffy$/i.test(f)||/\.pdf$/i.test(f)||!Editor.useCanvasForExport&&y))if(null!=b){F="&t="+(new Date).getTime();var l=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+g;y=f.split("/");this.ui.convertFile(l+F,0<y.length?y[y.length-1]:f,null,this.extension,k,c,mxUtils.bind(this,function(n,x,z){n=new mxXmlRequest(n,null,+"GET");this.executeRequest(n,mxUtils.bind(this,function(B){try{x(this.getFileContent(JSON.parse(B.getText())))}catch(I){z(I)}}),z)}))}else c({message:mxResources.get("accessDenied")});else F="&t="+(new Date).getTime(),l=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+d)+"/repository/files/"+encodeURIComponent(f)+"?ref="+g,y=new mxXmlRequest(l+F,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(n){try{k(this.createGitLabFile(E,d,g,JSON.parse(n.getText()),p,H))}catch(x){c(x)}}),c)}),c,t)};GitLabClient.prototype.getFileContent=function(f){var k=f.file_name,c=f.content;"base64"===f.encoding&&(/\.jpe?g$/i.test(k)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(k)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(k)?c="data:application/pdf;base64,"+c:/\.png$/i.test(k)?(f=this.ui.extractGraphModelFromPng(c),c=null!=f&&0<f.length?f:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(f,k,c,p,q,t){var y=DRAWIO_GITLAB_URL+"/";f={org:f,repo:k,-ref:c,name:p.file_name,path:p.file_path,html_url:y+f+"/"+k+"/blob/"+c+"/"+p.file_path,download_url:y+f+"/"+k+"/raw/"+c+"/"+p.file_path+"?inline=false",last_commit_id:p.last_commit_id,refPos:t};p=this.getFileContent(p);return q?new GitLabLibrary(this.ui,p,f):new GitLabFile(this.ui,p,f)};GitLabClient.prototype.insertFile=function(f,k,c,p,q,t,y){q=null!=q?q:!1;t=t.split("/");this.getRefIndex(t,!0,mxUtils.bind(this,function(H,F){var D=Math.max(F-1,0),d=H.slice(0,D).join("/"),g=H[D],l=H[F];path=H.slice(F++ref:c,name:p.file_name,path:p.file_path,html_url:y+f+"/"+k+"/blob/"+c+"/"+p.file_path,download_url:y+f+"/"+k+"/raw/"+c+"/"+p.file_path+"?inline=false",last_commit_id:p.last_commit_id,refPos:t};p=this.getFileContent(p);return q?new GitLabLibrary(this.ui,p,f):new GitLabFile(this.ui,p,f)};GitLabClient.prototype.insertFile=function(f,k,c,p,q,t,y){q=null!=q?q:!1;t=t.split("/");this.getRefIndex(t,!0,mxUtils.bind(this,function(H,F){var E=Math.max(F-1,0),d=H.slice(0,E).join("/"),g=H[E],l=H[F];path=H.slice(F+1,H.length).join("/");0<path.length&&(path+="/");path+=f;this.checkExists(d+"/"+g+"/"+l+"/"+path,!0,mxUtils.bind(this,function(n,x){n?q?(y||(k=Base64.encode(k)),this.showCommitDialog(f,!0,mxUtils.bind(this,function(z){this.writeFile(d,g,l,path,z,k,x,mxUtils.bind(this,function(B){try{var I=JSON.parse(B.getText());c(this.createGitLabFile(d,g,l,null!=I.content?I.content:I,q,F))}catch(G){p(G)}}),p)}),p)):(n=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,k,{org:d,repo:g,ref:l,name:f,path:path,html_url:n+d+"/"+g+"/blob/"+l+"/"+path,download_url:n+d+"/"+g+"/raw/"+l+"/"+path+"?inline=false",refPos:F,last_commit_id:x,isNew:!0}))):p()}))}),p,null,4>=t.length)};GitLabClient.prototype.checkExists=function(f,k,c){this.getFile(f,mxUtils.bind(this,function(p){if(k){var q=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[f]),function(){q();c(!0,p.getCurrentEtag())},function(){q();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),-mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(p){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(f,k,c,p,q,t,y,H,F){if(t.length>=this.maxFileSize)F({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+" / 10 MB)"});else{var D="POST";c={path:encodeURIComponent(p),branch:decodeURIComponent(c),commit_message:q,content:t,encoding:"base64"};null!=y&&(c.last_commit_id=y,D="PUT");f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+k)+"/repository/files/"+-encodeURIComponent(p);D=new mxXmlRequest(f,JSON.stringify(c),D);this.executeRequest(D,mxUtils.bind(this,function(d){H(d)}),F)}};GitLabClient.prototype.saveFile=function(f,k,c,p,q){var t=f.meta.org,y=f.meta.repo,H=f.meta.ref,F=f.meta.path,D=mxUtils.bind(this,function(g,l){this.writeFile(t,y,H,F,q,l,g,mxUtils.bind(this,function(n){delete f.meta.isNew;this.getFile(t+"/"+y+"/"+H+"/"+F,mxUtils.bind(this,function(x){x.getData()==f.getData()?k(x.getCurrentEtag()):k({content:f.getCurrentEtag()})}),c,null,-null,f.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(F)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){D(f.meta.last_commit_id,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,g.scale,g.border)}else D(f.meta.last_commit_id,Base64.encode(f.getData()))});p?this.getFile(t+"/"+y+"/"+H+"/"+F,mxUtils.bind(this,function(g){f.meta.last_commit_id=g.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=+mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(p){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(f,k,c,p,q,t,y,H,F){if(t.length>=this.maxFileSize)F({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+" / 10 MB)"});else{var E="POST";c={path:encodeURIComponent(p),branch:decodeURIComponent(c),commit_message:q,content:t,encoding:"base64"};null!=y&&(c.last_commit_id=y,E="PUT");f=this.baseUrl+"/projects/"+encodeURIComponent(f+"/"+k)+"/repository/files/"++encodeURIComponent(p);E=new mxXmlRequest(f,JSON.stringify(c),E);this.executeRequest(E,mxUtils.bind(this,function(d){H(d)}),F)}};GitLabClient.prototype.saveFile=function(f,k,c,p,q){var t=f.meta.org,y=f.meta.repo,H=f.meta.ref,F=f.meta.path,E=mxUtils.bind(this,function(g,l){this.writeFile(t,y,H,F,q,l,g,mxUtils.bind(this,function(n){delete f.meta.isNew;this.getFile(t+"/"+y+"/"+H+"/"+F,mxUtils.bind(this,function(x){x.getData()==f.getData()?k(x.getCurrentEtag()):k({content:f.getCurrentEtag()})}),c,null,+null,f.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(Editor.useCanvasForExport&&/(\.png)$/i.test(F)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){E(f.meta.last_commit_id,l)}),c,this.ui.getCurrentFile()!=f?f.getData():null,g.scale,g.border)}else E(f.meta.last_commit_id,Base64.encode(f.getData()))});p?this.getFile(t+"/"+y+"/"+H+"/"+F,mxUtils.bind(this,function(g){f.meta.last_commit_id=g.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=function(f){this.showGitLabDialog(!1,f,!0)};GitLabClient.prototype.pickFile=function(f){f=null!=f?f:mxUtils.bind(this,function(k){this.ui.loadFile("A"+encodeURIComponent(k))});this.showGitLabDialog(!0,f)};GitLabClient.prototype.showGitLabDialog=function(f,k,c){var p=null,q=null,t=null,y=null,H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.height="304px";var F=document.createElement("h3");mxUtils.write(F,mxResources.get(f?"selectFile":"selectFolder"));-F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(F);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.border="1px solid lightgray";D.style.boxSizing="border-box";D.style.padding="4px";D.style.overflow="auto";D.style.lineHeight="1.2em";D.style.height="274px";H.appendChild(D);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width=+F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(F);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="274px";H.appendChild(E);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var g=new CustomDialog(this.ui,H,mxUtils.bind(this,function(){k(p+"/"+q+"/"+encodeURIComponent(t)+"/"+y)}));this.ui.showDialog(g.container,420,370,!0,!0);f&&g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(Q,U,T,P){var v=document.createElement("a");v.setAttribute("title",Q);v.style.cursor="pointer";mxUtils.write(v,Q);mxEvent.addListener(v,"click",U);P&&(v.style.textDecoration="underline");null!=T&&(Q=d.cloneNode(),Q.style.padding=T,Q.appendChild(v),v=Q);return v}),-n=mxUtils.bind(this,function(Q){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));Q||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(t),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var T=y.split("/");for(Q=0;Q<T.length;Q++)(function(P){mxUtils.write(U," / ");U.appendChild(l(T[P],mxUtils.bind(this,function(){y=T.slice(0,P+1).join("/");I()}),null,!0))})(Q)}D.appendChild(U)}),-x=mxUtils.bind(this,function(Q){this.ui.handleError(Q,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=t=q=p=null,C()):this.ui.hideDialog()}))}),z=null,B=null,I=mxUtils.bind(this,function(Q){null==Q&&(D.innerText="",Q=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/tree?path="+y+"&ref="+t+"&per_page=100&page="+Q,null,"GET");this.ui.spinner.spin(D,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=B&&-(mxEvent.removeListener(D,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){I(Q+1)});mxEvent.addListener(z,"click",T);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==Q&&(n(!t),D.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==-y||null==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(P.getText());if(null==v||0==v.length)c||(mxUtils.br(D),mxUtils.write(D,mxResources.get("noFiles")));else{var A=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(u){if(K==("tree"==u.type)){var E=d.cloneNode();E.style.backgroundColor=A?Editor.isDarkMode()?"#000000":"#eeeeee":"";A=!A;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==-u.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;E.appendChild(M);E.appendChild(l(u.name+("tree"==u.type?"/":""),mxUtils.bind(this,function(){"tree"==u.type?(y=u.path,I()):f&&"blob"==u.type&&(this.ui.hideDialog(),k(p+"/"+q+"/"+t+"/"+u.path))})));D.appendChild(E);N++}})(v[m])});J(!0);f&&J(!1);100==N&&(D.appendChild(z),B=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&T()},mxEvent.addListener(D,"scroll",B))}}))}),-x,!0)}),G=mxUtils.bind(this,function(Q,U){null==Q&&(D.innerText="",Q=1);var T=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/branches?per_page=100&page="+Q,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(D,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(D,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,-mxResources.get("more")+"...");var P=mxUtils.bind(this,function(){G(Q+1)});mxEvent.addListener(z,"click",P);this.executeRequest(T,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==Q&&(n(!0),D.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var A=JSON.parse(v.getText());if(null==A||0==A.length)mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));else if(1==A.length&&U)t=A[0].name,y="",I();else{for(var N=-0;N<A.length;N++)mxUtils.bind(this,function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){t=encodeURIComponent(J.name);y="";I()})));D.appendChild(m)})(A[N],N);100==A.length&&(D.appendChild(z),B=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&P()},mxEvent.addListener(D,"scroll",B))}}))}),x)});g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(D,mxResources.get("loading"));-var C=mxUtils.bind(this,function(Q){var U=this.ui.spinner,T=0;this.ui.spinner.stop();var P=function(){U.spin(D,mxResources.get("loading"));T+=1},v=function(){--T;0===T&&U.stop()};null==Q&&(D.innerText="",Q=1);null!=B&&(mxEvent.removeListener(D,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){0===T&&C(Q+1)});mxEvent.addListener(z,-"click",A);var N=mxUtils.bind(this,function(K){P();var m=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(m,mxUtils.bind(this,function(u){this.ui.tryAndHandle(mxUtils.bind(this,function(){K(JSON.parse(u.getText()));v()}))}),x)}),J=mxUtils.bind(this,function(K,m){P();var u=new mxXmlRequest(this.baseUrl+"/groups/"+K.id+"/projects?per_page=100",null,"GET");this.executeRequest(u,mxUtils.bind(this,function(E){this.ui.tryAndHandle(mxUtils.bind(this,function(){m(K,JSON.parse(E.getText()));-v()}))}),x)});N(mxUtils.bind(this,function(K){if(null==this.user)mxUtils.write(D,mxResources.get("loggedOut"));else{P();var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+Q,null,"GET");this.executeRequest(m,mxUtils.bind(this,function(u){u=JSON.parse(u.getText());if(null!=u&&0!=u.length||null!=K&&0!=K.length){1==Q&&(D.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===T){var L=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),-mxUtils.bind(this,function(O){null!=O&&(O=O.split("/"),1<O.length?(p=O.slice(0,O.length-1).join("/"),q=O[O.length-1],y="",G(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(L.container,300,80,!0,!1);L.init()}}))),mxUtils.br(D),mxUtils.br(D));for(var E=!0,M=0;M<u.length;M++)mxUtils.bind(this,function(L){var O=d.cloneNode();O.style.backgroundColor=E?Editor.isDarkMode()?"#000000":"#eeeeee":"";E=!E;O.appendChild(l(L.name_with_namespace,-mxUtils.bind(this,function(){0===T&&(p=L.owner.username,q=L.path,y="",G(null,!0))})));D.appendChild(O)})(u[M]);for(M=0;M<K.length;M++)P(),J(K[M],mxUtils.bind(this,function(L,O){v();for(var R=0;R<O.length;R++){var S=d.cloneNode();S.style.backgroundColor=E?Editor.isDarkMode()?"#000000":"#eeeeee":"";E=!E;mxUtils.bind(this,function(V){S.appendChild(l(V.name_with_namespace,mxUtils.bind(this,function(){0===T&&(p=L.full_path,q=V.path,y="",G(null,!0))})));D.appendChild(S)})(O[R])}}));v()}else v(),mxUtils.br(D),-mxUtils.write(D,mxResources.get("repositoryNotFound"));100==u.length&&(D.appendChild(z),B=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&A()},mxEvent.addListener(D,"scroll",B))}),x)}}))});b?this.user?C():this.updateUser(function(){C()},x,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},x,!0)}),x)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));+n=mxUtils.bind(this,function(Q){var U=document.createElement("div");U.style.marginBottom="8px";U.appendChild(l(p+"/"+q,mxUtils.bind(this,function(){y=null;C()}),null,!0));Q||(mxUtils.write(U," / "),U.appendChild(l(decodeURIComponent(t),mxUtils.bind(this,function(){y=null;G()}),null,!0)));if(null!=y&&0<y.length){var T=y.split("/");for(Q=0;Q<T.length;Q++)(function(P){mxUtils.write(U," / ");U.appendChild(l(T[P],mxUtils.bind(this,function(){y=T.slice(0,P+1).join("/");I()}),null,!0))})(Q)}E.appendChild(U)}),+x=mxUtils.bind(this,function(Q){this.ui.handleError(Q,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(y=t=q=p=null,C()):this.ui.hideDialog()}))}),z=null,B=null,I=mxUtils.bind(this,function(Q){null==Q&&(E.innerText="",Q=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/tree?path="+y+"&ref="+t+"&per_page=100&page="+Q,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=B&&+(mxEvent.removeListener(E,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){I(Q+1)});mxEvent.addListener(z,"click",T);this.executeRequest(U,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==Q&&(n(!t),E.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==+y||null==y)y=null,C();else{var K=y.split("/");y=K.slice(0,K.length-1).join("/");I()}}),"4px")));var v=JSON.parse(P.getText());if(null==v||0==v.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var A=!0,N=0,J=mxUtils.bind(this,function(K){for(var m=0;m<v.length;m++)mxUtils.bind(this,function(u){if(K==("tree"==u.type)){var D=d.cloneNode();D.style.backgroundColor=A?Editor.isDarkMode()?"#000000":"#eeeeee":"";A=!A;var M=document.createElement("img");M.src=IMAGE_PATH+"/"+("tree"==+u.type?"folder.png":"file.png");M.setAttribute("align","absmiddle");M.style.marginRight="4px";M.style.marginTop="-4px";M.width=20;D.appendChild(M);D.appendChild(l(u.name+("tree"==u.type?"/":""),mxUtils.bind(this,function(){"tree"==u.type?(y=u.path,I()):f&&"blob"==u.type&&(this.ui.hideDialog(),k(p+"/"+q+"/"+t+"/"+u.path))})));E.appendChild(D);N++}})(v[m])});J(!0);f&&J(!1);100==N&&(E.appendChild(z),B=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&T()},mxEvent.addListener(E,"scroll",B))}}))}),+x,!0)}),G=mxUtils.bind(this,function(Q,U){null==Q&&(E.innerText="",Q=1);var T=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/branches?per_page=100&page="+Q,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=B&&(mxEvent.removeListener(E,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,+mxResources.get("more")+"...");var P=mxUtils.bind(this,function(){G(Q+1)});mxEvent.addListener(z,"click",P);this.executeRequest(T,mxUtils.bind(this,function(v){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==Q&&(n(!0),E.appendChild(l("../ [Up]",mxUtils.bind(this,function(){y=null;C()}),"4px")));var A=JSON.parse(v.getText());if(null==A||0==A.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==A.length&&U)t=A[0].name,y="",I();else{for(var N=+0;N<A.length;N++)mxUtils.bind(this,function(J,K){var m=d.cloneNode();m.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(l(J.name,mxUtils.bind(this,function(){t=encodeURIComponent(J.name);y="";I()})));E.appendChild(m)})(A[N],N);100==A.length&&(E.appendChild(z),B=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&P()},mxEvent.addListener(E,"scroll",B))}}))}),x)});g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));+var C=mxUtils.bind(this,function(Q){var U=this.ui.spinner,T=0;this.ui.spinner.stop();var P=function(){U.spin(E,mxResources.get("loading"));T+=1},v=function(){--T;0===T&&U.stop()};null==Q&&(E.innerText="",Q=1);null!=B&&(mxEvent.removeListener(E,"scroll",B),B=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){0===T&&C(Q+1)});mxEvent.addListener(z,+"click",A);var N=mxUtils.bind(this,function(K){P();var m=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(m,mxUtils.bind(this,function(u){this.ui.tryAndHandle(mxUtils.bind(this,function(){K(JSON.parse(u.getText()));v()}))}),x)}),J=mxUtils.bind(this,function(K,m){P();var u=new mxXmlRequest(this.baseUrl+"/groups/"+K.id+"/projects?per_page=100",null,"GET");this.executeRequest(u,mxUtils.bind(this,function(D){this.ui.tryAndHandle(mxUtils.bind(this,function(){m(K,JSON.parse(D.getText()));+v()}))}),x)});N(mxUtils.bind(this,function(K){if(null==this.user)mxUtils.write(E,mxResources.get("loggedOut"));else{P();var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+Q,null,"GET");this.executeRequest(m,mxUtils.bind(this,function(u){u=JSON.parse(u.getText());if(null!=u&&0!=u.length||null!=K&&0!=K.length){1==Q&&(E.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===T){var L=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),+mxUtils.bind(this,function(O){null!=O&&(O=O.split("/"),1<O.length?(p=O.slice(0,O.length-1).join("/"),q=O[O.length-1],y="",G(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(L.container,300,80,!0,!1);L.init()}}))),mxUtils.br(E),mxUtils.br(E));for(var D=!0,M=0;M<u.length;M++)mxUtils.bind(this,function(L){var O=d.cloneNode();O.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;O.appendChild(l(L.name_with_namespace,+mxUtils.bind(this,function(){0===T&&(p=L.owner.username,q=L.path,y="",G(null,!0))})));E.appendChild(O)})(u[M]);for(M=0;M<K.length;M++)P(),J(K[M],mxUtils.bind(this,function(L,O){v();for(var R=0;R<O.length;R++){var S=d.cloneNode();S.style.backgroundColor=D?Editor.isDarkMode()?"#000000":"#eeeeee":"";D=!D;mxUtils.bind(this,function(V){S.appendChild(l(V.name_with_namespace,mxUtils.bind(this,function(){0===T&&(p=L.full_path,q=V.path,y="",G(null,!0))})));E.appendChild(S)})(O[R])}}));v()}else v(),mxUtils.br(E),+mxUtils.write(E,mxResources.get("repositoryNotFound"));100==u.length&&(E.appendChild(z),B=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&A()},mxEvent.addListener(E,"scroll",B))}),x)}}))});b?this.user?C():this.updateUser(function(){C()},x,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},x,!0)}),x)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,f,k,c,p,q,t){this.file=b;this.id=f;this.content=k;this.modifiedDate=c;this.createdDate=p;this.isResolved=q;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,c,p){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DriveComment=function(b,f,k,c,p,q,t,y){DrawioComment.call(this,b,f,k,c,p,q,t);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,f,k,c,p){b={content:b.content};c?b.verb="resolve":p&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(q){f(q.replyId)}),k)};DriveComment.prototype.editComment=function(b,f,k){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},f,k)};-DriveComment.prototype.deleteComment=function(b,f){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,f)};function mxODPicker(b,f,k,c,p,q,t,y,H,F,D,d,g,l){function n(X,W){W=W||document;return W.querySelector(X)}function x(X,W,Y){if(null==X["@microsoft.graph.downloadUrl"])if(null==X.parentReference)Y();else{c(X.id,X.parentReference.driveId,function(ha){x(ha,W,Y)},Y);return}var Z=new XMLHttpRequest;Z.open("GET",X["@microsoft.graph.downloadUrl"]);var aa=X.file?"image/png"==X.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ha=Z.responseText;+DriveComment.prototype.deleteComment=function(b,f){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,f)};function mxODPicker(b,f,k,c,p,q,t,y,H,F,E,d,g,l){function n(X,W){W=W||document;return W.querySelector(X)}function x(X,W,Y){if(null==X["@microsoft.graph.downloadUrl"])if(null==X.parentReference)Y();else{c(X.id,X.parentReference.driveId,function(ha){x(ha,W,Y)},Y);return}var Z=new XMLHttpRequest;Z.open("GET",X["@microsoft.graph.downloadUrl"]);var aa=X.file?"image/png"==X.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ha=Z.responseText;aa?(ha="data:image/png;base64,"+Editor.base64Encode(ha),ha=Editor.extractGraphModelFromPng(ha)):/\.pdf$/.test(X.name)&&(ha="data:application/pdf;base64,"+Editor.base64Encode(ha),ha=Editor.extractGraphModelFromPdf(ha));var ea=mxUtils.parseXml(ha),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(fa){}Y()}};(aa||/\.pdf$/.test(X.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");Z.send()}function z(){d&&null!=N?A.exportToCanvas(function(X){X=EditorUi.prototype.createImageDataUri(X,null,"png");t(J,X);q(J)},400,null,null,function(X){console.log(X)},600,null,null,null,null,null,N):(t(J,void 0),q(J))}function B(X){function W(Y){R.style.background="transparent";R.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,Y);R.appendChild(Z);v.stop()}if(null!=R)if(R.style.background="transparent",R.innerText="",null==X||X.folder||/\.drawiolib$/.test(X.name))W(mxResources.get("noPreview"));else try{null!=X.remoteItem&&(X=X.remoteItem),M=X,v.spin(R),x(X,function(Y){v.stop();if(M==X)if("mxlibrary"==Y.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=Y.getElementsByTagName("diagram");N=AspectDialog.prototype.createViewer(R,0==Z.length?Y.documentElement:Z[0],null,"transparent")}},function(){J=null;W(mxResources.get("notADiagramFile"))})}catch(Y){J=null,W(mxResources.get("notADiagramFile"))}}function I(){var X=n(".odFilesBreadcrumb");if(null!=X){X.innerText="";for(var W=@@ -13741,17 +13746,17 @@ wa&&ua<wa.length;ua++){var qa=wa[ua];if(1!=fa||!qa.webUrl||0<qa.webUrl.indexOf("Ka.className="odFileImg";Ba.appendChild(Ka);za.appendChild(Ba);Ba=document.createElement("td");Da=document.createElement("div");Da.className="odFileTitle";Da.innerHTML=mxUtils.htmlEntities(Aa);Da.setAttribute("title",Ca);Ba.appendChild(Da);za.appendChild(Ba);oa.appendChild(za);null==ia&&(ia=za,ia.className+=" odRowSelected",J=qa,K=X,l||f(J));(function(Ma,Ea){za.addEventListener("dblclick",G);za.addEventListener("click",function(){ia!=Ea&&(ia.className=ia.className.replace("odRowSelected",""),ia=Ea,ia.className+=" odRowSelected",J=Ma,K=X,l||f(J))})})(qa,za)}}}0==na?(wa=document.createElement("div"),wa.className="odEmptyFolder",wa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(wa)):ba.appendChild(oa);I();m=!1}function ea(wa){k(wa?wa:va,function(oa){if(ca){var ia=oa.value||[];if(l||fa)Array.prototype.push.apply(ra,ia);else{for(var na=0;na<ia.length;na++){var ua=ia[na],qa=ua.file?ua.file.mimeType:null;(ua.folder||"text/html"==qa||"text/xml"==qa||"application/xml"==qa||"image/png"==qa||/\.svg$/.test(ua.name)||/\.html$/.test(ua.name)||/\.xml$/.test(ua.name)||/\.png$/.test(ua.name)||/\.drawio$/.test(ua.name)||/\.drawiolib$/.test(ua.name)||/\.pdf$/.test(ua.name))&&ra.push(ua)}ra.sort(function(Aa,Ca){var Da=Aa.name.toLowerCase(),za=Ca.name.toLowerCase();return Aa.folder&&!Ca.folder?-1:!Aa.folder&&Ca.folder?1:Da<za?-1:Da>za?1:0})}oa["@odata.nextLink"]&&1E3>ra.length?ea(oa["@odata.nextLink"]):(clearTimeout(ma),ha(ra))}},function(oa){if(ca){clearTimeout(ma);-var ia=null;try{ia=JSON.parse(oa.responseText).error.message}catch(na){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ia?" ("+ia+")":""));m=!1;v.stop()}},null!=wa)}if(!m){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=R&&(R.innerText="",R.style.top="50%");var ca=m=!0,fa=0;E=arguments;var ma=setTimeout(function(){m=ca=!1;v.stop();y(mxResources.get("timeout"))},2E4),ba=n(".odFilesList");ba.innerText="";v.spin(ba);switch(X){case "recent":u=+var ia=null;try{ia=JSON.parse(oa.responseText).error.message}catch(na){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ia?" ("+ia+")":""));m=!1;v.stop()}},null!=wa)}if(!m){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=R&&(R.innerText="",R.style.top="50%");var ca=m=!0,fa=0;D=arguments;var ma=setTimeout(function(){m=ca=!1;v.stop();y(mxResources.get("timeout"))},2E4),ba=n(".odFilesList");ba.innerText="";v.spin(ba);switch(X){case "recent":u=[{name:mxResources.get("recent",null,"Recent"),driveId:X}];var ja=p()||{},la=[],da;for(da in ja)la.push(ja[da]);clearTimeout(ma);ha(la);return;case "shared":var va="/me/drive/sharedWithMe";u=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:X}];break;case "sharepoint":va="/sites?search=";u=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:X}];fa=1;break;case "site":u.push({name:Z,driveId:X,folderId:W,siteId:Y});va="/sites/"+Y+"/drives";fa=2;break;case "subsite":u.push({name:Z,driveId:X,folderId:W,siteId:Y});va="/drives/"+Y+(W?"/items/"+W:"/root")+"/children";break;case "search":X=K;u=[{driveId:X,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));va=X?"/drives/"+X+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+aa+"')";break;default:null==W?u=[{driveId:X}]:u.push({name:Z,driveId:X,folderId:W}),va=(X?"/drives/"+X:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}fa||(va+=(0<va.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var ra=[];ea()}}function Q(X){S.className=S.className.replace("odCatSelected","");S=X;S.className+=" odCatSelected"}function U(X){m||(V=null,C("search",null,null,null,X))}var T="";null==f&&(f=B,T='<div style="text-align: center;" class="odPreview"></div>');null==p&&(p=function(){var X=null;try{X=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return X});null==q&&(q=function(X){if(null!=X){var W=p()||{};delete X["@microsoft.graph.downloadUrl"];W[X.id]=X;localStorage.setItem("mxODPickerRecentList",JSON.stringify(W))}});T='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+-mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+T+(F?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(D?'<button id="odSubmitBtn" class="odSubmitBtn">'++mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+T+(F?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(E?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(H?"select":"open"))+"</button>":"");var P=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();P=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+(P?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(P?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";-var v=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),A=new Editor,N=null,J=null,K=null,m=!1,u=[],E=null,M=null;this.getSelectedItem=function(){null!=J&&q(J);return J};if(null==n("#mxODPickerCss")){var L=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");L.appendChild(O);O.type="text/css";O.id="mxODPickerCss";O.appendChild(document.createTextNode(P))}b.innerHTML=+var v=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),A=new Editor,N=null,J=null,K=null,m=!1,u=[],D=null,M=null;this.getSelectedItem=function(){null!=J&&q(J);return J};if(null==n("#mxODPickerCss")){var L=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");L.appendChild(O);O.type="text/css";O.id="mxODPickerCss";O.appendChild(document.createTextNode(P))}b.innerHTML=T;var R=n(".odPreview"),S=n("#odFiles");b=function(X,W){W=W||document;return W.querySelectorAll(X)}(".odCatListTitle");for(T=0;T<b.length;T++)b[T].addEventListener("click",function(){J=M=null;if(!m)switch(Q(this),this.id){case "odFiles":C();break;case "odRecent":C("recent");break;case "odShared":C("shared");break;case "odSharepoint":C("sharepoint")}});var V=null;n("#odSearchBox").addEventListener("keyup",function(X){var W=this;null!=V&&clearTimeout(V);13==X.keyCode?U(W.value):V=setTimeout(function(){U(W.value)},-500)});n("#refreshOD").addEventListener("click",function(){if(null!=E){f(null);var X=u.slice();C.apply(this,E);u=X}});F&&n("#odBackBtn").addEventListener("click",F);D&&n("#odSubmitBtn").addEventListener("click",z);null!=g?(F=g.pop(),"sharepoint"==g[0].driveId&&Q(n("#odSharepoint")),u=g,C(F.driveId,F.folderId,F.siteId,F.name)):C()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),+500)});n("#refreshOD").addEventListener("click",function(){if(null!=D){f(null);var X=u.slice();C.apply(this,D);u=X}});F&&n("#odBackBtn").addEventListener("click",F);E&&n("#odSubmitBtn").addEventListener("click",z);null!=g?(F=g.pop(),"sharepoint"==g[0].driveId&&Q(n("#odSharepoint")),u=g,C(F.driveId,F.folderId,F.siteId,F.name)):C()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),null!=c.lastChanged&&(Date.now(),c.lastChanged.getTime()),Date.now(),App.startTime.getTime(),c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&c.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,p,q){if("1"==urlParams.openInSameWin||navigator.standalone)null!=q&&q();else{var t=null;try{t=window.open(c)}catch(y){}null==t||void 0===t?this.showDialog((new PopupDialog(this,c,p,q)).container,340,140,!0,!0):null!=p&&p()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=@@ -13767,9 +13772,9 @@ window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https:null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistration().then(function(k){null!=k&&k.unregister().then(function(){null!=b&&(b(),b=null)})})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};App.isSimpleThemePreferred=function(){var b=navigator.userAgent||navigator.vendor||window.opera;return 1024>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||/android/i.test(b)||/iPad|iPhone|iPod/.test(b)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints};-App.main=function(b,f){try{var k=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var D=parseInt(mxSettings.settings.autosaveDelay);!isNaN(D)&&0<D?(DrawioFile.prototype.autosaveDelay=D,EditorUi.debug("Setting autosaveDelay",D)):EditorUi.debug("Invalid autosaveDelay",D)}null!=mxSettings.settings.defaultEdgeLength&&(D=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(D)&&0<D?(Graph.prototype.defaultEdgeLength=D,EditorUi.debug("Using defaultEdgeLength",D)):-EditorUi.debug("Invalid defaultEdgeLength",D))}}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}try{if(null!=Menus.prototype.defaultFonts)for(D=0;D<Menus.prototype.defaultFonts.length;D++){var d=Menus.prototype.defaultFonts[D];"string"!==typeof d&&null!=d.fontFamily&&null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,-mxLanguage))}catch(g){document.body.innerHTML="",d=document.createElement("pre"),mxUtils.write(d,g.stack),document.body.appendChild(d)}},c=function(D){mxUtils.getAll("1"!=urlParams.dev?[D]:[D,STYLE_PATH+"/default.xml"],function(d){function g(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||+App.main=function(b,f){try{var k=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var E=parseInt(mxSettings.settings.autosaveDelay);!isNaN(E)&&0<E?(DrawioFile.prototype.autosaveDelay=E,EditorUi.debug("Setting autosaveDelay",E)):EditorUi.debug("Invalid autosaveDelay",E)}null!=mxSettings.settings.defaultEdgeLength&&(E=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(E)&&0<E?(Graph.prototype.defaultEdgeLength=E,EditorUi.debug("Using defaultEdgeLength",E)):+EditorUi.debug("Invalid defaultEdgeLength",E))}}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}try{if(null!=Menus.prototype.defaultFonts)for(E=0;E<Menus.prototype.defaultFonts.length;E++){var d=Menus.prototype.defaultFonts[E];"string"!==typeof d&&null!=d.fontFamily&&null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,+mxLanguage))}catch(g){document.body.innerHTML="",d=document.createElement("pre"),mxUtils.write(d,g.stack),document.body.appendChild(d)}},c=function(E){mxUtils.getAll("1"!=urlParams.dev?[E]:[E,STYLE_PATH+"/default.xml"],function(d){function g(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(I){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var B=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&@@ -13777,17 +13782,17 @@ mxLanguage))}catch(g){document.body.innerHTML="",d=document.createElement("pre")(mxLog.show(),mxLog.debug(I.stack)):(EditorUi.logError(I.message,null,null,null,I),window.setTimeout(function(){alert(I.message)},1))}}mxResources.parse(d[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=n)try{var x=JSON.parse(n),z;for(z in l.merge)x[z]=l.merge[z];l=x}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g,function(B){document.body.innerHTML="";var I=document.createElement("pre");mxUtils.write(I,B.stack);document.body.appendChild(I)}))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick=function(){mxLanguage=-"en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(Editor.loadCompatibleCss(),App.isMainCalled=!0,window.onerror=function(D,-d,g,l,n){EditorUi.logError("Global: "+(null!=D?D:""),d,g,l,n,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",D,"\nURL:",d,"\nLine:",g,"\nColumn:",l,"\nError:",n)):console.error("Message:",D,"\nURL:",d,"\nLine:",g,"\nColumn:",l,"\nError:",n);window.setTimeout(function(){alert("Error: "+(null!=D?D:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==+"en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(Editor.loadCompatibleCss(),App.isMainCalled=!0,window.onerror=function(E,+d,g,l,n){EditorUi.logError("Global: "+(null!=E?E:""),d,g,l,n,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",E,"\nURL:",d,"\nLine:",g,"\nColumn:",l,"\nError:",n)):console.error("Message:",E,"\nURL:",d,"\nLine:",g,"\nColumn:",l,"\nError:",n);window.setTimeout(function(){alert("Error: "+(null!=E?E:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"!=urlParams.enableSW&&-"1"==urlParams.dev)?(EditorUi.debug("App.main","Uninstalling service worker"),App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")})):Editor.enableServiceWorker&&navigator.serviceWorker.getRegistration().then(function(D){null!=D?(EditorUi.debug("App.main","Updating service worker"),D.update()):!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew?(EditorUi.debug("App.main","Installing service worker"),navigator.serviceWorker.register("service-worker.js")):-EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(D){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var q=-null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var t=JSON.parse(localStorage.getItem(mxSettings.key));null!=t&&(q=t.plugins)}catch(D){}t=urlParams.p;App.initPluginCallback();null!=t&&App.loadPlugins(t.split(";"));if(null!=q&&0<q.length&&"0"!=urlParams.plugins)for(p=0;p<q.length;p++)try{("/"==q[p].charAt(0)&&(q[p]=PLUGINS_BASE_PATH+q[p]),App.isSameDomain(q[p]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(q[p])?null==-App.pluginsLoaded[q[p]]&&(App.pluginsLoaded[q[p]]=!0,App.embedModePluginsCount++,mxscript(q[p])):null!=window.console&&console.log("Unknown plugin:",q[p]):null!=window.console&&console.log("Blocked plugin:",q[p])}catch(D){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",-null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,H=function(D){if(D.source==y)try{var d=JSON.parse(D.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme",-"dark light"),k())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,D.data)}};mxEvent.addListener(window,"message",H);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(D){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(D.stack)):console.error(D)}if(isLocalStorage&&-null!=localStorage&&"1"!=urlParams.embed){var F=localStorage.getItem(Editor.configurationKey);if(null!=F)try{F=JSON.parse(F),null!=F&&(EditorUi.debug("Using local configuration",F),Editor.configure(F),mxSettings.load())}catch(D){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(D.stack)):console.error(D)}}}k()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(D){document.body.innerHTML="",q=-document.createElement("pre"),mxUtils.write(q,D.stack),document.body.appendChild(q)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;+"1"==urlParams.dev)?(EditorUi.debug("App.main","Uninstalling service worker"),App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")})):Editor.enableServiceWorker&&navigator.serviceWorker.getRegistration().then(function(E){null!=E?(EditorUi.debug("App.main","Updating service worker"),E.update()):!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew?(EditorUi.debug("App.main","Installing service worker"),navigator.serviceWorker.register("service-worker.js")):+EditorUi.debug("App.main","Skipping service worker (first load)")})}catch(E){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var q=+null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var t=JSON.parse(localStorage.getItem(mxSettings.key));null!=t&&(q=t.plugins)}catch(E){}t=urlParams.p;App.initPluginCallback();null!=t&&App.loadPlugins(t.split(";"));if(null!=q&&0<q.length&&"0"!=urlParams.plugins)for(p=0;p<q.length;p++)try{("/"==q[p].charAt(0)&&(q[p]=PLUGINS_BASE_PATH+q[p]),App.isSameDomain(q[p]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(q[p])?null==+App.pluginsLoaded[q[p]]&&(App.pluginsLoaded[q[p]]=!0,App.embedModePluginsCount++,mxscript(q[p])):null!=window.console&&console.log("Unknown plugin:",q[p]):null!=window.console&&console.log("Blocked plugin:",q[p])}catch(E){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,H=function(E){if(E.source==y)try{var d=JSON.parse(E.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme",+"dark light"),k())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,E.data)}};mxEvent.addListener(window,"message",H);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(E){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(E.stack)):console.error(E)}if(isLocalStorage&&+null!=localStorage&&"1"!=urlParams.embed){var F=localStorage.getItem(Editor.configurationKey);if(null!=F)try{F=JSON.parse(F),null!=F&&(EditorUi.debug("Using local configuration",F),Editor.configure(F),mxSettings.load())}catch(E){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(E.stack)):console.error(E)}}}k()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(E){document.body.innerHTML="",q=+document.createElement("pre"),mxUtils.write(q,E.stack),document.body.appendChild(q)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(c):mxscript(c):f?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(p){null!=window.console&&console.log("Error loading plugin:",b[k],p)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};@@ -13827,7 +13832,7 @@ App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,f=this.getCurrentFile();null==f||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};App.prototype.getThumbnail=function(b,f,k){k=null!=k?k:0;var c=!1;try{var p=!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;f(null)}),this.timeout),t=mxUtils.bind(this,function(P){window.clearTimeout(q);p&&f(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var y=this.editor.graph,H=y.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var F=y.getGlobalVariable;y=this.createTemporaryGraph(y.getStylesheet());y.setBackgroundImage=this.editor.graph.setBackgroundImage;-var D=this.pages[0];this.currentPage==D?y.setBackgroundImage(H):null!=D.viewState&&null!=D.viewState&&(H=D.viewState.backgroundImage,y.setBackgroundImage(H));y.getGlobalVariable=function(P){return"page"==P?D.getName():"pagenumber"==P?1:F.apply(this,arguments)};y.getGlobalVariable=F;document.body.appendChild(y.container);y.model.setRoot(D.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{y!=this.editor.graph&&null!=y.container.parentNode&&+var E=this.pages[0];this.currentPage==E?y.setBackgroundImage(H):null!=E.viewState&&null!=E.viewState&&(H=E.viewState.backgroundImage,y.setBackgroundImage(H));y.getGlobalVariable=function(P){return"page"==P?E.getName():"pagenumber"==P?1:F.apply(this,arguments)};y.getGlobalVariable=F;document.body.appendChild(y.container);y.model.setRoot(E.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(v){P=null}t(P)}),b,this.thumbImageCache,"#ffffff",function(){t()},null,null,null,null,null,null,y,k,null,null,null,"diagram",null),c=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),g=y.getGraphBounds(),l=y.view.translate,n=y.view.scale;null!=H&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle((l.x+H.x)*n,(l.y+H.y)*n,H.width*n,H.height*n)));var x=b/g.width;x=Math.min(1,Math.min(3*b/(4*g.height),x));var z=Math.floor(g.x),B=Math.floor(g.y);d.setAttribute("width",Math.ceil(x*(g.width+4)));d.setAttribute("height",Math.ceil(x*(g.height+4)));var I=d.getContext("2d");I.scale(x,x);I.translate(-z,-B);var G=y.background;if(null==G||""==G||G==mxConstants.NONE)G="#ffffff";I.save();I.fillStyle=G;I.fillRect(z,B,Math.ceil(g.width+4),Math.ceil(g.height+4));I.restore();if(null!=H){var C=new Image;C.src=H.src;I.drawImage(C,H.x*x,H.y*x,H.width*x,H.height*x)}var Q=new mxJsCanvas(d),U=new mxAsyncCanvas(this.thumbImageCache);Q.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(P,v){P.shape instanceof mxShape&&P.shape.checkBounds()&&(v.save(),v.translate(.5,.5),P.shape.paint(v),v.translate(-.5,-.5),v.restore())};T.drawText=function(P,v){};T.drawState(y.getView().getState(y.model.root),U);U.finish(mxUtils.bind(this,function(){try{T.drawState(y.getView().getState(y.model.root),Q),y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(P){d=null}t(d)}));@@ -13846,18 +13851,18 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.sApp.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(k))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},2E3)},15E3)}};-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(H,F,D,d,g){"ResizeObserver loop limit exceeded"!=H&&(EditorUi.logError("Uncaught: "+(null!=H?H:""),F,D,d,g,null,!0),b.handleError({message:H},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(H){var F=this.getCurrentFile();EditorUi.debug("storage event",[H],-[F]);null!=F&&".draft-alive-check"==H.key&&null!=H.newValue&&null!=F.draftId&&(this.draftAliveCheck=H.newValue,F.saveDraft())}))}catch(H){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(H){try{var F=this.getDiagramId();if(F!=f){f=F;var D=this.getCurrentFile();null!=D&&D.getHash()==F||this.loadFile(F,!0)}else{var d=this.getHashObject();if(null!=d&&null!=d.pageId&&null!=this.currentPage&&d.pageId!=this.currentPage.getId()){var g=this.getPageById(d.pageId);+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(H,F,E,d,g){"ResizeObserver loop limit exceeded"!=H&&(EditorUi.logError("Uncaught: "+(null!=H?H:""),F,E,d,g,null,!0),b.handleError({message:H},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(H){var F=this.getCurrentFile();EditorUi.debug("storage event",[H],+[F]);null!=F&&".draft-alive-check"==H.key&&null!=H.newValue&&null!=F.draftId&&(this.draftAliveCheck=H.newValue,F.saveDraft())}))}catch(H){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(H){try{var F=this.getDiagramId();if(F!=f){f=F;var E=this.getCurrentFile();null!=E&&E.getHash()==F||this.loadFile(F,!0)}else{var d=this.getHashObject();if(null!=d&&null!=d.pageId&&null!=this.currentPage&&d.pageId!=this.currentPage.getId()){var g=this.getPageById(d.pageId);null!=g&&this.selectPage(g)}}}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"))}))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var k=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var H=mxUtils.bind(this,function(d){Editor.isPngDataUrl(d)&&(d=Editor.extractGraphModelFromPng(d));var g=urlParams.title;g=null!=g?decodeURIComponent(g):this.defaultFilename;d=new LocalFile(this,-d,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.editor.chromeless||(d.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),F=window.opener||window.parent;if(F!=window){var D=urlParams.create;null!=D?H(F[decodeURIComponent(D)]):(D=urlParams.data,null!=D?H(decodeURIComponent(D)):this.spinner.spin(document.body,mxResources.get("loading"))&&-this.createTimeout(2E3,mxUtils.bind(this,function(d){this.installMessageHandler(mxUtils.bind(this,function(g,l){l.source==F&&d.clear()&&(this.spinner.stop(),H(g))}))}),mxUtils.bind(this,function(d){this.handleError(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)D=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=D;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,-!0),this.actions.get("insertTemplate").funct();else{D=!1;try{D=null!=window.opener&&null!=window.opener.openFile}catch(d){}D?this.spinner.spin(document.body,mxResources.get("loading")):(D=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=D&&0!=D.length||this.editor.isChromelessView()?null!=D&&0<D.length?this.loadFile(D,null,null,mxUtils.bind(this,function(){var d=decodeURIComponent(urlParams.viewbox||"");if(""!=d)try{var g=JSON.parse(d);this.editor.graph.fitWindow(g,+d,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.editor.chromeless||(d.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),F=window.opener||window.parent;if(F!=window){var E=urlParams.create;null!=E?H(F[decodeURIComponent(E)]):(E=urlParams.data,null!=E?H(decodeURIComponent(E)):this.spinner.spin(document.body,mxResources.get("loading"))&&+this.createTimeout(2E3,mxUtils.bind(this,function(d){this.installMessageHandler(mxUtils.bind(this,function(g,l){l.source==F&&d.clear()&&(this.spinner.stop(),H(g))}))}),mxUtils.bind(this,function(d){this.handleError(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)E=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=E;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,+!0),this.actions.get("insertTemplate").funct();else{E=!1;try{E=null!=window.opener&&null!=window.opener.openFile}catch(d){}E?this.spinner.spin(document.body,mxResources.get("loading")):(E=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=E&&0!=E.length||this.editor.isChromelessView()?null!=E&&0<E.length?this.loadFile(E,null,null,mxUtils.bind(this,function(){var d=decodeURIComponent(urlParams.viewbox||"");if(""!=d)try{var g=JSON.parse(d);this.editor.graph.fitWindow(g,g.border)}catch(l){console.error(l)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(c=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,8))&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var p=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),q=mxUtils.bind(this,function(H){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,H,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var F=urlParams.title;F=null!=F?decodeURIComponent(F):this.defaultFilename;H=this.getServiceCount(!0);-isLocalStorage&&H++;var D=4>=H?2:6<H?4:3;F=new CreateDialog(this,F,mxUtils.bind(this,function(d,g){if(null==g){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(g,mxUtils.bind(this,function(n){this.createFile(d,this.getFileData(!0),null,g,null,!0,n)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,D,null,null,null,this.editor.fileExtensions);this.showDialog(F.container,-420,H>D?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));F.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var t=mxUtils.bind(this,function(H){this.createFile(null!=H.filename?H.filename:this.defaultFilename,H,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+-this.getSearch(["create"]));window.location.hash="R"+Graph.compress(H)}),!0,null,!0)}),y=c.data;c.compressed&&(y=Graph.decompress(y));"mermaid"==c.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(H){H!=this.emptyDiagramXml&&t(H)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(H){for(var F=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),D=0;D<F.length;D++)F[D].parentNode.removeChild(F[D]);mxMermaidToDrawio.resetListeners();+isLocalStorage&&H++;var E=4>=H?2:6<H?4:3;F=new CreateDialog(this,F,mxUtils.bind(this,function(d,g){if(null==g){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(g,mxUtils.bind(this,function(n){this.createFile(d,this.getFileData(!0),null,g,null,!0,n)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,E,null,null,null,this.editor.fileExtensions);this.showDialog(F.container,+420,H>E?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));F.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var t=mxUtils.bind(this,function(H){this.createFile(null!=H.filename?H.filename:this.defaultFilename,H,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname++this.getSearch(["create"]));window.location.hash="R"+Graph.compress(H)}),!0,null,!0)}),y=c.data;c.compressed&&(y=Graph.decompress(y));"mermaid"==c.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(H){H!=this.emptyDiagramXml&&t(H)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(H){for(var F=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),E=0;E<F.length;E++)F[E].parentNode.removeChild(F[E]);mxMermaidToDrawio.resetListeners();this.handleError(H)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):"generate"==c.type&&this.spinner.spin(document.body,mxResources.get("generate")+" '"+y+"'")&&this.generateDiagram(y,mxUtils.bind(this,function(H){this.spinner.stop();t(H)}),mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[c]?q(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(H){q(H)},mxUtils.bind(this,function(H){this.handleError(H,mxResources.get("errorLoadingFile"),p)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&@@ -13893,34 +13898,34 @@ App.prototype.saveLibrary=function(b,f,k,c,p,q,t){try{c=null!=c?c:this.mode;p=nuthis.drive.insertFile(b,y,d,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),H,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),H,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,y,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),H,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),H,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),H,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(g,f)}),H,d):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,y,b),mxUtils.bind(this,function(g){this.hideDialog(!0);this.libraryLoaded(g,f)}),H):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));-else if(p||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(y);var F=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);q||this.libraryLoaded(k,f);null!=t&&t()}),H)});if(b!=k.getTitle()){var D=k.getHash();k.rename(b,mxUtils.bind(this,function(d){k.constructor!=LocalLibrary&&D!=k.getHash()&&(mxSettings.removeCustomLibrary(D),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(D);F()}),H)}else F()}}catch(d){this.handleError(d)}};+else if(p||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(y);var F=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);q||this.libraryLoaded(k,f);null!=t&&t()}),H)});if(b!=k.getTitle()){var E=k.getHash();k.rename(b,mxUtils.bind(this,function(d){k.constructor!=LocalLibrary&&E!=k.getHash()&&(mxSettings.removeCustomLibrary(E),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(E);F()}),H)}else F()}}catch(d){this.handleError(d)}};App.prototype.saveFile=function(b,f){var k=this.getCurrentFile(),c=this.mode;if(null!=k){var p=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&-null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,H){k.invalidFileHandle=null;k.fileHandle=y;k.title=H.name;k.desc=H;k.editable=null;this.save(H.name,p)}),null,this.createFileSystemOptions(k.getTitle()));else{b=null!=k.getTitle()?k.getTitle():this.defaultFilename;var q=mxUtils.bind(this,function(y,H,F,D){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),+null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,H){k.invalidFileHandle=null;k.fileHandle=y;k.title=H.name;k.desc=H;k.editable=null;this.save(H.name,p)}),null,this.createFileSystemOptions(k.getTitle()));else{b=null!=k.getTitle()?k.getTitle():this.defaultFilename;var q=mxUtils.bind(this,function(y,H,F,E){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){F.value=y.split(".").slice(0,-1).join(".");F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&H==App.MODE_DEVICE)null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,l){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=l.name;k.desc=l;this.setMode(App.MODE_DEVICE);this.save(l.name,p)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(y)):(this.setMode(App.MODE_DEVICE),this.save(y,p));else if("download"==H)(new LocalFile(this,null,y)).save();else if("_blank"==H)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=H){var d=mxUtils.bind(this,function(g){var l=this.editor.graph,n=l.getSelectionCells(),x=l.getViewState(),-z=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,H,p,null==this.mode,g,null,null,mxUtils.bind(this,function(){this.restoreViewState(z,x,n)}))});null!=D?d(D):this.pickFolder(H,d)}else null!=H&&this.save(y,p)}),t=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,H,F){q(y.value,H,y,F);this.hideDialog()}),t?null:["_blank"]);this.showDialog(b.container,+z=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,H,p,null==this.mode,g,null,null,mxUtils.bind(this,function(){this.restoreViewState(z,x,n)}))});null!=E?d(E):this.pickFolder(H,d)}else null!=H&&this.save(y,p)}),t=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,H,F){q(y.value,H,y,F);this.hideDialog()}),t?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(k.getTitle(),p)}};-App.prototype.loadTemplate=function(b,f,k,c,p){var q=!1,t=b,y=null!=c?c:b;c=/\.png$/i.test(y)||/\.pdf$/i.test(y);var H=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(t)||(q=c||H,t="t="+(new Date).getTime(),t=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+t+(q?"&base64=1":""));this.editor.loadUrl(t,mxUtils.bind(this,function(F){try{var D=q?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(F):atob(F):F;if(H||this.isVisioData(D))H||(y=p?this.isRemoteVisioData(D)?"raw.vss":"raw.vssx":-this.isRemoteVisioData(D)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(d){f(d)},k,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(D,y))this.isExternalDataComms()?this.parseFileData(D,mxUtils.bind(this,function(d){4==d.readyState&&200<=d.status&&299>=d.status&&"<mxGraphModel"==d.responseText.substring(0,13)&&f(d.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);else if(this.isLucidChartData(D))this.convertLucidChart(D,-mxUtils.bind(this,function(d){f(d)}),mxUtils.bind(this,function(d){k(d)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(D))D=Editor.extractGraphModelFromPng(F);f(D)}}catch(d){k(d)}}),k,/(\.png)($|\?)/i.test(y)||H,null,null,q)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};+App.prototype.loadTemplate=function(b,f,k,c,p){var q=!1,t=b,y=null!=c?c:b;c=/\.png$/i.test(y)||/\.pdf$/i.test(y);var H=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(t)||(q=c||H,t="t="+(new Date).getTime(),t=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+t+(q?"&base64=1":""));this.editor.loadUrl(t,mxUtils.bind(this,function(F){try{var E=q?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(F):atob(F):F;if(H||this.isVisioData(E))H||(y=p?this.isRemoteVisioData(E)?"raw.vss":"raw.vssx":+this.isRemoteVisioData(E)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(d){f(d)},k,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,y))this.isExternalDataComms()?this.parseFileData(E,mxUtils.bind(this,function(d){4==d.readyState&&200<=d.status&&299>=d.status&&"<mxGraphModel"==d.responseText.substring(0,13)&&f(d.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);else if(this.isLucidChartData(E))this.convertLucidChart(E,+mxUtils.bind(this,function(d){f(d)}),mxUtils.bind(this,function(d){k(d)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(E))E=Editor.extractGraphModelFromPng(F);f(E)}}catch(d){k(d)}}),k,/(\.png)($|\?)/i.test(y)||H,null,null,q)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};App.prototype.uncompressPages=function(b){if(null!=b)try{var f=mxUtils.parseXml(b);if("mxfile"==f.documentElement.nodeName){for(var k=f.documentElement.getElementsByTagName("diagram"),c=0;c<k.length;c++){var p=Editor.parseDiagramNode(k[c],!0);null!=p&&(mxUtils.setTextContent(k[c],""),k[c].appendChild(p))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(q){}return b};-App.prototype.createFile=function(b,f,k,c,p,q,t,y,H,F){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var D=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){D();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=l&&this.handleError(l)});try{var g=mxUtils.bind(this,function(l){D();this.fileCreated(l,+App.prototype.createFile=function(b,f,k,c,p,q,t,y,H,F){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var E=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(l){E();null==l&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=l&&this.handleError(l)});try{var g=mxUtils.bind(this,function(l){E();this.fileCreated(l,k,q,p,H,F)});c==App.MODE_GOOGLE&&null!=this.drive?(null==t&&null!=this.stateArg&&null!=this.stateArg.folderId&&(t=this.stateArg.folderId),this.drive.insertFile(b,f,t,g,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,g,d,!1,t):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,g,d,!1,t):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,g,d,!1,t):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,g,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,f,g,d,!1,t):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,g,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(D(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,k,q,p,H,F)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):(D(),this.fileCreated(new LocalFile(this,f,b,null==c),k,q,p,H,F))}catch(l){D(),+this.oneDrive.insertFile(b,f,g,d,!1,t):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,g,d):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(l,n){var x=new LocalFile(this,f,n.name,null,l,n);x.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,k,q,p,H,F)}),d,!0)}),mxUtils.bind(this,function(l){"AbortError"!=l.name&&d(l)}),this.createFileSystemOptions(b))):(E(),this.fileCreated(new LocalFile(this,f,b,null==c),k,q,p,H,F))}catch(l){E(),this.handleError(l)}}};-App.prototype.fileCreated=function(b,f,k,c,p,q){var t=window.location.pathname;null!=f&&0<f.length&&(t+="?libs="+f);null!=p&&0<p.length&&(t+="?clibs="+p);t=this.getUrl(t);b.getMode()!=App.MODE_DEVICE&&(t+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var H=window.location.protocol+"//"+window.location.hostname+t,F=y,D=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(D=-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(D.container),F=this.decodeNodeIntoGraph(F,D));b.setData(this.createFileData(y,D,b,H));null!=D&&D.container.parentNode.removeChild(D.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==k&&null!=l&&(k=!l.isModified()&&null==l.getMode());var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);k&&this.updateStatus(mxUtils.bind(this,+App.prototype.fileCreated=function(b,f,k,c,p,q){var t=window.location.pathname;null!=f&&0<f.length&&(t+="?libs="+f);null!=p&&0<p.length&&(t+="?clibs="+p);t=this.getUrl(t);b.getMode()!=App.MODE_DEVICE&&(t+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var H=window.location.protocol+"//"+window.location.hostname+t,F=y,E=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(E=+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(E.container),F=this.decodeNodeIntoGraph(F,E));b.setData(this.createFileData(y,E,b,H));null!=E&&E.container.parentNode.removeChild(E.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var l=this.getCurrentFile();null==k&&null!=l&&(k=!l.isModified()&&null==l.getMode());var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,q);k&&this.updateStatus(mxUtils.bind(this,function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=p){for(var z=[],B=p.split(";"),I=0;I<B.length;I++)z.push(decodeURIComponent(B[I]));this.loadLibraries(z)}null!=c&&c()}),x=mxUtils.bind(this,function(){k||null==l||!l.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==k||k?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),window.geOpenWindow(t,null,x))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(l){d();null!=l&&"AbortError"==l.name||this.handleError(l)}))}};App.prototype.loadFile=function(b,f,k,c,p){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var q=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var H=mxUtils.bind(this,function(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(l){null!=l?(this.fileLoaded(new StorageFile(this,l,b)),null!=c&&c()):H({message:mxResources.get("fileNotFound")})}),H)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}));else if(null!=k)this.spinner.stop(),this.fileLoaded(k),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var F=decodeURIComponent(b.substring(1));"<"!=F.charAt(0)&&(F=Graph.decompress(F));F=new LocalFile(this,F,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return b};this.fileLoaded(F);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(l,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,l,n));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));-else if("U"==b.charAt(0)){var D=decodeURIComponent(b.substring(1)),d=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=D.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var l=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=D.substring(31,D.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var x=this.getCurrentFile();null!=x&&this.editor.chromeless&&!this.editor.editable&&(x.getHash=-function(){return"G"+n},window.location.hash="#"+x.getHash());null!=c&&c()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(D,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var x=D,z=D.lastIndexOf("."),B=x.lastIndexOf("/");z>B&&0<B&&(x=x.substring(B+1,z),z=D.substring(z),Editor.useCanvasForExport||+else if("U"==b.charAt(0)){var E=decodeURIComponent(b.substring(1)),d=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=E.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var l=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=E.substring(31,E.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var x=this.getCurrentFile();null!=x&&this.editor.chromeless&&!this.editor.editable&&(x.getHash=+function(){return"G"+n},window.location.hash="#"+x.getHash());null!=c&&c()}));return!0}return!1});!l()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",l);return!0});this.loadTemplate(E,mxUtils.bind(this,function(l){this.spinner.stop();if(null!=l&&0<l.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var x=E,z=E.lastIndexOf("."),B=x.lastIndexOf("/");z>B&&0<B&&(x=x.substring(B+1,z),z=E.substring(z),Editor.useCanvasForExport||".png"!=z||(z=".drawio"),".svg"===z||".xml"===z||".html"===z||".png"===z||".drawio"===z)&&(n=x+z)}l=new LocalFile(this,l,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);l.getHash=function(){return b};this.fileLoaded(l,!0)?null!=c&&c():d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){d()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var g=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var l=this.getServiceForName(g);if(null==l)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));l.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var z=this.getCurrentFile();if(null==z)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){z.getHash=function(){return n+b};x="#"+z.getHash();try{var B=this.getHashObject();null==B||mxUtils.isEmptyObject(B)||(x=x+"#"+encodeURIComponent(JSON.stringify(B)))}catch(I){}window.location.replace(x)}else x==@@ -13928,8 +13933,8 @@ z&&null==x.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var I=mxResnull!=x?mxResources.get("errorLoadingFile"):null,z,null,null,"#"+n+b):z()}))}})()}}),t=this.getCurrentFile(),y=mxUtils.bind(this,function(){p||null==t||!t.isModified()?q():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=t&&(window.location.hash=t.getHash())}),q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?y():null==t||f?y():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,y)).container,340,140,!0,!0)};App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var c=0;c<k.length;c++)""!=k[c]&&0>mxUtils.indexOf(f,k[c])&&f.push(k[c])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(F,D){D||mxSettings.removeCustomLibrary(F);delete this.loadedLibraries[F]}),c=0,p=[],q=0<b.length&&"L.scratchpad"==b[0]?1:0,t=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var F=b.length-1;0<=F;F--)null!=p[F]&&this.loadLibrary(p[F],F<=q);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var H=encodeURIComponent(decodeURIComponent(b[y]));-mxUtils.bind(this,function(F,D){if(null!=F&&0<F.length&&null==this.loadedLibraries[F]&&null==this.sidebar.palettes[F]){this.loadedLibraries[F]=!0;c++;var d=mxUtils.bind(this,function(B){p[D]=B;c--;t()}),g=mxUtils.bind(this,function(B){k(F,B);c--;t()}),l=F.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(F.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(I){".scratchpad"==B&&null==+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(F,E){E||mxSettings.removeCustomLibrary(F);delete this.loadedLibraries[F]}),c=0,p=[],q=0<b.length&&"L.scratchpad"==b[0]?1:0,t=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var F=b.length-1;0<=F;F--)null!=p[F]&&this.loadLibrary(p[F],F<=q);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var H=encodeURIComponent(decodeURIComponent(b[y]));+mxUtils.bind(this,function(F,E){if(null!=F&&0<F.length&&null==this.loadedLibraries[F]&&null==this.sidebar.palettes[F]){this.loadedLibraries[F]=!0;c++;var d=mxUtils.bind(this,function(B){p[E]=B;c--;t()}),g=mxUtils.bind(this,function(B){k(F,B);c--;t()}),l=F.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var B=decodeURIComponent(F.substring(1));StorageFile.getFileContent(this,B,mxUtils.bind(this,function(I){".scratchpad"==B&&null==I&&(I=this.emptyLibraryXml);null!=I?d(new StorageLibrary(this,I,B)):g()}),g)}catch(I){g()}}),0);else if("U"==l){var n=decodeURIComponent(F.substring(1));this.isOffline()?g(!0):this.loadTemplate(n,mxUtils.bind(this,function(B){null!=B&&0<B.length?d(new UrlLibrary(this,B,n)):g()}),function(){g()},null,!0)}else if("R"==l){l=decodeURIComponent(F.substring(1));try{l=JSON.parse(l);var x={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[x.downloadUrl],null,mxUtils.bind(this,function(B){try{d(new RemoteLibrary(this,B,x))}catch(I){g()}}),function(){g()})}catch(B){g()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(F.substring(1)),function(B){d(B)},g)}catch(B){g()}else{var z=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(z=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(z=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(z=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(z=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(z=this.oneDrive);null!=z?z.getLibrary(decodeURIComponent(F.substring(1)),mxUtils.bind(this,function(B){try{d(B)}catch(I){g()}}),function(B){g()}):g(!0)}}})(H,y)}t()}};@@ -13943,13 +13948,13 @@ Editor.userImage,c.style.top="6px",c.style.right="4px");if(null!=b&&b.isRealtimenull==q||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif&&this.isOwnGDriveDomain()){b=b||"online";var k=null,c=mxUtils.bind(this,function(p){p=p.filter(function(H){return!H.targets||-1<H.targets.indexOf(b)||null!=f&&-1<H.targets.indexOf(f)});for(var q=b+"NotifReadTS",t=isLocalStorage?parseInt(localStorage.getItem(q)):!0,y=0;y<p.length;y++)p[y].isNew=!t||p[y].timestamp>t;this.showNotification(p,q)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(p){}(null==k||k.ts+864E5<Date.now())&&this.isOwnGDriveDomain()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{var q=JSON.parse(p.getText());q.sort(function(t,y){return y.timestamp-t.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:q}));this.fetchingNotif=!1;c(q)}catch(t){}}))):c(k.notifs)}};-App.prototype.showNotification=function(b,f){function k(F){var D=document.querySelector(".geNotification-count");null!=D&&(D.innerHTML=F,D.style.display=0==F?"none":"",D=document.querySelector(".geNotification-bell"),D.style.animation=0==F?"none":"",D.className="geNotification-bell"+(0==F?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==F?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var p=c=0;p<b.length;p++)b[p].isNew&&-c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var q=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var F=this.notificationWin.querySelectorAll(".circle.active"),D=0;D<F.length;D++)F[D].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=+App.prototype.showNotification=function(b,f){function k(F){var E=document.querySelector(".geNotification-count");null!=E&&(E.innerHTML=F,E.style.display=0==F?"none":"",E=document.querySelector(".geNotification-bell"),E.style.animation=0==F?"none":"",E.className="geNotification-bell"+(0==F?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==F?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var p=c=0;p<b.length;p++)b[p].isNew&&+c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var q=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var F=this.notificationWin.querySelectorAll(".circle.active"),E=0;E<F.length;E++)F[E].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";p=document.createElement("span");p.className="geBell-top";c.appendChild(p);p=document.createElement("span");p.className="geBell-middle";c.appendChild(p);p=document.createElement("span");p.className="geBell-bottom";c.appendChild(p);p=document.createElement("span");p.className="geBell-rad";c.appendChild(p);this.notificationBtn.appendChild(c);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);p=document.createElement("div");p.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");p.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";p.appendChild(c);this.notificationWin.appendChild(p);p=document.createElement("div");p.className="notifications clearfix";var t=document.createElement("div");t.setAttribute("id","geNotifList");t.style.position="relative";p.appendChild(t);this.notificationWin.appendChild(p);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var F=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=-F.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=F.right-this.notificationWin.clientWidth+"px";k(0)}else q()}));mxEvent.addListener(c,"click",q)}else this.notificationBtn.style.display="";var y=0,H=document.getElementById("geNotifList");if(null!=H){H.innerHTML='<div class="line"></div>';for(p=0;p<b.length;p++)(function(F,D){D.isNew&&y++;var d=document.createElement("div");d.className="notification";F=F.timeSince(new Date(D.timestamp));null==F&&(F=mxResources.get("lessThanAMinute"));-d.innerHTML='<div class="circle'+(D.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[F],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(D.content)+"</p>";D.link&&mxEvent.addListener(d,"click",function(){window.open(D.link,"notifWin")});H.appendChild(d)})(this,b[p]);k(y)}}};+F.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=F.right-this.notificationWin.clientWidth+"px";k(0)}else q()}));mxEvent.addListener(c,"click",q)}else this.notificationBtn.style.display="";var y=0,H=document.getElementById("geNotifList");if(null!=H){H.innerHTML='<div class="line"></div>';for(p=0;p<b.length;p++)(function(F,E){E.isNew&&y++;var d=document.createElement("div");d.className="notification";F=F.timeSince(new Date(E.timestamp));null==F&&(F=mxResources.get("lessThanAMinute"));+d.innerHTML='<div class="circle'+(E.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[F],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(E.content)+"</p>";E.link&&mxEvent.addListener(d,"click",function(){window.open(E.link,"notifWin")});H.appendChild(d)})(this,b[p]);k(y)}}};App.prototype.save=function(b,f){var k=this.getCurrentFile(),c=!0,p=mxUtils.bind(this,function(){c&&(c=!1,k.handleFileSuccess(!0),null!=f&&f())}),q=mxUtils.bind(this,function(t){if(c){c=!1;Editor.addRetryToError(t,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=t&&null!=t.retry){var y=t.retry;t.retry=function(){c=!0;try{k.isModified()?y():p()}catch(H){q(H)}}}k.handleFileError(t,null==t||"AbortError"!=t.name)}});if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"),q,3*this.timeout))try{this.clearStatus(),this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==k.getTitle()?k.save(!0,p,q):k.saveAs(b,p,q)}catch(t){q(t)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};@@ -13963,8 +13968,8 @@ function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.coApp.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f)}f=this.editor.graph;var k=b.isEditable();f.isEnabled()&&!k&&f.reset();f.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?(f!=this.getDiagramId()&&(window.location.hash=f),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};App.prototype.showAuthDialog=function(b,f,k,c){var p=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(q){try{null!=k&&k(q,mxUtils.bind(this,function(){this.hideDialog();p()}))}catch(t){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(t.message))}))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(q){null!=c&&c(q);q&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};-App.prototype.convertFile=function(b,f,k,c,p,q,t,y){var H=f;/\.svg$/i.test(H)||(H=H.substring(0,f.lastIndexOf("."))+c);var F=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(F=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var D=new XMLHttpRequest;D.open("GET",b,!0);F||(D.responseType="blob");if(y)for(var d in y)D.setRequestHeader(d,y[d]);D.onload=mxUtils.bind(this,function(){if(200<=-D.status&&299>=D.status){var l=null;F?(l=JSON.parse(D.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([D.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(n){p(new LocalFile(this,n,H,!0))}),q,f)}else null!=q&&q({message:mxResources.get("errorLoadingFile")})});D.onerror=q;D.send()}else{var g=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(l);null!=n&&0<n.length&&p(new LocalFile(this,+App.prototype.convertFile=function(b,f,k,c,p,q,t,y){var H=f;/\.svg$/i.test(H)||(H=H.substring(0,f.lastIndexOf("."))+c);var F=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(F=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var E=new XMLHttpRequest;E.open("GET",b,!0);F||(E.responseType="blob");if(y)for(var d in y)E.setRequestHeader(d,y[d]);E.onload=mxUtils.bind(this,function(){if(200<=+E.status&&299>=E.status){var l=null;F?(l=JSON.parse(E.responseText),l=this.base64ToBlob(l.content,"application/octet-stream")):l=new Blob([E.response],{type:"application/octet-stream"});this.importVisio(l,mxUtils.bind(this,function(n){p(new LocalFile(this,n,H,!0))}),q,f)}else null!=q&&q({message:mxResources.get("errorLoadingFile")})});E.onerror=q;E.send()}else{var g=mxUtils.bind(this,function(l){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(l);null!=n&&0<n.length&&p(new LocalFile(this,n,H,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(l),null!=n?p(new LocalFile(this,n,H,!0)):p(new LocalFile(this,l,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,b)?this.parseFileData(l,mxUtils.bind(this,function(x){4==x.readyState&&(200<=x.status&&299>=x.status?p(new LocalFile(this,x.responseText,H,!0)):null!=q&&q({message:mxResources.get("errorLoadingFile")}))}),f):p(new LocalFile(this,l,H,!0))}catch(x){null!=q&&q(x)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);F?mxUtils.get(b,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus()){if(null!=p){l=JSON.parse(l.getText());var n=l.content;"base64"===l.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));g(n)}}else null!=q&&q({code:App.ERROR_UNKNOWN})}),function(){null!=q&&q({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=q&&q({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=t?t(b,g,q,k):this.editor.loadUrl(b,g,q,k,null,null,null,y)}};@@ -13984,14 +13989,14 @@ App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPaneApp.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(t){mxEvent.isConsumed(t)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var f=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var k=this.drive.getUsersList();if(0<k.length){var c=mxUtils.bind(this,function(t,y){var H=this.getCurrentFile();null!=H&&H.constructor==DriveFile?(this.spinner.spin(document.body,y),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();t()}),2E3)):t()});b=mxUtils.bind(this,function(t){var y=document.createElement("tr"),H=document.createElement("td");H.setAttribute("valig","middle");H.style.height="59px";H.style.width="66px";var F=document.createElement("img");F.setAttribute("width","50");F.setAttribute("height","50");F.setAttribute("border","0");F.setAttribute("src",null!=t.pictureUrl?t.pictureUrl:Editor.userImage);F.style.borderRadius="50%";F.style.margin="4px 8px 0 8px";H.appendChild(F);y.appendChild(H);-H=document.createElement("td");H.setAttribute("valign","middle");H.style.whiteSpace="nowrap";H.style.paddingTop="4px";H.style.maxWidth="0";H.style.overflow="hidden";H.style.textOverflow="ellipsis";mxUtils.write(H,t.displayName+(t.isCurrent&&1<k.length?" ("+mxResources.get("default")+")":""));null!=t.email&&(mxUtils.br(H),F=document.createElement("small"),F.style.color="gray",mxUtils.write(F,t.email),H.appendChild(F));F=document.createElement("div");F.style.marginTop="4px";var D=document.createElement("i");-mxUtils.write(D,mxResources.get("googleDrive"));F.appendChild(D);H.appendChild(F);y.appendChild(H);t.isCurrent?y.setAttribute("title","User ID: "+t.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+t.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){this.hideUserPanel();+H=document.createElement("td");H.setAttribute("valign","middle");H.style.whiteSpace="nowrap";H.style.paddingTop="4px";H.style.maxWidth="0";H.style.overflow="hidden";H.style.textOverflow="ellipsis";mxUtils.write(H,t.displayName+(t.isCurrent&&1<k.length?" ("+mxResources.get("default")+")":""));null!=t.email&&(mxUtils.br(H),F=document.createElement("small"),F.style.color="gray",mxUtils.write(F,t.email),H.appendChild(F));F=document.createElement("div");F.style.marginTop="4px";var E=document.createElement("i");+mxUtils.write(E,mxResources.get("googleDrive"));F.appendChild(E);H.appendChild(F);y.appendChild(H);t.isCurrent?y.setAttribute("title","User ID: "+t.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+t.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){this.hideUserPanel();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(t);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(d)})));return y});f=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";for(var q=0;q<k.length;q++)p.appendChild(b(k[q]));this.userPanel.appendChild(p);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";p=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));p.className="geBtn";p.style.float="right";b.appendChild(p);p=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var t=this.drive.createAuthWin();t.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0,t)}),mxResources.get("closingFile")+"...")}));p.className="geBtn";p.style.margin="0px";-b.appendChild(p);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(t,y,H,F){if(null!=t){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var D=document.createElement("table");D.style.borderSpacing="0";D.style.fontSize="10pt";D.style.width="100%";D.style.padding="10px";var d=document.createElement("tbody"),g=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=y){var n=document.createElement("img");n.setAttribute("width",+b.appendChild(p);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(t,y,H,F){if(null!=t){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var E=document.createElement("table");E.style.borderSpacing="0";E.style.fontSize="10pt";E.style.width="100%";E.style.padding="10px";var d=document.createElement("tbody"),g=document.createElement("tr"),l=document.createElement("td");l.setAttribute("valig","top");l.style.width="40px";if(null!=y){var n=document.createElement("img");n.setAttribute("width","40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",y);n.style.marginRight="6px";l.appendChild(n)}g.appendChild(l);l=document.createElement("td");l.setAttribute("valign","middle");l.style.whiteSpace="nowrap";l.style.maxWidth="0";l.style.overflow="hidden";l.style.textOverflow="ellipsis";mxUtils.write(l,t.displayName);null!=t.email&&(mxUtils.br(l),y=document.createElement("small"),y.style.color="gray",mxUtils.write(y,t.email),l.appendChild(y));null!=F&&(t=document.createElement("div"),-t.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,F),t.appendChild(y),l.appendChild(t));g.appendChild(l);d.appendChild(g);D.appendChild(d);this.userPanel.appendChild(D);t=document.createElement("div");t.style.textAlign="center";t.style.padding="10px";t.style.whiteSpace="nowrap";null!=H&&(H=mxUtils.button(mxResources.get("signOut"),H),H.className="geBtn",t.appendChild(H));this.userPanel.appendChild(t)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",+t.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,F),t.appendChild(y),l.appendChild(t));g.appendChild(l);d.appendChild(g);E.appendChild(d);this.userPanel.appendChild(E);t=document.createElement("div");t.style.textAlign="center";t.style.padding="10px";t.style.whiteSpace="nowrap";null!=H&&(H=mxUtils.button(mxResources.get("signOut"),H),H.className="geBtn",t.appendChild(H));this.userPanel.appendChild(t)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var t=this.getCurrentFile();if(null!=t&&t.constructor==DropboxFile){var y=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var t=this.getCurrentFile();if(null!=t&&t.constructor==OneDriveFile){var y=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var t=this.getCurrentFile();if(null!=t&&t.constructor==GitHubFile){var y=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var t=this.getCurrentFile();if(null!=t&&t.constructor==GitLabFile){var y=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=@@ -14002,7 +14007,7 @@ App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){return this.editorUi.createHelpIcon(k)};Menus.prototype.addLinkToItem=function(k,c){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(c))};Menus.prototype.removeCustomFont=function(k,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==k&&this.customFonts[p].url==c){this.customFonts.splice(p,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(k,c){for(var p=0;p<this.customFonts.length;p++)if(this.customFonts[p].name==k&&this.customFonts[p].url==c)return!0;for(p=0;p<this.defaultFonts.length;p++){var q=this.defaultFonts[p];if("string"!==typeof q&&q.fontFamily==k&&q.fontUrl==c||"string"===typeof q&&q==k&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(k,c){null==k||this.containsFont(k,c)||(this.customFonts.push({name:k,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function k(v,A,N){c.editor.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),-"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(J,K,m,u,E,M,L,O,R,S,V,X,W){var Y=parseInt(J);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,K&&"png"==v,m,u,E&&"png"==v,L,!O,R,v,V,null,X,W),null!=N&&N(J,K,m,u,E,M,L,O,R,S,V,X,W))}),!0,A,v,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,K,m,u,E){c.downloadFile(K&&"png"==v?"xmlpng":v,null,null,J,null,null,m,u,E)}),!1,!0)}f.apply(this,arguments);+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(J,K,m,u,D,M,L,O,R,S,V,X,W){var Y=parseInt(J);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,K&&"png"==v,m,u,D&&"png"==v,L,!O,R,v,V,null,X,W),null!=N&&N(J,K,m,u,D,M,L,O,R,S,V,X,W))}),!0,A,v,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,K,m,u,D){c.downloadFile(K&&"png"==v?"xmlpng":v,null,null,J,null,null,m,u,D)}),!1,!0)}f.apply(this,arguments);var c=this.editorUi,p=c.editor.graph,q=mxUtils.bind(p,p.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline(),A=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(A.container,v?350:620,v?70:460,!0,!0,function(N){null!=c.sidebar&&c.sidebar.hideTooltip();N&&null==c.getCurrentFile()&&c.showSplash()});A.init()});Editor.enableChatGpt&&c.isExternalDataComms()&&"draw.io"==c.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(c.actions.put("generate",new Action("generate...",function(){c.openTemplateDialog("")})).isEnabled=q);c.actions.put("insertTemplate",new Action("template...",function(){c.openTemplateDialog()})).isEnabled=q;var t=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});t.setToggleAction(!0);t.setSelectedCallback(function(){return c.isShareCursorPosition()});t=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});t.setToggleAction(!0);t.setSelectedCallback(function(){return c.isShowRemoteCursors()});t=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});t.setToggleAction(!0);t.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});t=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});t.setToggleAction(!0);@@ -14014,7 +14019,7 @@ t=c.actions.put("darkMode",new Action("dark",function(v){c.setAndPersistDarkModec.showDialog(v.container,340,200,!0,!0);v.init()})}).isEnabled=q;window.mxFreehand&&(c.actions.put("insertFreehand",new Action("freehand...",function(){if(p.isEnabled()){if(null==c.freehandWindow){var v=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,v?126:90,v)}p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing();c.freehandWindow.window.setVisible(!0)}},null,null,"X")).isEnabled=function(){return q()});c.actions.put("exportXml",new Action("formatXml...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=null==c.pages||1>=c.pages.length,N=document.createElement("h3");mxUtils.write(N,mxResources.get("formatXml"));N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(N);var J=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,p.isSelectionEmpty()),K=c.addCheckbox(v,mxResources.get("compressed"),Editor.defaultCompressed),m=c.addCheckbox(v,mxResources.get("allPages"),!A,A);m.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?m.setAttribute("disabled","disabled"):m.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,A||!m.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,-null,null,function(v,A,N,J,K,m,u,E,M,L,O,R){u=[];J&&M&&u.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,A,!0,J,K,m,null,!0,u,null,N,null,R));c.showDialog(v.container,450,240,!0,!0);v.init()},null,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("export"),null,v,function(A,N,J,K,m,u,E,M,L,O,R,S){c.createHtml(A,N,J,K,m,u,E,M,L,O,R,mxUtils.bind(this,function(V,X){var W=c.getBaseFilename(E);+null,null,function(v,A,N,J,K,m,u,D,M,L,O,R,S){u=[];J&&M&&u.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,A,S,J,K,m,null,!0,u,null,N,null,R));c.showDialog(v.container,450,270,!0,!0);v.init()},null,!0,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("export"),null,v,function(A,N,J,K,m,u,D,M,L,O,R,S){c.createHtml(A,N,J,K,m,u,D,M,L,O,R,mxUtils.bind(this,function(V,X){var W=c.getBaseFilename(D);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+X+"\n</body>\n</html>";c.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));c.actions.put("exportPdf",new Action("formatPdf...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(v,A){v=null!=c.pages?c.pages.length:1;var N=null==c.pages||1>=c.pages.length,J=c.getPageIndex(c.currentPage);J=null!=J?J+1:1;c.downloadFile("pdf",null,null,!A.selection,N||!A.allPages&&A.pagesFrom==J&&A.pagesTo==J,!A.crop,A.transparent,A.scale,null,A.grid,A.includeCopy,A.allPages||A.pagesFrom==J&&A.pagesTo==J?null:{from:Math.max(0,Math.min(v-1,A.pagesFrom-1)),to:Math.max(0,Math.min(v-1,A.pagesTo-1))},A.border,A.fit,A.sheetsAcross,A.sheetsDown,A.shadows)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function v(){null!=A&&A.removeDraft();c.fileLoaded(new LocalFile(c,c.emptyDiagramXml))}var A=c.getCurrentFile();null!=A&&A.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==p.getSelectionCount()){var v=p.getSelectionCell(),A=p.view.getState(v);null!=A&&null!=@@ -14026,8 +14031,8 @@ p.adaptiveColors});t=c.actions.put("automaticAdaptiveColors",new Action("automatp.adaptiveColors});t=c.actions.put("noAdaptiveColors",new Action("none",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.adaptiveColors="none";p.model.execute(v)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return"none"==p.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],A)})));isLocalStorage&&(t=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var y=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});y.setToggleAction(!0);y.setSelectedCallback(function(){return y.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=p.getSelectionCells(),A=[],N=0;N<v.length;N++)p.getModel().isVertex(v[N])&&A.push(v[N]);0<A.length&&(v=new EditGeometryDialog(c,A),c.showDialog(v.container,200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+M");c.actions.addAction("copyStyle",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var v=p.getSelectionCell(),A=p.getCellStyle(v,!1);c.copiedStyle={};var N=[],J=[],K;for(K in A)N.push(A[K]),J.push(K);p.copyCellStyles([v],J,N,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,Editor.altKey+-"+C");c.actions.addAction("pasteStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&null!=c.copiedStyle&&p.pasteCellStyles(p.includeDescendants(p.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,Editor.altKey+"+V");c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(v,A,N,J,K,m,u,E,M,L,O,R,S,V){v=parseInt(v);c.lastExportSvgEditable=-K;!isNaN(v)&&0<v&&c.exportSvg(v/100,A,N,J,K,m,u,!E,M,L,R,S,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){k("png",c.lastExportPngEditable,function(v,A,N,J,K){c.lastExportPngEditable=K})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){k("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){k("webp")}));t=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),+"+C");c.actions.addAction("pasteStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&null!=c.copiedStyle&&p.pasteCellStyles(p.includeDescendants(p.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,Editor.altKey+"+V");c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(v,A,N,J,K,m,u,D,M,L,O,R,S,V){v=parseInt(v);c.lastExportSvgEditable=+K;!isNaN(v)&&0<v&&c.exportSvg(v/100,A,N,J,K,m,u,!D,M,L,R,S,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){k("png",c.lastExportPngEditable,function(v,A,N,J,K){c.lastExportPngEditable=K})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){k("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){k("webp")}));t=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),A=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copyImage(v,A)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+X");t.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();t=c.actions.addAction("copyAsSvg",mxUtils.bind(this,function(){var v=mxUtils.sortCells(p.model.getTopmostCells(p.getSelectionCells())),A=mxUtils.getXml(0==v.length?c.editor.getGraphXml():p.encodeCells(v));c.copySvg(v,A)}),null,null,Editor.ctrlKey+"+"+Editor.altKey+"+"+Editor.shiftKey+"+X");t.visible=Editor.enableNativeClipboard&&c.editor.isExportToCanvas();t=c.actions.put("shadowVisible",new Action("shadow",function(){p.setShadowVisible(!p.shadowVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return p.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(v,A){c.isOwnGDriveDomain()&&mxEvent.isShiftDown(A)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",@@ -14039,15 +14044,15 @@ null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var A=document.create300,130,!0,!0)}},null,null,null,c.vsdxExportEnabled()&&!c.isOffline());t.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};c.actions.put("exportVsdx",t);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="8px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var A=document.createElement("span");A.style.display="flex";A.style.alignItems="center";A.style.cssFloat="right";A.style.cursor="pointer";A.style.userSelect="none";A.style.marginTop="-3px";A.appendChild(v);mxUtils.write(A,mxResources.get("showStartScreen"));mxEvent.addListener(A,"click",function(J){mxEvent.getSource(J)!=v&&(v.checked=!v.checked)});header=A}A=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var N=c.actions.get("plugins");null==N||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||A.push([mxResources.get("plugins"),N.funct])}EditorUi.isElectronApp||A.push([mxResources.get("link"),function(J,K){if(0<K.value.length)try{var m=JSON.parse(K.value),u=window.location.protocol+"//"+window.location.host+-"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(m)),E=new EmbedDialog(c,u);c.showDialog(E.container,450,240,!0);E.init()}catch(M){c.handleError(M)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&A.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(m)),D=new EmbedDialog(c,u);c.showDialog(D.container,450,240,!0);D.init()}catch(M){c.handleError(M)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&A.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,A,v.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(v,A){var N=-mxLanguage;null==urlParams.lang&&isLocalStorage&&(N=mxSettings.settings.language);var J=mxUtils.bind(this,function(m){var u=""==m?mxResources.get("automatic"):mxLanguageMap[m],E=null;""!=u&&(E=v.addItem(u,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(m)}),A),(m==N||""==m&&null==N)&&v.addCheckmark(E,Editor.checkmarkImage));return E});J("");v.addSeparator(A);for(var K in mxLanguageMap)J(K)})));c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,+mxLanguage;null==urlParams.lang&&isLocalStorage&&(N=mxSettings.settings.language);var J=mxUtils.bind(this,function(m){var u=""==m?mxResources.get("automatic"):mxLanguageMap[m],D=null;""!=u&&(D=v.addItem(u,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(m)}),A),(m==N||""==m&&null==N)&&v.addCheckmark(D,Editor.checkmarkImage));return D});J("");v.addSeparator(A);for(var K in mxLanguageMap)J(K)})));c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(v){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));t=this.get("viewZoom");var H=t.funct;t.funct=mxUtils.bind(this,function(v,A){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(v,["-","outline","fullscreen"],A)});t=this.get("layout");var F=t.funct;t.funct=function(v,A){F.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var N=null,J=20,K=20,m=function(){"undefined"!==typeof mxOrgChartLayout&&null!=N&&c.tryAndHandle(mxUtils.bind(this,function(){var V=c.editor.graph,X=new mxOrgChartLayout(V,N,J,K),W=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&-(W=V.getSelectionCell());X.execute(W)}))},u=document.createElement("div"),E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="180px";mxUtils.write(E,mxResources.get("orgChartType")+": ");u.appendChild(E);var M=document.createElement("select");M.style.width="160px";M.style.boxSizing="border-box";E=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),-mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<E.length;L++){var O=document.createElement("option");mxUtils.write(O,E[L]);O.value=L;2==L&&O.setAttribute("selected","selected");M.appendChild(O)}mxEvent.addListener(M,"change",function(){N=M.value});u.appendChild(M);E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="180px";mxUtils.write(E,mxResources.get("parentChildSpacing")+": ");u.appendChild(E);var R=document.createElement("input");-R.type="number";R.value=J;R.style.width="160px";R.style.boxSizing="border-box";u.appendChild(R);mxEvent.addListener(R,"change",function(){J=R.value});E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="180px";mxUtils.write(E,mxResources.get("siblingSpacing")+": ");u.appendChild(E);var S=document.createElement("input");S.type="number";S.value=K;S.style.width="160px";S.style.boxSizing="border-box";u.appendChild(S);mxEvent.addListener(S,"change",function(){K=-S.value});E=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(M.value),parentChildSpacing:parseInt(R.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});E.className="geBtn";u=new CustomDialog(c,u,function(){null==N&&(N=2);c.loadOrgChartLayouts(m)},null,null,null,E);c.showDialog(u.container,355,140,!0,!0)},A,null,q());v.addSeparator(A);v.addItem(mxResources.get("parallels"),+(W=V.getSelectionCell());X.execute(W)}))},u=document.createElement("div"),D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("orgChartType")+": ");u.appendChild(D);var M=document.createElement("select");M.style.width="160px";M.style.boxSizing="border-box";D=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),+mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<D.length;L++){var O=document.createElement("option");mxUtils.write(O,D[L]);O.value=L;2==L&&O.setAttribute("selected","selected");M.appendChild(O)}mxEvent.addListener(M,"change",function(){N=M.value});u.appendChild(M);D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("parentChildSpacing")+": ");u.appendChild(D);var R=document.createElement("input");+R.type="number";R.value=J;R.style.width="160px";R.style.boxSizing="border-box";u.appendChild(R);mxEvent.addListener(R,"change",function(){J=R.value});D=document.createElement("div");D.style.marginTop="6px";D.style.display="inline-block";D.style.width="180px";mxUtils.write(D,mxResources.get("siblingSpacing")+": ");u.appendChild(D);var S=document.createElement("input");S.type="number";S.value=K;S.style.width="160px";S.style.boxSizing="border-box";u.appendChild(S);mxEvent.addListener(S,"change",function(){K=+S.value});D=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(M.value),parentChildSpacing:parseInt(R.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});D.className="geBtn";u=new CustomDialog(c,u,function(){null==N&&(N=2);c.loadOrgChartLayouts(m)},null,null,null,D);c.showDialog(u.container,355,140,!0,!0)},A,null,q());v.addSeparator(A);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var N=new mxParallelEdgeLayout(p);N.checkOverlap=!0;c.prompt(mxResources.get("spacing"),N.spacing,mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){N.spacing=J;c.executeLayout(function(){N.execute(p.getDefaultParent(),p.isSelectionEmpty()?null:p.getSelectionCells())},!1)}))}))}))}),A);v.addSeparator(A);c.menus.addMenuItem(v,"runLayout",A,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,A){if(mxClient.IS_CHROMEAPP||!c.isOffline()&&!navigator.standalone){var N=v.addItem(mxResources.get("search")+":",null,null,A,null,null,!1);N.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth="1px";J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var m=mxUtils.trim(J.value);13==K.keyCode&&0<m.length?(this.editorUi.searchHelp(m),J.value="",window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==K.keyCode&&(J.value="")}));N.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(K){document.activeElement!=J&&J.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",@@ -14056,19 +14061,19 @@ A)):this.addMenuItems(v,"- keyboardShortcuts quickStart downloadDesktop supportnull,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(v.container,340,80,!0,!0);v.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["languageCode","-"],A);A=v.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;p.refresh()},A);Graph.translateDiagram||v.addCheckmark(A,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var v=p.cloneCells(p.getSelectionCells()),A=p.getBoundingBoxFromGeometry(v,!0);v=p.moveCells(v,-A.x,-A.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+A.width+", "+A.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(p.encodeCells(v)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function v(u){return null==u||null==u.boundingBox||!isNaN(u.boundingBox.x)&&-!isNaN(u.boundingBox.y)&&!isNaN(u.boundingBox.width)&&!isNaN(u.boundingBox.height)}var A=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),N=p.view.translate,J=p.view.scale;p.insertVertex(p.getDefaultParent(),null,"",A.x/J-N.x,A.y/J-N.y,A.width/J,A.height/J,"fillColor=none;strokeColor=red;");var K=0,m=0;p.view.states.visit(function(u,E){u=!0;v(E.shape)||(console.log("invalid shape",E.cell.id,E.shape),u=!1);v(E.text)||(console.log("invalid text",E.cell.id,E.text),u=!1);-u||K++;m++});console.log("states checked",m,"invalid",K)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(A){if(0<A.length)try{var N=function(E){function M(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=R[aa]){for(;0<R[aa].length;){var ha=R[aa].pop();M(ha)}delete R[aa]}}else mxLog.debug(L+": Visited: "+aa)}var L=E.parentNode.id,O=E.childNodes;-E={};for(var R={},S=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==E[W.id]){E[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=S?mxLog.debug(L+": Multiple roots: "+W.id):S=W.id:(null==R[Y]&&(R[Y]=[]),R[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=L+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(L+": Checked");var Z={};null==S?mxLog.debug(L+": No root"):(M(S),Object.keys(Z).length!=Object.keys(E).length&&-(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",R)))};"<"!=A.charAt(0)&&(A=Graph.decompress(A),mxLog.debug("See console for uncompressed XML"),console.log("xml",A));var J=mxUtils.parseXml(A),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var m=c.getHashValueForPages(K);mxLog.debug("Checksum: ",m)}catch(E){mxLog.debug("Error: ",E.message)}else mxLog.debug("No pages found for checksum");var u=J.getElementsByTagName("root");for(A=0;A<u.length;A++)N(u[A]);-mxLog.show()}catch(E){c.handleError(E),null!=window.console&&console.error(E)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var D=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(A){var N=c.getCurrentFile();if(0<A.length&&null!=N)try{var J=JSON.parse(A);N.patch([J],null,!0,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(A,N){D=c.getPagesForXml(c.getFileData(!0));-v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(D)}],["Diff",function(A,N){try{v.textarea.value=JSON.stringify(c.diffPages(D,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==D?(D=c.getPagesForXml(c.getFileData(!0)),v.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(D)):v.textarea.value=JSON.stringify(c.diffPages(D,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));+!isNaN(u.boundingBox.y)&&!isNaN(u.boundingBox.width)&&!isNaN(u.boundingBox.height)}var A=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),N=p.view.translate,J=p.view.scale;p.insertVertex(p.getDefaultParent(),null,"",A.x/J-N.x,A.y/J-N.y,A.width/J,A.height/J,"fillColor=none;strokeColor=red;");var K=0,m=0;p.view.states.visit(function(u,D){u=!0;v(D.shape)||(console.log("invalid shape",D.cell.id,D.shape),u=!1);v(D.text)||(console.log("invalid text",D.cell.id,D.text),u=!1);+u||K++;m++});console.log("states checked",m,"invalid",K)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(A){if(0<A.length)try{var N=function(D){function M(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=R[aa]){for(;0<R[aa].length;){var ha=R[aa].pop();M(ha)}delete R[aa]}}else mxLog.debug(L+": Visited: "+aa)}var L=D.parentNode.id,O=D.childNodes;+D={};for(var R={},S=null,V={},X=0;X<O.length;X++){var W=O[X];if(null!=W.id&&0<W.id.length)if(null==D[W.id]){D[W.id]=W.id;var Y=W.getAttribute("parent");null==Y?null!=S?mxLog.debug(L+": Multiple roots: "+W.id):S=W.id:(null==R[Y]&&(R[Y]=[]),R[Y].push(W.id))}else V[W.id]=W.id}O=Object.keys(V);0<O.length?(O=L+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(L+": Checked");var Z={};null==S?mxLog.debug(L+": No root"):(M(S),Object.keys(Z).length!=Object.keys(D).length&&+(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",R)))};"<"!=A.charAt(0)&&(A=Graph.decompress(A),mxLog.debug("See console for uncompressed XML"),console.log("xml",A));var J=mxUtils.parseXml(A),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var m=c.getHashValueForPages(K);mxLog.debug("Checksum: ",m)}catch(D){mxLog.debug("Error: ",D.message)}else mxLog.debug("No pages found for checksum");var u=J.getElementsByTagName("root");for(A=0;A<u.length;A++)N(u[A]);+mxLog.show()}catch(D){c.handleError(D),null!=window.console&&console.error(D)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var E=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(A){var N=c.getCurrentFile();if(0<A.length&&null!=N)try{var J=JSON.parse(A);N.patch([J],null,!0,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(A,N){E=c.getPagesForXml(c.getFileData(!0));+v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(E)}],["Diff",function(A,N){try{v.textarea.value=JSON.stringify(c.diffPages(E,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==E?(E=c.getPagesForXml(c.getFileData(!0)),v.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(E)):v.textarea.value=JSON.stringify(c.diffPages(E,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var v=c.getCurrentFile();null!=c.pages&&null!=v?c.spinner.spin(document.body,mxResources.get("loading"))&&v.getLatestVersion(function(A){c.spinner.stop();var N=c.getHashValueForPages(c.pages),J=v.getCurrentRevisionId(),K=c.getHashValueForPages(A.getShadowPages()),m=A.getDescriptorChecksum(A.getDescriptor()),u=A.getCurrentRevisionId();console.log("Local File",[v],"modified",v.isModified(),"checksum",N);console.log("Remote File",[A],"rev",u==J,"desc",m==K,"checksum",K);c.alert("Checksums "+(K==N?"match":"no not match"))},function(A){console.log("Error getLatestVersion",A);c.handleError(A)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages));console.log("diff ownPages/theirPages",c.diffPages(v.ownPages,v.theirPages));var A=v.getShadowPages();null!=A&&(console.log("Checksum shadowPages",c.getHashValueForPages(A)),console.log("diff shadowPages/ownPages",c.diffPages(A,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,A)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,A)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(v.ownPages,v.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(v.theirPages,v.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(v.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(v.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(v.theirPages,c.pages)))}null!=v&&console.log("Shadow pages",[c.getXmlForPages(v.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var v=c.getCurrentFile();null!=v&&v.isRealtime()&&null!=v.shadowPages&&(console.log("patching actualPages to shadowPages",v.patch([c.diffPages(v.shadowPages,c.pages)])),v.ownPages=c.clonePages(c.pages),v.theirPages=c.clonePages(c.pages),v.shadowPages=c.clonePages(c.pages),null!=v.sync&&(v.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){p.model.beginUpdate();try{var v=p.model.cells,A=0,N=[],J=[],K;for(K in v){var m=v[K],u=p.getCurrentCellStyle(m)[mxConstants.STYLE_IMAGE];null!=u&&"data:"==u.substring(0,5)&&(null==N[u]&&(N[u]=(N[u]||0)+1,A++),J.push(m))}p.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",A,"image(s) from",J.length,"cell(s): ",[J,N])}finally{p.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,p.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var v=-new mxImageExport,A=p.getGraphBounds(),N=p.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-A.x)/N),Math.floor((1-A.y)/N));J.scale(1/N);var m=0,u=J.save;J.save=function(){m++;u.apply(this,arguments)};var E=J.restore;J.restore=function(){m--;E.apply(this,arguments)};var M=v.drawShape;v.drawShape=function(L){mxLog.debug("entering shape",L,m);M.apply(this,arguments);mxLog.debug("leaving shape",L,m)};v.drawState(p.getView().getState(p.model.root),+new mxImageExport,A=p.getGraphBounds(),N=p.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-A.x)/N),Math.floor((1-A.y)/N));J.scale(1/N);var m=0,u=J.save;J.save=function(){m++;u.apply(this,arguments)};var D=J.restore;J.restore=function(){m--;D.apply(this,arguments)};var M=v.drawShape;v.drawShape=function(L){mxLog.debug("entering shape",L,m);M.apply(this,arguments);mxLog.debug("leaving shape",L,m)};v.drawState(p.getView().getState(p.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",m)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var d=null,g=null,l=null,n=null,x=null,z=null,B=null,I=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(p.view.revalidate=d,d=null):(d=p.view.revalidate,p.view.revalidate=function(){var v=Date.now(),A=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=g?(c.selectPage=g,g=null):(g=c.selectPage,c.selectPage=function(){var v=Date.now(),A=g.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=l?(c.diffPages=l,l=null):(l=c.diffPages,c.diffPages=function(){var v=Date.now(),A=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=n?(c.patchPages=n,n=null):(n=c.patchPages,c.patchPages=function(){var v=Date.now(),A=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var v=Date.now(),A=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-v+" ms","args",arguments);return A});null!=B?(c.getHashValueForPages=B,@@ -14077,15 +14082,15 @@ null!=z?(c.getFileData=z,z=null):(z=c.getFileData,c.getFileData=function(){var vA);var N=v.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},A);null!=d&&v.addCheckmark(N,Editor.checkmarkImage);this.addMenuItems(v,["-","testShowConsole"],A)})))}c.actions.put("shapes",new Action("moreShapes...",function(v){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action("shape...",function(v){p.isEnabled()&&(v=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),v.vertex=!0,v=new EditShapeDialog(c,v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())})).isEnabled=q;c.isOffline()||("1"!=urlParams.embed&&(c.actions.put("embedNotion",new Action("notion...",function(){var v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var A=document.createElement("a");A.setAttribute("href","javascript:void(0);");A.setAttribute("target","_blank");A.style.cursor="pointer";mxUtils.write(A,mxResources.get("getNotionChromeExtension"));v.appendChild(A);mxUtils.setPrefixedStyle(A.style,"transition","all 1s ease");mxUtils.setOpacity(A,0);window.setTimeout(function(){mxUtils.setOpacity(A,100)},300);mxEvent.addListener(A,"click",function(N){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");-mxEvent.consume(N)});c.getPublicUrl(c.getCurrentFile(),function(N){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",v,N,c.getCurrentFile(),function(J,K,m,u,E,M,L,O,R,S,V,X){L=["border=0"];R&&L.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,K,!0,u,E,M,"public"==S?N:null,null,L,null,m,null,X));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})})),c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")})),-c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",v,function(A,N,J,K,m,u,E,M,L,O,R,S){c.createHtml(A,N,J,K,m,u,E,M,L,O,R,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&+mxEvent.consume(N)});c.getPublicUrl(c.getCurrentFile(),function(N){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",v,N,c.getCurrentFile(),function(J,K,m,u,D,M,L,O,R,S,V,X){L=["border=0"];R&&L.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,K,!0,u,D,M,"public"==S?N:null,null,L,null,m,null,X));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})})),c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")})),+c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",v,function(A,N,J,K,m,u,D,M,L,O,R,S){c.createHtml(A,N,J,K,m,u,D,M,L,O,R,mxUtils.bind(this,function(V,X){var W=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+X+"\n",null,null,function(){try{var Y=window.open();if(null!=Y&&null!=Y.document){var Z=Y.document;"CSS1Compat"===document.compatMode&&Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(V);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(X);Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var ha=Y.document.createElement("div");ha.marginLeft="26px";ha.marginTop="26px";mxUtils.write(ha,mxResources.get("updatingDocument"));var ea=Y.document.createElement("img");ea.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ea.style.marginLeft="6px";ha.appendChild(ea);Y.document.body.insertBefore(ha,Y.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(X)[1];Z.body.appendChild(ca);ha.parentNode.removeChild(ha)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){c.handleError(ca)}});c.showDialog(W.container,450,240,!0,!0);W.init()}),S)})})})),c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.getPublicUrl(v,function(A){null!=A?(A=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?A:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(A.container,450,240,!0,!0),A.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})})),c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(v,A,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,A,N,J,K,m,function(u){c.spinner.stop();u=new EmbedDialog(c,u);c.showDialog(u.container,450,240,!0,!0);u.init()},function(u){c.spinner.stop();c.handleError(u)})},mxResources.get("image"),mxResources.get("retina"),c.editor.isExportToCanvas())})),c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(v,A,N,J,K,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,A,N,J,K,m,function(u){c.spinner.stop();u=new EmbedDialog(c,u);c.showDialog(u.container,450,240,!0,!0);u.init()},function(u){c.spinner.stop();c.handleError(u)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")})),c.actions.put("embedIframe",new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){var A=p.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,A.height/p.view.scale))+-2,null,null,null,v,c.getCurrentFile(),function(N,J,K,m,u,E,M,L,O,R,S,V){var X=[];O&&X.push("tags=%7B%7D");N=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+M+";height:"+L+';" src="'+c.createLink(N,J,!0,m,u,E,"public"==R?v:null,null,X,null,K,S,V)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");c.showDialog(N.container,450,240,!0,!0);N.init()},!0,!0)})})));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showPublishLinkDialog(null,-null,null,null,null,null,v,c.getCurrentFile(),function(A,N,J,K,m,u,E,M,L,O,R,S){E=[];K&&L&&E.push("tags=%7B%7D");A=new EmbedDialog(c,c.createLink(A,N,!0,K,m,u,"public"==O?v:null,null,E,null,J,null,S));c.showDialog(A.container,450,240,!0,!0);A.init()},null,!0)})},null,null,null,!c.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)t=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&+2,null,null,null,v,c.getCurrentFile(),function(N,J,K,m,u,D,M,L,O,R,S,V){var X=[];O&&X.push("tags=%7B%7D");N=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+M+";height:"+L+';" src="'+c.createLink(N,J,!0,m,u,D,"public"==R?v:null,null,X,null,K,S,V)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");c.showDialog(N.container,450,240,!0,!0);N.init()},!0,!0)})})));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(v){c.showPublishLinkDialog(null,+null,null,null,null,null,v,c.getCurrentFile(),function(A,N,J,K,m,u,D,M,L,O,R,S){D=[];K&&L&&D.push("tags=%7B%7D");A=new EmbedDialog(c,c.createLink(A,N,!0,K,m,u,"public"==O?v:null,null,D,null,J,null,S));c.showDialog(A.container,450,240,!0,!0);A.init()},null,!0)})},null,null,null,!c.isOffline()));if(isLocalStorage||mxClient.IS_CHROMEAPP)t=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(t=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),t.setToggleAction(!0),t.setSelectedCallback(function(){return c.isHighContrast()}));t=c.actions.addAction("search",function(){if(null!=c.sidebar){var v=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!v);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!v,mxSettings.save())}});t.label=mxResources.get("searchShapes");t.setToggleAction(!0);t.setSelectedCallback(function(){return null!=c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(v){p.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(v){p.isEditing()&&p.stopEditing();var A="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var N=c.createLoadMessage("save");N.xml=A;!0!==v||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(N.exit=!0);A=JSON.stringify(N)}(window.opener||window.parent).postMessage(A,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.clearStatus());v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&@@ -14093,17 +14098,17 @@ null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==ur"";(window.opener||window.parent).postMessage(A,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,A){c.editor.isExportToCanvas()?(this.addMenuItems(v,["exportPng"],A),Editor.jpgSupported&&this.addMenuItems(v,["exportJpg"],A),Editor.webpSupported&&this.addMenuItems(v,["exportWebp"],A)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],A);this.addMenuItems(v,["exportSvg","-"],A);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],A):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],A);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],A);this.addMenuItems(v,["-","exportHtml","exportXml","exportUrl"],A);c.isOffline()||(v.addSeparator(A),this.addMenuItem(v,"export",A).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||c.isOffline()||this.addMenuItems(v,["publishLink"],A);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||c.isOffline()||(v.addSeparator(A),c.menus.addSubmenu("embed",v,A))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,A){function N(m){m.pickFile(function(u){c.spinner.spin(document.body,-mxResources.get("loading"))&&m.getFile(u,function(E){var M="data:image/"==E.getData().substring(0,11)?K(E.getTitle()):"text/xml";/\.svg$/i.test(E.getTitle())&&!c.editor.isDataSvg(E.getData())&&(E.setData(Editor.createSvgDataUri(E.getData())),M="image/svg+xml");J(E.getData(),M,E.getTitle())},function(E){c.handleError(E,null!=E?mxResources.get("errorLoadingFile"):null)},m==c.drive)},!0)}var J=mxUtils.bind(this,function(m,u,E){var M=p.view,L=p.getGraphBounds(),O=p.snap(Math.ceil(Math.max(0,L.x/M.scale--M.translate.x)+4*p.gridSize)),R=p.snap(Math.ceil(Math.max(0,(L.y+L.height)/M.scale-M.translate.y)+4*p.gridSize));"data:image/"==m.substring(0,11)?c.loadImage(m,mxUtils.bind(this,function(S){var V=!0,X=mxUtils.bind(this,function(){c.resizeImage(S,m,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(m,u,O,R,Math.round(Y*W),Math.round(Z*W),E,function(aa){c.spinner.stop();p.setSelectionCells(aa);p.scrollCellToVisible(p.getSelectionCell())})}),-V)});m.length>c.resampleThreshold?c.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(m,u,O,R,0,0,E,function(S){c.spinner.stop();p.setSelectionCells(S);p.scrollCellToVisible(p.getSelectionCell())})}),K=mxUtils.bind(this,function(m){var u="text/xml";/\.png$/i.test(m)?u="image/png":/\.jpe?g$/i.test(m)?u="image/jpg":/\.gif$/i.test(m)?u="image/gif":/\.pdf$/i.test(m)&&(u="application/pdf");return u});"undefined"!=+mxResources.get("loading"))&&m.getFile(u,function(D){var M="data:image/"==D.getData().substring(0,11)?K(D.getTitle()):"text/xml";/\.svg$/i.test(D.getTitle())&&!c.editor.isDataSvg(D.getData())&&(D.setData(Editor.createSvgDataUri(D.getData())),M="image/svg+xml");J(D.getData(),M,D.getTitle())},function(D){c.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)},m==c.drive)},!0)}var J=mxUtils.bind(this,function(m,u,D){var M=p.view,L=p.getGraphBounds(),O=p.snap(Math.ceil(Math.max(0,L.x/M.scale-+M.translate.x)+4*p.gridSize)),R=p.snap(Math.ceil(Math.max(0,(L.y+L.height)/M.scale-M.translate.y)+4*p.gridSize));"data:image/"==m.substring(0,11)?c.loadImage(m,mxUtils.bind(this,function(S){var V=!0,X=mxUtils.bind(this,function(){c.resizeImage(S,m,mxUtils.bind(this,function(W,Y,Z){W=V?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(m,u,O,R,Math.round(Y*W),Math.round(Z*W),D,function(aa){c.spinner.stop();p.setSelectionCells(aa);p.scrollCellToVisible(p.getSelectionCell())})}),+V)});m.length>c.resampleThreshold?c.confirmImageResize(function(W){V=W;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(m,u,O,R,0,0,D,function(S){c.spinner.stop();p.setSelectionCells(S);p.scrollCellToVisible(p.getSelectionCell())})}),K=mxUtils.bind(this,function(m){var u="text/xml";/\.png$/i.test(m)?u="image/png":/\.jpe?g$/i.test(m)?u="image/jpg":/\.gif$/i.test(m)?u="image/gif":/\.pdf$/i.test(m)&&(u="application/pdf");return u});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){N(c.drive)},A):c.isModeEnabled(App.MODE_GOOGLE)&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?v.addItem(mxResources.get("oneDrive")+"...",null,function(){N(c.oneDrive)},A):c.isModeEnabled(App.MODE_ONEDRIVE)&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);c.isModeReady(App.MODE_DROPBOX)?v.addItem(mxResources.get("dropbox")+"...",null,function(){N(c.dropbox)},A):c.isModeEnabled(App.MODE_DROPBOX)&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);c.isModeReady(App.MODE_GITHUB)&&v.addItem(mxResources.get("github")+"...",null,function(){N(c.gitHub)},A);c.isModeReady(App.MODE_GITLAB)&&v.addItem(mxResources.get("gitlab")+"...",null,function(){N(c.gitLab)},A);c.isModeReady(App.MODE_TRELLO)?v.addItem(mxResources.get("trello")+"...",null,function(){N(c.trello)},A):c.isModeEnabled(App.MODE_TRELLO)&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},A,null,!1);v.addSeparator(A);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},A);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},A);c.isOffline()||-(v.addSeparator(A),v.addItem(mxResources.get("url")+"...",null,function(){var m=new FilenameDialog(c,"",mxResources.get("import"),function(u){if(null!=u&&0<u.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var E=/(\.png)($|\?)/i.test(u)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(u),function(M){J(M,E,u)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==E)}},mxResources.get("url"));c.showDialog(m.container,+(v.addSeparator(A),v.addItem(mxResources.get("url")+"...",null,function(){var m=new FilenameDialog(c,"",mxResources.get("import"),function(u){if(null!=u&&0<u.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var D=/(\.png)($|\?)/i.test(u)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(u),function(M){J(M,D,u)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==D)}},mxResources.get("url"));c.showDialog(m.container,300,80,!0,!0);m.init()},A))}))).isEnabled=q;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(v,A){var N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>N&&this.addSubmenu("viewZoom",v,A,mxResources.get("zoom")),460>N&&c.isPageMenuVisible()&&this.addSubmenu("pages",v,A),320>N&&this.addSubmenu("insert",v,A),360>N&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",v,A))})));this.put("appearance",new Menu(mxUtils.bind(this,function(v,A){if(c.isAutoDarkModeSupported()){var N=c.menus.addMenuItem(v,"autoMode",A);null!=N&&N.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}this.addMenuItems(v,["lightMode","darkMode","-"],A);N=c.menus.addMenuItem(v,"highContrast",A);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(N,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",function(v){p.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(v)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(v,A){var N="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=v.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},A),K=v.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},-A),m=!1;if("kennedy"==N||"dark"==N)v.addCheckmark(K,Editor.checkmarkImage),m=!0;for(var u=0;u<Editor.themes.length;u++)mxUtils.bind(this,function(E){K=v.addItem(mxResources.get("min"==E?"minimal":E),null,function(){c.setCurrentTheme(E)},A);N==E&&(v.addCheckmark(K,Editor.checkmarkImage),m=!0);"simple"==E&&v.addSeparator(A)})(Editor.themes[u]);m||v.addCheckmark(J,Editor.checkmarkImage)})));t=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();+A),m=!1;if("kennedy"==N||"dark"==N)v.addCheckmark(K,Editor.checkmarkImage),m=!0;for(var u=0;u<Editor.themes.length;u++)mxUtils.bind(this,function(D){K=v.addItem(mxResources.get("min"==D?"minimal":D),null,function(){c.setCurrentTheme(D)},A);N==D&&(v.addCheckmark(K,Editor.checkmarkImage),m=!0);"simple"==D&&v.addSeparator(A)})(Editor.themes[u]);m||v.addCheckmark(J,Editor.checkmarkImage)})));t=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(N,J){v.invalidFileHandle=null;v.fileHandle=N;v.title=J.name;v.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var A=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;A=new FilenameDialog(this.editorUi,A,mxResources.get("rename"),mxUtils.bind(this,function(N){null!=N&&0<N.length&&null!=v&&N!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&v.rename(N,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(N){if(null!=N&&0<N.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(A.container,340,100,!0,!0);A.init()}}));t.isEnabled=function(){return this.enabled&&q.apply(this,arguments)};t.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var A=c.getCopyFilename(v);v.constructor==DriveFile?(A=new CreateDialog(c,A,mxUtils.bind(this,function(N,J){"_blank"==J?c.editor.editAsNew(c.getFileData(),N):("download"==J&&(J=App.MODE_GOOGLE),null!=N&&0<N.length&&(J==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&@@ -14112,7 +14117,7 @@ c.showDialog(A.container,420,380,!0,!0),A.init()):c.editor.editAsNew(this.editorfunction(){var v=c.getCurrentFile();if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var A=!1;if(v.getMode()==App.MODE_GOOGLE&&null!=v.desc.parents)for(var N=0;N<v.desc.parents.length;N++)if(v.desc.parents[N].isRoot){A=!0;break}c.pickFolder(v.getMode(),mxUtils.bind(this,function(J){c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(J,mxUtils.bind(this,function(K){c.spinner.stop()}),mxUtils.bind(this,function(K){c.handleError(K)}))}),null,!0,A)}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,A){this.addMenuItems(v,["publishLink","presentationMode"],A)})));EditorUi.isElectronApp||!c.isOwnGDriveDomain()||"draw.io"!=c.getServiceName()||navigator.standalone||c.actions.put("presentationMode",new Action("presentationMode...",function(){var v=null!=c.getCurrentFile()?c.getCurrentFile().getTitle():null;c.editor.editAsNew(c.getFileData(!0),v,!0,null!=c.currentPage?c.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(A){c.handleError(A)}})).isEnabled=q;this.put("embed",new Menu(mxUtils.bind(this,function(v,A){var N=c.getCurrentFile();null==N||N.getMode()!=App.MODE_GOOGLE&&N.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(N.getTitle())||this.addMenuItems(v,["liveImage","-"],A);this.addMenuItems(v,["embedImage","embedSvg","-","embedHtml"],A);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],A);this.addMenuItems(v,["-","microsoftOffice","-","embedNotion"],A)})));t=function(v){var A=-mxResources.get(v)+"...";c.actions.put(v,new Action(A,function(N){if("fromText"==v||"formatSql"==v||"plantUml"==v||"mermaid"==v){var J=new ParseDialog(c,A,v);c.showDialog(J.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else J=new CreateGraphDialog(c,A,v),c.showDialog(J.container,620,420,!0,!1,function(K,m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=J.graph&&(null!=J.graph.container.parentNode&&J.graph.container.parentNode.removeChild(J.graph.container),+mxResources.get(v)+"...";c.actions.put(v,new Action(A,function(N){if("fromText"==v||"formatSql"==v||"plantUml"==v||"mermaid"==v){var J=new ParseDialog(c,A,v);c.showDialog(J.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else J=new CreateGraphDialog(c,A,v),c.showDialog(J.container,620,420,!0,!1,function(K,m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=J.graph&&(null!=J.graph.container.parentNode&&J.graph.container.parentNode.removeChild(J.graph.container),J.graph.destroy(),J.graph=null)});J.init()})).isEnabled=q};t("mermaid");t("horizontalFlow");t("verticalFlow");t("horizontalTree");t("verticalTree");t("radialTree");t("organic");t("circle");t("fromText");t("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&!c.isOffline())&&t("plantUml");var G=function(v){p.getModel().beginUpdate();try{v=p.addCell(v),p.fireEvent(new mxEventObject("cellsInserted","cells",[v])),p.model.isVertex(v)&&p.isAutoSizeCell(v)&&p.updateCellSize(v)}finally{p.getModel().endUpdate()}p.scrollCellToVisible(v);p.setSelectionCell(v);p.container.focus();p.editAfterInsert&&p.startEditing(v);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(p.view.getState(v))},0);return v},C=function(v,A,N,J,K){v=new mxCell(v,new mxGeometry(0,0,A,N),J);v.vertex=!0;null==K&&(K=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=K.x;v.geometry.y=K.y;return G(v)};c.actions.put("insertText",new Action("text",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&p.startEditingAtCell(C("Text",60,30,p.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",p.vertexFontSize),null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||!p.isMouseInsertPoint()?null:p.getInsertPoint()))},null,null,"A")).isEnabled=q;c.actions.put("insertRectangle",new Action("rectangle",function(v){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&C("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)||@@ -14172,10 +14177,10 @@ null!=N&&N.constructor==DriveFile?(N.isRestricted()&&this.addMenuItems(v,["expor"new - rename makeCopy openFolder moveToFolder".split(" "),A):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==N||N.constructor==LocalFile&&null==N.fileHandle||(v.addSeparator(A),J=this.addMenuItem(v,"synchronize",A),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs","-"],A),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==N||this.addMenuItems(v,["share","-"],A),null!=N&&N.isRenamable()&&this.addMenuItems(v,["rename"],A),c.isOfflineApp()?this.addMenuItems(v,["upload"],A):(this.addMenuItems(v,["makeCopy"],A),null!=N&&(N.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],A),null!=N.getFolderUrl()&&c.menus.addMenuItems(v,["openFolder"],A)))),v.addSeparator(A),this.addSubmenu("importFrom",v,A),this.addSubmenu("exportAs",v,A),c.isOffline()||(v.addSeparator(A),this.addSubmenu("embed",v,A),this.addSubmenu("publish",v,A)),v.addSeparator(A),this.addSubmenu("newLibrary",v,A),this.addSubmenu("openLibraryFrom",v,A),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],A),null!=N&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=N.getTitle()?N.getTitle():c.defaultFilename,(N.constructor==DriveFile&&null!=N.sync&&N.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(v,["-","properties"])),this.addMenuItems(v,["-","pageSetup"],A),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,-["print"],A),this.addMenuItems(v,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,A){function N(O){var R=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!K[R]){for(var S=O.name,V=0;null!=M[S.toLowerCase()];)S=O.name+" ("+ ++V+")";null==E[R]&&(L.push({name:O.name,url:O.url,label:S,title:O.url}),M[S.toLowerCase()]=O,E[R]=O)}}for(var J=mxUtils.bind(this,function(O,R,S,V,X){var W=c.editor.graph,Y=this.styleChange(v,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,+["print"],A),this.addMenuItems(v,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,A){function N(O){var R=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!K[R]){for(var S=O.name,V=0;null!=M[S.toLowerCase()];)S=O.name+" ("+ ++V+")";null==D[R]&&(L.push({name:O.name,url:O.url,label:S,title:O.url}),M[S.toLowerCase()]=O,D[R]=O)}}for(var J=mxUtils.bind(this,function(O,R,S,V,X){var W=c.editor.graph,Y=this.styleChange(v,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=R?encodeURIComponent(R):null,null],null,A,function(){W.setFont(O,R);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=R?encodeURIComponent(R):null,null],"cells",[W.cellEditor.getEditingCell()]))},function(){W.updateLabelElements(W.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&W.replaceElement(Z,"div")})});S&&(S=document.createElement("img"),S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,R);this.editorUi.hideCurrentMenu();-mxEvent.consume(Z)})));Graph.addFont(O,R);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=R&&(X+=" ("+R+")");Y.setAttribute("title",X)}),K={},m=0;m<this.defaultFonts.length;m++){var u=this.defaultFonts[m];"string"===typeof u?J(u):null!=u.fontFamily&&null!=u.fontUrl&&(K[encodeURIComponent(u.fontFamily)+"@"+encodeURIComponent(u.fontUrl)]=!0,J(u.fontFamily,u.fontUrl))}v.addSeparator(A);var E={},M={},L=[];for(m=0;m<this.customFonts.length;m++)N(this.customFonts[m]);L.sort(function(O,R){return O.label<+mxEvent.consume(Z)})));Graph.addFont(O,R);Y.firstChild.nextSibling.style.fontFamily=O;X=null!=V?V:O;null!=R&&(X+=" ("+R+")");Y.setAttribute("title",X)}),K={},m=0;m<this.defaultFonts.length;m++){var u=this.defaultFonts[m];"string"===typeof u?J(u):null!=u.fontFamily&&null!=u.fontUrl&&(K[encodeURIComponent(u.fontFamily)+"@"+encodeURIComponent(u.fontUrl)]=!0,J(u.fontFamily,u.fontUrl))}v.addSeparator(A);var D={},M={},L=[];for(m=0;m<this.customFonts.length;m++)N(this.customFonts[m]);L.sort(function(O,R){return O.label<R.label?-1:O.label>R.label?1:0});if(0<L.length){for(m=0;m<L.length;m++)J(L[m].name,L[m].url,!0,L[m].label);v.addSeparator(A)}v.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),A);v.addSeparator(A);v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,R=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(O.isEditing()){var X=O.getSelectedEditingElement();if(null!=X){var W=mxUtils.getCurrentStyle(X);if(null!=W){R=mxUtils.getCssFontFamily(W.fontFamily);W=O.getView().getState(O.cellEditor.getEditingCell());V=null!=W?W.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=X&&X!=O.cellEditor.textarea;){if(X.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=X.getAttribute("data-font-src")){V=X.getAttribute("data-font-src");break}else if(X.getAttribute("face")==R){V=null;break}X=X.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,S="g"):S="w")}}}else W=O.getView().getState(O.getSelectionCell()),null!=W&&(R=W.style[mxConstants.STYLE_FONTFAMILY]||R,X=W.style.fontSource,null!=X&&(X=decodeURIComponent(X),Graph.isGoogleFontUrl(X)?S="g":(S="w",V=X)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());R=new FontDialog(this.editorUi,R,V,S,mxUtils.bind(this,function(Z,aa,@@ -14242,37 +14247,37 @@ EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(p,q){this.menus.get("pages").funct(p,q)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var k=mxEvent.getClientX(b),c=mxEvent.getClientY(b);f.popup(k,c,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var k=this.createTab(),c=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",c+(null!=p?" ("+p+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,c);k.appendChild(f);this.addTabListeners(b,k);return k};EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(H){this.renamePage(b);mxEvent.consume(H)}));var c=document.createElement("div");c.style.backgroundImage="url("+Editor.thinExpandImage+")";c.className="geButton";f.appendChild(c);var p=!1,q=!1,t=mxUtils.bind(this,function(H){p=null!=this.currentMenu;q=b==this.currentPage;this.scrollToPage(b);k.isMouseDown||q||this.selectPage(b)}),y=mxUtils.bind(this,-function(H){if(!k.isMouseDown&&(q&&(mxEvent.isTouchEvent(H)||mxEvent.getSource(H)==c)||mxEvent.isPopupTrigger(H))&&(k.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(H)||!p)){var F=new mxPopupMenu(this.createPageMenu(b));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 D=mxEvent.getClientX(H),d=mxEvent.getClientY(H);F.popup(D,d,null,H);+function(H){if(!k.isMouseDown&&(q&&(mxEvent.isTouchEvent(H)||mxEvent.getSource(H)==c)||mxEvent.isPopupTrigger(H))&&(k.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(H)||!p)){var F=new mxPopupMenu(this.createPageMenu(b));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 E=mxEvent.getClientX(H),d=mxEvent.getClientY(H);F.popup(E,d,null,H);this.setCurrentMenu(F,f)}mxEvent.consume(H)});mxEvent.addGestureListeners(c,t,null,y);mxEvent.addGestureListeners(f,t,null,y)};EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));this.editor.graph.isEnabled()&&(k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c),k.addSeparator(c),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",k,c,mxResources.get("move")),k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c),k.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),c))})};(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,p,q,t,y){p=null!=p?p:!1;null==q&&(q=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var H=q.slice(),F=0;F<q.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(q[F]),"treeFolding","0")&&this.foldTreeCell(c,q[F]);q=H;q=b.apply(this,arguments)}finally{this.model.endUpdate()}return q};Graph.prototype.foldTreeCell=function(c,p){this.model.beginUpdate();try{var q=[];this.traverse(p,!0,mxUtils.bind(this,function(y,H){var F=null!=H&&this.isTreeEdge(H);F&&q.push(H);y==p||null!=H&&!F||q.push(y);return(null==H||F)&&(y==p||!this.model.isCollapsed(y))}));this.model.setCollapsed(p,c);for(var t=0;t<q.length;t++)this.model.setVisible(q[t],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,p,q,t,y,H){return this.model.filterCells(this.getEdges(c,p,q,t,y,H),mxUtils.bind(this,function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(c,p){return this.getTreeEdges(c,p,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,p){return this.getTreeEdges(c,p,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(K){return x.isVertex(K)&&q(K)}function p(K){var m=!1;null!=K&&(m="1"==n.getCurrentCellStyle(K).treeMoving);return m}function q(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),m="tree"==(null!=m?m.style:n.getCellStyle(K)).containerType);return m}function t(K){var m=!1;null!=K&&(K=x.getParent(K),m=n.view.getState(K),n.view.getState(K),m=null!=(null!=m?m.style:n.getCellStyle(K)).childLayout);return m}function y(K){K=n.view.getState(K);if(null!=K){var m=n.getIncomingTreeEdges(K.cell);if(0<m.length&&(m=n.view.getState(m[0]),null!=m&&(m=m.absolutePoints,null!=-m&&0<m.length&&(m=m[m.length-1],null!=m)))){if(m.y==K.y&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_SOUTH;if(m.y==K.y+K.height&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_NORTH;if(m.x>K.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(K,m){m=null!=m?m:!0;n.model.beginUpdate();try{var u=n.model.getParent(K),E=n.getIncomingTreeEdges(K),M=n.cloneCells([E[0],K]);n.model.setTerminal(M[0],n.model.getTerminal(E[0],+m&&0<m.length&&(m=m[m.length-1],null!=m)))){if(m.y==K.y&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_SOUTH;if(m.y==K.y+K.height&&Math.abs(m.x-K.getCenterX())<K.width/2)return mxConstants.DIRECTION_NORTH;if(m.x>K.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(K,m){m=null!=m?m:!0;n.model.beginUpdate();try{var u=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=n.cloneCells([D[0],K]);n.model.setTerminal(M[0],n.model.getTerminal(D[0],!0),!0);var L=y(K),O=u.geometry;L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?M[1].geometry.x+=m?K.geometry.width+10:-M[1].geometry.width-10:M[1].geometry.y+=m?K.geometry.height+10:-M[1].geometry.height-10;n.view.currentRoot!=u&&(M[1].geometry.x-=O.x,M[1].geometry.y-=O.y);var R=n.view.getState(K),S=n.view.scale;if(null!=R){var V=mxRectangle.fromRectangle(R);L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH?V.x+=(m?K.geometry.width+10:-M[1].geometry.width-10)*S:V.y+=(m?-K.geometry.height+10:-M[1].geometry.height-10)*S;var X=n.getOutgoingTreeEdges(n.model.getTerminal(E[0],!0));if(null!=X){for(var W=L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH,Y=O=E=0;Y<X.length;Y++){var Z=n.model.getTerminal(X[Y],!1);if(L==y(Z)){var aa=n.view.getState(Z);Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<R.getCenterX()||!W&&m!=aa.getCenterY()<R.getCenterY())&&mxUtils.intersects(V,aa)&&(E=10+Math.max(E,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/S),O=10+Math.max(O,-(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/S))}}W?O=0:E=0;for(Y=0;Y<X.length;Y++)if(Z=n.model.getTerminal(X[Y],!1),L==y(Z)&&(aa=n.view.getState(Z),Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<R.getCenterX()||!W&&m!=aa.getCenterY()<R.getCenterY()))){var ha=[];n.traverse(aa.cell,!0,function(ea,ca){var fa=null!=ca&&n.isTreeEdge(ca);fa&&ha.push(ca);(null==ca||fa)&&ha.push(ea);return null==ca||fa});n.moveCells(ha,(m?1:-1)*E,(m?1:-1)*O)}}}return n.addCells(M,u)}finally{n.model.endUpdate()}}function F(K){n.model.beginUpdate();-try{var m=y(K),u=n.getIncomingTreeEdges(K),E=n.cloneCells([u[0],K]);n.model.setTerminal(u[0],E[1],!1);n.model.setTerminal(E[0],E[1],!0);n.model.setTerminal(E[0],K,!1);var M=n.model.getParent(K),L=M.geometry,O=[];n.view.currentRoot!=M&&(E[1].geometry.x-=L.x,E[1].geometry.y-=L.y);n.traverse(K,!0,function(V,X){var W=null!=X&&n.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var R=K.geometry.width+40,S=K.geometry.height+40;m==mxConstants.DIRECTION_SOUTH?R=0:m==mxConstants.DIRECTION_NORTH?-(R=0,S=-S):m==mxConstants.DIRECTION_WEST?(R=-R,S=0):m==mxConstants.DIRECTION_EAST&&(S=0);n.moveCells(O,R,S);return n.addCells(E,M)}finally{n.model.endUpdate()}}function D(K,m){n.model.beginUpdate();try{var u=n.model.getParent(K),E=n.getIncomingTreeEdges(K),M=y(K);0==E.length&&(E=[n.createEdge(u,null,"",null,null,n.createCurrentEdgeStyle())],M=m);var L=n.cloneCells([E[0],K]);n.model.setTerminal(L[0],K,!0);null==n.model.getTerminal(L[0],!1)&&(n.model.setTerminal(L[0],L[1],!1),n.applyNewEdgeStyle(L[1],-[L[0]],M));E=n.getOutgoingTreeEdges(K);var O=u.geometry;m=[];n.view.currentRoot==u&&(O=new mxRectangle);for(var R=0;R<E.length;R++){var S=n.model.getTerminal(E[R],!1);null!=S&&m.push(S)}var V=n.view.getBounds(m),X=n.view.translate,W=n.view.scale;M==mxConstants.DIRECTION_SOUTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-L[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,L[1].geometry.y+=L[1].geometry.height-O.y+40):M==mxConstants.DIRECTION_NORTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width--L[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,L[1].geometry.y-=L[1].geometry.height+O.y+40):(L[1].geometry.x=M==mxConstants.DIRECTION_WEST?L[1].geometry.x-(L[1].geometry.width+O.x+40):L[1].geometry.x+(L[1].geometry.width-O.x+40),L[1].geometry.y=null==V?K.geometry.y+(K.geometry.height-L[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return n.addCells(L,u)}finally{n.model.endUpdate()}}function d(K,m,u){K=n.getOutgoingTreeEdges(K);u=n.view.getState(u);var E=[];if(null!=u&&null!=K){for(var M=-0;M<K.length;M++){var L=n.view.getState(n.model.getTerminal(K[M],!1));null!=L&&(!m&&Math.min(L.x+L.width,u.x+u.width)>=Math.max(L.x,u.x)||m&&Math.min(L.y+L.height,u.y+u.height)>=Math.max(L.y,u.y))&&E.push(L)}E.sort(function(O,R){return m?O.x+O.width-R.x-R.width:O.y+O.height-R.y-R.height})}return E}function g(K,m){var u=y(K),E=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)==E&&u!=m?l.actions.get("selectParent").funct():u==-m?(m=n.getOutgoingTreeEdges(K),null!=m&&0<m.length&&n.setSelectionCell(n.model.getTerminal(m[0],!1))):(u=n.getIncomingTreeEdges(K),null!=u&&0<u.length&&(E=d(n.model.getTerminal(u[0],!0),E,K),K=n.view.getState(K),null!=K&&(K=mxUtils.indexOf(E,K),0<=K&&(K+=m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_WEST?-1:1,0<=K&&K<=E.length-1&&n.setSelectionCell(E[K].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),z=l.menus.createPopupMenu;l.menus.createPopupMenu=function(K,m,u){z.apply(this,arguments);-if(1==n.getSelectionCount()){m=n.getSelectionCell();var E=n.getOutgoingTreeEdges(m);K.addSeparator();0<E.length&&(c(n.getSelectionCell())&&this.addMenuItems(K,["selectChildren"],null,u),this.addMenuItems(K,["selectDescendants"],null,u));c(n.getSelectionCell())?(K.addSeparator(),0<n.getIncomingTreeEdges(m).length&&this.addMenuItems(K,["selectSiblings","selectParent"],null,u)):0<n.model.getEdgeCount(m)&&this.addMenuItems(K,["selectConnections"],null,u)}};l.actions.addAction("selectChildren",function(K){if(n.isEnabled()&&-1==n.getSelectionCount()){var m=n.getSelectionCell();K=mxEvent.isControlDown(K)?null:n.getOutgoingTreeEdges(m);if(null!=K&&0<K.length){m=[];for(var u=0;u<K.length;u++)m.push(n.model.getTerminal(K[u],!1));n.setSelectionCells(m)}else n.setSelectionCells(n.model.getChildren(m))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(K){var m=n.getSelectionCell();if(n.isEnabled()&&null!=m){var u=[];mxEvent.isControlDown(K)||n.traverse(m,!0,function(E,M){var L=-null!=M&&n.isTreeEdge(M);L&&mxEvent.isControlDown(K)&&u.push(M);(null==M||L)&&u.push(E);return null==M||L});if(0==u.length||1==u.length&&u[0]==m)u=n.model.getDescendants(m);n.setSelectionCells(u)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(K){var m=n.getSelectionCell();n.isEnabled()&&null!=m&&(K=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m),null!=K&&0<K.length?n.setSelectionCell(n.model.getTerminal(K[0],!0)):n.selectParentCell())},null,-null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(K){if(n.isEnabled()&&1==n.getSelectionCount()){var m=n.getSelectionCell(),u=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m);K=[];if(null!=u&&0<u.length&&(u=n.getOutgoingTreeEdges(n.model.getTerminal(u[0],!0)),null!=u))for(var E=0;E<u.length;E++)K.push(n.model.getTerminal(u[E],!1));0==K.length&&(K=n.model.getChildren(n.model.getParent(m)));n.setSelectionCells(K)}},null,null,Editor.altKey+"+"+Editor.shiftKey+-"+S");var B=n.removeCells;n.removeCells=function(K,m){m=null!=m?m:!0;null==K&&(K=this.getDeletableCells(this.getSelectionCells()));m&&(K=this.getDeletableCells(this.addAllEdges(K)));for(var u=[],E=0;E<K.length;E++){var M=K[E];x.isEdge(M)&&q(M)&&(u.push(M),M=x.getTerminal(M,!1));if(c(M)){var L=[];n.traverse(M,!0,function(O,R){var S=null!=R&&n.isTreeEdge(R);S&&L.push(R);(null==R||S)&&L.push(O);return null==R||S});0<L.length&&(u=u.concat(L),M=n.getIncomingTreeEdges(K[E]),K=K.concat(M))}else null!=M&&-u.push(K[E])}K=u;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(K,m,u){return c(K.cell)?null:this.graph.view.getState(this.graph.getCellAt(m,u))};var I=n.duplicateCells;n.duplicateCells=function(K,m){K=null!=K?K:this.getSelectionCells();for(var u=K.slice(0),E=0;E<u.length;E++){var M=n.view.getState(u[E]);if(null!=M&&c(M.cell)){var L=n.getIncomingTreeEdges(M.cell);for(M=0;M<L.length;M++)mxUtils.remove(L[M],K)}}this.model.beginUpdate();try{var O=I.call(this,K,m);if(O.length==K.length)for(E=-0;E<K.length;E++)if(c(K[E])){var R=n.getIncomingTreeEdges(O[E]);L=n.getIncomingTreeEdges(K[E]);if(0==R.length&&0<L.length){var S=this.cloneCell(L[0]);this.addEdge(S,n.getDefaultParent(),this.model.getTerminal(L[0],!0),O[E])}}}finally{this.model.endUpdate()}return O};var G=n.moveCells;n.moveCells=function(K,m,u,E,M,L,O){for(var R=null,S=[],V=0;V<K.length;V++)(p(K[V])||c(K[V]))&&!t(K[V])&&this.isCellCollapsed(K[V])?S=S.concat(this.getSubtree(K[V])):S.push(K[V]);K=mxUtils.removeDuplicates(S);this.model.beginUpdate();+K.geometry.height+10:-M[1].geometry.height-10)*S;var X=n.getOutgoingTreeEdges(n.model.getTerminal(D[0],!0));if(null!=X){for(var W=L==mxConstants.DIRECTION_SOUTH||L==mxConstants.DIRECTION_NORTH,Y=O=D=0;Y<X.length;Y++){var Z=n.model.getTerminal(X[Y],!1);if(L==y(Z)){var aa=n.view.getState(Z);Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<R.getCenterX()||!W&&m!=aa.getCenterY()<R.getCenterY())&&mxUtils.intersects(V,aa)&&(D=10+Math.max(D,(Math.min(V.x+V.width,aa.x+aa.width)-Math.max(V.x,aa.x))/S),O=10+Math.max(O,+(Math.min(V.y+V.height,aa.y+aa.height)-Math.max(V.y,aa.y))/S))}}W?O=0:D=0;for(Y=0;Y<X.length;Y++)if(Z=n.model.getTerminal(X[Y],!1),L==y(Z)&&(aa=n.view.getState(Z),Z!=K&&null!=aa&&(W&&m!=aa.getCenterX()<R.getCenterX()||!W&&m!=aa.getCenterY()<R.getCenterY()))){var ha=[];n.traverse(aa.cell,!0,function(ea,ca){var fa=null!=ca&&n.isTreeEdge(ca);fa&&ha.push(ca);(null==ca||fa)&&ha.push(ea);return null==ca||fa});n.moveCells(ha,(m?1:-1)*D,(m?1:-1)*O)}}}return n.addCells(M,u)}finally{n.model.endUpdate()}}function F(K){n.model.beginUpdate();+try{var m=y(K),u=n.getIncomingTreeEdges(K),D=n.cloneCells([u[0],K]);n.model.setTerminal(u[0],D[1],!1);n.model.setTerminal(D[0],D[1],!0);n.model.setTerminal(D[0],K,!1);var M=n.model.getParent(K),L=M.geometry,O=[];n.view.currentRoot!=M&&(D[1].geometry.x-=L.x,D[1].geometry.y-=L.y);n.traverse(K,!0,function(V,X){var W=null!=X&&n.isTreeEdge(X);W&&O.push(X);(null==X||W)&&O.push(V);return null==X||W});var R=K.geometry.width+40,S=K.geometry.height+40;m==mxConstants.DIRECTION_SOUTH?R=0:m==mxConstants.DIRECTION_NORTH?+(R=0,S=-S):m==mxConstants.DIRECTION_WEST?(R=-R,S=0):m==mxConstants.DIRECTION_EAST&&(S=0);n.moveCells(O,R,S);return n.addCells(D,M)}finally{n.model.endUpdate()}}function E(K,m){n.model.beginUpdate();try{var u=n.model.getParent(K),D=n.getIncomingTreeEdges(K),M=y(K);0==D.length&&(D=[n.createEdge(u,null,"",null,null,n.createCurrentEdgeStyle())],M=m);var L=n.cloneCells([D[0],K]);n.model.setTerminal(L[0],K,!0);null==n.model.getTerminal(L[0],!1)&&(n.model.setTerminal(L[0],L[1],!1),n.applyNewEdgeStyle(L[1],+[L[0]],M));D=n.getOutgoingTreeEdges(K);var O=u.geometry;m=[];n.view.currentRoot==u&&(O=new mxRectangle);for(var R=0;R<D.length;R++){var S=n.model.getTerminal(D[R],!1);null!=S&&m.push(S)}var V=n.view.getBounds(m),X=n.view.translate,W=n.view.scale;M==mxConstants.DIRECTION_SOUTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-L[1].geometry.width)/2:(V.x+V.width)/W-X.x-O.x+10,L[1].geometry.y+=L[1].geometry.height-O.y+40):M==mxConstants.DIRECTION_NORTH?(L[1].geometry.x=null==V?K.geometry.x+(K.geometry.width-+L[1].geometry.width)/2:(V.x+V.width)/W-X.x+-O.x+10,L[1].geometry.y-=L[1].geometry.height+O.y+40):(L[1].geometry.x=M==mxConstants.DIRECTION_WEST?L[1].geometry.x-(L[1].geometry.width+O.x+40):L[1].geometry.x+(L[1].geometry.width-O.x+40),L[1].geometry.y=null==V?K.geometry.y+(K.geometry.height-L[1].geometry.height)/2:(V.y+V.height)/W-X.y+-O.y+10);return n.addCells(L,u)}finally{n.model.endUpdate()}}function d(K,m,u){K=n.getOutgoingTreeEdges(K);u=n.view.getState(u);var D=[];if(null!=u&&null!=K){for(var M=+0;M<K.length;M++){var L=n.view.getState(n.model.getTerminal(K[M],!1));null!=L&&(!m&&Math.min(L.x+L.width,u.x+u.width)>=Math.max(L.x,u.x)||m&&Math.min(L.y+L.height,u.y+u.height)>=Math.max(L.y,u.y))&&D.push(L)}D.sort(function(O,R){return m?O.x+O.width-R.x-R.width:O.y+O.height-R.y-R.height})}return D}function g(K,m){var u=y(K),D=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)==D&&u!=m?l.actions.get("selectParent").funct():u==+m?(m=n.getOutgoingTreeEdges(K),null!=m&&0<m.length&&n.setSelectionCell(n.model.getTerminal(m[0],!1))):(u=n.getIncomingTreeEdges(K),null!=u&&0<u.length&&(D=d(n.model.getTerminal(u[0],!0),D,K),K=n.view.getState(K),null!=K&&(K=mxUtils.indexOf(D,K),0<=K&&(K+=m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_WEST?-1:1,0<=K&&K<=D.length-1&&n.setSelectionCell(D[K].cell)))))}var l=this,n=l.editor.graph,x=n.getModel(),z=l.menus.createPopupMenu;l.menus.createPopupMenu=function(K,m,u){z.apply(this,arguments);+if(1==n.getSelectionCount()){m=n.getSelectionCell();var D=n.getOutgoingTreeEdges(m);K.addSeparator();0<D.length&&(c(n.getSelectionCell())&&this.addMenuItems(K,["selectChildren"],null,u),this.addMenuItems(K,["selectDescendants"],null,u));c(n.getSelectionCell())?(K.addSeparator(),0<n.getIncomingTreeEdges(m).length&&this.addMenuItems(K,["selectSiblings","selectParent"],null,u)):0<n.model.getEdgeCount(m)&&this.addMenuItems(K,["selectConnections"],null,u)}};l.actions.addAction("selectChildren",function(K){if(n.isEnabled()&&+1==n.getSelectionCount()){var m=n.getSelectionCell();K=mxEvent.isControlDown(K)?null:n.getOutgoingTreeEdges(m);if(null!=K&&0<K.length){m=[];for(var u=0;u<K.length;u++)m.push(n.model.getTerminal(K[u],!1));n.setSelectionCells(m)}else n.setSelectionCells(n.model.getChildren(m))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");l.actions.addAction("selectDescendants",function(K){var m=n.getSelectionCell();if(n.isEnabled()&&null!=m){var u=[];mxEvent.isControlDown(K)||n.traverse(m,!0,function(D,M){var L=+null!=M&&n.isTreeEdge(M);L&&mxEvent.isControlDown(K)&&u.push(M);(null==M||L)&&u.push(D);return null==M||L});if(0==u.length||1==u.length&&u[0]==m)u=n.model.getDescendants(m);n.setSelectionCells(u)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");l.actions.addAction("selectParent",function(K){var m=n.getSelectionCell();n.isEnabled()&&null!=m&&(K=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m),null!=K&&0<K.length?n.setSelectionCell(n.model.getTerminal(K[0],!0)):n.selectParentCell())},null,+null,Editor.altKey+"+"+Editor.shiftKey+"+P");l.actions.addAction("selectSiblings",function(K){if(n.isEnabled()&&1==n.getSelectionCount()){var m=n.getSelectionCell(),u=mxEvent.isControlDown(K)?null:n.getIncomingTreeEdges(m);K=[];if(null!=u&&0<u.length&&(u=n.getOutgoingTreeEdges(n.model.getTerminal(u[0],!0)),null!=u))for(var D=0;D<u.length;D++)K.push(n.model.getTerminal(u[D],!1));0==K.length&&(K=n.model.getChildren(n.model.getParent(m)));n.setSelectionCells(K)}},null,null,Editor.altKey+"+"+Editor.shiftKey++"+S");var B=n.removeCells;n.removeCells=function(K,m){m=null!=m?m:!0;null==K&&(K=this.getDeletableCells(this.getSelectionCells()));m&&(K=this.getDeletableCells(this.addAllEdges(K)));for(var u=[],D=0;D<K.length;D++){var M=K[D];x.isEdge(M)&&q(M)&&(u.push(M),M=x.getTerminal(M,!1));if(c(M)){var L=[];n.traverse(M,!0,function(O,R){var S=null!=R&&n.isTreeEdge(R);S&&L.push(R);(null==R||S)&&L.push(O);return null==R||S});0<L.length&&(u=u.concat(L),M=n.getIncomingTreeEdges(K[D]),K=K.concat(M))}else null!=M&&+u.push(K[D])}K=u;return B.apply(this,arguments)};l.hoverIcons.getStateAt=function(K,m,u){return c(K.cell)?null:this.graph.view.getState(this.graph.getCellAt(m,u))};var I=n.duplicateCells;n.duplicateCells=function(K,m){K=null!=K?K:this.getSelectionCells();for(var u=K.slice(0),D=0;D<u.length;D++){var M=n.view.getState(u[D]);if(null!=M&&c(M.cell)){var L=n.getIncomingTreeEdges(M.cell);for(M=0;M<L.length;M++)mxUtils.remove(L[M],K)}}this.model.beginUpdate();try{var O=I.call(this,K,m);if(O.length==K.length)for(D=+0;D<K.length;D++)if(c(K[D])){var R=n.getIncomingTreeEdges(O[D]);L=n.getIncomingTreeEdges(K[D]);if(0==R.length&&0<L.length){var S=this.cloneCell(L[0]);this.addEdge(S,n.getDefaultParent(),this.model.getTerminal(L[0],!0),O[D])}}}finally{this.model.endUpdate()}return O};var G=n.moveCells;n.moveCells=function(K,m,u,D,M,L,O){for(var R=null,S=[],V=0;V<K.length;V++)(p(K[V])||c(K[V]))&&!t(K[V])&&this.isCellCollapsed(K[V])?S=S.concat(this.getSubtree(K[V])):S.push(K[V]);K=mxUtils.removeDuplicates(S);this.model.beginUpdate();try{S=M;var X=this.getCurrentCellStyle(M);if(null!=K&&c(M)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(V=0;V<K.length;V++)if(c(K[V])||n.model.isEdge(K[V])&&null==n.model.getTerminal(K[V],!0)){M=n.model.getParent(K[V]);break}if(null!=S&&M!=S&&null!=this.view.getState(K[0])){var W=n.getIncomingTreeEdges(K[0]);if(0<W.length){var Y=n.view.getState(n.model.getTerminal(W[0],!0));if(null!=Y){var Z=n.view.getState(S);null!=Z&&(m=(Z.getCenterX()-Y.getCenterX())/n.view.scale,u=(Z.getCenterY()-Y.getCenterY())/-n.view.scale)}}}}R=G.apply(this,arguments);if(null!=R&&null!=K&&R.length==K.length)for(V=0;V<R.length;V++)if(this.model.isEdge(R[V]))c(S)&&0>mxUtils.indexOf(R,this.model.getTerminal(R[V],!0))&&this.model.setTerminal(R[V],S,!0);else if(c(K[V])&&(W=n.getIncomingTreeEdges(K[V]),0<W.length))if(!E)c(S)&&0>mxUtils.indexOf(K,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],S,!0);else if(0==n.getIncomingTreeEdges(R[V]).length){X=S;if(null==X||X==n.model.getParent(K[V]))X=n.model.getTerminal(W[0],-!0);E=this.cloneCell(W[0]);this.addEdge(E,n.getDefaultParent(),X,R[V])}}finally{this.model.endUpdate()}return R};if(null!=l.sidebar){var C=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(K,m,u,E){var M=n.model,L=null;M.beginUpdate();try{if(L=C.apply(this,arguments),c(K))for(var O=0;O<L.length;O++)if(M.isEdge(L[O])&&null==M.getTerminal(L[O],!0)){M.setTerminal(L[O],K,!0);var R=n.getCellGeometry(L[O]);R.points=null;null!=R.getTerminalPoint(!0)&&R.setTerminalPoint(null,!0)}}finally{M.endUpdate()}return L}}var Q=+n.view.scale)}}}}R=G.apply(this,arguments);if(null!=R&&null!=K&&R.length==K.length)for(V=0;V<R.length;V++)if(this.model.isEdge(R[V]))c(S)&&0>mxUtils.indexOf(R,this.model.getTerminal(R[V],!0))&&this.model.setTerminal(R[V],S,!0);else if(c(K[V])&&(W=n.getIncomingTreeEdges(K[V]),0<W.length))if(!D)c(S)&&0>mxUtils.indexOf(K,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],S,!0);else if(0==n.getIncomingTreeEdges(R[V]).length){X=S;if(null==X||X==n.model.getParent(K[V]))X=n.model.getTerminal(W[0],+!0);D=this.cloneCell(W[0]);this.addEdge(D,n.getDefaultParent(),X,R[V])}}finally{this.model.endUpdate()}return R};if(null!=l.sidebar){var C=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(K,m,u,D){var M=n.model,L=null;M.beginUpdate();try{if(L=C.apply(this,arguments),c(K))for(var O=0;O<L.length;O++)if(M.isEdge(L[O])&&null==M.getTerminal(L[O],!0)){M.setTerminal(L[O],K,!0);var R=n.getCellGeometry(L[O]);R.points=null;null!=R.getTerminalPoint(!0)&&R.setTerminalPoint(null,!0)}}finally{M.endUpdate()}return L}}var Q={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},U={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},T=l.onKeyDown;l.onKeyDown=function(K){try{var m=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=m){var u=mxEvent.isAltDown(K)&&mxEvent.isShiftDown(K)?Q[K.keyCode]:mxEvent.isAltDown(K)?U[K.keyCode]:null;null!=u?(u.funct(K),mxEvent.consume(K)):c(m)&&(u=null,0<n.getIncomingTreeEdges(m).length&&-(9==K.which?u=mxEvent.isShiftDown(K)?F(m):D(m):13==K.which&&(u=H(m,!mxEvent.isShiftDown(K)))),null!=u&&0<u.length?(1==u.length&&n.model.isEdge(u[0])?n.setSelectionCell(n.model.getTerminal(u[0],!1)):n.setSelectionCell(u[u.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(m)),n.startEditingAtCell(m),mxEvent.consume(K)):37==K.keyCode?(g(m,mxConstants.DIRECTION_WEST),mxEvent.consume(K)):38==K.keyCode?(g(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(K)):39==K.keyCode?(g(m,mxConstants.DIRECTION_EAST),-mxEvent.consume(K)):40==K.keyCode&&(g(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(K)))}}catch(E){l.handleError(E)}mxEvent.isConsumed(K)||T.apply(this,arguments)};var P=n.connectVertex;n.connectVertex=function(K,m,u,E,M,L,O){var R=n.getIncomingTreeEdges(K);if(c(K)){var S=y(K),V=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,X=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;return S==m||0==R.length?D(K,m):V==X?F(K):H(K,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return P.apply(this,-arguments)};n.getSubtree=function(K){var m=[K];!p(K)&&!c(K)||t(K)||n.traverse(K,!0,function(u,E){var M=null!=E&&n.isTreeEdge(E);M&&0>mxUtils.indexOf(m,E)&&m.push(E);(null==E||M)&&0>mxUtils.indexOf(m,u)&&m.push(u);return null==E||M});return m};var v=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){v.apply(this,arguments);(p(this.state.cell)||c(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?+(9==K.which?u=mxEvent.isShiftDown(K)?F(m):E(m):13==K.which&&(u=H(m,!mxEvent.isShiftDown(K)))),null!=u&&0<u.length?(1==u.length&&n.model.isEdge(u[0])?n.setSelectionCell(n.model.getTerminal(u[0],!1)):n.setSelectionCell(u[u.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(n.view.getState(m)),n.startEditingAtCell(m),mxEvent.consume(K)):37==K.keyCode?(g(m,mxConstants.DIRECTION_WEST),mxEvent.consume(K)):38==K.keyCode?(g(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(K)):39==K.keyCode?(g(m,mxConstants.DIRECTION_EAST),+mxEvent.consume(K)):40==K.keyCode&&(g(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(K)))}}catch(D){l.handleError(D)}mxEvent.isConsumed(K)||T.apply(this,arguments)};var P=n.connectVertex;n.connectVertex=function(K,m,u,D,M,L,O){var R=n.getIncomingTreeEdges(K);if(c(K)){var S=y(K),V=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,X=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;return S==m||0==R.length?E(K,m):V==X?F(K):H(K,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return P.apply(this,+arguments)};n.getSubtree=function(K){var m=[K];!p(K)&&!c(K)||t(K)||n.traverse(K,!0,function(u,D){var M=null!=D&&n.isTreeEdge(D);M&&0>mxUtils.indexOf(m,D)&&m.push(D);(null==D||M)&&0>mxUtils.indexOf(m,u)&&m.push(u);return null==D||M});return m};var v=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){v.apply(this,arguments);(p(this.state.cell)||c(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(K){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(K),mxEvent.getClientY(K),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(K);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(K)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var A=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){A.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(K){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=K?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(K,m){J.apply(this,@@ -14280,74 +14285,74 @@ arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.mnew mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');y.vertex=!0;var H=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!0);H.insertEdge(F,!1);t.insert(F);t.insert(y);t.insert(H);return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var y=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');y.vertex=!0;var H=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!0);H.insertEdge(F,!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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-D.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),F.style);d.geometry.relative=!0;d.edge=!0;y.insertEdge(d,!0);D.insertEdge(d,!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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!0);H.insertEdge(F,!1);var E=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+E.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),F.style);d.geometry.relative=!0;d.edge=!0;y.insertEdge(d,!0);E.insertEdge(d,!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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),F.style);l.geometry.relative=!0;l.edge=!0;y.insertEdge(l,!0);g.insertEdge(l,!1);var n=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),F.style);x.geometry.relative=!0;x.edge=!0;y.insertEdge(x,!0);n.insertEdge(x,!1);t.insert(F);t.insert(d);t.insert(l);t.insert(x);t.insert(y);t.insert(H);t.insert(D);t.insert(g);t.insert(n);return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+n.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),F.style);x.geometry.relative=!0;x.edge=!0;y.insertEdge(x,!0);n.insertEdge(x,!1);t.insert(F);t.insert(d);t.insert(l);t.insert(x);t.insert(y);t.insert(H);t.insert(E);t.insert(g);t.insert(n);return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');t.vertex=!0;return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var t=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');t.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;t.insertEdge(y,!1);return q.createVertexTemplateFromCells([t,y],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');t.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;t.insertEdge(y,!1);return q.createVertexTemplateFromCells([t,y],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var y=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"};');p.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;var H=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"};');H.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!0);H.insertEdge(F,!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 d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");d.geometry.relative=-!0;d.edge=!0;y.insertEdge(d,!0);D.insertEdge(d,!1);t.insert(F);t.insert(d);t.insert(y);t.insert(H);t.insert(D);return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=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"};');p.setAttributeForCell(t,"treeRoot","1");t.vertex=!0;return q.createVertexTemplateFromCells([t],+F.geometry.relative=!0;F.edge=!0;y.insertEdge(F,!0);H.insertEdge(F,!1);var E=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"};');E.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");d.geometry.relative=+!0;d.edge=!0;y.insertEdge(d,!0);E.insertEdge(d,!1);t.insert(F);t.insert(d);t.insert(y);t.insert(H);t.insert(E);return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=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"};');p.setAttributeForCell(t,"treeRoot","1");t.vertex=!0;return q.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=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"};');t.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");y.geometry.setTerminalPoint(new mxPoint(0,0),!0);y.geometry.relative=!0;y.edge=!0;t.insertEdge(y,!1);return q.createVertexTemplateFromCells([t,y],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");y.geometry.setTerminalPoint(new mxPoint(110,-40),!0);y.geometry.relative=!0;y.edge=!0;t.insertEdge(y,!1);var H=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");H.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),y.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;H.insertEdge(F,!1);return q.createVertexTemplateFromCells([y,F,t,H],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;-EditorUi.initMinimalTheme=function(){function b(F,D){if(EditorUi.windowed){var d=F.editor.graph;d.popupMenuHandler.hideMenu();null==F.formatWindow?(F.formatWindow=new WrapperWindow(F,"",Math.max(10,F.diagramContainer.clientWidth-248),60,240,Math.min(566,d.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";F.createFormat(g).init()}),F.dependsOnLanguage(mxUtils.bind(this,function(){F.formatWindow.window.setTitle(mxResources.get("format"))})),F.formatWindow.window.addListener(mxEvent.SHOW,-mxUtils.bind(this,function(){F.formatWindow.window.fit()})),F.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):F.formatWindow.window.setVisible(null!=D?D:!F.formatWindow.window.isVisible())}else null==F.formatElt&&(F.formatElt=F.createSidebarContainer(),F.createFormat(F.formatElt).init(),F.formatElt.style.border="none",F.formatElt.style.width="240px",F.formatElt.style.borderLeftWidth="1px",F.formatElt.style.borderLeftStyle="solid",F.formatElt.style.right="0px"),D=F.diagramContainer.parentNode,-null!=F.formatElt.parentNode?(F.formatElt.parentNode.removeChild(F.formatElt),D.style.right="0px"):(D.parentNode.appendChild(F.formatElt),D.style.right=F.formatElt.style.width)}function f(F,D){if(EditorUi.windowed){var d=F.editor.graph;d.popupMenuHandler.hideMenu();null==F.sidebarWindow?(F.sidebarWindow=new WrapperWindow(F,"",10,56,Math.min(d.container.clientWidth-10,218)-6,Math.min(d.container.clientHeight-40,650)-6,function(g){F.createShapesPanel(g)}),F.dependsOnLanguage(mxUtils.bind(this,function(){F.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),-F.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){F.sidebarWindow.window.fit()})),F.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),F.sidebarWindow.window.setVisible(!0),isLocalStorage&&F.getLocalData("sidebar",function(g){F.sidebar.showEntries(g,null,!0)}),F.restoreLibraries()):F.sidebarWindow.window.setVisible(null!=D?D:!F.sidebarWindow.window.isVisible())}else null==F.sidebarElt&&(F.sidebarElt=F.createSidebarContainer(),F.createShapesPanel(F.sidebarElt),F.sidebarElt.style.border=-"none",F.sidebarElt.style.width="210px",F.sidebarElt.style.borderRight="1px solid gray"),D=F.diagramContainer.parentNode,null!=F.sidebarElt.parentNode?(F.sidebarElt.parentNode.removeChild(F.sidebarElt),D.style.left="0px"):(D.parentNode.appendChild(F.sidebarElt),D.style.left=F.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var k=0;try{k=window.innerWidth||document.documentElement.clientWidth||+EditorUi.initMinimalTheme=function(){function b(F,E){if(EditorUi.windowed){var d=F.editor.graph;d.popupMenuHandler.hideMenu();null==F.formatWindow?(F.formatWindow=new WrapperWindow(F,"",Math.max(10,F.diagramContainer.clientWidth-248),60,240,Math.min(566,d.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";F.createFormat(g).init()}),F.dependsOnLanguage(mxUtils.bind(this,function(){F.formatWindow.window.setTitle(mxResources.get("format"))})),F.formatWindow.window.addListener(mxEvent.SHOW,+mxUtils.bind(this,function(){F.formatWindow.window.fit()})),F.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):F.formatWindow.window.setVisible(null!=E?E:!F.formatWindow.window.isVisible())}else null==F.formatElt&&(F.formatElt=F.createSidebarContainer(),F.createFormat(F.formatElt).init(),F.formatElt.style.border="none",F.formatElt.style.width="240px",F.formatElt.style.borderLeftWidth="1px",F.formatElt.style.borderLeftStyle="solid",F.formatElt.style.right="0px"),E=F.diagramContainer.parentNode,+null!=F.formatElt.parentNode?(F.formatElt.parentNode.removeChild(F.formatElt),E.style.right="0px"):(E.parentNode.appendChild(F.formatElt),E.style.right=F.formatElt.style.width)}function f(F,E){if(EditorUi.windowed){var d=F.editor.graph;d.popupMenuHandler.hideMenu();null==F.sidebarWindow?(F.sidebarWindow=new WrapperWindow(F,"",10,56,Math.min(d.container.clientWidth-10,218)-6,Math.min(d.container.clientHeight-40,650)-6,function(g){F.createShapesPanel(g)}),F.dependsOnLanguage(mxUtils.bind(this,function(){F.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),+F.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){F.sidebarWindow.window.fit()})),F.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),F.sidebarWindow.window.setVisible(!0),isLocalStorage&&F.getLocalData("sidebar",function(g){F.sidebar.showEntries(g,null,!0)}),F.restoreLibraries()):F.sidebarWindow.window.setVisible(null!=E?E:!F.sidebarWindow.window.isVisible())}else null==F.sidebarElt&&(F.sidebarElt=F.createSidebarContainer(),F.createShapesPanel(F.sidebarElt),F.sidebarElt.style.border=+"none",F.sidebarElt.style.width="210px",F.sidebarElt.style.borderRight="1px solid gray"),E=F.diagramContainer.parentNode,null!=F.sidebarElt.parentNode?(F.sidebarElt.parentNode.removeChild(F.sidebarElt),E.style.left="0px"):(E.parentNode.appendChild(F.sidebarElt),E.style.left=F.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var k=0;try{k=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(F){}Menus.prototype.autoPopup=!1;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.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";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var c=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){c.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(F,D){null!=D.shortcut&&900>k&&!mxClient.IS_IOS?F.firstChild.nextSibling.setAttribute("title",D.shortcut):p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var c=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){c.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(F,E){null!=E.shortcut&&900>k&&!mxClient.IS_IOS?F.firstChild.nextSibling.setAttribute("title",E.shortcut):p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(F){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=F?F:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();q.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(F){t.apply(this,-arguments);if(F){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=D&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=D&&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(){};EditorUi.prototype.installFormatToolbar=function(F){var D=-this.editor.graph,d=document.createElement("div");d.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%;";D.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,l){0<D.getSelectionCount()?(F.appendChild(d),d.innerHTML="Selected: "+D.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var y=!1;EditorUi.prototype.initFormatWindow=-function(){if(!y&&null!=this.formatWindow){y=!0;var F=this.formatWindow.window.toggleMinimized,D=240;this.formatWindow.window.toggleMinimized=function(){F.apply(this,arguments);this.minimized?(D=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+D-140+"px"):(this.div.style.width=D+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-D+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(d){mxEvent.getSource(d)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function F(E,M,L){var O=n.menus.get(E);M=B.addMenu(mxResources.get(E),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));M.className="geButton";M.setAttribute("title",mxResources.get(E));n.menus.menuCreated(O,M,"geButton");null!=L&&-(M.style.backgroundImage="url("+L+")",M.innerText="");return M}function D(E,M,L,O,R,S){var V=document.createElement("a");V.className="geButton";z.appendChild(V);null!=S?V.style.backgroundImage="url("+S+")":mxUtils.write(V,E);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&M(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=R&&(E=function(){R.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},R.addListener("stateChanged",-E),x.addListener("enabledChanged",E),E());return V}function d(E,M,L){M=document.createElement("div");M.className="geButtonGroup";for(L=0;L<E.length;L++)null!=E[L]&&M.appendChild(E[L]);z.appendChild(M);return M}function g(){k=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;z.innerHTML="";var E=1E3>k,M=F("diagram",null,E?Editor.menuImage:null);d([M,D(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),-E?Editor.shapesImage:null),D(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),E?Editor.formatImage:null)]);M=F("insert",!0,E?U:null);d([M,D(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),E?Editor.trashImage:null)]);x.isEnabled()||M.setAttribute("disabled","disabled");K.setAttribute("title",mxResources.get("undo")+" ("+N.shortcut+")");-m.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");u.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=k&&(d([K,m]),520<=k&&d([u,640<=k?D("",v.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",v,Editor.zoomInImage):null,640<=k?D("",A.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",A,Editor.zoomOutImage):null]));z.appendChild(n.statusContainer);z.appendChild(n.buttonContainer)}H.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,+arguments);if(F){var E=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=E&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=E&&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(){};EditorUi.prototype.installFormatToolbar=function(F){var E=+this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";E.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,l){0<E.getSelectionCount()?(F.appendChild(d),d.innerHTML="Selected: "+E.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var y=!1;EditorUi.prototype.initFormatWindow=+function(){if(!y&&null!=this.formatWindow){y=!0;var F=this.formatWindow.window.toggleMinimized,E=240;this.formatWindow.window.toggleMinimized=function(){F.apply(this,arguments);this.minimized?(E=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+E-140+"px"):(this.div.style.width=E+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-E+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(d){mxEvent.getSource(d)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function F(D,M,L){var O=n.menus.get(D);M=B.addMenu(mxResources.get(D),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));M.className="geButton";M.setAttribute("title",mxResources.get(D));n.menus.menuCreated(O,M,"geButton");null!=L&&+(M.style.backgroundImage="url("+L+")",M.innerText="");return M}function E(D,M,L,O,R,S){var V=document.createElement("a");V.className="geButton";z.appendChild(V);null!=S?V.style.backgroundImage="url("+S+")":mxUtils.write(V,D);mxEvent.addListener(V,"click",function(X){"disabled"!=V.getAttribute("disabled")&&M(X);mxEvent.consume(X)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=R&&(D=function(){R.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},R.addListener("stateChanged",+D),x.addListener("enabledChanged",D),D());return V}function d(D,M,L){M=document.createElement("div");M.className="geButtonGroup";for(L=0;L<D.length;L++)null!=D[L]&&M.appendChild(D[L]);z.appendChild(M);return M}function g(){k=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;z.innerHTML="";var D=1E3>k,M=F("diagram",null,D?Editor.menuImage:null);d([M,E(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),+D?Editor.shapesImage:null),E(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),D?Editor.formatImage:null)]);M=F("insert",!0,D?U:null);d([M,E(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),D?Editor.trashImage:null)]);x.isEnabled()||M.setAttribute("disabled","disabled");K.setAttribute("title",mxResources.get("undo")+" ("+N.shortcut+")");+m.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");u.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=k&&(d([K,m]),520<=k&&d([u,640<=k?E("",v.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",v,Editor.zoomInImage):null,640<=k?E("",A.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",A,Editor.zoomOutImage):null]));z.appendChild(n.statusContainer);z.appendChild(n.buttonContainer)}H.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=k||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&-1E3<=k&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var z=document.createElement("div");z.className="geMenubarContainer";var B=new Menubar(n,z),I=n.hideCurrentMenu;n.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var G=n.descriptorChanged;n.descriptorChanged=function(){G.apply(this,arguments);var E=n.getCurrentFile();if(null!=E&&null!=E.getTitle()){var M=E.getMode();-"google"==M?M="googleDrive":"github"==M?M="gitHub":"gitlab"==M?M="gitLab":"onedrive"==M&&(M="oneDrive");M=mxResources.get(M);z.setAttribute("title",E.getTitle()+(null!=M?" ("+M+")":""))}else z.removeAttribute("title")};n.setStatusText(n.editor.getStatus());z.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();z.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var C=this.createZoomInput(!0),Q=n.updateTabContainer;-n.updateTabContainer=function(){Q.apply(this,arguments);n.tabContainer.appendChild(C)};var U=Editor.addBoxImage;if(null!=n.hoverIcons){var T=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=x.freehand){var P=x.freehand.createStyle;x.freehand.createStyle=function(E){return P.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());-var v=n.actions.get("zoomIn"),A=n.actions.get("zoomOut");l=n.actions.get("resetView");var N=n.actions.get("undo"),J=n.actions.get("redo"),K=D("",N.funct,null,"",N,Editor.undoImage),m=D("",J.funct,null,"",J,Editor.redoImage),u=D("",function(E){mxEvent.isAltDown(E)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(E)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});+1E3<=k&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var z=document.createElement("div");z.className="geMenubarContainer";var B=new Menubar(n,z),I=n.hideCurrentMenu;n.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var G=n.descriptorChanged;n.descriptorChanged=function(){G.apply(this,arguments);var D=n.getCurrentFile();if(null!=D&&null!=D.getTitle()){var M=D.getMode();+"google"==M?M="googleDrive":"github"==M?M="gitHub":"gitlab"==M?M="gitLab":"onedrive"==M&&(M="oneDrive");M=mxResources.get(M);z.setAttribute("title",D.getTitle()+(null!=M?" ("+M+")":""))}else z.removeAttribute("title")};n.setStatusText(n.editor.getStatus());z.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();z.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var C=this.createZoomInput(!0),Q=n.updateTabContainer;+n.updateTabContainer=function(){Q.apply(this,arguments);n.tabContainer.appendChild(C)};var U=Editor.addBoxImage;if(null!=n.hoverIcons){var T=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=x.freehand){var P=x.freehand.createStyle;x.freehand.createStyle=function(D){return P.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());+var v=n.actions.get("zoomIn"),A=n.actions.get("zoomOut");l=n.actions.get("resetView");var N=n.actions.get("undo"),J=n.actions.get("redo"),K=E("",N.funct,null,"",N,Editor.undoImage),m=E("",J.funct,null,"",J,Editor.redoImage),u=E("",function(D){mxEvent.isAltDown(D)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(D)},!0,"",l,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});n.container.appendChild(n.tabContainer);n.container.appendChild(z);n.updateTabContainer();!EditorUi.windowed&&1E3<=k&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();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.chatWindow&&n.menus.chatWindow.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()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,p,q,t){var y=p.y,H=p.x,F=!1,D=!1;if(null!=this.states&&null!=c&&null!=p){var d=this,g=new mxCellState,l=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);g.x=c.x+H;g.y=c.y+y;g.width=c.width;g.height=c.height;for(var x=[],z=[],B=0;B<this.states.length;B++){var I=this.states[B];I instanceof mxCellState&&(t||!this.graph.isCellSelected(I.cell))&&((g.x>=I.x&&g.x<=I.x+I.width||I.x>=g.x&&I.x<=g.x+g.width)&&(g.y>+null!=n.menus.chatWindow&&n.menus.chatWindow.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()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,p,q,t){var y=p.y,H=p.x,F=!1,E=!1;if(null!=this.states&&null!=c&&null!=p){var d=this,g=new mxCellState,l=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);g.x=c.x+H;g.y=c.y+y;g.width=c.width;g.height=c.height;for(var x=[],z=[],B=0;B<this.states.length;B++){var I=this.states[B];I instanceof mxCellState&&(t||!this.graph.isCellSelected(I.cell))&&((g.x>=I.x&&g.x<=I.x+I.width||I.x>=g.x&&I.x<=g.x+g.width)&&(g.y>I.y+I.height+4||g.y+g.height+4<I.y)?x.push(I):(g.y>=I.y&&g.y<=I.y+I.height||I.y>=g.y&&I.y<=g.y+g.height)&&(g.x>I.x+I.width+4||g.x+g.width+4<I.x)&&z.push(I))}var G=0,C=0,Q=I=0,U=0,T=0,P=0,v=0,A=5*l;if(1<x.length){x.push(g);x.sort(function(m,u){return m.y-u.y});var N=!1;B=g==x[0];l=g==x[x.length-1];if(!B&&!l)for(B=1;B<x.length-1;B++)if(g==x[B]){l=x[B-1];B=x[B+1];I=C=Q=(B.y-l.y-l.height-g.height)/2;break}for(B=0;B<x.length-1;B++){l=x[B];var J=x[B+1],K=g==l||g==J;J=J.y-l.y-l.height;N|=g==l;if(0==C&&0==G)C=J,G=1;else if(Math.abs(C-J)<=(K||1==B&&N?n:0))G+=1;else if(1<G&&N){x=x.slice(0,B+1);break}else if(3<=x.length-B&&!N)G=0,I=C=0!=Q?Q:0,x.splice(0,0==B?1:B),B=-1;else break;0!=I||K||(C=I=J)}3==x.length&&x[1]==g&&(I=0)}if(1<z.length){z.push(g);z.sort(function(m,u){return m.x-u.x});N=!1;B=g==z[0];l=g==z[z.length-1];if(!B&&!l)for(B=1;B<z.length-1;B++)if(g==z[B]){l=z[B-1];B=z[B+1];P=T=v=(B.x-l.x-l.width-g.width)/2;break}for(B=0;B<z.length-1;B++){l=z[B];J=z[B+1];K=g==l||g==J;J=J.x-l.x-l.width;N|=g==l;-if(0==T&&0==U)T=J,U=1;else if(Math.abs(T-J)<=(K||1==B&&N?n:0))U+=1;else if(1<U&&N){z=z.slice(0,B+1);break}else if(3<=z.length-B&&!N)U=0,P=T=0!=v?v:0,z.splice(0,0==B?1:B),B=-1;else break;0!=P||K||(T=P=J)}3==z.length&&z[1]==g&&(P=0)}n=function(m,u,E,M){var L=[];if(M){M=A;var O=0}else M=0,O=A;L.push(new mxPoint(m.x-M,m.y-O));L.push(new mxPoint(m.x+M,m.y+O));L.push(m);L.push(u);L.push(new mxPoint(u.x-M,u.y-O));L.push(new mxPoint(u.x+M,u.y+O));if(null!=E)return E.points=L,E;m=new mxPolyline(L,mxConstants.GUIDE_COLOR,+if(0==T&&0==U)T=J,U=1;else if(Math.abs(T-J)<=(K||1==B&&N?n:0))U+=1;else if(1<U&&N){z=z.slice(0,B+1);break}else if(3<=z.length-B&&!N)U=0,P=T=0!=v?v:0,z.splice(0,0==B?1:B),B=-1;else break;0!=P||K||(T=P=J)}3==z.length&&z[1]==g&&(P=0)}n=function(m,u,D,M){var L=[];if(M){M=A;var O=0}else M=0,O=A;L.push(new mxPoint(m.x-M,m.y-O));L.push(new mxPoint(m.x+M,m.y+O));L.push(m);L.push(u);L.push(new mxPoint(u.x-M,u.y-O));L.push(new mxPoint(u.x+M,u.y+O));if(null!=D)return D.points=L,D;m=new mxPolyline(L,mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);m.dialect=mxConstants.DIALECT_SVG;m.pointerEvents=!1;m.init(d.graph.getView().getOverlayPane());return m};T=function(m,u){if(m&&null!=d.guidesArrHor)for(m=0;m<d.guidesArrHor.length;m++)d.guidesArrHor[m].node.style.visibility="hidden";if(u&&null!=d.guidesArrVer)for(m=0;m<d.guidesArrVer.length;m++)d.guidesArrVer[m].node.style.visibility="hidden"};if(1<U&&U==z.length-1){U=[];v=d.guidesArrHor;F=[];H=0;B=z[0]==g?1:0;N=z[B].y+z[B].height;if(0<P)for(B=0;B<z.length-1;B++)l=z[B],J=z[B+1],g==l?(H=J.x-l.width-P,F.push(new mxPoint(H+l.width+A,N)),F.push(new mxPoint(J.x-A,N))):g==J?(F.push(new mxPoint(l.x+l.width+A,N)),H=l.x+l.width+P,F.push(new mxPoint(H-A,N))):(F.push(new mxPoint(l.x+l.width+A,N)),F.push(new mxPoint(J.x-A,N)));else l=z[0],B=z[2],H=l.x+l.width+(B.x-l.x-l.width-g.width)/2,F.push(new mxPoint(l.x+l.width+A,N)),F.push(new mxPoint(H-A,N)),F.push(new mxPoint(H+g.width+A,N)),F.push(new mxPoint(B.x-A,N));for(B=0;B<F.length;B+=2)z=F[B],P=F[B+1],z=n(z,P,null!=v?-v[B/2]:null),z.node.style.visibility="visible",z.redraw(),U.push(z);for(B=F.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrHor=U;H-=c.x;F=!0}else T(!0);if(1<G&&G==x.length-1){U=[];v=d.guidesArrVer;D=[];y=0;B=x[0]==g?1:0;G=x[B].x+x[B].width;if(0<I)for(B=0;B<x.length-1;B++)l=x[B],J=x[B+1],g==l?(y=J.y-l.height-I,D.push(new mxPoint(G,y+l.height+A)),D.push(new mxPoint(G,J.y-A))):g==J?(D.push(new mxPoint(G,l.y+l.height+A)),y=l.y+l.height+I,D.push(new mxPoint(G,y-A))):(D.push(new mxPoint(G,l.y+-l.height+A)),D.push(new mxPoint(G,J.y-A)));else l=x[0],B=x[2],y=l.y+l.height+(B.y-l.y-l.height-g.height)/2,D.push(new mxPoint(G,l.y+l.height+A)),D.push(new mxPoint(G,y-A)),D.push(new mxPoint(G,y+g.height+A)),D.push(new mxPoint(G,B.y-A));for(B=0;B<D.length;B+=2)z=D[B],P=D[B+1],z=n(z,P,null!=v?v[B/2]:null,!0),z.node.style.visibility="visible",z.redraw(),U.push(z);for(B=D.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrVer=U;y-=c.y;D=!0}else T(!1,!0)}if(F||D)return g=new mxPoint(H,y),x=b.call(this,-c,g,q,t),F&&!D?g.y=x.y:D&&!F&&(g.x=x.x),x.y!=g.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=g.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),g;T(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){f.call(this,c);var p=this.guidesArrVer,q=this.guidesArrHor;if(null!=p)for(var t=0;t<p.length;t++)p[t].node.style.visibility=c?"visible":"hidden";if(null!=+v[B/2]:null),z.node.style.visibility="visible",z.redraw(),U.push(z);for(B=F.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrHor=U;H-=c.x;F=!0}else T(!0);if(1<G&&G==x.length-1){U=[];v=d.guidesArrVer;E=[];y=0;B=x[0]==g?1:0;G=x[B].x+x[B].width;if(0<I)for(B=0;B<x.length-1;B++)l=x[B],J=x[B+1],g==l?(y=J.y-l.height-I,E.push(new mxPoint(G,y+l.height+A)),E.push(new mxPoint(G,J.y-A))):g==J?(E.push(new mxPoint(G,l.y+l.height+A)),y=l.y+l.height+I,E.push(new mxPoint(G,y-A))):(E.push(new mxPoint(G,l.y++l.height+A)),E.push(new mxPoint(G,J.y-A)));else l=x[0],B=x[2],y=l.y+l.height+(B.y-l.y-l.height-g.height)/2,E.push(new mxPoint(G,l.y+l.height+A)),E.push(new mxPoint(G,y-A)),E.push(new mxPoint(G,y+g.height+A)),E.push(new mxPoint(G,B.y-A));for(B=0;B<E.length;B+=2)z=E[B],P=E[B+1],z=n(z,P,null!=v?v[B/2]:null,!0),z.node.style.visibility="visible",z.redraw(),U.push(z);for(B=E.length/2;null!=v&&B<v.length;B++)v[B].destroy();d.guidesArrVer=U;y-=c.y;E=!0}else T(!1,!0)}if(F||E)return g=new mxPoint(H,y),x=b.call(this,+c,g,q,t),F&&!E?g.y=x.y:E&&!F&&(g.x=x.x),x.y!=g.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=g.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),g;T(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){f.call(this,c);var p=this.guidesArrVer,q=this.guidesArrHor;if(null!=p)for(var t=0;t<p.length;t++)p[t].node.style.visibility=c?"visible":"hidden";if(null!=q)for(t=0;t<q.length;t++)q[t].node.style.visibility=c?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var c=this.guidesArrVer,p=this.guidesArrHor;if(null!=c){for(var q=0;q<c.length;q++)c[q].destroy();this.guidesArrVer=null}if(null!=p){for(q=0;q<p.length;q++)p[q].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,c){function p(){var G=b.getDiagramContainerOffset(),C=b.diagramContainer;d.style.top=C.offsetTop-G.y+"px";d.style.left=C.offsetLeft-G.x+"px";d.style.width=(k?0:C.offsetWidth)+H+"px";d.style.height=(k?C.offsetHeight:0)+H+"px"}function q(G,C,Q){if(null!=t)return G;var U;return function(){var T=this,P=arguments,v=Q&&!U;clearTimeout(U);U=setTimeout(function(){U=null;Q||G.apply(T,P)},C);v&&G.apply(T,P)}}var t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||-window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,F=this;this.unit=f;var D=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,-function(){D=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[k?"borderRight":"borderBottom"]="0.5px solid "+D.strokeClr;d.style.borderLeft="0.5px solid "+D.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(G){F.editorUiRefresh.apply(b,+window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,F=this;this.unit=f;var E=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,+function(){E=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[k?"borderRight":"borderBottom"]="0.5px solid "+E.strokeClr;d.style.borderLeft="0.5px solid "+E.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(G){F.editorUiRefresh.apply(b,arguments);p()};p();var g=document.createElement("canvas");g.width=d.offsetWidth;g.height=d.offsetHeight;d.style.overflow="hidden";g.style.position="relative";d.appendChild(g);var l=g.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=d;this.canvas=g;var x=function(G,C,Q,U,T){G=Math.round(G);C=Math.round(C);Q=Math.round(Q);U=Math.round(U);l.beginPath();l.moveTo(G+.5,C+.5);l.lineTo(Q+.5,U+.5);l.stroke();T&&(k?(l.save(),l.translate(G,C),l.rotate(-Math.PI/2),l.fillText(T,0,0),-l.restore()):l.fillText(T,G,C))},z=function(){l.clearRect(0,0,g.width,g.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=D.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var G=n.view.scale,C=n.view.getBackgroundPageBounds(),Q=n.view.translate,U=n.pageVisible;Q=U?H+(k?C.y-n.container.scrollTop:C.x-n.container.scrollLeft):H+(k?Q.y*G-n.container.scrollTop:Q.x*G-n.container.scrollLeft);var T=0;U&&(T=n.getPageLayout(),T=k?T.y*n.pageFormat.height:T.x*n.pageFormat.width);var P;switch(F.unit){case mxConstants.POINTS:var v=+l.restore()):l.fillText(T,G,C))},z=function(){l.clearRect(0,0,g.width,g.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=E.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var G=n.view.scale,C=n.view.getBackgroundPageBounds(),Q=n.view.translate,U=n.pageVisible;Q=U?H+(k?C.y-n.container.scrollTop:C.x-n.container.scrollLeft):H+(k?Q.y*G-n.container.scrollTop:Q.x*G-n.container.scrollLeft);var T=0;U&&(T=n.getPageLayout(),T=k?T.y*n.pageFormat.height:T.x*n.pageFormat.width);var P;switch(F.unit){case mxConstants.POINTS:var v=P=10;var A=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;v=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;v=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=G||4<=G?8:16,v=mxConstants.PIXELS_PER_INCH/P,A=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=v;2<=G?N=v/(2*Math.floor(G/2)):.5>=G&&(N=v*Math.floor(1/G/2)*(F.unit==mxConstants.MILLIMETERS?2:1));v=null;C=U?Math.min(Q+(k?C.height:C.width),k?-g.height:g.width):k?g.height:g.width;if(U)if(l.fillStyle=D.outBkgClr,k){var J=Q-H;0<J&&l.fillRect(0,H,H,J);C<g.height&&l.fillRect(0,C,H,g.height)}else J=Q-H,0<J&&l.fillRect(H,0,J,H),C<g.width&&l.fillRect(C,0,g.width,H);l.fillStyle=D.fontClr;for(U=U?Q:Q%(N*G);U<=C;U+=N*G)if(J=Math.round((U-Q)/G/N),!(U<H||J==v)){v=J;var K=null;0==J%P&&(K=F.formatText(T+J*N)+"");k?x(H-A[Math.abs(J)%P],U,H,U,K):x(U,H-A[Math.abs(J)%P],U,H,K)}l.lineWidth=1;x(k?0:H,k?H:0,H,H);l.fillStyle=D.cornerClr;l.fillRect(0,0,H,H)},+g.height:g.width):k?g.height:g.width;if(U)if(l.fillStyle=E.outBkgClr,k){var J=Q-H;0<J&&l.fillRect(0,H,H,J);C<g.height&&l.fillRect(0,C,H,g.height)}else J=Q-H,0<J&&l.fillRect(H,0,J,H),C<g.width&&l.fillRect(C,0,g.width,H);l.fillStyle=E.fontClr;for(U=U?Q:Q%(N*G);U<=C;U+=N*G)if(J=Math.round((U-Q)/G/N),!(U<H||J==v)){v=J;var K=null;0==J%P&&(K=F.formatText(T+J*N)+"");k?x(H-A[Math.abs(J)%P],U,H,U,K):x(U,H-A[Math.abs(J)%P],U,H,K)}l.lineWidth=1;x(k?0:H,k?H:0,H,H);l.fillStyle=E.cornerClr;l.fillRect(0,0,H,H)},B=-1,I=function(){null!=t?(null!=y&&y(B),B=t(z)):z()};this.drawRuler=I;this.sizeListener=f=q(function(){var G=n.container;k?(G=G.offsetHeight+H,g.height!=G&&(g.height=G,d.style.height=G+"px",I())):(G=G.offsetWidth+H,g.width!=G&&(g.width=G,d.style.width=G+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=q(function(){var G=k?n.container.scrollTop:n.container.scrollLeft;F.lastScroll!=G&&(F.lastScroll=G,I())},10);this.unitListener=function(G,C){F.setUnit(C.getProperty("unit"))};-n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(G){D=G;d.style.background=D.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(G,C,Q,U){if(k&&4<G.height||!k&&4<G.width){if(null!=F.guidePart)try{l.putImageData(F.guidePart.imgData1,-F.guidePart.x1,F.guidePart.y1),l.putImageData(F.guidePart.imgData2,F.guidePart.x2,F.guidePart.y2),l.putImageData(F.guidePart.imgData3,F.guidePart.x3,F.guidePart.y3)}catch(M){}var T=F.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=D.guideClr;l.setLineDash([2]);if(k){var P=G.y+T.y+H-this.graph.container.scrollTop;var v=0;var A=P+G.height/2;var N=H/2;var J=P+G.height;var K=0;var m=l.getImageData(v,P-1,H,3);x(v,P,H,P);P--;var u=l.getImageData(N,A-1,H,3);x(N,A,H,A);A--;var E=l.getImageData(K,-J-1,H,3);x(K,J,H,J);J--}else P=0,v=G.x+T.x+H-this.graph.container.scrollLeft,A=H/2,N=v+G.width/2,J=0,K=v+G.width,m=l.getImageData(v-1,P,3,H),x(v,P,v,H),v--,u=l.getImageData(N-1,A,3,H),x(N,A,N,H),N--,E=l.getImageData(K-1,J,3,H),x(K,J,K,H),K--;if(null==F.guidePart||F.guidePart.x1!=v||F.guidePart.y1!=P)F.guidePart={imgData1:m,x1:v,y1:P,imgData2:u,x2:N,y2:A,imgData3:E,x3:K,y3:J}}catch(M){}}else T=F.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(G){E=G;d.style.background=E.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(G,C,Q,U){if(k&&4<G.height||!k&&4<G.width){if(null!=F.guidePart)try{l.putImageData(F.guidePart.imgData1,+F.guidePart.x1,F.guidePart.y1),l.putImageData(F.guidePart.imgData2,F.guidePart.x2,F.guidePart.y2),l.putImageData(F.guidePart.imgData3,F.guidePart.x3,F.guidePart.y3)}catch(M){}var T=F.origGuideMove.apply(this,arguments);try{l.lineWidth=.5;l.strokeStyle=E.guideClr;l.setLineDash([2]);if(k){var P=G.y+T.y+H-this.graph.container.scrollTop;var v=0;var A=P+G.height/2;var N=H/2;var J=P+G.height;var K=0;var m=l.getImageData(v,P-1,H,3);x(v,P,H,P);P--;var u=l.getImageData(N,A-1,H,3);x(N,A,H,A);A--;var D=l.getImageData(K,+J-1,H,3);x(K,J,H,J);J--}else P=0,v=G.x+T.x+H-this.graph.container.scrollLeft,A=H/2,N=v+G.width/2,J=0,K=v+G.width,m=l.getImageData(v-1,P,3,H),x(v,P,v,H),v--,u=l.getImageData(N-1,A,3,H),x(N,A,N,H),N--,D=l.getImageData(K-1,J,3,H),x(K,J,K,H),K--;if(null==F.guidePart||F.guidePart.x1!=v||F.guidePart.y1!=P)F.guidePart={imgData1:m,x1:v,y1:P,imgData2:u,x2:N,y2:A,imgData3:D,x3:K,y3:J}}catch(M){}}else T=F.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var G=F.origGuideDestroy.apply(this,arguments);if(null!=F.guidePart)try{l.putImageData(F.guidePart.imgData1,F.guidePart.x1,F.guidePart.y1),l.putImageData(F.guidePart.imgData2,F.guidePart.x2,F.guidePart.y2),l.putImageData(F.guidePart.imgData3,F.guidePart.x3,F.guidePart.y3),F.guidePart=null}catch(C){}return G}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(c){var p=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,-function(q){p=null!=b.currentMenu;mxEvent.consume(q)}),null,mxUtils.bind(this,function(q){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(q)||mxEvent.isPopupTrigger(q))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(q)||!p){var t=new mxPopupMenu(mxUtils.bind(this,function(F,D){b.menus.addMenuItems(F,["points","inches","millimeters","meters"],D)}));t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,+function(q){p=null!=b.currentMenu;mxEvent.consume(q)}),null,mxUtils.bind(this,function(q){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(q)||mxEvent.isPopupTrigger(q))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(q)||!p){var t=new mxPopupMenu(mxUtils.bind(this,function(F,E){b.menus.addMenuItems(F,["points","inches","millimeters","meters"],E)}));t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);b.resetCurrentMenu();t.destroy()});var y=mxEvent.getClientX(q),H=mxEvent.getClientY(q);t.popup(y,H,null,q);b.setCurrentMenu(t,c)}mxEvent.consume(q)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.MILD_SMOOTHING,c=null,p=[],q,t=[],y,H=!1,F=!0,D=!0,d=!0,g=!0,l=[],n=!1,x=!1,z=!1,B="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},G=!0;this.setClosedPath=function(A){H=A};this.setAutoClose=function(A){F=A};this.setAutoInsert=-function(A){D=A};this.setAutoScroll=function(A){d=A};this.setOpenFill=function(A){g=A};this.setStopClickEnabled=function(A){x=A};this.setSelectInserted=function(A){z=A};this.setSmoothing=function(A){k=A};this.getSmoothing=function(){return k};this.setPerfectFreehandMode=function(A){G=A};this.isPerfectFreehandMode=function(){return G};this.setBrushSize=function(A){I.size=A};this.getBrushSize=function(){return I.size};var C=function(A){n=A;b.getRubberband().setEnabled(!A);b.graphHandler.setSelectEnabled(!A);-b.graphHandler.setMoveEnabled(!A);b.container.style.cursor=A?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return n};var Q=mxUtils.bind(this,function(A){if(c){var N=y.length,J=x&&0<t.length&&null!=y&&2>y.length;J||t.push.apply(t,y);y=[];t.push(null);p.push(c);c=null;(J||D)&&this.stopDrawing();D&&(!J||2<=N)&&this.startDrawing();mxEvent.consume(A)}}),U=new mxCell;U.edge=!0;this.getStrokeColor=function(A){var N=null!=+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.MILD_SMOOTHING,c=null,p=[],q,t=[],y,H=!1,F=!0,E=!0,d=!0,g=!0,l=[],n=!1,x=!1,z=!1,B="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},G=!0;this.setClosedPath=function(A){H=A};this.setAutoClose=function(A){F=A};this.setAutoInsert=+function(A){E=A};this.setAutoScroll=function(A){d=A};this.setOpenFill=function(A){g=A};this.setStopClickEnabled=function(A){x=A};this.setSelectInserted=function(A){z=A};this.setSmoothing=function(A){k=A};this.getSmoothing=function(){return k};this.setPerfectFreehandMode=function(A){G=A};this.isPerfectFreehandMode=function(){return G};this.setBrushSize=function(A){I.size=A};this.getBrushSize=function(){return I.size};var C=function(A){n=A;b.getRubberband().setEnabled(!A);b.graphHandler.setSelectEnabled(!A);+b.graphHandler.setMoveEnabled(!A);b.container.style.cursor=A?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return n};var Q=mxUtils.bind(this,function(A){if(c){var N=y.length,J=x&&0<t.length&&null!=y&&2>y.length;J||t.push.apply(t,y);y=[];t.push(null);p.push(c);c=null;(J||E)&&this.stopDrawing();E&&(!J||2<=N)&&this.startDrawing();mxEvent.consume(A)}}),U=new mxCell;U.edge=!0;this.getStrokeColor=function(A){var N=null!=B?B:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(U),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=N||A||(N=b.shapeForegroundColor);return N};this.setStrokeColor=function(A){B=A};this.createStyle=function(A){var N=";fillColor=none;";G&&(N=";lineShape=1;");N+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+A+N};this.stopDrawing=function(){if(0<p.length){if(G){for(var A=[],N=0;N<t.length;N++)null!=t[N]&&A.push([t[N].x,-t[N].y]);A=PerfectFreehand.getStroke(A,I);t=[];for(N=0;N<A.length;N++)t.push({x:A[N][0],y:A[N][1]});t.push(null)}A=t[0].x;var J=t[0].x,K=t[0].y,m=t[0].y;for(N=1;N<t.length;N++)null!=t[N]&&(A=Math.max(A,t[N].x),J=Math.min(J,t[N].x),K=Math.max(K,t[N].y),m=Math.min(m,t[N].y));A-=J;K-=m;if(0<A&&0<K){var u=100/A,E=100/K;t.map(function(S){if(null==S)return S;S.x=(S.x-J)*u;S.y=(S.y-m)*E;return S});var M='<shape strokewidth="inherit"><foreground>',L=0;for(N=0;N<t.length;N++){var O=t[N];if(null==O){O=!1;L=+t[N].y]);A=PerfectFreehand.getStroke(A,I);t=[];for(N=0;N<A.length;N++)t.push({x:A[N][0],y:A[N][1]});t.push(null)}A=t[0].x;var J=t[0].x,K=t[0].y,m=t[0].y;for(N=1;N<t.length;N++)null!=t[N]&&(A=Math.max(A,t[N].x),J=Math.min(J,t[N].x),K=Math.max(K,t[N].y),m=Math.min(m,t[N].y));A-=J;K-=m;if(0<A&&0<K){var u=100/A,D=100/K;t.map(function(S){if(null==S)return S;S.x=(S.x-J)*u;S.y=(S.y-m)*D;return S});var M='<shape strokewidth="inherit"><foreground>',L=0;for(N=0;N<t.length;N++){var O=t[N];if(null==O){O=!1;L=t[L];var R=t[N-1];!H&&F&&(O=L.x-R.x,R=L.y-R.y,O=Math.sqrt(O*O+R*R)<=b.tolerance);if(H||O)M+='<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>';M+="</path>"+(g||H||O?"<fillstroke/>":"<stroke/>");L=N+1}else M=N==L?M+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):M+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}M+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+Graph.compress(M)+")");M=b.view.scale;L=b.view.translate;N=new mxCell("",new mxGeometry(J/M-L.x,m/M-L.y,A/M,K/M),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted","cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}z&&b.setSelectionCells([N])}}for(N=0;N<p.length;N++)p[N].parentNode.removeChild(p[N]);c=null;p=[];t=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(A,N){A=N.getProperty("eventName");N=N.getProperty("event");A==mxEvent.MOUSE_MOVE&&n&&(null!=N.sourceState&&N.sourceState.setCursor("crosshair"),N.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(A,N){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(A=N.getEvent(),n&&!mxEvent.isPopupTrigger(A)&&!mxEvent.isMiddleMouseButton(A)&&!mxEvent.isMultiTouchEvent(A))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var K=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");@@ -14355,24 +14360,24 @@ c.setAttribute("fill",G?K:"none");c.setAttribute("pointer-events","none");c.setAmouseMove:mxUtils.bind(this,function(A,N){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){A=N.getEvent();A=T(A);P(A);var J=v(0);if(J)if(t.push(J),G){var K=[];for(J=0;J<t.length;J++)K.push([t[J].x,t[J].y]);y=[];for(var m=2;m<l.length;m+=2)J=v(m),K.push([J.x,J.y]),y.push(J);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,I))}else{q+=" L"+J.x+" "+J.y;K="";y=[];for(m=2;m<l.length;m+=2)J=v(m),K+=" L"+J.x+" "+J.y,y.push(J);c.setAttribute("d",q+K)}d&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(A.x-J.x,A.y-J.y)).grow(20)));N.consume()}}),mouseUp:mxUtils.bind(this,function(A,N){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(Q(N.getEvent()),N.consume())})});var T=function(A){return mxUtils.convertPoint(b.container,mxEvent.getClientX(A),mxEvent.getClientY(A))},P=function(A){for(l.push(A);l.length>k;)l.shift()},v=function(A){var N=l.length;if(1===N%2||N>=k){var J=0,K=0,m,u=0;for(m=A;m<N;m++)u++,A=l[m],J+=A.x,K+=A.y;return{x:J/u,y:K/u}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,f,k){function c(L,O){try{if(!v){var R=f.file.getCurrentUser();if(P&&null!=R&&null!=R.displayName){var S={from:C,id:x,type:L,sessionId:f.clientId,userId:R.id,username:R.displayName,data:O,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};S={bytes:f.objectToString(S),data:"aes"};S=JSON.stringify(S);A&&"cursor"!=L&&EditorUi.debug("P2PCollab: sending to socket server",[S]);x++;R=!A&&("cursor"==L||"selectionChange"==L);T&&!R&&m("message",S);if(R)for(p2pId in U)U[p2pId].send(S)}}}catch(V){null!=-window.console&&console.error(V,L,O)}}function p(L){if(b.shareCursorPosition&&!D.isMouseDown){var O=mxUtils.getOffset(D.container),R=D.view.translate,S=D.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((L.getX()-O.x+D.container.scrollLeft)/S-R.x),y:Math.round((L.getY()-O.y+D.container.scrollTop)/S-R.y)})}}function q(L,O){var R=null!=b.currentPage?b.currentPage.getId():null;if(null!=L&&null!=L.cursor&&null!=L.lastCursor)if(null!=L.lastCursor.hide||!b.isShowRemoteCursors()||-null!=L.lastCursor.pageId&&L.lastCursor.pageId!=R)L.cursor.style.display="none";else{R=function(){var Z=Math.max(D.container.scrollLeft,Math.min(D.container.scrollLeft+D.container.clientWidth-L.cursor.clientWidth,X)),aa=Math.max(D.container.scrollTop-22,Math.min(D.container.scrollTop+D.container.clientHeight-L.cursor.clientHeight,W));Y.style.opacity=Z!=X||aa!=W?0:1;L.cursor.style.left=Z+"px";L.cursor.style.top=aa+"px";L.cursor.style.display=""};var S=D.view.translate,V=D.view.scale,X=(S.x+L.lastCursor.x)*+window.console&&console.error(V,L,O)}}function p(L){if(b.shareCursorPosition&&!E.isMouseDown){var O=mxUtils.getOffset(E.container),R=E.view.translate,S=E.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((L.getX()-O.x+E.container.scrollLeft)/S-R.x),y:Math.round((L.getY()-O.y+E.container.scrollTop)/S-R.y)})}}function q(L,O){var R=null!=b.currentPage?b.currentPage.getId():null;if(null!=L&&null!=L.cursor&&null!=L.lastCursor)if(null!=L.lastCursor.hide||!b.isShowRemoteCursors()||+null!=L.lastCursor.pageId&&L.lastCursor.pageId!=R)L.cursor.style.display="none";else{R=function(){var Z=Math.max(E.container.scrollLeft,Math.min(E.container.scrollLeft+E.container.clientWidth-L.cursor.clientWidth,X)),aa=Math.max(E.container.scrollTop-22,Math.min(E.container.scrollTop+E.container.clientHeight-L.cursor.clientHeight,W));Y.style.opacity=Z!=X||aa!=W?0:1;L.cursor.style.left=Z+"px";L.cursor.style.top=aa+"px";L.cursor.style.display=""};var S=E.view.translate,V=E.view.scale,X=(S.x+L.lastCursor.x)*V+8,W=(S.y+L.lastCursor.y)*V-12,Y=L.cursor.getElementsByTagName("img")[0];O?(mxUtils.setPrefixedStyle(L.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(Y.style,"transition","all 900ms ease-out"),window.setTimeout(R,0)):(mxUtils.setPrefixedStyle(L.cursor.style,"transition",null),mxUtils.setPrefixedStyle(Y.style,"transition",null),R())}}function t(L,O){try{var R=function(){if(null==n[V]){var ca=G[V];null==ca&&(ca=d%l.length,G[V]=ca,d++);var fa=l[ca];ca=11<ca?"black":"white";n[V]={cursor:document.createElement("div"),color:fa,selection:{}};B[O]=V;X=n[V].cursor;X.style.pointerEvents="none";X.style.position="absolute";X.style.display="none";X.style.opacity="0.9";var ma=document.createElement("img");mxUtils.setPrefixedStyle(ma.style,"transform","rotate(-45deg)translateX(-14px)");ma.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+fa+'" fill="'+fa+'"/>').src);ma.style.width="10px";X.appendChild(ma);ma=document.createElement("div");ma.style.backgroundColor=fa;ma.style.color=ca;ma.style.fontSize="9pt";ma.style.padding="3px 7px";ma.style.marginTop="8px";ma.style.borderRadius="10px";ma.style.maxWidth="100px";ma.style.overflow="hidden";ma.style.textOverflow="ellipsis";ma.style.whiteSpace="nowrap";mxUtils.write(ma,S);X.appendChild(ma);b.diagramContainer.appendChild(X)}else X=n[V].cursor;W=n[V].selection};if(!v){L=JSON.parse(L);null!=L.bytes&&(L=f.stringToObject(L.bytes));A&&"cursor"!=L.type&&EditorUi.debug("P2PCollab: msg received",[L]);if(null!=O){if(L.from==C||z[L.from]>=L.id){EditorUi.debug("P2PCollab: Dropped Message",L,C,z[L.from]);return}z[L.from]=L.id}var S=L.username?L.username:"Anonymous",V=L.sessionId,X,W;null!=n[V]&&(clearTimeout(n[V].inactiveTO),n[V].inactiveTO=setTimeout(function(){H(null,V)},12E4));var Y=L.data;switch(L.type){case "cursor":R();n[V].lastCursor=Y;q(n[V],!0);break;case "diff":try{L=null!=Y.patch?f.stringToObject(decodeURIComponent(Y.patch)):Y.diff,f.receiveRemoteChanges(L.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",-ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=Y.pageId&&Y.pageId==Z){R();for(R=0;R<Y.removed.length;R++){var aa=Y.removed[R];if(null!=aa){var ha=W[aa];delete W[aa];null!=ha&&ha.destroy()}}for(R=0;R<Y.added.length;R++)if(aa=Y.added[R],null!=aa){var ea=D.model.getCell(aa);null!=ea&&(W[aa]=D.highlightCell(ea,n[V].color,6E4,70,3))}}}break;case "notify":L=null!=Y.data?f.stringToObject(decodeURIComponent(Y.data)):+ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=Y.pageId&&Y.pageId==Z){R();for(R=0;R<Y.removed.length;R++){var aa=Y.removed[R];if(null!=aa){var ha=W[aa];delete W[aa];null!=ha&&ha.destroy()}}for(R=0;R<Y.added.length;R++)if(aa=Y.added[R],null!=aa){var ea=E.model.getCell(aa);null!=ea&&(W[aa]=E.highlightCell(ea,n[V].color,6E4,70,3))}}}break;case "notify":L=null!=Y.data?f.stringToObject(decodeURIComponent(Y.data)):Y.msg,f.handleMessageData(L.d)}f.file.fireEvent(new mxEventObject("realtimeMessage","message",L))}}catch(ca){null!=window.console&&console.warn(ca,L,O)}}function y(L,O){if(!A&&SimplePeer.WEBRTC_SUPPORT){var R=new SimplePeer({initiator:O,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});R.on("signal",function(S){m("sendSignal",{to:L,from:C,signal:S})});R.on("error",function(S){delete Q[L];EditorUi.debug("P2PCollab: p2p socket error",S);!v&&O&&R.destroyed&&I[L]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",L),y(L,!0))});R.on("connect",function(){delete Q[L];null==U[L]||U[L].destroyed?(U[L]=R,I[L]=!0,EditorUi.debug("P2PCollab: p2p socket connected",L)):(R.noP2PMapDel=!0,R.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",L))});R.on("close",function(){R.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",L),F(B[L]),delete U[L])});R.on("data",t);return Q[L]=R}}function H(L,O){F(O||B[L]);null!=L&&(delete B[L],I[L]=!1)}function F(L){var O=n[L];if(null!=O){var R=O.selection,S;for(S in R)null!=-R[S]&&R[S].destroy();null!=O.cursor&&null!=O.cursor.parentNode&&O.cursor.parentNode.removeChild(O.cursor);clearTimeout(O.inactiveTO);delete n[L]}}var D=b.editor.graph,d=0,g=null,l="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},x=1,z={},B={},I={},G={},C,Q={},U={},T=!0,P=!1,v=!1,A="0"!=urlParams["no-p2p"],N=!1,J=0,K=null,m=mxUtils.bind(this,function(L,O){if(!v)try{null!=+R[S]&&R[S].destroy();null!=O.cursor&&null!=O.cursor.parentNode&&O.cursor.parentNode.removeChild(O.cursor);clearTimeout(O.inactiveTO);delete n[L]}}var E=b.editor.graph,d=0,g=null,l="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},x=1,z={},B={},I={},G={},C,Q={},U={},T=!0,P=!1,v=!1,A="0"!=urlParams["no-p2p"],N=!1,J=0,K=null,m=mxUtils.bind(this,function(L,O){if(!v)try{null!=g?(g.send(JSON.stringify({action:L,msg:O})),A||EditorUi.debug("P2PCollab: sending to socket server",[L],[O])):this.joinFile(!0)}catch(R){K=R,f.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,R)}});this.sendMessage=c;this.sendDiff=function(L){this.sendMessage("diff",{diff:L})};this.sendNotification=function(L){this.sendMessage("notify",{msg:L})};this.getState=function(){return null!=g?g.readyState:3};this.getLastError=function(){return K};-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,O){},mouseMove:function(L,O){var R,S=-1;return function(){clearTimeout(R);var V=this,X=arguments,W=function(){R=null;S=Date.now();L.apply(V,X)};Date.now()-S>O?W():R=setTimeout(W,O)}}(function(L,O){p(O)},300),mouseUp:function(L,O){p(O)}};D.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);-var u=mxGraphHandler.prototype.maxCells,E=null,M={};this.selectionChangeListener=function(L,O){var R=function(S){return null!=S?S.id:null};null!=E&&window.clearTimeout(E);E=window.setTimeout(function(){for(var S=D.getSelectionCount()>u?[]:D.getSelectionCells().map(R),V=null!=b.currentPage?b.currentPage.getId():null,X={},W=[],Y=[],Z=0;Z<S.length;Z++){var aa=S[Z];null!=aa&&(X[aa]=!0,null==M[aa]&&Y.push(aa))}for(aa in M)X[aa]||W.push(aa);M=X;c("selectionChange",{pageId:V,removed:W,added:Y})},300)};D.getSelectionModel().addListener(mxEvent.CHANGE,-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var L in n)q(n[L])});mxEvent.addListener(D.container,"scroll",this.cursorHandler);D.getView().addListener(mxEvent.SCALE,this.cursorHandler);D.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);D.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(L){if(!v)try{N&&+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,O){},mouseMove:function(L,O){var R,S=-1;return function(){clearTimeout(R);var V=this,X=arguments,W=function(){R=null;S=Date.now();L.apply(V,X)};Date.now()-S>O?W():R=setTimeout(W,O)}}(function(L,O){p(O)},300),mouseUp:function(L,O){p(O)}};E.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);+var u=mxGraphHandler.prototype.maxCells,D=null,M={};this.selectionChangeListener=function(L,O){var R=function(S){return null!=S?S.id:null};null!=D&&window.clearTimeout(D);D=window.setTimeout(function(){for(var S=E.getSelectionCount()>u?[]:E.getSelectionCells().map(R),V=null!=b.currentPage?b.currentPage.getId():null,X={},W=[],Y=[],Z=0;Z<S.length;Z++){var aa=S[Z];null!=aa&&(X[aa]=!0,null==M[aa]&&Y.push(aa))}for(aa in M)X[aa]||W.push(aa);M=X;c("selectionChange",{pageId:V,removed:W,added:Y})},300)};E.getSelectionModel().addListener(mxEvent.CHANGE,+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var L in n)q(n[L])});mxEvent.addListener(E.container,"scroll",this.cursorHandler);E.getView().addListener(mxEvent.SCALE,this.cursorHandler);E.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);E.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(L){if(!v)try{N&&(EditorUi.debug("P2PCollab: joinInProgress on",N),K="busy");N=++J;try{null!=g&&1==g.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",g.joinId),g.close(1E3),g=null)}catch(S){EditorUi.debug("P2PCollab: closing socket error",S)}var O=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+k);null==g&&(g=O);O.addEventListener("open",function(S){g=O;g.joinId=N;N=!1;f.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",g.joinId);Editor.enableRealtimeCache||window.setTimeout(function(){f.sendJoinMessage()},0);L&&f.scheduleCleanup()});O.addEventListener("message",function(S){try{A||EditorUi.debug("P2PCollab: msg received",[S]);var V=JSON.parse(S.data);A&&"message"!=V.action&&EditorUi.debug("P2PCollab: msg received",[S]);switch(V.action){case "message":t(V.msg,V.from);break;case "clientsList":var X=V.msg;C=X.cId;P=!0;for(V=0;V<X.list.length;V++)y(X.list[V],!0);break;case "signal":var W=V.msg;if(!A){if(Q[W.from])var Y=Q[W.from];else Y=y(W.from,!1),T=!0;Y.signal(W.signal)}break;case "newClient":T=!0;break;case "clientLeft":H(V.msg);break;case "sendSignalFailed":var Z=V.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete Q[Z.to];I[Z.to]=!1}}catch(aa){null!=window.console&&console.warn(aa,S)}});var R=!1;O.addEventListener("close",mxUtils.bind(this,function(S){EditorUi.debug("P2PCollab: WebSocket closed",O.joinId,"reconnecting",S.code,S.reason);EditorUi.debug("P2PCollab: closing socket on",O.joinId);v||1E3==S.code||J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in close on",O.joinId),N=!1),R||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),window.setTimeout(mxUtils.bind(this,function(){R=!0;this.joinFile(!0)}),500)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));O.addEventListener("error",mxUtils.bind(this,function(S){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",S);EditorUi.debug("P2PCollab: error socket on",O.joinId);v||J!=O.joinId||(N==J&&(EditorUi.debug("P2PCollab: joinInProgress in error on",-O.joinId),N=!1),R||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),R=!0,this.joinFile(!0)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(S){K=S,f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!v){EditorUi.debug("P2PCollab: destroyed");v=!0;for(sessionId in n)F(sessionId);null!=this.mouseListeners&&D.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&-D.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(D.container,"scroll",this.cursorHandler),D.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=g&&1<=g.readyState&&(g.close(1E3),g=null);for(var L in U)null!=U[L]&&U[L].destroy();f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}+O.joinId),N=!1),R||(EditorUi.debug("P2PCollab: calling rejoin on",O.joinId),R=!0,this.joinFile(!0)));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(S){K=S,f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!v){EditorUi.debug("P2PCollab: destroyed");v=!0;for(sessionId in n)F(sessionId);null!=this.mouseListeners&&E.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&+E.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(E.container,"scroll",this.cursorHandler),E.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=g&&1<=g.readyState&&(g.close(1E3),g=null);for(var L in U)null!=U[L]&&U[L].destroy();f.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.jsindex b8678ee5b..aae422e47 100644--- a/src/main/webapp/js/diagramly/ElectronApp.js+++ b/src/main/webapp/js/diagramly/ElectronApp.js@@ -1064,6 +1064,11 @@ mxStencilRegistry.allowEval = false;EditorUi.prototype.normalizeFilename = function(title, defaultExtension){+ if (!title || typeof title !== 'string')+ {+ title = mxResources.get('untitledDiagram');+ }+var tokens = title.split('.');var ext = (tokens.length > 1) ? tokens[tokens.length - 1] : '';defaultExtension = (defaultExtension != null) ? defaultExtension : 'drawio';diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.jsindex 5e3804ed2..74d5d21e3 100644--- a/src/main/webapp/js/integrate.min.js+++ b/src/main/webapp/js/integrate.min.js@@ -62,7 +62,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"28.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -442,9 +442,9 @@ mxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r){k=null!=k&&"verticl+"; ");null!=m&&(d+="border-width: 1px; border-style: solid; border-color: inherit; border: 1px solid "+m+"; ");""==c||g?p+=d:q+=d;e&&(k&&0<b||!k&&0<a)?(p+="white-space: normal; word-wrap: "+mxConstants.WORD_WRAP+"; ",k?v="height: "+Math.round(b)+"px; ":u="width: "+Math.round(a)+"px; ",""!=c&&"fill"!=f&&(k?y=0:t=0)):(p+="white-space: nowrap; ",""==c&&"block"!=f&&(y=0));r(y,t,n+u+v,q+c,p,c)};mxSvgCanvas2D.prototype.getTextCss=function(){var a=this.state,b=mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;b="display: inline-block; font-size: "+mxUtils.htmlEntities(a.fontSize)+"px; font-family: "+mxUtils.parseCssFontFamily(a.fontFamily,!0)+"; color: "+this.getLightDarkColor(mxUtils.htmlEntities(a.fontColor)).cssText+"; line-height: "+mxUtils.htmlEntities(b)+"; pointer-events: "+(this.pointerEvents?mxUtils.htmlEntities(this.pointerEventsValue):"none")+"; ";(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="font-weight: bold; ");(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="font-style: italic; ");var c=[];(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push("underline");(a.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push("line-through");0<c.length&&(b+="text-decoration: "+c.join(" ")+"; ");return b};-mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):"SUP"==l.nodeName||"SUB"==l.nodeName||"B"==l.nodeName||"I"==l.nodeName||"SPAN"==l.nodeName||"FONT"==l.nodeName||"STRIKE"==l.nodeName||"U"==l.nodeName?(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),-k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration","line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration",-"underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d)):e=!1;l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};+mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):""!=l.style.backgroundColor||"SUP"!=l.nodeName&&"SUB"!=l.nodeName&&"B"!=l.nodeName&&"I"!=l.nodeName&&"SPAN"!=l.nodeName&&"FONT"!=l.nodeName&&"STRIKE"!=l.nodeName&&"U"!=l.nodeName?e=!1:(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),+""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration",+"line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration","underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d));l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e)if(p=null!=p?p:0,this.foEnabled&&"html"==l){var r=this.createDiv(e);if(null!=r){var t=this.createElement("text"),u=new mxPoint(0,0);this.allowConvertHtmlToSvg&&this.convertHtmlToSvg(r.firstChild.firstChild,t,u)?(0>u.y&&g==mxConstants.ALIGN_TOP?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_BOTTOM?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_TOP&&(t.style.transform="translateY("+u.y+"em)"),this.plainText(a+this.state.dx,b+this.state.dy,c,d,"",f,g,k,m,n,p,q,t)):(null!=q&&"vertical-"!=q.substring(0,9)&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))}}else this.plainText(a+this.state.dx,b+this.state.dy,c,d,e,f,g,k,m,n,p,q)};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;e=this.createElement("clipPath");e.setAttribute("id",g);g=this.createElement("rect");g.setAttribute("x",a);g.setAttribute("y",b);g.setAttribute("width",c);g.setAttribute("height",d);e.appendChild(g);return e};@@ -1998,8 +1998,8 @@ Editor.toUnit=function(a,b){return b==mxConstants.INCHES?Math.round(100*a/mxConsEditor.fromUnit=function(a,b){return b==mxConstants.INCHES?Math.round(a*mxConstants.PIXELS_PER_INCH):b==mxConstants.MILLIMETERS?Math.round(a*mxConstants.PIXELS_PER_MM):b==mxConstants.METERS?Math.round(a*mxConstants.PIXELS_PER_MM*1E3):Math.round(a)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};-Editor.prototype.editAsNew=function(a,b,f,e){b=null!=b?"?title="+encodeURIComponent(b):"";f?(b+=(0<b.length?"&":"?")+"lightbox=1",null!=e&&(b+="&page-id="+e)):null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,d=mxUtils.bind(this,function(h){"ready"==h.data&&h.source==g&&(mxEvent.removeListener(window,"message",d),g.postMessage(a,"*"))});mxEvent.addListener(window,-"message",d);g=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};+Editor.prototype.editAsNew=function(a,b,f,e){b=null!=b?"?title="+encodeURIComponent(b):"";f?b+=(0<b.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);null!=e&&(b+=(0<b.length?"&":"?")+"page-id="+e);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,d=mxUtils.bind(this,function(h){"ready"==h.data&&h.source==g&&(mxEvent.removeListener(window,"message",d),g.postMessage(a,"*"))});+mxEvent.addListener(window,"message",d);g=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,e=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!e.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};@@ -2180,23 +2180,23 @@ mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appe600)}),aa||200)}),J=mxUtils.bind(this,function(aa){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,aa||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=d(mxUtils.bind(this,function(aa){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=M.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=P.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));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(aa)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){M.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(aa){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(aa)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(y=0;y<this.lightboxToolbarActions.length;y++){var L=this.lightboxToolbarActions[y];L.elem=d(L.fn,L.icon,L.tooltip)}if(null!=g.refreshBtn){var W=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);d(mxUtils.bind(this,function(aa){null!=-W?window.location.href=W:window.location.reload();mxEvent.consume(aa)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(aa){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(aa)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&d(mxUtils.bind(this,function(aa){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(aa))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||-(mxEvent.isShiftDown(aa)||J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(aa){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(aa)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(aa){mxEvent.isShiftDown(aa)?G():J(100);mxEvent.consume(aa)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||J(30)}));var X=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(aa,P){},mouseUp:function(aa,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<X&&Math.abs(this.scrollTop-a.container.scrollTop)<-X&&Math.abs(this.startX-P.getGraphX())<X&&Math.abs(this.startY-P.getGraphY())<X&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var T=a.view.validate,N=new mxPoint,ca=!1,H=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=f.currentPage&&H!=f.currentPage){H=f.currentPage;ca=!0;var aa=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);-null==aa&&(aa=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));aa=a.getPageLayout(aa,N,1);var P=a.getDefaultTranslate(aa);this.x0=aa.x;this.y0=aa.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();aa=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=aa||this.translate.y!=P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,-arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=ma||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*-this.view.scale),this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ea=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&-(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ea.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ea.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";ea.style.transform=""},0)):(la.style.transform="",ea.style.transform=""),-a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=V&&(Ja=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(Ja+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor--1)),!mxUtils.hasScrollbars(a.container)||0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/-2));aa?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,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;if(a.isFastZoomEnabled()){null==ia&&""!=la.getAttribute("filter")&&(ia=la.getAttribute("filter"),la.removeAttribute("filter"));Y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);aa=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=P||null==V?a.container.scrollLeft+a.container.clientWidth/2:V.x+a.container.scrollLeft-a.container.offsetLeft;-var Ja=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+aa+")";ea.style.transformOrigin=ma+"px "+Ja+"px";ea.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/2+a.container.scrollLeft-ma.offsetLeft+-"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",+P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(aa)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){M.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(aa){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();+else if("_blank"==this.editor.editButtonLink){var P=null!=this.currentPage?this.currentPage.getId():null;this.editor.editAsNew(this.getEditBlankXml(),null,null,P)}else a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(aa)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(y=0;y<this.lightboxToolbarActions.length;y++){var L=this.lightboxToolbarActions[y];L.elem=d(L.fn,L.icon,L.tooltip)}if(null!=g.refreshBtn){var W=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);+d(mxUtils.bind(this,function(aa){null!=W?window.location.href=W:window.location.reload();mxEvent.consume(aa)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(aa){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(aa)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||+a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,function(aa){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(aa))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":+"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(mxEvent.isShiftDown(aa)||J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(aa){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(aa)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(aa){mxEvent.isShiftDown(aa)?+G():J(100);mxEvent.consume(aa)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||J(30)}));var X=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(aa,P){},mouseUp:function(aa,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-+a.container.scrollLeft)<X&&Math.abs(this.scrollTop-a.container.scrollTop)<X&&Math.abs(this.startX-P.getGraphX())<X&&Math.abs(this.startY-P.getGraphY())<X&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var T=a.view.validate,N=new mxPoint,ca=!1,H=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=f.currentPage&&H!=f.currentPage){H=f.currentPage;+ca=!0;var aa=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==aa&&(aa=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));aa=a.getPageLayout(aa,N,1);var P=a.getDefaultTranslate(aa);this.x0=aa.x;this.y0=aa.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();aa=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=aa||this.translate.y!=+P)this.invalidate(),this.translate.x=aa,this.translate.y=P}T.apply(this,arguments)};if(!a.isViewer()){var S=a.sizeDidChange;a.sizeDidChange=function(){var aa=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),ma=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=ma||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);+this.autoTranslate=!1;aa||(this.container.scrollLeft+=Math.round((ba.x-ma)*this.view.scale),this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}S.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ea=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var O=null,V=null,Y=null,ha=null,ia=null,ta=function(aa){null!=O&&window.clearTimeout(O);0<=aa&&window.setTimeout(function(){if(!a.isMouseDown||+ha)O=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ea.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ea.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";+ea.style.transform=""},0)):(la.style.transform="",ea.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=V&&(Ja=a.container.offsetWidth/2-V.x+ba.x,na=a.container.offsetHeight/2-V.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=Y&&(Ja+=P.x-Y.x,na+=P.y-Y.y),null!=b&&f.chromelessResize(!1,+null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ia&&la.setAttribute("filter",ia);a.cumulativeZoomFactor=1;ia=ha=V=Y=O=null}),null!=aa?aa:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(aa,P,ba,ma){ma=null!=ma?ma:this.zoomFactor;(P=P||!a.scrollbars)&&(V=new mxPoint(a.container.offsetLeft++a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));aa?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,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;if(a.isFastZoomEnabled()){null==ia&&""!=la.getAttribute("filter")&&(ia=la.getAttribute("filter"),la.removeAttribute("filter"));Y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);aa=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=P||null==V?a.container.scrollLeft+a.container.clientWidth/+2:V.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=P||null==V?a.container.scrollTop+a.container.clientHeight/2:V.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+aa+")";ea.style.transformOrigin=ma+"px "+Ja+"px";ea.style.transform="scale("+aa+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(P||null==V?a.container.clientWidth/+2+a.container.scrollLeft-ma.offsetLeft+"px":V.x+a.container.scrollLeft-ma.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==V?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":V.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+aa+")")):a.view.validateBackgroundStyles(aa,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=f.hoverIcons&&f.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",aa))}ta(a.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(a.container,function(aa){null!=O&&window.clearTimeout(O)},null,function(aa){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(aa){null==O||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(aa,P,ba,ma,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(aa))ba=a.view.getTranslate(),ma=40/a.view.scale,mxEvent.isShiftDown(aa)?a.view.setTranslate(ba.x+(P?-ma:ma),ba.y):a.view.setTranslate(ba.x,ba.y+(P?ma:-ma));else if(ba||a.isZoomWheelEvent(aa))for(var na=mxEvent.getSource(aa);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),V=null!=ma&&null!=Ja?new mxPoint(ma,Ja):new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ha=ba,ba=a.zoomFactor,ma=null,aa.ctrlKey&&null!=aa.deltaY&&40>Math.abs(aa.deltaY)&&Math.round(aa.deltaY)!=aa.deltaY?ba=1+Math.abs(aa.deltaY)/20*(ba-1):null!=aa.movementY&&"pointermove"==aa.type&&(ba=1+Math.max(1,Math.abs(aa.movementY))/20*(ba-1),ma=-1),a.lazyZoom(P,null,ma,ba),mxEvent.consume(aa),!1;na=na.parentNode}}),a.container);a.panningHandler.zoomGraph=function(aa){a.cumulativeZoomFactor=aa.scale;a.lazyZoom(0<aa.scale,!0);mxEvent.consume(aa)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};@@ -3777,16 +3777,19 @@ ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(f){var e=a.editor.graph;e.getModel().beginUpdate();try{e.setCellStyles(b,f),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[f],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}}};ColorDialog.recentColors=[];ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href",-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,h,m,p,k,v,w,y,C,D){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");-m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";G.style.display="flex";G.style.whiteSpace="nowrap";G.style.alignItems="center";G.style.justifyContent="end";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(G);null!=D&&-m.appendChild(D);var J=document.createElement("textarea");v?J.setAttribute("wrap","off"):J.style.wordBreak="break-all";J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");mxUtils.write(J,f||"");J.style.resize="none";J.style.outline="none";J.style.position="absolute";J.style.boxSizing="border-box";J.style.top="0px";J.style.left="0px";J.style.height="100%";J.style.width="100%";this.textarea=J;this.init=-function(){J.focus();J.scrollTop=0};E.appendChild(J);null==y||a.isOffline()||G.appendChild(a.createHelpIcon(y));if(null!=C)for(b=0;b<C.length;b++)(function(Q,L,W){Q=mxUtils.button(Q,function(X){L(X,J)});null!=W&&Q.setAttribute("title",W);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,J);if(null!=-e){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();e(J.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";G.appendChild(M);mxEvent.addListener(J,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&M.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck",-"false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";var e=a.getDiagramSnapshot();f.value=mxUtils.getPrettyXml(e.node);b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),f.addEventListener("drop",function(m){m.stopPropagation();-m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;p.onload=function(k){f.value=k.target.result};p.readAsText(m)}else f.value=a.extractGraphModelFromEvent(m)},!1));var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var h=document.createElement("option");-h.setAttribute("value","apply");mxUtils.write(h,mxResources.get("apply",null,"Update Existing Drawing"));d.appendChild(h)}a.editor.graph.isEnabled()&&(h=document.createElement("option"),h.setAttribute("value","insert"),mxUtils.write(h,mxResources.get("insert")),d.appendChild(h));h=document.createElement("option");h.setAttribute("value","new");mxUtils.write(h,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&!navigator.standalone&&d.appendChild(h);b.appendChild(d);h=mxUtils.button(mxResources.get("ok"),-function(){var m=Graph.zapGremlins(mxUtils.trim(f.value)),p=null;if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement,v=Editor.extractParserError(k,mxResources.get("unknownError"));v?(EditorUi.debug("EditDiagramDialogParserError",[this],"node",[k],"cause",[v]),p=mxResources.get("invalidInput")+" ("+v+")"):("mxfile"==k.nodeName?a.editor.setGraphXml(k):a.updateDiagramData(e,k),a.hideDialog())}catch(D){p=D}else if("insert"==d.value){a.editor.graph.model.beginUpdate();-try{var w=mxUtils.parseXml(m),y=new mxGraphModel;(new mxCodec(w)).decode(w.documentElement,y);var C=y.getChildren(y.getChildAt(y.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(C));a.hideDialog()}catch(D){p=D}finally{a.editor.graph.model.endUpdate()}}null!=p&&a.handleError(p)});h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},SimpleTextareaDialog=function(a,b,f){var e=document.createElement("div"),g=document.createElement("textarea");g.style.position="absolute";g.style.left="30px";g.style.right="30px";g.style.top="30px";g.style.bottom="100px";g.style.resize=+"none";g.setAttribute("wrap","off");g.setAttribute("spellcheck","false");g.setAttribute("autocorrect","off");g.setAttribute("autocomplete","off");g.setAttribute("autocapitalize","off");g.value=null!=b?b:"";e.appendChild(g);b=document.createElement("div");b.style.position="absolute";b.style.bottom="46px";b.style.right="30px";b.style.left="30px";b.style.justifyContent="end";b.style.display="flex";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.setAttribute("title","Escape");+d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);var h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f(g.value)});h.setAttribute("title","Ctrl+Enter");h.className="geBtn gePrimaryBtn";b.appendChild(h);mxEvent.addListener(g,"keydown",function(m){13==m.keyCode&&mxEvent.isControlDown(m)&&h.click()});a.editor.cancelFirst||b.appendChild(d);this.init=function(){g.focus();g.scrollTop=0};e.appendChild(b);this.container=e},TextareaDialog=function(a,b,f,e,g,d,h,m,p,k,v,w,y,C,D){k=+null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";G.style.display="flex";G.style.whiteSpace="nowrap";G.style.alignItems="center";G.style.justifyContent="end";G.style.bottom="0px";+G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(G);null!=D&&m.appendChild(D);var J=document.createElement("textarea");v?J.setAttribute("wrap","off"):J.style.wordBreak="break-all";J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");mxUtils.write(J,f||"");J.style.resize="none";J.style.outline=+"none";J.style.position="absolute";J.style.boxSizing="border-box";J.style.top="0px";J.style.left="0px";J.style.height="100%";J.style.width="100%";this.textarea=J;this.init=function(){J.focus();J.scrollTop=0};E.appendChild(J);null==y||a.isOffline()||G.appendChild(a.createHelpIcon(y));if(null!=C)for(b=0;b<C.length;b++)(function(Q,L,W){Q=mxUtils.button(Q,function(X){L(X,J)});null!=W&&Q.setAttribute("title",W);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),+function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,J);if(null!=e){var M=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();e(J.value)});M.setAttribute("title","Ctrl+Enter");M.className="geBtn gePrimaryBtn";G.appendChild(M);mxEvent.addListener(J,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&M.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=h},EditDiagramDialog=+function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";var e=a.getDiagramSnapshot();f.value=mxUtils.getPrettyXml(e.node);b.appendChild(f);this.init=+function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),f.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;p.onload=function(k){f.value=k.target.result};p.readAsText(m)}else f.value=a.extractGraphModelFromEvent(m)},!1));var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&+b.appendChild(g);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var h=document.createElement("option");h.setAttribute("value","apply");mxUtils.write(h,mxResources.get("apply",null,"Update Existing Drawing"));d.appendChild(h)}a.editor.graph.isEnabled()&&(h=document.createElement("option"),h.setAttribute("value","insert"),mxUtils.write(h,mxResources.get("insert")),d.appendChild(h));h=document.createElement("option");+h.setAttribute("value","new");mxUtils.write(h,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&!navigator.standalone&&d.appendChild(h);b.appendChild(d);h=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(f.value)),p=null;if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement,v=Editor.extractParserError(k,mxResources.get("unknownError"));v?(EditorUi.debug("EditDiagramDialogParserError",+[this],"node",[k],"cause",[v]),p=mxResources.get("invalidInput")+" ("+v+")"):("mxfile"==k.nodeName?a.editor.setGraphXml(k):a.updateDiagramData(e,k),a.hideDialog())}catch(D){p=D}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var w=mxUtils.parseXml(m),y=new mxGraphModel;(new mxCodec(w)).decode(w.documentElement,y);var C=y.getChildren(y.getChildAt(y.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(C));a.hideDialog()}catch(D){p=D}finally{a.editor.graph.model.endUpdate()}}null!=+p&&a.handleError(p)});h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;var ExportDialog=function(a){function b(){var T=v.value,N=T.lastIndexOf(".");v.value=0<N?T.substring(0,N+1)+w.value:T+"."+w.value;"xml"===w.value?(y.setAttribute("disabled","true"),C.setAttribute("disabled","true"),D.setAttribute("disabled","true"),L.setAttribute("disabled","true")):(y.removeAttribute("disabled"),C.removeAttribute("disabled"),D.removeAttribute("disabled"),L.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*D.value>MAX_AREA||0>=C.value?"red":"";D.style.backgroundColor=C.value*D.value>MAX_AREA||0>=D.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,h=Math.ceil(g.width/d),m=Math.ceil(g.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var v=document.createElement("input");v.setAttribute("value",a.editor.getOrCreateFilename());v.style.width="180px";k=document.createElement("td");k.appendChild(v);g.appendChild(k);@@ -12023,11 +12026,11 @@ StorageFile.listFiles=function(b,l,n,d){b.getDatabaseItems(function(x){var z=[];StorageLibrary.prototype.isRenamable=function(b,l,n){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,l,n){DrawioFile.call(this,b,l);this.title=n;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,l,n){RemoteFile.call(this,b,l,n.title);this.libObj=n};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,l,n){};RemoteLibrary.prototype.saveAs=function(b,l,n){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,l,n){StorageFile.call(this,b,l,n);b=n;l=b.lastIndexOf("/");0<=l&&(b=b.substring(l+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,l,n){return!1};UrlLibrary.prototype.saveAs=function(b,l,n){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,l,n){DrawioFile.call(this,b,l);this.desc=n||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*mxClient.IS_IOS || */-var StorageDialog=function(b,l,n){function d(c,f,k,m,t,v){function A(){mxEvent.addListener(E,"click",null!=v?v:function(){k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()}),function(U){b.spinner.stop();b.handleError(U)}):+var StorageDialog=function(b,l,n){function d(c,f,k,m,t,v){function A(){mxEvent.addListener(E,"click",null!=v?v:function(){k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);l()}),function(T){b.spinner.stop();b.handleError(T)}):(b.setMode(k,!0),l())})}F++;++y>n&&(mxUtils.br(M),y=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height="100px";E.style.whiteSpace="nowrap";E.setAttribute("title",f);var D=document.createElement("div");D.style.textOverflow="ellipsis";D.style.overflow="hidden";D.style.position="absolute";D.style.bottom="8px";D.style.left="0px";D.style.right="0px";mxUtils.write(D,f);E.appendChild(D);if(null!=c){var B=document.createElement("img");B.setAttribute("src",c);B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width="60px";B.style.height="60px";B.style.paddingBottom="6px";E.appendChild(B)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top=-"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(D),mxUtils.write(D,t[c]);if(null!=m&&null==b[m]){B.style.visibility="hidden";mxUtils.setOpacity(D,10);var Q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});Q.spin(E);var T=window.setTimeout(function(){null==b[m]&&(Q.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",-mxUtils.bind(this,function(U,P){null!=b[m]&&P.getProperty("client")==b[m]&&(window.clearTimeout(T),mxUtils.setOpacity(D,100),B.style.visibility="",Q.stop(),A(),"drive"==m&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else A();M.appendChild(E)}n=null!=n?n:2;var x=document.createElement("div");x.style.textAlign="center";x.style.whiteSpace="nowrap";x.style.paddingTop="0px";x.style.paddingBottom="20px";var z=document.createElement("div");z.style.border="1px solid #d3d3d3";z.style.borderWidth="1px 0px 1px 0px";+"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(D),mxUtils.write(D,t[c]);if(null!=m&&null==b[m]){B.style.visibility="hidden";mxUtils.setOpacity(D,10);var Q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});Q.spin(E);var U=window.setTimeout(function(){null==b[m]&&(Q.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",+mxUtils.bind(this,function(T,P){null!=b[m]&&P.getProperty("client")==b[m]&&(window.clearTimeout(U),mxUtils.setOpacity(D,100),B.style.visibility="",Q.stop(),A(),"drive"==m&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else A();M.appendChild(E)}n=null!=n?n:2;var x=document.createElement("div");x.style.textAlign="center";x.style.whiteSpace="nowrap";x.style.paddingTop="0px";x.style.paddingBottom="20px";var z=document.createElement("div");z.style.border="1px solid #d3d3d3";z.style.borderWidth="1px 0px 1px 0px";z.style.padding="10px 0px 20px 0px";var y=0,F=0,M=document.createElement("div");M.style.paddingTop="2px";z.appendChild(M);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");x.appendChild(L);x.appendChild(z);y=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");z=document.createElement("span");z.style.position="absolute";z.style.cursor="pointer";z.style.bottom="27px";z.style.color="gray";z.style.userSelect="none";z.style.textAlign="center";z.style.left="50%";mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,0)");mxUtils.write(z,mxResources.get("decideLater"));@@ -12062,58 +12065,59 @@ function(){b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&d.appendb.editor.graph.setSelectionCells(t));b.hideDialog()});d.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(x);this.graph=z};this.container=d};CreateGraphDialog.prototype.connectImage=new mxImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==",26,26);-var BackgroundImageDialog=function(b,l,n,d,x){function z(){null==u||u==mxConstants.NONE?(q.style.display="none",U.checked=!1):(q.style.backgroundColor=u,q.style.display="",U.checked=!0)}var y=b.editor.graph,F=document.createElement("div");F.style.whiteSpace="nowrap";var M=document.createElement("h2");mxUtils.write(M,mxResources.get("background"));M.style.marginTop="0px";F.appendChild(M);var K=null!=n&&null!=n.originalSrc;M=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value",+var BackgroundImageDialog=function(b,l,n,d,x){function z(){null==u||u==mxConstants.NONE?(q.style.display="none",T.checked=!1):(q.style.backgroundColor=u,q.style.display="",T.checked=!0)}var y=b.editor.graph,F=document.createElement("div");F.style.whiteSpace="nowrap";var M=document.createElement("h2");mxUtils.write(M,mxResources.get("background"));M.style.marginTop="0px";F.appendChild(M);var K=null!=n&&null!=n.originalSrc;M=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginBottom="8px";f.style.width="360px";f.value=K||null==n?"":n.src;var k=document.createElement("select");k.style.width="360px";if(null!=b.pages)for(var m=0;m<b.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+b.pages[m].getId());b.pages[m]==b.currentPage&&t.setAttribute("disabled","disabled");null!=n&&n.originalSrc==t.getAttribute("value")&&(t.setAttribute("selected","selected"),M=!0);k.appendChild(t)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",c.style.display="none",k.style.display=-"none");var v=document.createElement("option"),A=!1,E=!1,D=function(G,H){A||null!=G&&E||(c.checked?null!=H&&H(v.selected?null:k.value):""==f.value||b.isOffline()?(Q.value="",T.value="",null!=H&&H("")):(f.value=mxUtils.trim(f.value),b.loadImage(f.value,function(g){Q.value=g.width;T.value=g.height;null!=H&&H(f.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));Q.value="";T.value="";null!=H&&H(null)})))},B=mxUtils.bind(this,function(G){b.importFiles(G,+"none");var v=document.createElement("option"),A=!1,E=!1,D=function(G,H){A||null!=G&&E||(c.checked?null!=H&&H(v.selected?null:k.value):""==f.value||b.isOffline()?(Q.value="",U.value="",null!=H&&H("")):(f.value=mxUtils.trim(f.value),b.loadImage(f.value,function(g){Q.value=g.width;U.value=g.height;null!=H&&H(f.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));Q.value="";U.value="";null!=H&&H(null)})))},B=mxUtils.bind(this,function(G){b.importFiles(G,0,0,b.maxBackgroundSize,function(H,g,p,C,I,N){f.value=H;D();f.focus()},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var g=0;g<H.length;g++)H[g]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?k.focus():f.focus();mxEvent.addListener(k,"focus",function(){L.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");L.setAttribute("checked","checked");L.checked=!0});if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var G=F.parentNode,H=null;mxEvent.addListener(G,"dragleave",function(g){null!=H&&(H.parentNode.removeChild(H),H=null);g.stopPropagation();g.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(g){null==H&&(H=b.highlightElement(G));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(g){null!=H&&(H.parentNode.removeChild(H),H=null);if(0<g.dataTransfer.files.length)B(g.dataTransfer.files);else if(0<=mxUtils.indexOf(g.dataTransfer.types,"text/uri-list")){var p=g.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)&&(f.value=decodeURIComponent(p),D())}g.stopPropagation();g.preventDefault()}),!1)}};F.appendChild(L);F.appendChild(f);mxUtils.br(F);m=document.createElement("span");m.style.marginLeft="30px";mxUtils.write(m,mxResources.get("width")+":");F.appendChild(m);var Q=document.createElement("input");-Q.setAttribute("type","text");Q.style.width="60px";Q.style.marginLeft="8px";Q.style.marginRight="16px";Q.value=null==n||K?"":n.width;F.appendChild(Q);mxUtils.write(F,mxResources.get("height")+":");var T=document.createElement("input");T.setAttribute("type","text");T.style.width="60px";T.style.marginLeft="8px";T.style.marginRight="16px";T.value=null==n||K?"":n.height;F.appendChild(T);mxUtils.br(F);mxUtils.br(F);mxEvent.addListener(f,"change",D);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&+Q.setAttribute("type","text");Q.style.width="60px";Q.style.marginLeft="8px";Q.style.marginRight="16px";Q.value=null==n||K?"":n.width;F.appendChild(Q);mxUtils.write(F,mxResources.get("height")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.width="60px";U.style.marginLeft="8px";U.style.marginRight="16px";U.value=null==n||K?"":n.height;F.appendChild(U);mxUtils.br(F);mxUtils.br(F);mxEvent.addListener(f,"change",D);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],null!=G&&(f.value=G.url,D()));f.focus()};F.appendChild(c);F.appendChild(k);mxUtils.br(F);mxUtils.br(F);K?(c.setAttribute("checked","checked"),c.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!M&&c.checked&&(mxUtils.write(v,mxResources.get("pageNotFound")),v.setAttribute("disabled","disabled"),v.setAttribute("selected","selected"),v.setAttribute("value","pageNotFound"),k.appendChild(v),mxEvent.addListener(k,-"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)}));n=document.createElement("div");n.style.display=x?"inline-flex":"none";n.style.alignItems="center";n.style.cursor="default";n.style.minWidth="40%";n.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=d!=mxConstants.NONE&&null!=d;U.checked=U.defaultChecked;n.appendChild(U);mxUtils.write(n,mxResources.get("fillColor"));+"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)}));n=document.createElement("div");n.style.display=x?"inline-flex":"none";n.style.alignItems="center";n.style.cursor="default";n.style.minWidth="40%";n.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=d!=mxConstants.NONE&&null!=d;T.checked=T.defaultChecked;n.appendChild(T);mxUtils.write(n,mxResources.get("fillColor"));x=n.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=y.shadowVisible;P.checked=P.defaultChecked;x.appendChild(P);mxUtils.write(x,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(x,"click",function(G){mxEvent.getSource(G)!=P&&(P.checked=!P.checked)});var q=document.createElement("button");q.style.width="36px";q.style.height=-"18px";q.style.cursor="pointer";q.style.marginLeft="10px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.verticalAlign="bottom";q.className="geColorBtn";var u=d;z();mxEvent.addListener(n,"click",function(G){mxEvent.getSource(G)!=U&&(U.checked=!U.checked);u=U.checked?"#ffffff":null;z()});mxEvent.addListener(q,"click",function(G){b.pickColor(u||"none",function(H){u=H;z()});mxEvent.consume(G)});n.appendChild(q);F.appendChild(n);F.appendChild(x);mxUtils.br(F);-d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){A=!0;b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&d.appendChild(y);x=mxUtils.button(mxResources.get("reset"),function(){f.value="";Q.value="";T.value="";L.checked=!0;u=mxConstants.NONE;z();A=!1});mxEvent.addGestureListeners(x,function(){A=!0});x.className="geBtn";x.width="100";d.appendChild(x);if(Graph.fileSupport){var J=document.createElement("input");-J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(G){null!=J.files&&(B(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";F.appendChild(J);x=mxUtils.button(mxResources.get("open"),function(){J.click()});x.className="geBtn";d.appendChild(x)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(G){l(""!=G&&null!=G?new mxImage(G,Q.value,T.value):null,null==G,u,!mxClient.IS_SVG||mxClient.IS_SF?+"18px";q.style.cursor="pointer";q.style.marginLeft="10px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.verticalAlign="bottom";q.className="geColorBtn";var u=d;z();mxEvent.addListener(n,"click",function(G){mxEvent.getSource(G)!=T&&(T.checked=!T.checked);u=T.checked?"#ffffff":null;z()});mxEvent.addListener(q,"click",function(G){b.pickColor(u||"none",function(H){u=H;z()});mxEvent.consume(G)});n.appendChild(q);F.appendChild(n);F.appendChild(x);mxUtils.br(F);+d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){A=!0;b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&d.appendChild(y);x=mxUtils.button(mxResources.get("reset"),function(){f.value="";Q.value="";U.value="";L.checked=!0;u=mxConstants.NONE;z();A=!1});mxEvent.addGestureListeners(x,function(){A=!0});x.className="geBtn";x.width="100";d.appendChild(x);if(Graph.fileSupport){var J=document.createElement("input");+J.setAttribute("multiple","multiple");J.setAttribute("type","file");mxEvent.addListener(J,"change",function(G){null!=J.files&&(B(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";F.appendChild(J);x=mxUtils.button(mxResources.get("open"),function(){J.click()});x.className="geBtn";d.appendChild(x)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(G){l(""!=G&&null!=G?new mxImage(G,Q.value,U.value):null,null==G,u,!mxClient.IS_SVG||mxClient.IS_SF?null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){E=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(y);F.appendChild(d);this.container=F},ParseDialog=function(b,l,n){function d(k,m,t){var v=k.split("\n");if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(p,C,I,N,O){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,N,O));var S=null;E.getModel().beginUpdate();try{S="txt"==C?b.insertAsPreText(I,z.x,z.y):E.insertVertex(null,null,null,z.x,z.y,N,O,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(I)+";"),E.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:p,format:C},null,2))}finally{E.getModel().endUpdate()}null!=S&&(E.setSelectionCell(S),E.scrollCellToVisible(S))},E=b.editor.graph,D="plantUmlTxt"==m?"txt":"plantUmlPng"==m?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==k&&"svg"==D?window.setTimeout(function(){b.spinner.stop();A(k,D,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",295,212)},200):b.generatePlantUmlImage(k,D,function(p,C,I){b.spinner.stop();A(k,D,p,C,I)},function(p){b.handleError(p)})}}else if("mermaid"==m||"mermaid2drawio"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var B=0;B<v.length&&(0==v[B].trim().length||"%%"==v[B].substring(0,2));)B++;if("---"==v[B].trim()){do B++;while(B<v.length&&"---"!=v[B].trim());B++}B=v[B].trim().toLowerCase();v=B.indexOf(" ");B=B.substring(0,0<v?v:B.length);var Q="undefined"!==typeof mxMermaidToDrawio&&"mermaid2drawio"==m&&("graph"==B||"flowchart"==B||"sequencediagram"==B||"classdiagram"==B||"statediagram-v2"==B||"statediagram"==B||"erdiagram"==B||"requirementdiagram"==B||"gitgraph"==B||"mindmap"==B||"journey"==B);E=b.editor.graph;Q&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){b.spinner.stop();E.setSelectionCells(b.importXml(p,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));E.scrollCellToVisible(E.getSelectionCell())}));b.generateMermaidImage(k,null,function(p,C,I){if(!Q){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(new mxRectangle(0,0,C,I));b.spinner.stop();var N=null;E.getModel().beginUpdate();try{N=E.insertVertex(null,null,null,z.x,z.y,C,I,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+p+";"),E.setAttributeForCell(N,"mermaidData",JSON.stringify({data:k},null,2))}finally{E.getModel().endUpdate()}null!=N&&(E.setSelectionCell(N),E.scrollCellToVisible(N))}},function(p){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(p)})}}else if("table"==-m){m=null;var T=[],U=0,P={};for(B=0;B<v.length;B++){var q=mxUtils.trim(v[B]);if("primary key"==q.substring(0,11).toLowerCase()){var u=q.match(/\((.+)\)/);u&&u[1]&&(P[u[1]]=!0);v.splice(B,1)}else 0<q.toLowerCase().indexOf("primary key")&&(P[q.split(" ")[0]]=!0,v[B]=mxUtils.trim(q.replace(/primary key/i,"")))}for(B=0;B<v.length;B++)if(q=mxUtils.trim(v[B]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length--1))),m=new mxCell(q,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,T.push(m),q=b.editor.graph.getPreferredSizeForCell(J),null!=q&&(m.geometry.width=q.width+10);else if(null!=m&&")"==q.charAt(0))U+=m.geometry.width+40,m=null;else if("("!=q&&null!=m){q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length);u=P[q.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,+m){m=null;var U=[],T=0,P={};for(B=0;B<v.length;B++){var q=mxUtils.trim(v[B]);if("primary key"==q.substring(0,11).toLowerCase()){var u=q.match(/\((.+)\)/);u&&u[1]&&(P[u[1]]=!0);v.splice(B,1)}else 0<q.toLowerCase().indexOf("primary key")&&(P[q.split(" ")[0]]=!0,v[B]=mxUtils.trim(q.replace(/primary key/i,"")))}for(B=0;B<v.length;B++)if(q=mxUtils.trim(v[B]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length-+1))),m=new mxCell(q,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,U.push(m),q=b.editor.graph.getPreferredSizeForCell(J),null!=q&&(m.geometry.width=q.width+10);else if(null!=m&&")"==q.charAt(0))T+=m.geometry.width+40,m=null;else if("("!=q&&null!=m){q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length);u=P[q.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(u?"1":"0")+";");J.vertex=!0;var G=new mxCell(u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(u?"fontStyle=1;":""));G.vertex=!0;J.insert(G);q=new mxCell(q,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(u?"fontStyle=5;":""));q.vertex=!0;J.insert(q);q=b.editor.graph.getPreferredSizeForCell(q);null!=q&&m.geometry.width<q.width+30&&(m.geometry.width=Math.min(320,Math.max(m.geometry.width,q.width+30)));m.insert(J,u?0:null);m.geometry.height+=30}0<T.length&&(E=b.editor.graph,z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(T,-!0)),E.setSelectionCells(E.importCells(T,z.x,z.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==m){if(0<v.length){E=b.editor.graph;m=null;T=[];for(B=J=0;B<v.length;B++)";"!=v[B].charAt(0)&&(0==v[B].length?m=null:null==m?(m=new mxCell(v[B],new mxGeometry(J,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),m.vertex=!0,T.push(m),q=E.getPreferredSizeForCell(m),-null!=q&&m.geometry.width<q.width+10&&(m.geometry.width=q.width+10),J+=m.geometry.width+40):"--"==v[B]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,m.geometry.height+=q.geometry.height,m.insert(q)):0<v[B].length&&(U=new mxCell(v[B],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),-U.vertex=!0,q=E.getPreferredSizeForCell(U),null!=q&&U.geometry.width<q.width&&(U.geometry.width=q.width),m.geometry.width=Math.max(m.geometry.width,U.geometry.width),m.geometry.height+=U.geometry.height,m.insert(U)));if(0<T.length){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(T,!0));E.getModel().beginUpdate();try{T=E.importCells(T,z.x,z.y);q=[];for(B=0;B<T.length;B++)q.push(T[B]),q=q.concat(T[B].children);E.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{E.getModel().endUpdate()}E.setSelectionCells(T);-E.scrollCellToVisible(E.getSelectionCell())}}}else{J=function(p){var C=H[p];null==C&&(C=new mxCell(p,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),C.vertex=!0,H[p]=C,T.push(C));return C};var H={};T=[];for(B=0;B<v.length;B++)if(";"!=v[B].charAt(0)){var g=v[B].split("->");2<=g.length&&(u=J(g[0]),G=J(g[g.length-1]),g=new mxCell(2<g.length?g[1]:"",new mxGeometry),g.edge=!0,g.geometry.relative=!0,u.insertEdge(g,!0),G.insertEdge(g,!1),T.push(g))}if(0<T.length){v=document.createElement("div");v.style.visibility=-"hidden";document.body.appendChild(v);E=new Graph(v);E.getModel().beginUpdate();try{T=E.importCells(T);for(B=0;B<T.length;B++)E.getModel().isVertex(T[B])&&(q=E.getPreferredSizeForCell(T[B]),T[B].geometry.width=Math.max(T[B].geometry.width,q.width),T[B].geometry.height=Math.max(T[B].geometry.height,q.height));B=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(E,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),T),B=!1):"circle"==-m?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(U=new mxFastOrganicLayout(E),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(E.getDefaultParent()));B&&(P=new mxParallelEdgeLayout(E),P.spacing=30,P.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{T=E.getModel().getChildren(E.getDefaultParent()),z=mxEvent.isAltDown(t)?z:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(T,!0)),q=b.editor.graph.importCells(T,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(u?"fontStyle=5;":""));q.vertex=!0;J.insert(q);q=b.editor.graph.getPreferredSizeForCell(q);null!=q&&m.geometry.width<q.width+30&&(m.geometry.width=Math.min(320,Math.max(m.geometry.width,q.width+30)));m.insert(J,u?0:null);m.geometry.height+=30}0<U.length&&(E=b.editor.graph,z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(U,+!0)),E.setSelectionCells(E.importCells(U,z.x,z.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==m){if(0<v.length){E=b.editor.graph;m=null;U=[];for(B=J=0;B<v.length;B++)";"!=v[B].charAt(0)&&(0==v[B].length?m=null:null==m?(m=new mxCell(v[B],new mxGeometry(J,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),m.vertex=!0,U.push(m),q=E.getPreferredSizeForCell(m),+null!=q&&m.geometry.width<q.width+10&&(m.geometry.width=q.width+10),J+=m.geometry.width+40):"--"==v[B]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,m.geometry.height+=q.geometry.height,m.insert(q)):0<v[B].length&&(T=new mxCell(v[B],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),+T.vertex=!0,q=E.getPreferredSizeForCell(T),null!=q&&T.geometry.width<q.width&&(T.geometry.width=q.width),m.geometry.width=Math.max(m.geometry.width,T.geometry.width),m.geometry.height+=T.geometry.height,m.insert(T)));if(0<U.length){z=mxEvent.isAltDown(t)?z:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(U,!0));E.getModel().beginUpdate();try{U=E.importCells(U,z.x,z.y);q=[];for(B=0;B<U.length;B++)q.push(U[B]),q=q.concat(U[B].children);E.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{E.getModel().endUpdate()}E.setSelectionCells(U);+E.scrollCellToVisible(E.getSelectionCell())}}}else{J=function(p){var C=H[p];null==C&&(C=new mxCell(p,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),C.vertex=!0,H[p]=C,U.push(C));return C};var H={};U=[];for(B=0;B<v.length;B++)if(";"!=v[B].charAt(0)){var g=v[B].split("->");2<=g.length&&(u=J(g[0]),G=J(g[g.length-1]),g=new mxCell(2<g.length?g[1]:"",new mxGeometry),g.edge=!0,g.geometry.relative=!0,u.insertEdge(g,!0),G.insertEdge(g,!1),U.push(g))}if(0<U.length){v=document.createElement("div");v.style.visibility=+"hidden";document.body.appendChild(v);E=new Graph(v);E.getModel().beginUpdate();try{U=E.importCells(U);for(B=0;B<U.length;B++)E.getModel().isVertex(U[B])&&(q=E.getPreferredSizeForCell(U[B]),U[B].geometry.width=Math.max(U[B].geometry.width,q.width),U[B].geometry.height=Math.max(U[B].geometry.height,q.height));B=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(E,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),U),B=!1):"circle"==+m?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(T=new mxFastOrganicLayout(E),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(E.getDefaultParent()));B&&(P=new mxParallelEdgeLayout(E),P.spacing=30,P.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{U=E.getModel().getChildren(E.getDefaultParent()),z=mxEvent.isAltDown(t)?z:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(U,!0)),q=b.editor.graph.importCells(U,z.x,z.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();v.parentNode.removeChild(v)}}}function x(){return"list"==F.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==F.value||"mermaid2drawio"==F.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==F.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==F.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":-"plantUmlSvg"==F.value||"plantUmlTxt"==F.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var z=b.editor.graph.getFreeInsertPoint();l=document.createElement("div");l.style.textAlign="right";var y=document.createElement("textarea");y.style.boxSizing="border-box";y.style.resize=-"none";y.style.width="100%";y.style.height="354px";y.style.marginBottom="16px";var F=document.createElement("select");F.className="geBtn";if("formatSql"==n||"mermaid"==n&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())F.style.display="none";var M=document.createElement("option");M.setAttribute("value","list");mxUtils.write(M,mxResources.get("list"));"plantUml"!=n&&"mermaid"!=n&&F.appendChild(M);null!=n&&"fromText"!=n||M.setAttribute("selected","selected");M=document.createElement("option");-M.setAttribute("value","table");mxUtils.write(M,mxResources.get("formatSql"));"formatSql"==n&&(F.appendChild(M),M.setAttribute("selected","selected"));M=document.createElement("option");M.setAttribute("value","mermaid");mxUtils.write(M,mxResources.get("image"));if("mermaid"==n)if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));F.appendChild(K)}else F.style.display=-"none";F.appendChild(M);M=document.createElement("option");M.setAttribute("value","diagram");mxUtils.write(M,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));-"plantUml"!=n&&"mermaid"!=n&&(F.appendChild(M),F.appendChild(K),F.appendChild(L),F.appendChild(c));M=document.createElement("option");M.setAttribute("value","plantUmlSvg");mxUtils.write(M,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==n&&M.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value",-"plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==n&&(F.appendChild(M),F.appendChild(K),F.appendChild(L));var f=x();y.value=f;l.appendChild(y);this.init=function(){y.focus()};Graph.fileSupport&&(y.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),y.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=-k.dataTransfer.files[0];var m=new FileReader;m.onload=function(t){y.value=t.target.result};m.readAsText(k)}},!1));"plantUml"==n&&"https://plant-aws.diagrams.net"==window.PLANT_URL&&(M=document.createElement("div"),M.style.display="inline-block",M.style.color="#c00",M.style.fontSize="12px",M.style.marginRight="16px",M.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',-l.appendChild(M));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=n&&"plantUml"!=n||l.appendChild(b.createHelpIcon("mermaid"==n?"https://mermaid.js.org/intro/":"https://plantuml.com/"));l.appendChild(F);mxEvent.addListener(F,"change",function(){var k=x();if(0==y.value.length||y.value==f)f=k,y.value=f});n=mxUtils.button(mxResources.get("close"),function(){y.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);-M=mxUtils.button(mxResources.get("insert"),function(k){try{b.hideDialog(),d(y.value,F.value,k)}catch(m){b.handleError(m)}});M.className="geBtn gePrimaryBtn";l.appendChild(M);b.editor.cancelFirst||l.appendChild(n);this.container=l},NewDialog=function(b,l,n,d,x,z,y,F,M,K,L,c,f,k,m,t,v,A,E,D){function B(ia){null!=ia&&(za=Ca=ia?135:140);ia=!0;if(null!=Xa)for(;I<Xa.length&&(ia||0!=mxUtils.mod(I,30));){var ua=Xa[I++];ua=G(ua.url,ua.libs,ua.title,ua.tooltip?ua.tooltip:ua.title,ua.select,ua.imgUrl,ua.info,-ua.onClick,ua.preview,ua.noImg,ua.clibs,ua.type);ia&&ua.click();ia=!1}}function Q(ia,ua,sa,oa,qa,ya){if(null!=ia&&mxUtils.isAncestorNode(document.body,oa)){ia=mxUtils.parseXml(ia);ia=Editor.parseDiagramNode(ia.documentElement,null,!0);var Fa=new mxCodec(ia.ownerDocument),Ja=new mxGraphModel;Fa.decode(ia,Ja);b.sidebar.createTooltip(oa,Ja.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||-document.body.clientHeight)-120,800),null!=qa?mxResources.get(qa):null,!0,new mxPoint(ua,sa),!0,function(){Y=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&P(oa,null,null,ya,infoObj,clibs)},!0,!1)}}function T(){var ia=document.createElement("div");ia.style.position="absolute";ia.style.overflow="visible";ia.style.left="8px";ia.style.right="8px";ia.style.bottom="8px";ia.style.top="8px";mxUtils.write(ia,mxResources.get("describeYourDiagram")+":");mxUtils.br(ia);var ua=document.createElement("input");-ua.setAttribute("type","text");ua.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));ua.style.width="100%";ua.style.marginTop="6px";ua.style.marginBottom="4px";ua.style.boxSizing="border-box";ia.appendChild(ua);ia.init=function(){ua.focus()};mxUtils.br(ia);var sa=document.createElement("div");sa.style.top="86px";sa.style.left="2px";sa.style.right="2px";sa.style.bottom="2px";sa.style.position="absolute";sa.style.border="1px solid #424242";var oa=document.createElement("div");-oa.style.boxSizing="border-box";oa.style.position="relative";oa.style.textAlign="center";oa.style.top="50%";mxUtils.write(oa,mxResources.get("blankDiagram"));sa.appendChild(oa);var qa=document.createElement("select");qa.className="geBtn";qa.style.maxWidth="160px";qa.style.marginLeft="0px";oa=document.createElement("option");mxUtils.write(oa,mxResources.get("diagramType"));oa.setAttribute("value","");qa.appendChild(oa);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){oa=document.createElement("option");-var Fa=EditorUi.mermaidDiagramTypes[ya],Ja=Fa;Fa==urlParams["smart-template-type"]&&oa.setAttribute("selected","selected");"erDiagram"==Ja&&(Ja="entityRelationshipDiagram");Ja=mxResources.get(Ja,null,Ja.charAt(0).toUpperCase()+Ja.substring(1).replace(/[A-Z]/g," $&"));oa.setAttribute("value",Fa);mxUtils.write(oa,Ja);qa.appendChild(oa)}var Ma=mxUtils.button(mxResources.get("generate"),function(){var Ua=ua.value,Ra=qa.value.replace(/([A-Z])/g," $1").toLowerCase(),ab="Write the declaration code for a detailed and complex "+-(""!=Ra?Ra:"graph")+' that shows "'+(""!=Ua?Ua:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ra=""!=qa.value?" ("+mxUtils.trim(mxUtils.getTextContent(qa.options[qa.selectedIndex]))+")":"";var Oa="gantt"==qa.value||"pie"==qa.value||"timeline"==qa.value||"quadrantchart"==qa.value||"c4context"==qa.value,Va=ua.value+Ra;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Ea){Oa||(ra=Z=Ea,wa="Smart Template: "+-Va)}));b.spinner.spin(sa,mxResources.get("generate")+" '"+Ua+"'")&&b.generateOpenAiMermaidDiagram(ab,function(Ea,bb,Za,ib){b.spinner.stop();sa.innerHTML="";var cb=document.createElement("img");cb.setAttribute("title",mxResources.get("preview"));cb.src="data:image/svg+xml;base64,"+bb.substring(bb.indexOf(",")+1);cb.style.cursor="pointer";cb.style.width="100%";cb.style.height="100%";sa.appendChild(cb);Ea=b.createMermaidXml(Ea,EditorUi.defaultMermaidConfig,bb,Za,ib,Va);var kb="<mxfile><diagram>"+Graph.compress(Ea)+-"</diagram></mxfile>";if(Oa||"undefined"===typeof mxMermaidToDrawio)ra=Z=Ea;Ea=S.cloneNode(!0);sa.appendChild(Ea);bb=function(Pa){Y=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Za=function(Pa){Y||Q(kb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),cb,Va)};mxEvent.addGestureListeners(cb,bb,null,Za);mxEvent.addGestureListeners(Ea,bb,null,Za)},function(Ea){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Ea)})});Ma.setAttribute("disabled",-"disabled");Ma.className="geBtn gePrimaryBtn";oa=function(){window.setTimeout(function(){""!=ua.value?Ma.removeAttribute("disabled"):Ma.setAttribute("disabled","disabled")},0)};ya=null!=E?E:urlParams["smart-template"];null!=ya&&"1"!=ya&&(ua.value=decodeURIComponent(ya),oa(),""==ya||null==E&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Ma.click()},0));mxEvent.addListener(ua,"change",oa);mxEvent.addListener(ua,"keydown",oa);mxEvent.addListener(ua,"cut",oa);mxEvent.addListener(ua,-"paste",oa);mxEvent.addListener(ua,"keydown",function(Ua){13==Ua.keyCode&&Ma.click()});oa=document.createElement("div");oa.style.height="40px";oa.style.marginTop="4px";oa.style.marginBottom="4px";oa.style.whiteSpace="nowrap";oa.style.overflowX="auto";oa.style.overflowY="hidden";oa.appendChild(qa);oa.appendChild(Ma);ia.appendChild(oa);ia.appendChild(sa);return ia}function U(){if(ka&&null!=k)n||b.hideDialog(),k(ka,va,C.value);else if(d)n||b.hideDialog(),d(Z,C.value,da,fa);else{var ia=C.value;if(null!=-ia&&0<ia.length){var ua=function(oa,qa,ya){b.createFile(ya,Z,null!=fa&&0<fa.length?fa:null,oa,function(){b.hideDialog()},null,qa,null,null!=na&&0<na.length?na:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var sa=new SaveDialog(b,ia,mxUtils.bind(this,function(oa,qa,ya){ua(qa,ya,oa.value)}),null,null,null,null,b.mode);b.showDialog(sa.container,420,150,!0,!1);sa.init()}else b.pickFolder(b.mode,function(oa){ua(b.mode,oa,ia)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}+"plantUmlSvg"==F.value||"plantUmlTxt"==F.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var z=b.editor.graph.getFreeInsertPoint();l=document.createElement("div");var y=document.createElement("textarea");y.style.position="absolute";y.style.left="30px";y.style.right="30px";y.style.top=+"30px";y.style.bottom="100px";y.style.resize="none";y.setAttribute("wrap","off");y.setAttribute("spellcheck","false");y.setAttribute("autocorrect","off");y.setAttribute("autocomplete","off");y.setAttribute("autocapitalize","off");var F=document.createElement("select");F.className="geBtn";if("formatSql"==n||"mermaid"==n&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())F.style.display="none";var M=document.createElement("option");M.setAttribute("value","list");mxUtils.write(M,mxResources.get("list"));+"plantUml"!=n&&"mermaid"!=n&&F.appendChild(M);null!=n&&"fromText"!=n||M.setAttribute("selected","selected");M=document.createElement("option");M.setAttribute("value","table");mxUtils.write(M,mxResources.get("formatSql"));"formatSql"==n&&(F.appendChild(M),M.setAttribute("selected","selected"));M=document.createElement("option");M.setAttribute("value","mermaid");mxUtils.write(M,mxResources.get("image"));if("mermaid"==n){if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");+K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));F.appendChild(K)}else F.style.display="none";F.appendChild(M)}M=document.createElement("option");M.setAttribute("value","diagram");mxUtils.write(M,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,+mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));"plantUml"!=n&&"mermaid"!=n&&(F.appendChild(M),F.appendChild(K),F.appendChild(L),F.appendChild(c));M=document.createElement("option");M.setAttribute("value","plantUmlSvg");mxUtils.write(M,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==n&&M.setAttribute("selected","selected");K=document.createElement("option");+K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value","plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==n&&(F.appendChild(M),F.appendChild(K),F.appendChild(L));var f=x();y.value=f;l.appendChild(y);M=document.createElement("div");M.style.position="absolute";M.style.bottom=+"46px";M.style.right="30px";M.style.left="30px";M.style.justifyContent="end";M.style.display="flex";this.init=function(){y.focus()};Graph.fileSupport&&(y.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),y.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var m=new FileReader;m.onload=function(t){y.value=t.target.result};m.readAsText(k)}},!1));"plantUml"==n&&"https://plant-aws.diagrams.net"==+window.PLANT_URL&&(K=document.createElement("div"),K.style.display="inline-block",K.style.color="#c00",K.style.fontSize="12px",K.style.marginRight="10px",K.style.display="flex",K.style.alignItems="center",K.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',M.appendChild(K));b.isOffline()&&!mxClient.IS_CHROMEAPP||"mermaid"!=n&&"plantUml"!=n||M.appendChild(b.createHelpIcon("mermaid"==+n?"https://mermaid.js.org/intro/":"https://plantuml.com/"));M.appendChild(F);mxEvent.addListener(F,"change",function(){var k=x();if(0==y.value.length||y.value==f)f=k,y.value=f});n=mxUtils.button(mxResources.get("close"),function(){y.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});n.className="geBtn";b.editor.cancelFirst&&M.appendChild(n);K=mxUtils.button(mxResources.get("insert"),function(k){try{b.hideDialog(),d(y.value,F.value,k)}catch(m){b.handleError(m)}});+K.className="geBtn gePrimaryBtn";M.appendChild(K);b.editor.cancelFirst||M.appendChild(n);l.appendChild(M);this.container=l},NewDialog=function(b,l,n,d,x,z,y,F,M,K,L,c,f,k,m,t,v,A,E,D){function B(ia){null!=ia&&(za=Ca=ia?135:140);ia=!0;if(null!=Xa)for(;I<Xa.length&&(ia||0!=mxUtils.mod(I,30));){var ua=Xa[I++];ua=G(ua.url,ua.libs,ua.title,ua.tooltip?ua.tooltip:ua.title,ua.select,ua.imgUrl,ua.info,ua.onClick,ua.preview,ua.noImg,ua.clibs,ua.type);ia&&ua.click();ia=!1}}function Q(ia,ua,sa,oa,qa,ya){if(null!=+ia&&mxUtils.isAncestorNode(document.body,oa)){ia=mxUtils.parseXml(ia);ia=Editor.parseDiagramNode(ia.documentElement,null,!0);var Fa=new mxCodec(ia.ownerDocument),Ja=new mxGraphModel;Fa.decode(ia,Ja);b.sidebar.createTooltip(oa,Ja.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=qa?mxResources.get(qa):null,!0,new mxPoint(ua,+sa),!0,function(){Y=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&P(oa,null,null,ya,infoObj,clibs)},!0,!1)}}function U(){var ia=document.createElement("div");ia.style.position="absolute";ia.style.overflow="visible";ia.style.left="8px";ia.style.right="8px";ia.style.bottom="8px";ia.style.top="8px";mxUtils.write(ia,mxResources.get("describeYourDiagram")+":");mxUtils.br(ia);var ua=document.createElement("input");ua.setAttribute("type","text");ua.setAttribute("placeholder",+mxResources.get("processForHiringNewEmployee"));ua.style.width="100%";ua.style.marginTop="6px";ua.style.marginBottom="4px";ua.style.boxSizing="border-box";ia.appendChild(ua);ia.init=function(){ua.focus()};mxUtils.br(ia);var sa=document.createElement("div");sa.style.top="86px";sa.style.left="2px";sa.style.right="2px";sa.style.bottom="2px";sa.style.position="absolute";sa.style.border="1px solid #424242";var oa=document.createElement("div");oa.style.boxSizing="border-box";oa.style.position="relative";+oa.style.textAlign="center";oa.style.top="50%";mxUtils.write(oa,mxResources.get("blankDiagram"));sa.appendChild(oa);var qa=document.createElement("select");qa.className="geBtn";qa.style.maxWidth="160px";qa.style.marginLeft="0px";oa=document.createElement("option");mxUtils.write(oa,mxResources.get("diagramType"));oa.setAttribute("value","");qa.appendChild(oa);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){oa=document.createElement("option");var Fa=EditorUi.mermaidDiagramTypes[ya],Ja=Fa;+Fa==urlParams["smart-template-type"]&&oa.setAttribute("selected","selected");"erDiagram"==Ja&&(Ja="entityRelationshipDiagram");Ja=mxResources.get(Ja,null,Ja.charAt(0).toUpperCase()+Ja.substring(1).replace(/[A-Z]/g," $&"));oa.setAttribute("value",Fa);mxUtils.write(oa,Ja);qa.appendChild(oa)}var Ma=mxUtils.button(mxResources.get("generate"),function(){var Ua=ua.value,Ra=qa.value.replace(/([A-Z])/g," $1").toLowerCase(),ab="Write the declaration code for a detailed and complex "+(""!=Ra?Ra:"graph")+' that shows "'++(""!=Ua?Ua:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ra=""!=qa.value?" ("+mxUtils.trim(mxUtils.getTextContent(qa.options[qa.selectedIndex]))+")":"";var Oa="gantt"==qa.value||"pie"==qa.value||"timeline"==qa.value||"quadrantchart"==qa.value||"c4context"==qa.value,Va=ua.value+Ra;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Ea){Oa||(ra=Z=Ea,wa="Smart Template: "+Va)}));b.spinner.spin(sa,+mxResources.get("generate")+" '"+Ua+"'")&&b.generateOpenAiMermaidDiagram(ab,function(Ea,bb,Za,ib){b.spinner.stop();sa.innerHTML="";var cb=document.createElement("img");cb.setAttribute("title",mxResources.get("preview"));cb.src="data:image/svg+xml;base64,"+bb.substring(bb.indexOf(",")+1);cb.style.cursor="pointer";cb.style.width="100%";cb.style.height="100%";sa.appendChild(cb);Ea=b.createMermaidXml(Ea,EditorUi.defaultMermaidConfig,bb,Za,ib,Va);var kb="<mxfile><diagram>"+Graph.compress(Ea)+"</diagram></mxfile>";+if(Oa||"undefined"===typeof mxMermaidToDrawio)ra=Z=Ea;Ea=S.cloneNode(!0);sa.appendChild(Ea);bb=function(Pa){Y=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Za=function(Pa){Y||Q(kb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),cb,Va)};mxEvent.addGestureListeners(cb,bb,null,Za);mxEvent.addGestureListeners(Ea,bb,null,Za)},function(Ea){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Ea)})});Ma.setAttribute("disabled","disabled");+Ma.className="geBtn gePrimaryBtn";oa=function(){window.setTimeout(function(){""!=ua.value?Ma.removeAttribute("disabled"):Ma.setAttribute("disabled","disabled")},0)};ya=null!=E?E:urlParams["smart-template"];null!=ya&&"1"!=ya&&(ua.value=decodeURIComponent(ya),oa(),""==ya||null==E&&"1"!=urlParams["smart-template-generate"]||window.setTimeout(function(){Ma.click()},0));mxEvent.addListener(ua,"change",oa);mxEvent.addListener(ua,"keydown",oa);mxEvent.addListener(ua,"cut",oa);mxEvent.addListener(ua,"paste",+oa);mxEvent.addListener(ua,"keydown",function(Ua){13==Ua.keyCode&&Ma.click()});oa=document.createElement("div");oa.style.height="40px";oa.style.marginTop="4px";oa.style.marginBottom="4px";oa.style.whiteSpace="nowrap";oa.style.overflowX="auto";oa.style.overflowY="hidden";oa.appendChild(qa);oa.appendChild(Ma);ia.appendChild(oa);ia.appendChild(sa);return ia}function T(){if(ka&&null!=k)n||b.hideDialog(),k(ka,va,C.value);else if(d)n||b.hideDialog(),d(Z,C.value,da,fa);else{var ia=C.value;if(null!=ia&&0<+ia.length){var ua=function(oa,qa,ya){b.createFile(ya,Z,null!=fa&&0<fa.length?fa:null,oa,function(){b.hideDialog()},null,qa,null,null!=na&&0<na.length?na:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var sa=new SaveDialog(b,ia,mxUtils.bind(this,function(oa,qa,ya){ua(qa,ya,oa.value)}),null,null,null,null,b.mode);b.showDialog(sa.container,420,150,!0,!1);sa.init()}else b.pickFolder(b.mode,function(oa){ua(b.mode,oa,ia)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function P(ia,ua,sa,oa,qa,ya,Fa){return ha!=ia?(null!=ha&&(ha.classList.remove("geTemplateSelected"),ha==Ga&&(Da.style.display="none",Ka.style.display="",La.style.visibility="hidden",Ia.style.visibility=null!=ra?"visible":"hidden")),ia==Ga&&(ua=ra,null!=ua?(Ia.style.visibility="visible",Ia.style.visibility=null!=ra?"visible":"hidden",La.style.visibility="visible"):(Da.style.display="",La.style.visibility="hidden",Ia.style.visibility="hidden")),O.removeAttribute("disabled"),Z=ua,fa=sa,na=ya,ha=ia,ka=oa,da=Fa,va=qa,ha.classList.add("geTemplateSelected"),!0):!1}function q(){Da.style.display="";Ka.style.display="none";La.style.visibility="hidden";Ia.style.visibility="hidden";Na.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Na.select():document.execCommand("selectAll",!1,null)}function u(){Ka.style.backgroundImage=Aa;Ka.style.backgroundSize="contain";Da.style.display="none";Ka.style.display="";La.style.visibility="visible";Ia.style.visibility="visible"}function J(ia){var ua=mxUtils.trim(Na.value);ia||""==ua?null!=wa&&(Na.value=wa,u()):(Ka.style.backgroundImage="url("+Editor.spinImage+")",Ka.style.backgroundSize="12px 12px",Ka.style.display="",Da.style.display="none",b.generateDiagram(ua,mxUtils.bind(this,function(sa,oa){ha==Ga&&"none"==Da.style.display&&(Aa="url(data:image/svg+xml;base64,"+oa.substring(oa.indexOf(",")+1)+")",Ga.setAttribute("title",ua),Ia.style.display="",ra=Z=sa,wa=ua,u())}),mxUtils.bind(this,function(sa){ha==Ga&&(Da.style.display="",Ka.style.display=@@ -12121,9 +12125,9 @@ mxUtils.trim(Na.value);ia||""==ua?null!=wa&&(Na.value=wa,u()):(Ka.style.backgrouelse if(b.sidebar.hideTooltip(),null!=V){var hb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+V.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+V.naturalWidth+'" height="'+V.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";Q(hb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),sa,ia)}else b.sidebar.currentElt=Ea,R=!0,Oa(ia,function(lb){if(R&&b.sidebar.currentElt==Ea)try{Q(lb,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),Ea,gb)}catch(mb){b.sidebar.currentElt=null,b.handleError(mb)}R=!1})}var Ea=null;if("generative"!=ab||null==Ga){Ea=document.createElement("div");Ea.className="geTemplate";var bb=null,Za=ia;null!=sa?Ea.setAttribute("title",mxResources.get(sa,null,sa)):null!=oa&&0<oa.length&&Ea.setAttribute("title",oa)}else Ea=Ga;var ib=document.createElement("span");ib.className="geAdaptiveAsset";mxUtils.write(ib,mxResources.get(sa,null,sa));if(null!=ya){Ea.style.display="inline-flex";Ea.style.justifyContent="center";Ea.style.alignItems="center";Ma=document.createElement("img");Ma.setAttribute("src",ya);Ma.setAttribute("alt",oa);Ma.style.maxWidth=za+"px";Ma.style.maxHeight=Ca+"px";V=Ma;var cb=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ea.appendChild(Ma);Ma.onerror=function(){this.src!=cb?this.src=cb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Pa){P(Ea,-null,null,ia,Fa,Ra)}),null,null);mxEvent.addListener(Ea,"dblclick",function(Pa){U();mxEvent.consume(Pa)})}else if(!Ua&&null!=ia&&0<ia.length){var kb=function(Pa){N.spin(pa)&&Oa(ia,function(gb,hb){N.stop();null!=gb&&(P(Ea,gb,ua,null,null,Ra,hb),Pa&&U())})};ya=Ma||TEMPLATE_PATH+"/"+ia.substring(0,ia.length-4)+".png";Ma=Ka.cloneNode(!1);Ma.style.backgroundImage="url("+ya+")";Ma.style.display="";Ea.appendChild(Ma);null!=sa&&Ea.appendChild(ib);mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Pa){kb()}),+null,null,ia,Fa,Ra)}),null,null);mxEvent.addListener(Ea,"dblclick",function(Pa){T();mxEvent.consume(Pa)})}else if(!Ua&&null!=ia&&0<ia.length){var kb=function(Pa){N.spin(pa)&&Oa(ia,function(gb,hb){N.stop();null!=gb&&(P(Ea,gb,ua,null,null,Ra,hb),Pa&&T())})};ya=Ma||TEMPLATE_PATH+"/"+ia.substring(0,ia.length-4)+".png";Ma=Ka.cloneNode(!1);Ma.style.backgroundImage="url("+ya+")";Ma.style.display="";Ea.appendChild(Ma);null!=sa&&Ea.appendChild(ib);mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Pa){kb()}),null,null);mxEvent.addListener(Ea,"dblclick",function(Pa){kb(!0);mxEvent.consume(Pa)})}else Ea.appendChild(ib),"generative"==ab&&null==Ga&&(Ea.appendChild(Ka),Ea.appendChild(Da),Ea.appendChild(Ia),Ea.appendChild(La),Ga=Ea),qa&&P(Ea),null!=Ja?(mxEvent.addGestureListeners(Ea,null,null,mxUtils.bind(this,function(Pa){P(Ea,null,null,ia,Fa)})),mxEvent.addListener(Ea,"click",Ja)):(mxEvent.addListener(Ea,"click",function(Pa){P(Ea,null,null,ia,Fa)&&"generative"==ab&&null==ra&&q()}),mxEvent.addListener(Ea,-"dblclick",function(Pa){"generative"!=ab?U():"none"==Da.style.display&&q();mxEvent.consume(Pa)}));null!=ia&&(ya=S.cloneNode(!0),Ea.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Pa){Y=b.sidebar.currentElt==Ea}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Pa){Y||Va(Pa,null!=sa?sa:oa);mxEvent.consume(Pa)})));pa.appendChild(Ea);return Ea}function H(){function ia(Oa,Va){Oa=mxResources.get(Oa,null,Oa.substring(0,1).toUpperCase()+Oa.substring(1));18<Oa.length&&+"dblclick",function(Pa){"generative"!=ab?T():"none"==Da.style.display&&q();mxEvent.consume(Pa)}));null!=ia&&(ya=S.cloneNode(!0),Ea.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Pa){Y=b.sidebar.currentElt==Ea}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Pa){Y||Va(Pa,null!=sa?sa:oa);mxEvent.consume(Pa)})));pa.appendChild(Ea);return Ea}function H(){function ia(Oa,Va){Oa=mxResources.get(Oa,null,Oa.substring(0,1).toUpperCase()+Oa.substring(1));18<Oa.length&&(Oa=Oa.substring(0,18)+"…");return Oa+(null!=Va?" ("+Va.length+")":"")}function ua(Oa,Va,Ea){mxEvent.addListener(Va,"click",function(){Ya!=Va&&(null!=Ya&&(Ya.style.backgroundColor=""),Ya=Va,Ya.style.backgroundColor=y,pa.scrollTop=0,pa.innerText="",I=0,null!=Ha[Oa].content?(pa.appendChild(Ha[Oa].content),Z=ra,Xa=null,null!=Ha[Oa].content.init&&Ha[Oa].content.init()):(Xa=Ea?Sa[Oa][Ea]:Ha[Oa],X=null,B(!1)))});"smartTemplate"!=Oa||null==E&&null==urlParams["smart-template"]||Va.click()}fb&&(fb=!1,mxEvent.addListener(pa,"scroll",function(Oa){pa.scrollTop+pa.clientHeight>=pa.scrollHeight&&(B(),mxEvent.consume(Oa))}));if(0<db){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));ta.appendChild(sa);for(var oa in $a){var qa=document.createElement("div");sa=oa;var ya=$a[oa];18<sa.length&&(sa=sa.substring(0,18)+"…");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";qa.setAttribute("title",sa+" ("+ya.length+")");mxUtils.write(qa,qa.getAttribute("title"));null!=K&&(qa.style.padding=K);ta.appendChild(qa);(function(Oa,Va){mxEvent.addListener(qa,"click",function(){Ya!=Va&&(Ya.style.backgroundColor="",Ya=Va,Ya.style.backgroundColor=y,pa.scrollTop=0,pa.innerText="",I=0,Xa=$a[Oa],X=null,B(!1))})})(oa,qa)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");ta.appendChild(sa)}for(oa in Ha){sa=@@ -12134,7 +12138,7 @@ F=500>(window.innerWidth||document.documentElement.clientWidth||document.body.cl"40px";p.style.height="40px";p.style.marginRight="10px";p.style.paddingBottom="4px";p.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";l||F||!n||M.appendChild(p);n&&mxUtils.write(M,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");p=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?p=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?p=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?p=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?p=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?p=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(p=b.trello.extension);var C=document.createElement("input");C.setAttribute("value",b.defaultFilename+p);C.style.marginLeft="10px";C.style.width=l||F?"144px":"244px";this.init=function(){n&&Editor.selectFilename(C);null!=pa.parentNode&&null!=pa.parentNode.parentNode&&mxEvent.addGestureListeners(pa.parentNode.parentNode,mxUtils.bind(this,function(ia){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};n&&(M.appendChild(C),A?C.style.width=-l||F?"350px":"450px":null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),A.style.marginLeft="6px",A.style.width=l||F?"80px":"180px",M.appendChild(A)));A=!1;var I=0,N=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),O=mxUtils.button(t||mxResources.get("create"),function(){O.setAttribute("disabled","disabled");U();O.removeAttribute("disabled")});+l||F?"350px":"450px":null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),A.style.marginLeft="6px",A.style.width=l||F?"80px":"180px",M.appendChild(A)));A=!1;var I=0,N=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),O=mxUtils.button(t||mxResources.get("create"),function(){O.setAttribute("disabled","disabled");T();O.removeAttribute("disabled")});O.className="geBtn gePrimaryBtn";var S=document.createElement("img");S.setAttribute("src",Editor.magnifyImage);S.setAttribute("title",mxResources.get("preview"));S.className="geButton geRoundButton";var R=!1,V=null,Y=!1;if(c||f){var W=[],X=null,aa=null,ba=null,la=function(ia){O.setAttribute("disabled","disabled");for(var ua=0;ua<W.length;ua++)W[ua].className=ua==ia?"geBtn gePrimaryBtn":"geBtn"};A=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height="30px";g.appendChild(t);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ta.style.display="";ja.style.display="";pa.style.left="160px";la(0);pa.scrollTop=0;pa.innerText="";I=0;X!=Xa&&(Xa=X,Ha=aa,db=ba,ta.innerText="",H(),X=null)});W.push(F);t.appendChild(F);var ea=function(ia){ta.style.display="none";ja.style.display="none";pa.style.left="30px";la(ia?-1:1);null==X&&(X=Xa);pa.scrollTop=0;pa.innerText="";N.spin(pa);var ua=function(sa,oa,qa){I=0;N.stop();Xa=sa;qa=qa||{};var ya=0,Fa;for(Fa in qa)ya+=qa[Fa].length;if(oa)pa.innerText=oa;else if(0==sa.length&&0==ya)pa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(pa.innerText="",0<ya){ta.style.display="";pa.style.left="160px";ta.innerText="";db=0;Ha={"draw.io":sa};for(Fa in qa)Ha[Fa]=qa[Fa];H()}else B(!0)};ia?f(ca.value,ua):c(ua)};c&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ea()}),t.appendChild(F),W.push(F));if(f){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+@@ -12149,37 +12153,37 @@ B(!1)}mxEvent.consume(ia)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,f"geGenerateDiagramDescription";var Ba=document.createElement("button");Ba.className="geBtn gePrimaryBtn geGenerateDiagramButton";Ba.setAttribute("disabled","disabled");Ba.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ba,mxResources.get("ok"));var Ia=S.cloneNode(!0);Ia.style.display="none";var Qa=!1;mxEvent.addGestureListeners(Ia,function(ia){Qa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ia){if(!Qa&&null!=ra){var ua="<mxfile><diagram>"+Graph.compress(ra)+"</diagram></mxfile>";Q(ua,mxEvent.getClientX(ia),mxEvent.getClientY(ia),Ga,wa)}});var La=S.cloneNode(!0);La.setAttribute("src",Editor.editImage);La.setAttribute("title",mxResources.get("edit"));La.style.visibility="hidden";La.style.left="0px";t=S.cloneNode(!0);t.setAttribute("src",Editor.helpImage);t.setAttribute("title",mxResources.get("help"));mxEvent.addListener(t,"click",function(ia){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ia)});Da.appendChild(Na);Da.appendChild(Ba);Da.appendChild(t);Da.style.display="none";mxEvent.addListener(La,"click",q);mxEvent.addListener(Na,"input",function(){""!=Na.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){J()});mxEvent.addListener(Na,"keydown",function(ia){13!=ia.keyCode||mxEvent.isShiftDown(ia)?27==ia.keyCode&&(J(!0),mxEvent.consume(ia)):(J(),mxEvent.consume(ia))});var Ha={},Sa={},$a={},db=0,fb=!0,Ya=null,eb=null;Ha.basic=D?[]:[{title:"blankDiagram"}];-var Xa=Ha.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ha.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ha.smartTemplate={content:T()});if(!l){var jb=function(){mxUtils.get(Wa,function(ia){if(!Ta){Ta=!0;ia=ia.getXml().documentElement.firstChild;for(var ua=+var Xa=Ha.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ha.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ha.smartTemplate={content:U()});if(!l){var jb=function(){mxUtils.get(Wa,function(ia){if(!Ta){Ta=!0;ia=ia.getXml().documentElement.firstChild;for(var ua={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("parsererror"==ia.nodeName)null!=window.console&&console.log("Parser error in "+L+": "+ia.textContent);else if("clibs"==ia.nodeName){for(var sa=ia.getAttribute("name"),oa=ia.getElementsByTagName("add"),qa=[],ya=0;ya<oa.length;ya++)qa.push(encodeURIComponent(mxUtils.getTextContent(oa[ya])));null!=sa&&0<qa.length&&(ua[sa]=qa.join(";"))}else if(qa=ia.getAttribute("url"),null!=qa){oa=ia.getAttribute("section");sa=ia.getAttribute("subsection");if(null==oa&&(ya=qa.indexOf("/"),oa=qa.substring(0,ya),null==sa)){var Fa=qa.indexOf("/",ya+1);-1<Fa&&(sa=qa.substring(ya+1,Fa))}ya=Ha[oa];null==ya&&(ya=[],Ha[oa]=ya);qa=ia.getAttribute("clibs");null!=ua[qa]&&(qa=ua[qa]);qa={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title"),tooltip:ia.getAttribute("name")||ia.getAttribute("url"),preview:ia.getAttribute("preview"),clibs:qa,tags:ia.getAttribute("tags")};ya.push(qa);null!=sa&&(ya=Sa[oa],null==ya&&(ya={},Sa[oa]=ya),oa=ya[sa],-null==oa&&(oa=[],ya[sa]=oa),oa.push(qa))}ia=ia.nextSibling}N.stop();H()}})};g.appendChild(ja);g.appendChild(ta);g.appendChild(pa);var Ta=!1,Wa=L;/^https?:\/\//.test(Wa)&&!b.editor.isCorsEnabledForUrl(Wa)&&(Wa=PROXY_URL+"?url="+encodeURIComponent(Wa));N.spin(pa);null!=v?v(function(ia,ua){$a=ia;ba=db=ua;jb()},jb):jb();aa=Ha}mxEvent.addListener(C,"keypress",function(ia){b.dialog.container.firstChild==g&&13==ia.keyCode&&U()});v=document.createElement("div");v.style.marginTop=l?"4px":"16px";v.style.textAlign=+null==oa&&(oa=[],ya[sa]=oa),oa.push(qa))}ia=ia.nextSibling}N.stop();H()}})};g.appendChild(ja);g.appendChild(ta);g.appendChild(pa);var Ta=!1,Wa=L;/^https?:\/\//.test(Wa)&&!b.editor.isCorsEnabledForUrl(Wa)&&(Wa=PROXY_URL+"?url="+encodeURIComponent(Wa));N.spin(pa);null!=v?v(function(ia,ua){$a=ia;ba=db=ua;jb()},jb):jb();aa=Ha}mxEvent.addListener(C,"keypress",function(ia){b.dialog.container.firstChild==g&&13==ia.keyCode&&T()});v=document.createElement("div");v.style.marginTop=l?"4px":"16px";v.style.textAlign="right";v.style.position="absolute";v.style.left="40px";v.style.bottom="24px";v.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=z&&z();b.hideDialog(!0)});D.className="geBtn";!b.editor.cancelFirst||x&&null==z||v.appendChild(D);l||"1"==urlParams.embed||x||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(l=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ia=new FilenameDialog(b,"",mxResources.get("create"),function(ua){null!=ua&&0<ua.length&&-b.editor.loadUrl(b.editor.getProxiedUrl(ua),function(sa){Z=sa;fa=null;templateRealURl=ua;b.hideDialog();U()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ia.container,300,80,!0,!0);ia.init()}),l.className="geBtn",v.appendChild(l));Graph.fileSupport&&m&&(m=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ia=document.createElement("input");ia.setAttribute("multiple","multiple");ia.setAttribute("type","file");mxEvent.addListener(ia,+b.editor.loadUrl(b.editor.getProxiedUrl(ua),function(sa){Z=sa;fa=null;templateRealURl=ua;b.hideDialog();T()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ia.container,300,80,!0,!0);ia.init()}),l.className="geBtn",v.appendChild(l));Graph.fileSupport&&m&&(m=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ia=document.createElement("input");ia.setAttribute("multiple","multiple");ia.setAttribute("type","file");mxEvent.addListener(ia,"change",function(ua){b.openFiles(ia.files,!0);ia.value=""});ia.style.display="none";document.body.appendChild(ia);b.newDlgFileInputElt=ia}b.newDlgFileInputElt.click()}),m.className="geBtn",v.appendChild(m));v.appendChild(O);b.editor.cancelFirst||null!=d||x&&null==z||v.appendChild(D);g.appendChild(v);this.container=g};NewDialog.tagsList={};-var SaveDialog=function(b,l,n,d,x,z,y,F){function M(G,H,g,p,C,I){var N=null;if(null==d||0>mxUtils.indexOf(d,G)){C=null!=C?C:b.getTitleForService(G);var O=0<=mxUtils.indexOf(U,G);if(O||null!=b.getServiceForName(G)){N=document.createElement("option");var S="";!O&&b.isOffline()&&(N.setAttribute("disabled","disabled"),S=" ("+mxResources.get("offline")+")");if("pick"==I)N.innerHTML=mxUtils.htmlEntities(C)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+S,N.setAttribute("value",+var SaveDialog=function(b,l,n,d,x,z,y,F){function M(G,H,g,p,C,I){var N=null;if(null==d||0>mxUtils.indexOf(d,G)){C=null!=C?C:b.getTitleForService(G);var O=0<=mxUtils.indexOf(T,G);if(O||null!=b.getServiceForName(G)){N=document.createElement("option");var S="";!O&&b.isOffline()&&(N.setAttribute("disabled","disabled"),S=" ("+mxResources.get("offline")+")");if("pick"==I)N.innerHTML=mxUtils.htmlEntities(C)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+S,N.setAttribute("value","pickFolder-"+G),N.setAttribute("title",C+" - "+mxResources.get("pickFolder")+"...");else{O=G+(null!=g?"-"+g:"");var R=u[O];null!=R&&null!=R.option&&R.option.parentNode.removeChild(R.option);R=null;if(null!=H){"/"==H.charAt(H.length-1)&&(H=H.substring(0,H.length-1));"/"==H.charAt(0)&&(H=H.substring(1));R=H;if(G!=App.MODE_GITHUB&&G==App.MODE_GITLAB){var V=R.lastIndexOf("/");0<=V&&(R=R.substring(V+1))}40<R.length&&(R=R.substring(0,20)+"..."+R.substring(R.length-20))}N.innerHTML=mxUtils.htmlEntities(C)+(null!=R?" – "+mxUtils.htmlEntities(R):"")+S;N.setAttribute("title",C+(null!=H?" ("+H+")":"")+(null!=g&&decodeURIComponent(g)!=H?" ["+g+"]":""));N.setAttribute("value",O);u[O]={option:N,mode:G,path:H,id:g};SaveDialog.lastValue==O&&null==F&&"disabled"==!N.getAttribute("disabled")?p=!0:null==p&&("root"==I?p=null==F&&b.mode==G||null!=G&&G==F:"pickFolder-"==Q.value.substring(0,11)&&(p=!0));p&&N.setAttribute("selected","selected")}Q.appendChild(N)}}return N}function K(G){b.pickFolder(G,-function(H){var g=null;G==App.MODE_GOOGLE&&null!=H.docs&&0<H.docs.length?g={mode:G,path:H.docs[0].name,id:H.docs[0].id}:G==App.MODE_ONEDRIVE&&null!=H.value&&0<H.value.length?g={mode:G,path:H.value[0].name,id:OneDriveFile.prototype.getIdOf(H.value[0])}:(G==App.MODE_GITHUB||G==App.MODE_GITLAB)&&null!=H&&0<H.length&&(g={mode:G,path:decodeURIComponent(H),id:H});null!=g&&(T.style.display="",b.addRecent(g,"Folders",5),H=M(g.mode,g.path,g.id,!0),Q.innerHTML="",u={},L(),g=Q.selectedIndex,Q.value=H.value,+function(H){var g=null;G==App.MODE_GOOGLE&&null!=H.docs&&0<H.docs.length?g={mode:G,path:H.docs[0].name,id:H.docs[0].id}:G==App.MODE_ONEDRIVE&&null!=H.value&&0<H.value.length?g={mode:G,path:H.value[0].name,id:OneDriveFile.prototype.getIdOf(H.value[0])}:(G==App.MODE_GITHUB||G==App.MODE_GITLAB)&&null!=H&&0<H.length&&(g={mode:G,path:decodeURIComponent(H),id:H});null!=g&&(U.style.display="",b.addRecent(g,"Folders",5),H=M(g.mode,g.path,g.id,!0),Q.innerHTML="",u={},L(),g=Q.selectedIndex,Q.value=H.value,0>Q.selectedIndex&&(Q.selectedIndex=g))},!0,!0,!0,!0)}function L(){var G=b.getRecent("Folders"),H=0;if(null!=G&&0<G.length){for(var g=0;g<G.length;g++)null!=M(G[g].mode,G[g].path,G[g].id)&&H++;0<H&&Q.appendChild(P.cloneNode(!0))}M(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");M(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(M(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),M(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&M(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);M(App.MODE_GITHUB,null,null,null,null,"pick");M(App.MODE_GITLAB,null,null,null,null,"pick");M(App.MODE_TRELLO);G=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&G&&M(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&M(App.MODE_BROWSER);-G&&M("download");Editor.popupsAllowed&&M("_blank",null,null,null,mxResources.get("openInNewWindow"));0<H&&(Q.appendChild(P.cloneNode(!0)),H=Q.value,Q.appendChild(T),Q.value=H);if("pickFolder-"==Q.value.substring(0,11)||"reset"==Q.value)H=document.createElement("option"),H.setAttribute("value",""),H.setAttribute("selected","selected"),mxUtils.write(H,mxResources.get("pickFolder")+"..."),Q.insertBefore(H,Q.firstChild);q=Q.value}function c(){if("reset"==Q.value)b.resetRecent("Folders"),Q.innerHTML="",+G&&M("download");Editor.popupsAllowed&&M("_blank",null,null,null,mxResources.get("openInNewWindow"));0<H&&(Q.appendChild(P.cloneNode(!0)),H=Q.value,Q.appendChild(U),Q.value=H);if("pickFolder-"==Q.value.substring(0,11)||"reset"==Q.value)H=document.createElement("option"),H.setAttribute("value",""),H.setAttribute("selected","selected"),mxUtils.write(H,mxResources.get("pickFolder")+"..."),Q.insertBefore(H,Q.firstChild);q=Q.value}function c(){if("reset"==Q.value)b.resetRecent("Folders"),Q.innerHTML="",Q.value="",pickFolderOption=null,u={},L();else if("pickFolder-"==Q.value.substring(0,11)){var G=Q.value.substring(11);Q.value=q;K(G)}else if(null!=B&&null!=u[Q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[B.value].extension){G=b.getExtensionForService(u[Q.value].mode);var H=D.value;null!=G&&0>l.indexOf(".")&&0>H.indexOf(".")&&(D.value=H+G)}J.innerHTML="";mxUtils.write(J,mxResources.get("download"==Q.value||"_blank"==Q.value?"ok":"save"));""==Q.value?J.setAttribute("disabled","disabled"):J.removeAttribute("disabled")}var f=document.createElement("div");f.style.display="flex";f.style.flexWrap="wrap";f.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="grid";k.style.gap="5px 8px";k.style.gridAutoRows="auto auto 44px";k.style.gridAutoColumns="0fr minmax(0,1fr)";k.style.width="100%";var m=null,t=null;if(null!=x&&null!=z&&"image/"==z.substring(0,6)&&("image/svg"!=z.substring(0,9)||mxClient.IS_SVG)){k.style.display="inline-grid";k.style.flexBasis="75%";m=document.createElement("div");m.style.display="inline-block";m.style.height="auto";m.style.maxWidth="25%";m.style.margin="auto";var v=document.createElement("img"),A=y?x:btoa(unescape(encodeURIComponent(x))),E="data:"+z+";base64,"+A;v.setAttribute("src",E);v.style.boxSizing="border-box";v.style.maxHeight="50px";v.style.maxWidth="100%";v.style.paddingLeft="10px";m.appendChild(v);"image/png"!=z&&"image/svg+xml"!=z||"function"!==typeof window.ClipboardItem||null==navigator.clipboard||(t=mxUtils.button(mxResources.get("copy"),function(){b.writeImageToClipboard(E,null,null,z,mxUtils.bind(this,function(){"copy"==F?b.hideDialog():b.alert(mxResources.get("copiedToClipboard"))}),mxUtils.bind(this,function(G){b.handleError(G)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(m.setAttribute("title",mxResources.get("openInNewWindow")),m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(G){mxEvent.isPopupTrigger(G)||b.openInNewWindow(x,z,y)})):m.setAttribute("title",mxResources.get("preview"))}v=document.createElement("div");v.style.display="flex";v.style.padding="1px";v.style.alignItems="center";v.style.justifyContent="flex-end";v.style.gridColumn="1";v.style.whiteSpace="nowrap";A=document.createElement("div");A.style.display="grid";A.style.padding="1px";A.style.alignItems="center";A.style.gridColumn="2";A.style.gridAutoColumns="minmax(0,1fr) auto";A.style.gap="6px";mxUtils.write(v,mxResources.get("saveAs")+":");var D=document.createElement("input");D.setAttribute("type","text");D.setAttribute("value",l);D.style.boxSizing="border-box";D.style.width="100%";A.appendChild(D);k.appendChild(v);k.appendChild(A);var B=null;null!=b.editor.diagramFileTypes&&null==z&&(v=v.cloneNode(!1),A=A.cloneNode(!1),mxUtils.write(v,mxResources.get("type")+":"),B=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),B.style.boxSizing="border-box",B.style.width="100%",A.appendChild(B),k.appendChild(v),k.appendChild(A));v=v.cloneNode(!1);A=A.cloneNode(!1);mxUtils.write(v,mxResources.get("where")+":");var Q=document.createElement("select");-Q.style.textOverflow="ellipsis";Q.style.gridColumn="1";var T=document.createElement("option");mxUtils.write(T,mxResources.get("reset"));T.setAttribute("value","reset");var U=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var q=null,u={},J=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=Q.value;var G=u[SaveDialog.lastValue];null!=G&&n(D,G.mode,G.id)},null,"geBtn gePrimaryBtn");+Q.style.textOverflow="ellipsis";Q.style.gridColumn="1";var U=document.createElement("option");mxUtils.write(U,mxResources.get("reset"));U.setAttribute("value","reset");var T=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var q=null,u={},J=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=Q.value;var G=u[SaveDialog.lastValue];null!=G&&n(D,G.mode,G.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(D,"keypress",function(G){13==G.keyCode&&("copy"==F&&null!=t?t.click():J.click())});mxEvent.addListener(Q,"change",c);L();A.appendChild(Q);null!=SaveDialog.lastValue&&null!=u[SaveDialog.lastValue]&&(Q.value=SaveDialog.lastValue);c();k.appendChild(v);k.appendChild(A);f.appendChild(k);null!=m&&f.appendChild(m);k=document.createElement("div");k.style.flexBasis="100%";k.style.textAlign="right";k.style.marginTop=null!=z?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&k.appendChild(m);"copy"==F&&null!=t?(t.className="geBtn gePrimaryBtn",J.className="geBtn",k.appendChild(J),k.appendChild(t)):(null!=t&&k.appendChild(t),k.appendChild(J));b.editor.cancelFirst||k.appendChild(m);f.appendChild(k);this.init=function(){Editor.selectFilename(D)};this.container=f},CreateDialog=function(b,l,n,d,x,z,y,F,M,K,L,c,f,k,m,t,v){function A(q,u,J,G){function H(){mxEvent.addListener(g,"click",function(){var O=J;if(y){var S=B.value,R=S.lastIndexOf(".");if(0>l.lastIndexOf(".")&&0>R){O=null!=O?O:P.value;var V="";O==App.MODE_GOOGLE?V=b.drive.extension:O==App.MODE_GITHUB?V=b.gitHub.extension:O==App.MODE_GITLAB?V=b.gitLab.extension:O==App.MODE_TRELLO?V=b.trello.extension:O==App.MODE_DROPBOX?V=b.dropbox.extension:O==App.MODE_ONEDRIVE?V=b.oneDrive.extension:O==App.MODE_DEVICE&&(V=".drawio");0<=R&&(S=S.substring(0,R));B.value=S+V}}E(J)})}var g=document.createElement("a");g.style.overflow="hidden";var p=document.createElement("img");p.src=q;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(p);g.style.color="gray";g.style.fontSize="11px";var C=document.createElement("div");g.appendChild(C);mxUtils.write(C,u);if(null!=-G&&null==b[G]){p.style.visibility="hidden";mxUtils.setOpacity(C,10);var I=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});I.spin(g);var N=window.setTimeout(function(){null==b[G]&&(I.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(N),mxUtils.setOpacity(C,100),p.style.visibility="",I.stop(),H())}))}else H();T.appendChild(g);-++U==c&&(mxUtils.br(T),U=0)}function E(q){var u=B.value;if(null==q||null!=u&&0<u.length)v&&b.hideDialog(),n(u,q,B)}L="1"==urlParams.noDevice?!1:L;y=null!=y?y:!0;F=null!=F?F:!0;c=null!=c?c:4;v=null!=v?v:!0;z=document.createElement("div");z.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(z);var D=document.createElement("h2");mxUtils.write(D,x||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";z.appendChild(D);x=document.createElement("span");mxUtils.write(x,mxResources.get("filename")++G&&null==b[G]){p.style.visibility="hidden";mxUtils.setOpacity(C,10);var I=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});I.spin(g);var N=window.setTimeout(function(){null==b[G]&&(I.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(N),mxUtils.setOpacity(C,100),p.style.visibility="",I.stop(),H())}))}else H();U.appendChild(g);+++T==c&&(mxUtils.br(U),T=0)}function E(q){var u=B.value;if(null==q||null!=u&&0<u.length)v&&b.hideDialog(),n(u,q,B)}L="1"==urlParams.noDevice?!1:L;y=null!=y?y:!0;F=null!=F?F:!0;c=null!=c?c:4;v=null!=v?v:!0;z=document.createElement("div");z.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(z);var D=document.createElement("h2");mxUtils.write(D,x||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";z.appendChild(D);x=document.createElement("span");mxUtils.write(x,mxResources.get("filename")+":");x.style.maxWidth="106px";x.style.overflow="hidden";x.style.textOverflow="ellipsis";x.style.display="inline-block";z.appendChild(x);var B=document.createElement("input");B.setAttribute("value",l);B.style.width="180px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){Editor.selectFilename(B)};z.appendChild(B);null!=t&&null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width="90px",z.appendChild(t));t=null;if("1"!=urlParams.noDevice&&null!=f&&null!=k&&"image/"==k.substring(0,6)&&("image/svg"!=k.substring(0,9)||mxClient.IS_SVG)){B.style.width="160px";x=document.createElement("img");var Q=m?f:btoa(unescape(encodeURIComponent(f)));x.setAttribute("src","data:"+k+";base64,"+Q);x.style.position="absolute";x.style.top="70px";x.style.right="100px";x.style.maxWidth="120px";x.style.maxHeight="80px";mxUtils.setPrefixedStyle(x.style,"transform","translate(50%,-50%)");z.appendChild(x);mxClient.IS_FF||"image/png"!=k||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(t=mxUtils.button(mxResources.get("copy"),function(q){q=b.base64ToBlob(Q,"image/png");q=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="data:'+k+";base64,"+Q+'">'],{type:"text/html"})});navigator.clipboard.write([q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(u){b.handleError(u)}))}),t.style.marginTop="6px",-t.className="geBtn");M&&Editor.popupsAllowed&&(x.style.cursor="pointer",mxEvent.addGestureListeners(x,null,null,function(q){mxEvent.isPopupTrigger(q)||E("_blank")}))}mxUtils.br(z);var T=document.createElement("div");T.style.textAlign="center";var U=0;T.style.marginTop="6px";z.appendChild(T);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),+t.className="geBtn");M&&Editor.popupsAllowed&&(x.style.cursor="pointer",mxEvent.addGestureListeners(x,null,null,function(q){mxEvent.isPopupTrigger(q)||E("_blank")}))}mxUtils.br(z);var U=document.createElement("div");U.style.textAlign="center";var T=0;U.style.marginTop="6px";z.appendChild(U);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),P.appendChild(f),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),P.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),P.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),P.appendChild(f),A(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),P.appendChild(f),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),P.appendChild(f),A(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),@@ -12191,34 +12195,34 @@ var PopupDialog=function(b,l,n,d,x){x=null!=x?x:!0;var z=document.createElement(null!=n&&n();b.openLink(l,null,!0)});F.className="geBtn gePrimaryBtn";F.style.width=y.style.width;z.appendChild(F);mxUtils.br(z);mxUtils.br(z);mxUtils.write(z,mxResources.get("allowPopups"));this.container=z},ImageDialog=function(b,l,n,d,x,z,y,F){function M(){0<c.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}z=null!=z?z:!0;var K=b.editor.graph,L=document.createElement("div");mxUtils.write(L,l);l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";l.style.paddingRight="20px";var c=document.createElement("input");c.setAttribute("value",n);c.setAttribute("type","text");c.setAttribute("spellcheck","false");c.setAttribute("autocorrect","off");c.setAttribute("autocomplete","off");c.setAttribute("autocapitalize","off");c.style.marginTop="6px";c.style.width=(Graph.fileSupport?460:340)-20+"px";c.style.backgroundImage="url('"+Editor.crossImage+"')";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="100% 50%";c.style.paddingRight="14px";n=document.createElement("div");n.setAttribute("title",mxResources.get("reset"));n.style.position="relative";n.style.left="-16px";n.style.width="12px";n.style.height="14px";n.style.cursor="pointer";n.style.display="inline-block";n.style.top="3px";n.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(n,"click",function(){c.value="";c.focus()});l.appendChild(c);l.appendChild(n);L.appendChild(l);var f=F,k,m,t=function(B,Q,T,U){var P="data:"==B.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<B.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(B,function(q){b.spinner.stop();b.hideDialog();var u=!1===U?1:null!=Q&&null!=T?Math.max(Q/q.width,T/q.height):Math.min(1,Math.min(520/q.width,520/q.height));z&&(B=b.convertDataUri(B));d(B,-Math.round(Number(q.width)*u),Math.round(Number(q.height)*u),f,k,m)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(B,null,null,f,k,m)):(B=b.convertDataUri(B),Q=null==Q?120:Q,T=null==T?100:T,b.hideDialog(),d(B,Q,T,f,k,m))},v=function(B,Q){if(null!=B){var T=x?null:K.getModel().getGeometry(K.getSelectionCell());null!=T?t(B,T.width,T.height,Q):t(B,null,null,Q)}else b.hideDialog(),d(null)};this.init=function(){c.focus();-if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=L.parentNode,Q=null;mxEvent.addListener(B,"dragleave",function(T){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(T){null==Q&&(Q=b.highlightElement(B));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(T){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<T.dataTransfer.files.length)b.importFiles(T.dataTransfer.files,-0,0,b.maxImageSize,function(P,q,u,J,G,H,g,p){v(P,p)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var q=0;q<P.length;q++)P[q]()},!mxEvent.isControlDown(T),null,null,!0);else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var U=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&v(decodeURIComponent(U))}T.stopPropagation();T.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign=+"')";mxEvent.addListener(n,"click",function(){c.value="";c.focus()});l.appendChild(c);l.appendChild(n);L.appendChild(l);var f=F,k,m,t=function(B,Q,U,T){var P="data:"==B.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<B.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(B,function(q){b.spinner.stop();b.hideDialog();var u=!1===T?1:null!=Q&&null!=U?Math.max(Q/q.width,U/q.height):Math.min(1,Math.min(520/q.width,520/q.height));z&&(B=b.convertDataUri(B));d(B,+Math.round(Number(q.width)*u),Math.round(Number(q.height)*u),f,k,m)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(B,null,null,f,k,m)):(B=b.convertDataUri(B),Q=null==Q?120:Q,U=null==U?100:U,b.hideDialog(),d(B,Q,U,f,k,m))},v=function(B,Q){if(null!=B){var U=x?null:K.getModel().getGeometry(K.getSelectionCell());null!=U?t(B,U.width,U.height,Q):t(B,null,null,Q)}else b.hideDialog(),d(null)};this.init=function(){c.focus();+if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=L.parentNode,Q=null;mxEvent.addListener(B,"dragleave",function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(U){null==Q&&(Q=b.highlightElement(B));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<U.dataTransfer.files.length)b.importFiles(U.dataTransfer.files,+0,0,b.maxImageSize,function(P,q,u,J,G,H,g,p){v(P,p)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var q=0;q<P.length;q++)P[q]()},!mxEvent.isControlDown(U),null,null,!0);else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var T=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&v(decodeURIComponent(T))}U.stopPropagation();U.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&F.appendChild(n);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(c.value=B.url));c.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type",-"file");mxEvent.addListener(A,"change",function(B){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(Q,T,U,P,q,u){v(Q)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var T=0;T<Q.length;T++)Q[T]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}l=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});l.className="geBtn";F.appendChild(l)}mxEvent.addListener(c,-"keypress",function(B){13==B.keyCode&&v(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var B=new CropImageDialog(b,c.value,f,function(Q,T,U){f=Q;k=T;m=U});b.showDialog(B.container,300,390,!0,!0)});y&&(E.className="geBtn",F.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var B=b.editor.createImageUrlConverter().convert(c.value),Q=new Image;Q.onload=function(){b.editor.convertImageToDataUri(B,-function(T){b.confirmImageResize(function(U){b.resizeImage(Q,T,mxUtils.bind(this,function(P,q,u){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(c.value=P,M()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},Q.width>b.maxImageSize||Q.height>b.maxImageSize||T.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};Q.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};+"file");mxEvent.addListener(A,"change",function(B){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(Q,U,T,P,q,u){v(Q)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var U=0;U<Q.length;U++)Q[U]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}l=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});l.className="geBtn";F.appendChild(l)}mxEvent.addListener(c,+"keypress",function(B){13==B.keyCode&&v(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var B=new CropImageDialog(b,c.value,f,function(Q,U,T){f=Q;k=U;m=T});b.showDialog(B.container,300,390,!0,!0)});y&&(E.className="geBtn",F.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var B=b.editor.createImageUrlConverter().convert(c.value),Q=new Image;Q.onload=function(){b.editor.convertImageToDataUri(B,+function(U){b.confirmImageResize(function(T){b.resizeImage(Q,U,mxUtils.bind(this,function(P,q,u){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(c.value=P,M()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},Q.width>b.maxImageSize||Q.height>b.maxImageSize||U.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};Q.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};Q.src=B}});D.className="geBtn";mxEvent.addListener(c,"change",function(B){f=null;M()});M();F.appendChild(D);y=mxUtils.button(mxResources.get("apply"),function(){v(c.value)});y.className="geBtn gePrimaryBtn";F.appendChild(y);b.editor.cancelFirst||F.appendChild(n);Graph.fileSupport&&(F.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",y=document.createElement("div"),y.style.position="absolute",-y.style.width="420px",y.style.top="58%",y.style.textAlign="center",y.style.fontSize="18px",y.style.color="#a0c3ff",mxUtils.write(y,mxResources.get("dragImagesHere")),L.appendChild(y));L.appendChild(F);this.container=L},LinkDialog=function(b,l,n,d,x,z,y){function F(B,Q){var T=document.createElement("option");mxUtils.write(T,mxResources.get(B));T.value=B;E.appendChild(T);D[B]=Q}var M=document.createElement("div");M.style.height="100%";mxUtils.write(M,mxResources.get("editLink")+":");var K=document.createElement("div");+y.style.width="420px",y.style.top="58%",y.style.textAlign="center",y.style.fontSize="18px",y.style.color="#a0c3ff",mxUtils.write(y,mxResources.get("dragImagesHere")),L.appendChild(y));L.appendChild(F);this.container=L},LinkDialog=function(b,l,n,d,x,z,y){function F(B,Q){var U=document.createElement("option");mxUtils.write(U,mxResources.get(B));U.value=B;E.appendChild(U);D[B]=Q}var M=document.createElement("div");M.style.height="100%";mxUtils.write(M,mxResources.get("editLink")+":");var K=document.createElement("div");K.className="geUrlLinkContainer";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="16px";L.style.marginBottom="4px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.backgroundImage="url("+Editor.crossImage+")";c.className="geAdaptiveAsset";c.style.display="inline-block";c.style.position="relative";c.style.top="3px";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";mxEvent.addListener(c,"click",function(){L.value="";L.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geLinkDialogOption");var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="414px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0 6p 0 6px";null!=y&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);y=null!=y?y:"_blank";t.setAttribute("title",y);z&&(L.style.width="200px");if(x&&null!=b.pages){null!=l&&Graph.isPageLink(l)?(k.setAttribute("checked","checked"),k.defaultChecked=!0):(L.setAttribute("value",l),f.setAttribute("checked","checked"),f.defaultChecked=!0);K.appendChild(f);K.appendChild(L);K.appendChild(c);z&&(K.appendChild(t),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);K.appendChild(k);x=!1;for(z=0;z<b.pages.length;z++)c=document.createElement("option"),mxUtils.write(c,b.pages[z].getName()||mxResources.get("pageWithNumber",[z+1])),c.setAttribute("value","data:page/id,"+b.pages[z].getId()),l==c.getAttribute("value")&&(c.setAttribute("selected","selected"),x=!0),m.appendChild(c);if(!x&&k.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");m.appendChild(v);mxEvent.addListener(m,"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)})}K.appendChild(m)}else L.setAttribute("value",l),K.appendChild(L),K.appendChild(c);M.appendChild(K);var A=mxUtils.button(n,function(){b.hideDialog();d(k.checked?"pageNotFound"!==m.value?m.value:l:L.value,LinkDialog.selectedDocs,t.checked?y:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){k.checked?m.focus():(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",-!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(L,"focus",function(){k.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var B=M.parentNode,Q=null;mxEvent.addListener(B,"dragleave",function(T){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(T){null==-Q&&(Q=b.highlightElement(B));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(T){try{null!=Q&&(Q.parentNode.removeChild(Q),Q=null),0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(T.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,A.click())}catch(U){b.handleError(U)}T.stopPropagation();T.preventDefault()}),!1)}};n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign=+!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(L,"focus",function(){k.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var B=M.parentNode,Q=null;mxEvent.addListener(B,"dragleave",function(U){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(U){null==+Q&&(Q=b.highlightElement(B));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(U){try{null!=Q&&(Q.parentNode.removeChild(Q),Q=null),0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(U.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,A.click())}catch(T){b.handleError(T)}U.stopPropagation();U.preventDefault()}),!1)}};n=document.createElement("div");n.style.marginTop="16px";n.style.textAlign="right";b.isOffline()||n.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&n.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(B){if(B.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=B.docs;var Q=B.docs[0].url;"application/mxe"==B.docs[0].mimeType||null!=B.docs[0].mimeType&&"application/vnd.jgraph."==B.docs[0].mimeType.substring(0,23)?Q="https://www.draw.io/#G"+B.docs[0].id:"application/vnd.google-apps.folder"==B.docs[0].mimeType&&(Q="https://drive.google.com/#folders/"+B.docs[0].id);L.value=Q;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var E=document.createElement("select");E.className="geBtn";E.style.position="relative";E.style.top="1px";E.style.maxWidth="120px";var D={};x=document.createElement("option");mxUtils.write(x,mxResources.get("select")+"...");x.value="";E.appendChild(x);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&F("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var B=b.drive.createLinkPicker();b.linkPicker=B.setCallback(function(Q){LinkDialog.filePicked(Q)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F("dropbox",function(){Dropbox.choose({linkType:"direct",-cancel:function(){},success:function(B){L.value=B[0].link;L.focus()}})});null!=b.oneDrive&&F("oneDrive",function(){b.oneDrive.pickFile(function(B,Q){null!=Q&&null!=Q.value&&0<Q.value.length&&(L.value=Q.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&F("github",function(){b.gitHub.pickFile(function(B){if(null!=B){B=B.split("/");var Q=B[0],T=B[1],U=B[2];B=B.slice(3,B.length).join("/");L.value="https://github.com/"+Q+"/"+T+"/blob/"+U+"/"+B;L.focus()}})});null!=b.gitLab&&F("gitlab",function(){b.gitLab.pickFile(function(B){if(null!=-B){B=B.split("/");var Q=B[0],T=B[1],U=B[2];B=B.slice(3,B.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+Q+"/"+T+"/blob/"+U+"/"+B;L.focus()}})});1<E.children.length&&(n.appendChild(E),mxEvent.addListener(E,"change",function(B){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(L,"keypress",function(B){13==B.keyCode&&A.click()});n.appendChild(A);b.editor.cancelFirst||n.appendChild(K);M.appendChild(n);this.container=M},RevisionDialog=function(b,l,n){var d=document.createElement("div"),+cancel:function(){},success:function(B){L.value=B[0].link;L.focus()}})});null!=b.oneDrive&&F("oneDrive",function(){b.oneDrive.pickFile(function(B,Q){null!=Q&&null!=Q.value&&0<Q.value.length&&(L.value=Q.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&F("github",function(){b.gitHub.pickFile(function(B){if(null!=B){B=B.split("/");var Q=B[0],U=B[1],T=B[2];B=B.slice(3,B.length).join("/");L.value="https://github.com/"+Q+"/"+U+"/blob/"+T+"/"+B;L.focus()}})});null!=b.gitLab&&F("gitlab",function(){b.gitLab.pickFile(function(B){if(null!=+B){B=B.split("/");var Q=B[0],U=B[1],T=B[2];B=B.slice(3,B.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+Q+"/"+U+"/blob/"+T+"/"+B;L.focus()}})});1<E.children.length&&(n.appendChild(E),mxEvent.addListener(E,"change",function(B){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(L,"keypress",function(B){13==B.keyCode&&A.click()});n.appendChild(A);b.editor.cancelFirst||n.appendChild(K);M.appendChild(n);this.container=M},RevisionDialog=function(b,l,n){var d=document.createElement("div"),x=document.createElement("h3");x.style.marginTop="3px";mxUtils.write(x,mxResources.get("revisionHistory"));d.appendChild(x);x=document.createElement("div");x.style.position="absolute";x.style.overflow="auto";x.style.width="170px";x.style.height="378px";d.appendChild(x);var z=document.createElement("div");z.style.position="absolute";z.style.left="200px";z.style.width="470px";z.style.height="376px";z.style.overflow="hidden";z.style.borderWidth="1px";z.style.borderStyle="solid";var y=document.createElement("div");y.style.position="absolute";y.style.display="none";y.style.textAlign="center";y.style.padding="8px";y.style.borderRadius="8px";y.style.left="50%";y.style.top="50%";y.style.whiteSpace="nowrap";y.style.transform="translate(-50%, -50%)";y.style.background="inherit";y.style.border="1px solid";z.appendChild(y);mxEvent.disableContextMenu(z);d.appendChild(z);var F=new Graph(z);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;var M=0,K=null,L=0,c=F.getGlobalVariable;F.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:c.apply(this,arguments)};F.getLinkForCell=function(){return null};for(var f=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",-left:"50%"}),k=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={},v=0;v<m.length;v++)t[m[v].getAttribute("id")]=m[v];var A=null,E=null,D=null,B=null,Q=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&F.zoomIn()},20);Q.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&F.zoomOut()},20);T.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomFitImage,-mxResources.get("fit"),function(){null!=D&&(1==F.view.scale?(F.maxFitScale=8,F.fit(8)):F.zoomActual(),F.center())},20);U.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));P.setAttribute("disabled","disabled");var q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));q.setAttribute("disabled","disabled");var u=z.cloneNode(!1);u.style.pointerEvent="none";z.parentNode.appendChild(u);var J=new Graph(u);J.setTooltips(!1);J.setEnabled(!1);+left:"50%"}),k=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={},v=0;v<m.length;v++)t[m[v].getAttribute("id")]=m[v];var A=null,E=null,D=null,B=null,Q=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&F.zoomIn()},20);Q.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&F.zoomOut()},20);U.setAttribute("disabled","disabled");var T=b.createToolbarButton(Editor.zoomFitImage,+mxResources.get("fit"),function(){null!=D&&(1==F.view.scale?(F.maxFitScale=8,F.fit(8)):F.zoomActual(),F.center())},20);T.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));P.setAttribute("disabled","disabled");var q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));q.setAttribute("disabled","disabled");var u=z.cloneNode(!1);u.style.pointerEvent="none";z.parentNode.appendChild(u);var J=new Graph(u);J.setTooltips(!1);J.setEnabled(!1);J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;var G=document.createElement("div");G.style.textAlign="left";G.style.color="gray";G.style.backgroundColor="transparent";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.whiteSpace="nowrap";G.style.cursor="default";G.style.height="100%";G.style.display="inline-flex";G.style.alignItems="center";G.style.flexGrow="1";mxEvent.addListener(G,"click",function(){var X=mxUtils.getTextContent(G);""!=X&&b.alert(X)});var H=null;mxEvent.addGestureListeners(P,function(X){try{var aa=null!=K[M]?t[K[M].getAttribute("id")]:null;mxUtils.setOpacity(P,20);y.innerText="";if(null==aa)y.style.display="inline-block",mxUtils.write(y,mxResources.get("pageNotFound"));else{H=G.innerHTML;G.innerHTML=mxResources.get("current");z.style.display="none";u.style.display="";u.style.backgroundColor=z.style.backgroundColor;var ba=Editor.parseDiagramNode(aa);(new mxCodec(ba.ownerDocument)).decode(ba,J.getModel());J.view.scaleAndTranslate(F.view.scale,F.view.translate.x,F.view.translate.y);J.mathEnabled="1"==ba.getAttribute("math");J.setAdaptiveColors(ba.getAttribute("adaptiveColors"));Editor.MathJaxRender&&J.mathEnabled&&Editor.MathJaxRender(J.container)}}catch(la){y.style.display="inline-block",y.innerText="",mxUtils.write(y,mxResources.get("pageNotFound")+": "+la.message)}},null,function(){mxUtils.setOpacity(P,60);y.style.display="none";y.innerText="";"none"==z.style.display&&(z.style.display=@@ -12232,31 +12236,31 @@ null;if(null!=l&&0<l.length){z.style.cursor="move";var R=document.createElement(y.innerText="";var fa=mxUtils.parseXml(ca),na=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=na){var Z=function(ra){null!=ra&&(ra=ha(Editor.parseDiagramNode(ra)));return ra},ha=function(ra){var wa=ra.getAttribute("background");if(null==wa||""==wa||wa==mxConstants.NONE)wa=F.defaultPageBackgroundColor;z.style.backgroundColor=mxUtils.getLightDarkColor(wa);(new mxCodec(ra.ownerDocument)).decode(ra,F.getModel());F.maxFitScale=1;F.fit(8);F.center();F.mathEnabled="1"==ra.getAttribute("math");F.setAdaptiveColors(ra.getAttribute("adaptiveColors"));Editor.MathJaxRender&&F.mathEnabled&&Editor.MathJaxRender(F.container);return ra};p.style.display="none";p.innerText="";D=fa;B=ca;K=parseSelectFunction=null;L=0;if("mxfile"==na.nodeName){fa=na.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(M,K.length-1);0<K.length&&Z(K[L]);if(1<K.length)for(p.removeAttribute("disabled"),p.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",ka+" ("+K[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var ka=K[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);na=b.getPageById(K[ca].getAttribute("id"));var da="";if(null!=na){var va=new DiagramPage(K[ca]);b.getHashValueForPages([na])!=b.getHashValueForPages([va])&&(da=" (M)")}else da=" (X)";mxUtils.write(fa,ka+da);ca==L&&fa.setAttribute("selected","selected");p.appendChild(fa)}C=function(){try{var ra=parseInt(p.value);L=M=ra;Z(K[ra])}catch(wa){p.value=M,b.handleError(wa)}}}else ha(na);-ka=X.lastModifyingUserName;null!=ka&&20<ka.length&&(ka=ka.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ka?ka+" ":"")+aa.toLocaleDateString()+" "+aa.toLocaleTimeString());G.setAttribute("title",ba.getAttribute("title"));Q.removeAttribute("disabled");T.removeAttribute("disabled");U.removeAttribute("disabled");P.removeAttribute("disabled");q.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&g.removeAttribute("disabled"),I.removeAttribute("disabled"),-N.removeAttribute("disabled"));mxUtils.setOpacity(Q,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(q,60)}else p.style.display="none",p.innerText="",G.innerText="",y.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(y,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottomWidth="1px";ba.style.borderBottomStyle="solid";ba.style.fontSize="12px";ba.style.cursor="pointer";var ea=document.createElement("td");+ka=X.lastModifyingUserName;null!=ka&&20<ka.length&&(ka=ka.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ka?ka+" ":"")+aa.toLocaleDateString()+" "+aa.toLocaleTimeString());G.setAttribute("title",ba.getAttribute("title"));Q.removeAttribute("disabled");U.removeAttribute("disabled");T.removeAttribute("disabled");P.removeAttribute("disabled");q.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&g.removeAttribute("disabled"),I.removeAttribute("disabled"),+N.removeAttribute("disabled"));mxUtils.setOpacity(Q,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(q,60)}else p.style.display="none",p.innerText="",G.innerText="",y.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(y,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottomWidth="1px";ba.style.borderBottomStyle="solid";ba.style.fontSize="12px";ba.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";X==l[l.length-1]?mxUtils.write(ea,mxResources.get("current")):aa.toDateString()===Y?mxUtils.write(ea,aa.toLocaleTimeString()):mxUtils.write(ea,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());ba.appendChild(ea);ba.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(ba,"click",-function(ca){E!=X&&(f.stop(),null!=A&&(A.style.backgroundColor=""),E=X,A=ba,A.style.backgroundColor="light-dark(#ebf2f9, #000000)",B=D=null,G.removeAttribute("title"),G.innerText=mxResources.get("loading")+"...",z.style.backgroundColor=F.defaultPageBackgroundColor,y.innerText="",F.getModel().clear(),g.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),q.setAttribute("disabled",-"disabled"),I.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(q,20),f.spin(z),X.getXml(function(fa){if(E==X)try{la(fa)}catch(na){G.innerText=mxResources.get("error")+": "+na.message}},function(fa){f.stop();p.style.display="none";p.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));mxUtils.write(y,mxResources.get("errorLoadingFile"))}),+function(ca){E!=X&&(f.stop(),null!=A&&(A.style.backgroundColor=""),E=X,A=ba,A.style.backgroundColor="light-dark(#ebf2f9, #000000)",B=D=null,G.removeAttribute("title"),G.innerText=mxResources.get("loading")+"...",z.style.backgroundColor=F.defaultPageBackgroundColor,y.innerText="",F.getModel().clear(),g.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),q.setAttribute("disabled",+"disabled"),I.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(q,20),f.spin(z),X.getXml(function(fa){if(E==X)try{la(fa)}catch(na){G.innerText=mxResources.get("error")+": "+na.message}},function(fa){f.stop();p.style.display="none";p.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(ba,"dblclick",function(ca){I.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(ba)}return ba}(l[v]);null!=W&&v==l.length-1&&(S=W)}R.appendChild(V);x.appendChild(R)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?(z.style.display="none",O.style.display="none",mxUtils.write(x,mxResources.get("notAvailable"))):-(z.style.display="none",O.style.display="none",mxUtils.write(x,mxResources.get("noRevisions")));this.init=function(){null!=S&&S.click()};x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";O.appendChild(G);O.appendChild(P);O.appendChild(T);O.appendChild(U);O.appendChild(Q);O.appendChild(p);O.appendChild(q);b.editor.cancelFirst&&m.appendChild(x);m.appendChild(I);null!=k&&k.constructor==DriveFile&&m.appendChild(N);m.appendChild(g);b.editor.cancelFirst||m.appendChild(x);+(z.style.display="none",O.style.display="none",mxUtils.write(x,mxResources.get("noRevisions")));this.init=function(){null!=S&&S.click()};x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";O.appendChild(G);O.appendChild(P);O.appendChild(U);O.appendChild(T);O.appendChild(Q);O.appendChild(p);O.appendChild(q);b.editor.cancelFirst&&m.appendChild(x);m.appendChild(I);null!=k&&k.constructor==DriveFile&&m.appendChild(N);m.appendChild(g);b.editor.cancelFirst||m.appendChild(x);d.appendChild(m);d.appendChild(O);this.container=d},DraftDialog=function(b,l,n,d,x,z,y,F,M){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,l);K.appendChild(L);var c=document.createElement("select"),f=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,f(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this,q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){for(q=0;q<M.length;q++)x.apply(P,[q,mxUtils.bind(P,function(){})]);b.hideDialog(!0);u.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(E=mxUtils.parseXml(M[c.value].data),D=b.editor.extractGraphModel(E.documentElement,!0),B=0,this.init())});if(null!=M){c.style.marginLeft="4px";for(l=0;l<M.length;l++){var k=document.createElement("option");k.setAttribute("value",l);var m=new Date(M[l].created),t=new Date(M[l].modified);mxUtils.write(k,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),t.toDateString(),t.toLocaleDateString())+" "+t.toLocaleTimeString());c.appendChild(k)}k=document.createElement("option");k.setAttribute("value","-1");mxUtils.write(k,mxResources.get("deleteAll"));c.appendChild(k);L.appendChild(c);mxEvent.addListener(c,"change",f)}null==n&&(n=M[0].data);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";v.style.marginTop="10px";-v.style.left="40px";v.style.right="40px";v.style.top="46px";v.style.bottom="74px";v.style.overflow="hidden";mxEvent.disableContextMenu(v);K.appendChild(v);var A=new Graph(v);A.setEnabled(!1);A.setPanning(!0);A.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var E=mxUtils.parseXml(n),D=b.editor.extractGraphModel(E.documentElement,!0),B=0,Q=null,T=A.getGlobalVariable;-A.getGlobalVariable=function(P){return"page"==P&&null!=Q&&null!=Q[B]?Q[B].getAttribute("name"):"pagenumber"==P?B+1:"pagecount"==P?null!=Q?Q.length:1:T.apply(this,arguments)};A.getLinkForCell=function(){return null};n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){A.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){A.zoomOut()},20);l=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==A.view.scale?+v.style.left="40px";v.style.right="40px";v.style.top="46px";v.style.bottom="74px";v.style.overflow="hidden";mxEvent.disableContextMenu(v);K.appendChild(v);var A=new Graph(v);A.setEnabled(!1);A.setPanning(!0);A.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var E=mxUtils.parseXml(n),D=b.editor.extractGraphModel(E.documentElement,!0),B=0,Q=null,U=A.getGlobalVariable;+A.getGlobalVariable=function(P){return"page"==P&&null!=Q&&null!=Q[B]?Q[B].getAttribute("name"):"pagenumber"==P?B+1:"pagecount"==P?null!=Q?Q.length:1:U.apply(this,arguments)};A.getLinkForCell=function(){return null};n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){A.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){A.zoomOut()},20);l=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==A.view.scale?(A.maxFitScale=8,A.fit(8)):A.zoomActual();A.center()},20);y=mxUtils.button(y||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){x.apply(P,[c.value,mxUtils.bind(P,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,f()):b.hideDialog(!0))})]);q.jumpToEnd()})}),mxResources.get("no"),-mxResources.get("yes"))});y.className="geBtn";var U=document.createElement("select");U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";z=mxUtils.button(z||mxResources.get("edit"),function(){d.apply(this,[c.value])});z.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";m=document.createElement("div");+mxResources.get("yes"))});y.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";z=mxUtils.button(z||mxResources.get("edit"),function(){d.apply(this,[c.value])});z.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function P(G){if(null!=G){var H=G.getAttribute("background");if(null==H||""==H||H==mxConstants.NONE)H="light-dark(#ffffff, transparent)";v.style.backgroundColor=H;(new mxCodec(G.ownerDocument)).decode(G,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return G}function q(G){null!=G&&(G=P(Editor.parseDiagramNode(G)));-return G}mxEvent.addListener(U,"change",function(G){B=parseInt(U.value);q(Q[B]);mxEvent.consume(G)});if("mxfile"==D.nodeName){var u=D.getElementsByTagName("diagram");Q=[];for(var J=0;J<u.length;J++)Q.push(u[J]);0<Q.length&&q(Q[B]);U.innerText="";if(1<Q.length)for(U.style.display="",J=0;J<Q.length;J++)u=document.createElement("option"),mxUtils.write(u,Q[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),u.setAttribute("value",J),J==B&&u.setAttribute("selected","selected"),U.appendChild(u);-else U.style.display="none"}else P(D)};m.appendChild(U);m.appendChild(n);m.appendChild(L);m.appendChild(l);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});n.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(k.appendChild(n),null!=F&&k.appendChild(F),k.appendChild(y),k.appendChild(z)):(k.appendChild(z),k.appendChild(y),null!=F&&k.appendChild(F),k.appendChild(n));K.appendChild(k);K.appendChild(m);+return G}mxEvent.addListener(T,"change",function(G){B=parseInt(T.value);q(Q[B]);mxEvent.consume(G)});if("mxfile"==D.nodeName){var u=D.getElementsByTagName("diagram");Q=[];for(var J=0;J<u.length;J++)Q.push(u[J]);0<Q.length&&q(Q[B]);T.innerText="";if(1<Q.length)for(T.style.display="",J=0;J<Q.length;J++)u=document.createElement("option"),mxUtils.write(u,Q[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),u.setAttribute("value",J),J==B&&u.setAttribute("selected","selected"),T.appendChild(u);+else T.style.display="none"}else P(D)};m.appendChild(T);m.appendChild(n);m.appendChild(L);m.appendChild(l);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});n.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(k.appendChild(n),null!=F&&k.appendChild(F),k.appendChild(y),k.appendChild(z)):(k.appendChild(z),k.appendChild(y),null!=F&&k.appendChild(F),k.appendChild(n));K.appendChild(k);K.appendChild(m);this.container=K},FindWindow=function(b,l,n,d,x,z){function y(C,I,N){if("object"===typeof I.value&&null!=I.value.attributes){I=I.value.attributes;for(var O=0;O<I.length;O++)if("label"!=I[O].nodeName){var S=mxUtils.trim(I[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==C&&0<=S.indexOf(N)||null!=C&&C.test(S))return!0}}return!1}function F(){k?(H.removeAttribute("disabled"),g.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),g.setAttribute("disabled","disabled"));-B.value?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}function M(C,I,N){J.innerText="";var O=L.model.getDescendants(L.model.getRoot()),S=B.value.toLowerCase(),R=T.checked?new RegExp(S):null,V=null;t=null;c!=S&&(c=S,f=null,m=!1);var Y=null==f;if(0<S.length){if(m){m=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}C=(W+1)%b.pages.length;f=null;do m=!1,O=b.pages[C],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(O),L.model.setRoot(O.root),+B.value?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}function M(C,I,N){J.innerText="";var O=L.model.getDescendants(L.model.getRoot()),S=B.value.toLowerCase(),R=U.checked?new RegExp(S):null,V=null;t=null;c!=S&&(c=S,f=null,m=!1);var Y=null==f;if(0<S.length){if(m){m=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}C=(W+1)%b.pages.length;f=null;do m=!1,O=b.pages[C],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(O),L.model.setRoot(O.root),C=(C+1)%b.pages.length;while(!M(!0,I,N)&&C!=W);f&&(f=null,N?b.editor.graph.model.execute(new SelectPage(b,O)):b.selectPage(O));m=!1;L=b.editor.graph;return M(!0,I,N)}for(X=0;X<O.length;X++){W=L.view.getState(O[X]);I&&(Y=Y||W==f);if(null!=W&&null!=W.cell.value&&(Y||null==V)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,-" ")).toLowerCase();var aa=0;I&&z&&W==f&&(label=label.substr(v),aa=v);var ba=null==Q||""==Q.value;if(null==R&&(0<=label.indexOf(S)||ba&&y(R,W.cell,S))||null!=R&&(R.test(label)||ba&&y(R,W.cell,S)))if(z&&(null!=R?(ba=label.match(R),null!=ba&&0<ba.length&&(t=ba[0].toLowerCase(),v=aa+ba.index+t.length)):(t=S,v=aa+label.indexOf(S)+t.length)),Y){V=W;break}else null==V&&(V=W)}Y=Y||W==f}}if(null!=V){if(X==O.length&&U.checked)return f=null,m=!0,M(!0,I,N);f=V;L.scrollCellToVisible(f.cell);L.isEnabled()&&!L.isCellLocked(f.cell)?-N||L.getSelectionCell()==f.cell&&1==L.getSelectionCount()||L.setSelectionCell(f.cell):L.highlightCell(f.cell)}else{if(!C&&U.checked)return m=!0,M(!0,I,N);L.isEnabled()&&!N&&L.clearSelection()}k=null!=V;z&&!C&&F();return 0==S.length||null!=V}var K=b.actions.get("findReplace"),L=b.editor.graph,c=null,f=null,k=!1,m=!1,t=null,v=0,A=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=z?"260px":"200px",B=document.createElement("input");+" ")).toLowerCase();var aa=0;I&&z&&W==f&&(label=label.substr(v),aa=v);var ba=null==Q||""==Q.value;if(null==R&&(0<=label.indexOf(S)||ba&&y(R,W.cell,S))||null!=R&&(R.test(label)||ba&&y(R,W.cell,S)))if(z&&(null!=R?(ba=label.match(R),null!=ba&&0<ba.length&&(t=ba[0].toLowerCase(),v=aa+ba.index+t.length)):(t=S,v=aa+label.indexOf(S)+t.length)),Y){V=W;break}else null==V&&(V=W)}Y=Y||W==f}}if(null!=V){if(X==O.length&&T.checked)return f=null,m=!0,M(!0,I,N);f=V;L.scrollCellToVisible(f.cell);L.isEnabled()&&!L.isCellLocked(f.cell)?+N||L.getSelectionCell()==f.cell&&1==L.getSelectionCount()||L.setSelectionCell(f.cell):L.highlightCell(f.cell)}else{if(!C&&T.checked)return m=!0,M(!0,I,N);L.isEnabled()&&!N&&L.clearSelection()}k=null!=V;z&&!C&&F();return 0==S.length||null!=V}var K=b.actions.get("findReplace"),L=b.editor.graph,c=null,f=null,k=!1,m=!1,t=null,v=0,A=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=z?"260px":"200px",B=document.createElement("input");B.setAttribute("placeholder",mxResources.get("find"));B.setAttribute("type","text");B.style.marginTop="4px";B.style.marginBottom="6px";B.style.width=D;B.style.fontSize="12px";B.style.borderRadius="4px";B.style.padding="6px";E.appendChild(B);mxUtils.br(E);if(z){var Q=document.createElement("input");Q.setAttribute("placeholder",mxResources.get("replaceWith"));Q.setAttribute("type","text");Q.style.marginTop="4px";Q.style.marginBottom="6px";Q.style.width=D;Q.style.fontSize="12px";Q.style.borderRadius=-"4px";Q.style.padding="6px";E.appendChild(Q);mxUtils.br(E);mxEvent.addListener(Q,"input",F)}var T=document.createElement("input");T.setAttribute("id","geFindWinRegExChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";E.appendChild(T);D=document.createElement("label");D.setAttribute("for","geFindWinRegExChck");E.appendChild(D);mxUtils.write(D,mxResources.get("regularExpression"));E.appendChild(D);D=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");D.style.position=-"relative";D.style.marginLeft="6px";E.appendChild(D);mxUtils.br(E);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";E.appendChild(U);D=document.createElement("label");D.setAttribute("for","geFindWinAllPagesChck");E.appendChild(D);mxUtils.write(D,mxResources.get("allPages"));E.appendChild(D);var P=document.createElement("div");mxUtils.br(E);D=document.createElement("div");D.style.left="0px";D.style.right=+"4px";Q.style.padding="6px";E.appendChild(Q);mxUtils.br(E);mxEvent.addListener(Q,"input",F)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";E.appendChild(U);D=document.createElement("label");D.setAttribute("for","geFindWinRegExChck");E.appendChild(D);mxUtils.write(D,mxResources.get("regularExpression"));E.appendChild(D);D=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");D.style.position=+"relative";D.style.marginLeft="6px";E.appendChild(D);mxUtils.br(E);var T=document.createElement("input");T.setAttribute("id","geFindWinAllPagesChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";E.appendChild(T);D=document.createElement("label");D.setAttribute("for","geFindWinAllPagesChck");E.appendChild(D);mxUtils.write(D,mxResources.get("allPages"));E.appendChild(D);var P=document.createElement("div");mxUtils.br(E);D=document.createElement("div");D.style.left="0px";D.style.right="0px";D.style.marginTop="6px";D.style.padding="0 6px 0 6px";E.appendChild(D);var q=mxUtils.button(mxResources.get("reset"),function(){J.innerText="";B.value="";B.style.backgroundColor="";z&&(Q.value="",F());c=f=null;m=!1;B.focus()});q.setAttribute("title",mxResources.get("reset"));q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn";z||D.appendChild(q);var u=mxUtils.button(mxResources.get("find"),function(){try{B.style.backgroundColor=M()?"":"light-dark(#ffcfcf, #ff0000)"}catch(C){b.handleError(C)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.float="none";u.style.width="120px";u.style.marginTop="6px";u.style.marginLeft="8px";u.style.overflow="hidden";u.style.textOverflow="ellipsis";u.className="geBtn gePrimaryBtn";D.appendChild(u);var J=document.createElement("div");J.style.marginTop="10px";if(z){var G=function(C,I,N,O,S){if(null==S||"1"!=S.html)return O=C.toLowerCase().indexOf(I,O),0>O?C:C.substr(0,O)+N+C.substr(O+I.length);var R=C;I=mxUtils.htmlEntities(I,!1,!1,!1);S=[];var V=-1;for(C=C.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=C.indexOf("<",V+1));)S.push(V);V=C.match(/<[^>]*>/g);C=C.replace(/<[^>]*>/g,"");O=C.toLowerCase().indexOf(I,O);if(0>O)return R;R=O+I.length;N=mxUtils.htmlEntities(N);C=C.substr(0,O)+N+C.substr(R);for(var Y=0,W=0;W<S.length;W++){if(S[W]-Y<O)C=C.substr(0,S[W])+V[W]+C.substr(S[W]);@@ -12267,7 +12271,7 @@ b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var N=0,O={};M(!1b.editor.graph.rendering=!0}A++});p.setAttribute("title",mxResources.get("replaceAll"));p.style.float="none";p.style.width="120px";p.style.marginTop="6px";p.style.marginLeft="8px";p.style.overflow="hidden";p.style.textOverflow="ellipsis";p.className="geBtn gePrimaryBtn";p.setAttribute("disabled","disabled");D.appendChild(p);mxUtils.br(D);D.appendChild(q);q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));q.setAttribute("title",mxResources.get("close"));q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn";D.appendChild(q);mxUtils.br(D);D.appendChild(J)}else D.style.display="flex",D.style.alignItems="center",q.style.width="",u.style.width="";mxEvent.addListener(B,"keyup",function(C){if(91==C.keyCode||93==C.keyCode||17==C.keyCode)mxEvent.consume(C);else if(27==C.keyCode)K.funct();else if(c!=B.value.toLowerCase()||13==C.keyCode)try{B.style.backgroundColor=M()?"":"light-dark(#ffcfcf, #ff0000)"}catch(I){B.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(E,"keydown",function(C){70==C.keyCode&&b.keyHandler.isControlDown(C)&&!mxEvent.isShiftDown(C)&&(K.funct(),mxEvent.consume(C))});this.window=new mxWindow(mxResources.get("find")+(z?"/"+mxResources.get("replace"):""),E,l,n,d,x,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(B.focus(),mxClient.IS_GC||mxClient.IS_FF?B.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(C){B.focus();B.value=C;u.click()}},FreehandWindow=function(b,l,n,d,x,z){var y=b.editor.graph,F=document.createElement("div");F.style.textAlign=+mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(B.focus(),mxClient.IS_GC||mxClient.IS_FF?B.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1);this.doSearch=function(C){B.focus();B.value=C;u.click()}},FreehandWindow=function(b,l,n,d,x,z){var y=b.editor.graph,F=document.createElement("div");F.style.textAlign="center";F.style.userSelect="none";F.style.overflow="hidden";F.style.height="100%";if(z){var M=function(){var k=y.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&L.setAttribute("title",k))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=y.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";F.appendChild(K);y.freehand.setPerfectFreehandMode(K.checked);z=document.createElement("label");z.setAttribute("for","geFreehandBrush");z.style.float="left";z.style.marginTop="10px";F.appendChild(z);mxUtils.write(z,mxResources.get("brush"));F.appendChild(z);var L=document.createElement("tempDiv");L.style.display="block";L.style.width="100%";L.style.height="100%";L.style.borderRadius="2px";L.style.boxSizing="border-box";L.style.border="1px solid black";L.style.backgroundColor=y.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){L.style.backgroundColor=y.freehand.getStrokeColor()});M();z=mxUtils.button("",mxUtils.bind(this,function(k){b.pickColor(y.freehand.getStrokeColor(!0),function(m){y.freehand.setStrokeColor(m);L.style.backgroundColor=y.freehand.getStrokeColor();M()},"default");mxEvent.consume(k)}));z.style.position="absolute";z.style.boxSizing="border-box";z.style.padding="2px";@@ -12295,7 +12299,7 @@ V));g.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}f"absolute";m.style.boxSizing="border-box";m.style.borderRadius="4px";m.style.border="1px solid lightgray";m.style.margin="8px 8px 16px 8px";m.style.padding="8px";m.style.left="0px";m.style.right="0px";m.style.bottom="0px";m.style.padding="6px";m.style.height="80px";var t=document.createElement("div");t.style.display="flex";t.style.gap="6px";t.style.marginBottom="6px";var v=document.createElement("select");v.style.textOverflow="ellipsis";v.style.flexGrow="1";v.style.padding="4px";v.style.minWidth="0";m.appendChild(t);var A=document.createElement("option");A.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(A);var E=document.createElement("option");E.setAttribute("value","selectionOnly");mxUtils.write(E,mxResources.get("selectionOnly"));v.appendChild(E);t.appendChild(v);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var D=document.createElement("option");D.setAttribute("value","create");mxUtils.write(D,mxResources.get("create"));v.appendChild(D)}D=document.createElement("option");D.setAttribute("value","help");mxUtils.write(D,mxResources.get("help"));v.appendChild(D);D=document.createElement("option");D.setAttribute("value","reset");mxUtils.write(D,mxResources.get("reset"));v.appendChild(D);var B=document.createElement("select");B.style.textOverflow="ellipsis";B.style.flexGrow="1";B.style.padding="4px";B.style.minWidth="0";for(D=0;D<EditorUi.mermaidDiagramTypes.length;D++){var Q=document.createElement("option"),-T=EditorUi.mermaidDiagramTypes[D],U=T;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));Q.setAttribute("value",T);mxUtils.write(Q,U);B.appendChild(Q)}t.appendChild(B);t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";+U=EditorUi.mermaidDiagramTypes[D],T=U;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));Q.setAttribute("value",U);mxUtils.write(Q,T);B.appendChild(Q)}t.appendChild(B);t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";t.appendChild(P);D=document.createElement("img");D.setAttribute("src",Editor.sendImage);D.setAttribute("title",mxResources.get("sendMessage"));D.className="geAdaptiveAsset";D.style.position="relative";D.style.cursor="pointer";D.style.opacity="0.5";D.style.height="19px";D.style.left="-24px";D.style.top="5px";D.style.background="url('"+b.editor.transparentImage+"')";t.appendChild(D);m.appendChild(t);c.isSelectionEmpty()?b.isDiagramEmpty()?v.value="help":v.value="includeCopyOfMyDiagram":v.value="selectionOnly";var q=!1,u=v.value,J=function(){P.setAttribute("placeholder",mxResources.get("create"==v.value?"describeYourDiagram":"askMeAnything"));"create"==v.value?(v.style.width="",B.style.display=""):(v.style.width="100%",B.style.display="none")};J();mxEvent.addListener(v,"change",function(){q||("reset"==v.value?(v.value=u,k.innerHTML=""):u=v.value,J())});c.selectionModel.addListener(mxEvent.CHANGE,z);c.getModel().addListener(mxEvent.CHANGE,z);z();mxEvent.addListener(D,"click",L);mxEvent.addListener(P,"keydown",function(G){13!=G.keyCode||mxEvent.isShiftDown(G)||L()});f.appendChild(m);this.window=new mxWindow(mxResources.get("chatWindowTitle"),f,l,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){c.getModel().removeListener(z)}));this.window.addListener("show",@@ -12306,29 +12310,29 @@ F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("aliF.src=IMAGE_PATH+"/gitlab-logo.svg",F.style.width="32px"):l==b.trello&&(y=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[y]));var M=document.createElement("input");M.setAttribute("type","checkbox");y=mxUtils.button(mxResources.get("authorize"),function(){d(M.checked)});y.insertBefore(F,y.firstChild);y.style.marginTop="6px";y.className="geBigButton";y.style.fontSize="18px";y.style.padding="14px";x.appendChild(z);x.appendChild(b);x.appendChild(y);n&&(n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(M),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberMe")),n.appendChild(z),x.appendChild(n),M.checked=!0,M.defaultChecked=!0,mxEvent.addListener(z,"click",function(K){M.checked=!M.checked;mxEvent.consume(K)}));this.container=x},MoreShapesDialog=function(b,l,n){n=null!=n?n:b.sidebar.entries;var d=document.createElement("div"),x=[];if(null!=b.sidebar.customEntries)for(var z=0;z<b.sidebar.customEntries.length;z++){for(var y=b.sidebar.customEntries[z]||{},F={title:b.getResource(y.title),entries:[]},M=0;null!=y.entries&&M<y.entries.length;M++){var K=y.entries[M];F.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<F.entries.length&&x.push(F)}for(z=0;z<n.length;z++)if(null==b.sidebar.enabledLibraries)x.push(n[z]);else{F={title:n[z].title,entries:[]};for(M=0;M<n[z].entries.length;M++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-n[z].entries[M].id)&&F.entries.push(n[z].entries[M]);0<F.entries.length&&x.push(F)}n=x;if(l){z=mxUtils.bind(this,function(T){for(var U=0;U<T.length;U++)(function(P){var q=m.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="light-dark(#e5e5e5, #505759)";q.style.padding="6px 0px 6px 20px";mxUtils.write(q,P.title);L.appendChild(q);for(var u=0;u<P.entries.length;u++)(function(J){var G=m.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";+n[z].entries[M].id)&&F.entries.push(n[z].entries[M]);0<F.entries.length&&x.push(F)}n=x;if(l){z=mxUtils.bind(this,function(U){for(var T=0;T<U.length;T++)(function(P){var q=m.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="light-dark(#e5e5e5, #505759)";q.style.padding="6px 0px 6px 20px";mxUtils.write(q,P.title);L.appendChild(q);for(var u=0;u<P.entries.length;u++)(function(J){var G=m.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",J.title+" ("+J.id+")");var H=document.createElement("input");H.setAttribute("type","checkbox");H.checked=b.sidebar.isEntryVisible(J.id);H.defaultChecked=H.checked;G.appendChild(H);mxUtils.write(G," "+J.title);L.appendChild(G);var g=function(p){if(null==p||"INPUT"!=mxEvent.getSource(p).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=J.desc){var C=document.createElement("pre");C.style.boxSizing="border-box";C.style.fontFamily="inherit";C.style.margin="20px";C.style.right="0px";C.style.textAlign="left";mxUtils.write(C,J.desc);c.appendChild(C)}null!=J.imageCallback?J.imageCallback(c):null!=J.image?(C=document.createElement("img"),C.setAttribute("border","0"),C.style.maxWidth="100%",C.setAttribute("src",J.image),c.appendChild(C)):null==J.desc&&(c.style.padding="20px",c.style.color="rgb(179, 179, 179)",mxUtils.write(c,mxResources.get("noPreview")));null!=f&&(f.style.backgroundColor=-"");f=G;f.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=p&&mxEvent.consume(p)}};mxEvent.addListener(G,"click",g);mxEvent.addListener(G,"dblclick",function(p){H.checked=!H.checked;mxEvent.consume(p)});k.push(function(){return H.checked?J.id:null});0==U&&0==u&&g()})(P.entries[u])})(T[U])});M=document.createElement("div");M.className="geDialogTitle";mxUtils.write(M,mxResources.get("shapes"));M.style.position="absolute";M.style.top="0px";M.style.left="0px";M.style.lineHeight="40px";M.style.height=+"");f=G;f.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=p&&mxEvent.consume(p)}};mxEvent.addListener(G,"click",g);mxEvent.addListener(G,"dblclick",function(p){H.checked=!H.checked;mxEvent.consume(p)});k.push(function(){return H.checked?J.id:null});0==T&&0==u&&g()})(P.entries[u])})(U[T])});M=document.createElement("div");M.className="geDialogTitle";mxUtils.write(M,mxResources.get("shapes"));M.style.position="absolute";M.style.top="0px";M.style.left="0px";M.style.lineHeight="40px";M.style.height="40px";M.style.right="0px";var L=document.createElement("div"),c=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";c.style.position="absolute";c.style.left="202px";c.style.right="0px";c.style.top="40px";c.style.bottom="60px";c.style.overflow="auto";c.style.borderLeftStyle="solid";c.style.borderLeftWidth="1px";c.style.textAlign="center";var f=null,k=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";z(n);d.style.padding="30px";d.appendChild(M);d.appendChild(L);d.appendChild(c);n=document.createElement("div");n.className="geDialogFooter";n.style.position="absolute";n.style.paddingRight="16px";n.style.left="0px";n.style.right="0px";n.style.bottom="0px";n.style.height="60px";n.style.lineHeight="52px";var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.position="relative";t.style.top="1px";t.checked=b.sidebar.sidebarTitles;-t.defaultChecked=t.checked;n.appendChild(t);z=document.createElement("span");mxUtils.write(z," "+mxResources.get("labels"));z.style.paddingRight="20px";n.appendChild(z);mxEvent.addListener(z,"click",function(T){t.checked=!t.checked;mxEvent.consume(T)});var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)z=document.createElement("span"),z.style.paddingRight="20px",z.appendChild(v),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),-v.style.position="relative",v.style.top="1px",v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(z,"click",function(T){mxEvent.getSource(T)!=v&&(v.checked=!v.checked,mxEvent.consume(T))}),n.appendChild(z);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";M=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var T=[],U=0;U<k.length;U++){var P=k[U].apply(this,arguments);null!=P&&T.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(T,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<T.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(T,"search"),mxSettings.settings.search=0<=U&&0<T.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),v.checked&&mxSettings.save());b.sidebar.showEntries(T.join(";"),v.checked,!0);b.setSidebarTitles(t.checked,v.checked)});M.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table");-z=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";M=document.createElement("tr");A.style.width="100%";l=document.createElement("td");x=document.createElement("td");y=document.createElement("td");var E=mxUtils.bind(this,function(T,U,P){var q=document.createElement("input");q.type="checkbox";A.appendChild(q);q.checked=b.sidebar.isEntryVisible(P);var u=document.createElement("span");mxUtils.write(u,U);U=document.createElement("div");U.style.display="block";U.appendChild(q);-U.appendChild(u);mxEvent.addListener(u,"click",function(J){q.checked=!q.checked;mxEvent.consume(J)});T.appendChild(U);return function(){return q.checked?P:null}});M.appendChild(l);M.appendChild(x);M.appendChild(y);z.appendChild(M);A.appendChild(z);k=[];var D=0;for(z=0;z<n.length;z++)for(M=0;M<n[z].entries.length;M++)D++;var B=[l,x,y],Q=0;for(z=0;z<n.length;z++)(function(T){for(var U=0;U<T.entries.length;U++){var P=T.entries[U];k.push(E(B[Math.floor(Q/(D/3))],P.title,P.id));Q++}})(n[z]);d.appendChild(A);-n=document.createElement("div");n.style.marginTop="18px";n.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,n.appendChild(v),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),n.appendChild(z),mxEvent.addListener(z,"click",function(T){v.checked=!v.checked;mxEvent.consume(T)}));d.appendChild(n);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});-z.className="geBtn";M=mxUtils.button(mxResources.get("apply"),function(){for(var T=["search"],U=0;U<k.length;U++){var P=k[U].apply(this,arguments);null!=P&&T.push(P)}b.sidebar.showEntries(0<T.length?T.join(";"):"",v.checked);b.hideDialog()});M.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="right"}b.editor.cancelFirst?(n.appendChild(z),n.appendChild(M)):(n.appendChild(M),n.appendChild(z));d.appendChild(n);this.container=d},PluginsDialog=function(b,+t.defaultChecked=t.checked;n.appendChild(t);z=document.createElement("span");mxUtils.write(z," "+mxResources.get("labels"));z.style.paddingRight="20px";n.appendChild(z);mxEvent.addListener(z,"click",function(U){t.checked=!t.checked;mxEvent.consume(U)});var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)z=document.createElement("span"),z.style.paddingRight="20px",z.appendChild(v),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),+v.style.position="relative",v.style.top="1px",v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(z,"click",function(U){mxEvent.getSource(U)!=v&&(v.checked=!v.checked,mxEvent.consume(U))}),n.appendChild(z);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className="geBtn";M=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],T=0;T<k.length;T++){var P=k[T].apply(this,arguments);null!=P&&U.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<U.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=T&&0<U.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),v.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),v.checked,!0);b.setSidebarTitles(t.checked,v.checked)});M.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table");+z=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";M=document.createElement("tr");A.style.width="100%";l=document.createElement("td");x=document.createElement("td");y=document.createElement("td");var E=mxUtils.bind(this,function(U,T,P){var q=document.createElement("input");q.type="checkbox";A.appendChild(q);q.checked=b.sidebar.isEntryVisible(P);var u=document.createElement("span");mxUtils.write(u,T);T=document.createElement("div");T.style.display="block";T.appendChild(q);+T.appendChild(u);mxEvent.addListener(u,"click",function(J){q.checked=!q.checked;mxEvent.consume(J)});U.appendChild(T);return function(){return q.checked?P:null}});M.appendChild(l);M.appendChild(x);M.appendChild(y);z.appendChild(M);A.appendChild(z);k=[];var D=0;for(z=0;z<n.length;z++)for(M=0;M<n[z].entries.length;M++)D++;var B=[l,x,y],Q=0;for(z=0;z<n.length;z++)(function(U){for(var T=0;T<U.entries.length;T++){var P=U.entries[T];k.push(E(B[Math.floor(Q/(D/3))],P.title,P.id));Q++}})(n[z]);d.appendChild(A);+n=document.createElement("div");n.style.marginTop="18px";n.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,n.appendChild(v),z=document.createElement("span"),mxUtils.write(z," "+mxResources.get("rememberThisSetting")),n.appendChild(z),mxEvent.addListener(z,"click",function(U){v.checked=!v.checked;mxEvent.consume(U)}));d.appendChild(n);z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});+z.className="geBtn";M=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],T=0;T<k.length;T++){var P=k[T].apply(this,arguments);null!=P&&U.push(P)}b.sidebar.showEntries(0<U.length?U.join(";"):"",v.checked);b.hideDialog()});M.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="right"}b.editor.cancelFirst?(n.appendChild(z),n.appendChild(M)):(n.appendChild(M),n.appendChild(z));d.appendChild(n);this.container=d},PluginsDialog=function(b,l,n,d){function x(){M=!0;if(0==F.length)y.innerText=mxResources.get("noPlugins");else{y.innerText="";for(var k=0;k<F.length;k++){var m=document.createElement("span");m.style.display="flex";m.style.alignItems="center";m.style.whiteSpace="nowrap";var t=document.createElement("img");t.src=Editor.trashImage;t.style.position="relative";t.style.cursor="pointer";t.style.marginRight="4px";t.style.display="inline-block";t.style.width="18px";t.setAttribute("title",mxResources.get("delete"));m.appendChild(t);mxUtils.write(m,F[k]);y.appendChild(m);mxUtils.br(y);mxEvent.addListener(t,"click",function(v){return function(){b.confirm(mxResources.get("delete")+' "'+F[v]+'"?',function(){null!=n&&n(F[v]);F.splice(v,1);x()})}}(k))}}}var z=document.createElement("div"),y=document.createElement("div");y.style.height="180px";y.style.overflow="auto";var F=mxSettings.getPlugins().slice(),M=!1;z.appendChild(y);x();M=!1;var K=mxUtils.button(mxResources.get("add"),null!=l?function(){l(function(k){k&&0>mxUtils.indexOf(F,k)&&F.push(k);x()})}:function(){var k=document.createElement("div"),m=document.createElement("span");m.style.marginTop="6px";mxUtils.write(m,mxResources.get("builtinPlugins")+": ");k.appendChild(m);var t=document.createElement("select");t.style.width="150px";for(m=0;m<App.publicPlugin.length;m++){var v=document.createElement("option");mxUtils.write(v,App.publicPlugin[m]);v.value=App.publicPlugin[m];t.appendChild(v)}k.appendChild(t);mxUtils.br(k);mxUtils.br(k);m=mxUtils.button(mxResources.get("custom")+"...",function(){var A=new FilenameDialog(b,"",mxResources.get("add"),function(E){b.hideDialog();if(null!=E&&0<E.length){E=E.split(";");for(var D=0;D<E.length;D++){var B=E[D],Q=App.pluginRegistry[B];null!=Q&&(B=Q);0<B.length&&0>mxUtils.indexOf(F,B)&&F.push(B)}x()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(A.container,300,80,!0,!0);A.init()});m.className="geBtn";ALLOW_CUSTOM_PLUGINS||(m.style.display="none");k=new CustomDialog(b,k,mxUtils.bind(this,function(){var A=App.pluginRegistry[t.value];0>mxUtils.indexOf(F,A)&&(F.push(A),x())}),null,null,null,m);b.showDialog(k.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var c=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){M?(mxSettings.setPlugins(F),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});c.className="geBtn gePrimaryBtn";var f=document.createElement("div");-f.style.marginTop="14px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||f.appendChild(L),f.appendChild(K),f.appendChild(c)):(f.appendChild(K),f.appendChild(c),d||f.appendChild(L));z.appendChild(f);this.container=z},CropImageDialog=function(b,l,n,d){function x(){var T=v.checked,U=A.checked,P=k.geometry,q=M.width,u=M.height,J=(300-q)/2,G=(300-u)/2;P.x<J?(P.width-=J-P.x,P.x=J):P.x+P.width>J+q&&(P.width=J+q-P.x,-P.x=Math.min(P.x,J+q));P.y<G?(P.height-=G-P.y,P.y=G):P.y+P.height>G+u&&(P.height=G+u-P.y,P.y=Math.min(P.y,G+u));var H=(P.x-J)/q*100;q=100-(P.x+P.width-J)/q*100;J=(P.y-G)/u*100;P=100-(P.y+P.height-G)/u*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(q)+"% "+mxUtils.format(P)+"% "+mxUtils.format(H)+"%"+(T?" round "+f+"%":U?" round 50%":"")+")"}function z(T){null!=L&&(!0!==T&&(L.model.setGeometry(k,c.clone()),f=5,D.value=f),L.model.setStyle(k,m+x()),L.selectAll(),E.style.visibility=v.checked?-"visible":"hidden")}var y=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var M=document.createElement("img");M.onload=function(){function T(){L.model.setStyle(k,m+x())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);-L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var R=U.apply(this,arguments);R.livePreview=!1;return R};if(null!=n)try{if("inset"==n.substring(0,5)){var P=k.geometry,q=M.width,u=M.height,J=(300-q)/2,G=(300-u)/2,H=n.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),g=parseFloat(H[0]),p=parseFloat(H[1]),C=parseFloat(H[2]),I=parseFloat(H[3]);isFinite(g)&&isFinite(p)&&isFinite(C)&&isFinite(I)?(P.x=I/100*q+J,P.y=g/100*u+G,P.width=(100-p)/100*q+J-P.x,P.height=(100--C)/100*u+G-P.y,"round"==H[4]?"50%"==H[5]?A.setAttribute("checked","checked"):(f=parseInt(H[5]),D.value=f,v.setAttribute("checked","checked"),E.style.visibility="visible"):t.setAttribute("checked","checked")):n=null}else n=null}catch(R){}k.style=m+(n?n:x());k.vertex=!0;L.addCell(k,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,T);L.addListener(mxEvent.CELLS_RESIZED,T);var N=L.graphHandler.mouseUp,O=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){N.apply(this,arguments);+f.style.marginTop="14px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||f.appendChild(L),f.appendChild(K),f.appendChild(c)):(f.appendChild(K),f.appendChild(c),d||f.appendChild(L));z.appendChild(f);this.container=z},CropImageDialog=function(b,l,n,d){function x(){var U=v.checked,T=A.checked,P=k.geometry,q=M.width,u=M.height,J=(300-q)/2,G=(300-u)/2;P.x<J?(P.width-=J-P.x,P.x=J):P.x+P.width>J+q&&(P.width=J+q-P.x,+P.x=Math.min(P.x,J+q));P.y<G?(P.height-=G-P.y,P.y=G):P.y+P.height>G+u&&(P.height=G+u-P.y,P.y=Math.min(P.y,G+u));var H=(P.x-J)/q*100;q=100-(P.x+P.width-J)/q*100;J=(P.y-G)/u*100;P=100-(P.y+P.height-G)/u*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(q)+"% "+mxUtils.format(P)+"% "+mxUtils.format(H)+"%"+(U?" round "+f+"%":T?" round 50%":"")+")"}function z(U){null!=L&&(!0!==U&&(L.model.setGeometry(k,c.clone()),f=5,D.value=f),L.model.setStyle(k,m+x()),L.selectAll(),E.style.visibility=v.checked?+"visible":"hidden")}var y=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var M=document.createElement("img");M.onload=function(){function U(){L.model.setStyle(k,m+x())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);+L.graphHandler.allowLivePreview=!1;var T=L.createVertexHandler;L.createVertexHandler=function(){var R=T.apply(this,arguments);R.livePreview=!1;return R};if(null!=n)try{if("inset"==n.substring(0,5)){var P=k.geometry,q=M.width,u=M.height,J=(300-q)/2,G=(300-u)/2,H=n.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),g=parseFloat(H[0]),p=parseFloat(H[1]),C=parseFloat(H[2]),I=parseFloat(H[3]);isFinite(g)&&isFinite(p)&&isFinite(C)&&isFinite(I)?(P.x=I/100*q+J,P.y=g/100*u+G,P.width=(100-p)/100*q+J-P.x,P.height=(100-+C)/100*u+G-P.y,"round"==H[4]?"50%"==H[5]?A.setAttribute("checked","checked"):(f=parseInt(H[5]),D.value=f,v.setAttribute("checked","checked"),E.style.visibility="visible"):t.setAttribute("checked","checked")):n=null}else n=null}catch(R){}k.style=m+(n?n:x());k.vertex=!0;L.addCell(k,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,U);L.addListener(mxEvent.CELLS_RESIZED,U);var N=L.graphHandler.mouseUp,O=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){N.apply(this,arguments);K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){O.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var S=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){S.call(this,[k],[k])}};M.onerror=function(){M.onload=null;M.src=Editor.errorImage};M.setAttribute("src",l);M.style.maxWidth="300px";M.style.maxHeight="300px";F.appendChild(M);y.appendChild(F);var K=document.createElement("div");K.style.width="300px";K.style.height="300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";y.appendChild(K);var L=null,c=new mxGeometry(100,100,100,100),f=5,k=new mxCell("",c.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+l.replace(";base64","")+";clipPath=",t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRect");t.setAttribute("name","croppingShape");t.setAttribute("checked","checked");t.style.margin="5px";y.appendChild(t);l=document.createElement("label");l.setAttribute("for","croppingRect");mxUtils.write(l,mxResources.get("rectangle"));y.appendChild(l);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRounded");v.setAttribute("name","croppingShape");v.style.margin="5px";y.appendChild(v);l=document.createElement("label");l.setAttribute("for","croppingRounded");mxUtils.write(l,mxResources.get("rounded"));y.appendChild(l);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id",@@ -12354,18 +12358,18 @@ D&&(D(),D=null);if(null==aa.title||0==aa.title.length)X.innerText="";X.style.texY);m.appendChild(R);mxEvent.addListener(R,"dragstart",function(fa){null==D&&(null==P&&null!=g&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=g.xml&&fa.dataTransfer.setData("Text",g.xml),A=F(fa),mxClient.IS_GC&&(R.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(R,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(R,"dragend",function(fa){"hidden"==W.style.visibility&&(W.style.visibility="",X.style.visibility="");A=null;mxUtils.setOpacity(R,100);mxUtils.setPrefixedStyle(R.style,"transform",null)})}else Q||(Q=!0,b.handleError({message:mxResources.get("fileExists")}));else{G=!1;try{if(N=mxUtils.parseXml(P),"mxlibrary"==N.documentElement.nodeName){O=JSON.parse(mxUtils.getTextContent(N.documentElement));if(null!=O&&0<O.length)for(var ba=0;ba<O.length;ba++)null!=O[ba].xml?M(null,null,0,0,0,0,O[ba]):M(O[ba].data,null,0,0,O[ba].w,O[ba].h,null,"fixed",O[ba].title);G=!0}else if("mxfile"==N.documentElement.nodeName){var la=N.documentElement.getElementsByTagName("diagram");for(ba=0;ba<la.length;ba++){var ea=Editor.getDiagramNodeXml(la[ba]);Y=b.stringToCells(ea);if(0<Y.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(Y);null!=ca&&M(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}G=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}G||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&-console.log("Error in library dialog: "+fa)}return null}function K(P){P.dataTransfer.dropEffect=null!=A?"move":"copy";P.stopPropagation();P.preventDefault()}function L(P){P.stopPropagation();P.preventDefault();Q=!1;E=F(P);if(null!=A)null!=E&&E<m.children.length?(c.splice(E>A?E-1:E,0,c.splice(A,1)[0]),m.insertBefore(m.children[A],m.children[E])):(c.push(c.splice(A,1)[0]),m.appendChild(m.children[A]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,T(P));+console.log("Error in library dialog: "+fa)}return null}function K(P){P.dataTransfer.dropEffect=null!=A?"move":"copy";P.stopPropagation();P.preventDefault()}function L(P){P.stopPropagation();P.preventDefault();Q=!1;E=F(P);if(null!=A)null!=E&&E<m.children.length?(c.splice(E>A?E-1:E,0,c.splice(A,1)[0]),m.insertBefore(m.children[A],m.children[E])):(c.push(c.splice(A,1)[0]),m.appendChild(m.children[A]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,U(P));else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var q=decodeURIComponent(P.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(q)||/(\.png)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.svg)($|\?)/i.test(q))&&b.loadImage(q,function(u){M(q,null,0,0,u.width,u.height);m.scrollTop=m.scrollHeight})}P.stopPropagation();P.preventDefault()}var c=[];n=document.createElement("div");n.style.height="100%";var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.height="40px";n.appendChild(f);mxUtils.write(f,mxResources.get("filename")+":");null==l&&(l=b.defaultLibraryName+".xml");var k=document.createElement("input");k.setAttribute("value",l);k.style.marginRight="20px";k.style.marginLeft="10px";k.style.width="500px";null==x||x.isRenamable()||k.setAttribute("disabled","true");this.init=function(){if(null==x||x.isRenamable())k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f.appendChild(k);Editor.enableUncompressedLibraries&&(k.style.width="420px",l=document.createElement("input"),l.setAttribute("type","checkbox"),l.style.marginRight="10px",f.appendChild(l),mxUtils.write(f,mxResources.get("compressed")));var m=document.createElement("div");m.style.borderWidth="1px 0px 1px 0px";m.style.borderColor="#d3d3d3";m.style.borderStyle="solid";m.style.marginTop="6px";m.style.overflow="auto";m.style.height="340px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";0==c.length&&Graph.fileSupport&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));n.appendChild(t);var v={},A=null,E=null,D=null;f=function(P){"true"!=mxEvent.getSource(P).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(P))};mxEvent.addListener(m,"mousedown",f);mxEvent.addListener(m,"pointerdown",-f);mxEvent.addListener(m,"touchstart",f);var B=new mxUrlConverter,Q=!1;if(null!=d)for(f=0;f<d.length;f++)l=d[f],M(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(m,"dragleave",function(P){t.style.cursor="";for(var q=mxEvent.getSource(P);null!=q;){if(q==m||q==t){P.stopPropagation();P.preventDefault();break}q=q.parentNode}});var T=function(P){return function(q,u,J,G,H,g,p,C,I){null!=I&&EditorUi.isVisioFilename(I.name)?b.importVisio(I,mxUtils.bind(this,function(N){M(N,u,J,G,H,g,p,"fixed",+f);mxEvent.addListener(m,"touchstart",f);var B=new mxUrlConverter,Q=!1;if(null!=d)for(f=0;f<d.length;f++)l=d[f],M(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(m,"dragleave",function(P){t.style.cursor="";for(var q=mxEvent.getSource(P);null!=q;){if(q==m||q==t){P.stopPropagation();P.preventDefault();break}q=q.parentNode}});var U=function(P){return function(q,u,J,G,H,g,p,C,I){null!=I&&EditorUi.isVisioFilename(I.name)?b.importVisio(I,mxUtils.bind(this,function(N){M(N,u,J,G,H,g,p,"fixed",mxEvent.isAltDown(P)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=I&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(q,I.name)?b.isExternalDataComms()?b.parseFile(I,mxUtils.bind(this,function(N){4==N.readyState&&(b.spinner.stop(),200<=N.status&&299>=N.status&&(M(N.responseText,u,J,G,H,g,p,"fixed",mxEvent.isAltDown(P)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(M(q,u,J,G,H,g,p,"fixed",mxEvent.isAltDown(P)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight)}};mxEvent.addListener(m,"dragover",K);mxEvent.addListener(m,"drop",L);mxEvent.addListener(t,"dragover",K);mxEvent.addListener(t,"drop",L);n.appendChild(m);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);"draw.io"!=b.getServiceName()||null==x||x.constructor!=DriveLibrary&&x.constructor!=GitHubLibrary||(l=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(x,function(P){if(null!=P){var q=b.getSearch("create title mode url drive splash state clibs ui".split(" "));q+=(0==q.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(P);P=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+q,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(P.container,450,240,!0);P.init()}else x.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(x.getId(),x)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get("export"),function(){var P=b.createLibraryDataFromImages(c),-q=k.value;/(\.xml)$/i.test(q)||(q+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,q,"text/xml",null,null,null!=y?y:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(q)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,-"change",function(P){Q=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(q,u,J,G,H,g,p,C,I){null!=U.files&&(T(P)(q,u,J,G,H,g,p,C,I),U.type="",U.type="file",U.value="")});m.scrollTop=m.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}l=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);b.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";d.appendChild(l)}l=mxUtils.button(mxResources.get("addImages"),+q=k.value;/(\.xml)$/i.test(q)||(q+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,q,"text/xml",null,null,null!=y?y:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(q)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";d.appendChild(l);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var T=document.createElement("input");T.setAttribute("multiple","multiple");T.setAttribute("type","file");mxEvent.addListener(T,+"change",function(P){Q=!1;b.importFiles(T.files,0,0,b.maxImageSize,function(q,u,J,G,H,g,p,C,I){null!=T.files&&(U(P)(q,u,J,G,H,g,p,C,I),T.type="",T.type="file",T.value="")});m.scrollTop=m.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}l=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);b.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";d.appendChild(l)}l=mxUtils.button(mxResources.get("addImages"),function(){null!=D&&(D(),D=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(P,q,u){Q=!1;if(null!=P){if("data:image/"==P.substring(0,11)){var J=P.indexOf(",");0<J&&(P=P.substring(0,J)+";base64,"+P.substring(J+1))}M(P,null,0,0,q,u);m.scrollTop=m.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";d.appendChild(l);this.saveBtnClickHandler=function(P,q,u,J){b.saveLibrary(P,q,u,J)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(k.value,c,x,z)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";d.appendChild(l);b.editor.cancelFirst||d.appendChild(f);n.appendChild(d);this.container=n},EditShapeDialog=function(b,l,n,d,x){d=null!=d?d:300;x=null!=x?x:120;var z=document.createElement("table"),y=document.createElement("tbody");z.style.cellPadding="4px";var F=document.createElement("tr");var M=document.createElement("td");M.setAttribute("colspan","2");M.style.fontSize="10pt";mxUtils.write(M,n);F.appendChild(M);y.appendChild(F);F=document.createElement("tr");M=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=x+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};M.appendChild(K);F.appendChild(M);M=document.createElement("td");n=document.createElement("div");n.style.position="relative";n.style.border="1px solid gray";n.style.top="6px";n.style.width="200px";@@ -12387,7 +12391,7 @@ m.style.width="250px";m.className="dlg_fontName_g";K=document.createElement("td"null,"Font Name")+":");M.appendChild(K);var v=document.createElement("input");"w"==d&&(Editor.enableWebFonts?v.setAttribute("value",l):f.setAttribute("value",l));v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(v);M.appendChild(K);Editor.enableWebFonts&&F.appendChild(M);M=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");M.appendChild(K);var A=document.createElement("input");A.setAttribute("value",n||"");A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(A);M.appendChild(K);Editor.enableWebFonts&&F.appendChild(M);this.init=function(){var D=f;"g"==d?D=m:"w"==d&&Editor.enableWebFonts&&(D=v);D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};M=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();x()});l.className="geBtn";b.editor.cancelFirst&&K.appendChild(l);var E=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var D=f.value;var B="s"}else if(k.checked){D=-m.value;var Q=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");B="g"}else t.checked&&(D=v.value,Q=A.value,B="w");var T=D;var U=Q,P=B,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,u=y.querySelector(".dlg_fontName_"+P);null==u||null!=T&&0!=T.length?(u=y.querySelector(".dlg_fontUrl"),null==u||"w"!=P||q.test(U)?T=!0:(u.style.border="1px solid red",T=!1)):(u.style.border="1px solid red",T=!1);T&&(x(D,Q,B),b.hideDialog())});E.className="geBtn gePrimaryBtn";+m.value;var Q=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");B="g"}else t.checked&&(D=v.value,Q=A.value,B="w");var U=D;var T=Q,P=B,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,u=y.querySelector(".dlg_fontName_"+P);null==u||null!=U&&0!=U.length?(u=y.querySelector(".dlg_fontUrl"),null==u||"w"!=P||q.test(T)?U=!0:(u.style.border="1px solid red",U=!1)):(u.style.border="1px solid red",U=!1);U&&(x(D,Q,B),b.hideDialog())});E.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",z);mxEvent.addListener(m,"keypress",z);mxEvent.addListener(v,"keypress",z);mxEvent.addListener(A,"keypress",z);mxEvent.addListener(f,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(m,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(v,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(A,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});K.appendChild(E);b.editor.cancelFirst||K.appendChild(l);M.appendChild(K);F.appendChild(M);y.appendChild(F);this.container=y};function AspectDialog(b,l,n,d,x){this.aspect={pageId:l||(b.pages?b.pages[0].getId():null),layerIds:n||[]};l=document.createElement("div");var z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("pages"));l.appendChild(z);n=document.createElement("div");n.className="geAspectDlgList";l.appendChild(n);z=document.createElement("h5");z.style.margin="0 0 10px";mxUtils.write(z,mxResources.get("layers"));l.appendChild(z);z=document.createElement("div");z.className="geAspectDlgList";@@ -12399,7 +12403,7 @@ AspectDialog.prototype.createPageItem=function(b,l,n){var d=document.createElemethis.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var z=x.model;z=z.getChildCells(z.getRoot());for(var y=0;y<z.length;y++)this.createLayerItem(z[y],b,x,n)});mxEvent.addListener(d,"click",l);this.aspect.pageId==b&&l()};AspectDialog.prototype.createLayerItem=function(b,l,n,d){l=n.convertValueToString(b)||mxResources.get("background")||"Background";var x=document.createElement("div");x.setAttribute("data-layer-id",b.id);x.className="geAspectDlgListItem";x.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(l)+"</div>";this.layersContainer.appendChild(x);this.createViewer(x.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=x.className.indexOf("geAspectDlgListItemSelected")?(x.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(x.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(x,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};-var FilePropertiesDialog=function(b,l){function n(B){var Q=K;K=function(T,U){try{B(function(){Q(T,U)},U)}catch(P){U(P)}}}var d=document.createElement("table"),x=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var z=b.getCurrentFile(),y=null!=z&&null!=z.getTitle()?z.getTitle():b.defaultFilename,F=/(\.png)$/i.test(y),M=/(\.svg)$/i.test(y),K=function(B,Q){B()},L=null!=z?z.isLocked():!1;var c=document.createElement("tr");var f=document.createElement("td");+var FilePropertiesDialog=function(b,l){function n(B){var Q=K;K=function(U,T){try{B(function(){Q(U,T)},T)}catch(P){T(P)}}}var d=document.createElement("table"),x=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var z=b.getCurrentFile(),y=null!=z&&null!=z.getTitle()?z.getTitle():b.defaultFilename,F=/(\.png)$/i.test(y),M=/(\.svg)$/i.test(y),K=function(B,Q){B()},L=null!=z?z.isLocked():!1;var c=document.createElement("tr");var f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("locked")+":");c.appendChild(f);var k=document.createElement("input");k.setAttribute("type","checkbox");L&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(k);c.appendChild(f);x.appendChild(c);this.init=function(){k.focus()};n(function(B,Q){null!=b.fileNode&&L!=k.checked?window.setTimeout(function(){null!=z&&z.setLocked(k.checked);B()},0):B()});if(F||M){y=1;F=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(y=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(F=parseInt(c.getAttribute("border"))));c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("zoom")+":");c.appendChild(f);var m=document.createElement("input");m.setAttribute("value",100*y+"%");m.style.marginLeft="4px";m.style.width="100%";f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(m);c.appendChild(f);x.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("borderWidth")+":");c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",F);t.style.marginLeft="4px";t.style.width="100%";f=document.createElement("td");f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);x.appendChild(c);@@ -12414,16 +12418,16 @@ y.style.textOverflow="ellipsis",y.style.display="block",y.style.margin="2px 0pxK(function(){b.spinner.stop();b.hideDialog()},function(B){b.spinner.stop();b.handleError(B,mxResources.get("error"))})});y.className="geBtn gePrimaryBtn";c=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&f.appendChild(F);f.appendChild(y);b.editor.cancelFirst||f.appendChild(F);c.appendChild(f);x.appendChild(c);d.appendChild(x);this.container=d},ConnectionPointsDialog=function(b,l){function n(){null!=x&&x.destroy()}var d=document.createElement("div");d.style.userSelect="none";var x=null;this.init=function(){function z(G,H,g){var p="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";G=new mxCell("",new mxGeometry(G,H,6,6),p);G.vertex=!0;G.cp=!0;G.constObj=g;return c.addCell(G)}function y(G){G=c.getSelectionCells();c.deleteCells(G)}function F(){var G=parseInt(P.value)||0;G=0>G?0:100<G?100:G;P.value=G;var H=parseInt(u.value)||0;H=0>H?0:100<H?100:H;u.value=H;var g=parseInt(q.value)||0,p=parseInt(J.value)||0;g=new mxConnectionConstraint(new mxPoint(G/100,H/100),!1,null,g,p);G=c.getConnectionPoint(m,g);H=c.getSelectionCell();if(null!=H){H.constObj=g;g=H.geometry.clone();p=c.view.scale;var C=c.view.translate;g.x=(G.x-3*p)/p-C.x;g.y=(G.y-3*p)/p-C.y;c.model.setGeometry(H,g)}}function M(G){if(G.constObj)return{x:G.constObj.point.x,-y:G.constObj.point.y,dx:G.constObj.dx,dy:G.constObj.dy};var H=0,g=0,p=f.geometry,C=mxUtils.format((G.geometry.x+3-p.x)/p.width);G=mxUtils.format((G.geometry.y+3-p.y)/p.height);0>C?(H=C*p.width,C=0):1<C&&(H=(C-1)*p.width,C=1);0>G?(g=G*p.height,G=0):1<G&&(g=(G-1)*p.height,G=1);return{x:C,y:G,dx:parseInt(H),dy:parseInt(g)}}function K(G){if(1==c.getSelectionCount()){var H=c.getSelectionCell();G&&(H.constObj=null);G=M(H);P.value=100*G.x;u.value=100*G.y;q.value=G.dx;J.value=G.dy;U.style.visibility=""}else U.style.visibility=+y:G.constObj.point.y,dx:G.constObj.dx,dy:G.constObj.dy};var H=0,g=0,p=f.geometry,C=mxUtils.format((G.geometry.x+3-p.x)/p.width);G=mxUtils.format((G.geometry.y+3-p.y)/p.height);0>C?(H=C*p.width,C=0):1<C&&(H=(C-1)*p.width,C=1);0>G?(g=G*p.height,G=0):1<G&&(g=(G-1)*p.height,G=1);return{x:C,y:G,dx:parseInt(H),dy:parseInt(g)}}function K(G){if(1==c.getSelectionCount()){var H=c.getSelectionCell();G&&(H.constObj=null);G=M(H);P.value=100*G.x;u.value=100*G.y;q.value=G.dx;J.value=G.dy;T.style.visibility=""}else T.style.visibility="hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.borderStyle="solid";L.style.borderWidth="1px";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var c=new Graph(L);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;L=l.geometry;var f=new mxCell(l.value,new mxGeometry(0,0,L.width,L.height),l.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");f.vertex=!0;c.addCell(f);c.dblClick=function(G,H){if(null!=H&&H!=f)c.setSelectionCell(H);else{H=mxUtils.convertPoint(c.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=c.view.scale;var g=c.view.translate;c.setSelectionCell(z((H.x-3*G)/G-g.x,(H.y-3*G)/G-g.y))}};x=new mxKeyHandler(c);x.bindKey(46,y);x.bindKey(8,y);c.getRubberband().isForceRubberbandEvent=function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==f)};c.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var k=c.isCellSelectable;c.isCellSelectable=function(G){return G==f?!1:k.apply(this,arguments)};c.getLinkForCell=function(){return null};var m=c.view.getState(f);L=c.getAllConnectionConstraints(m);for(var t=0;null!=L&&t<L.length;t++){var v=c.getConnectionPoint(m,L[t]);z(v.x-3,v.y-3,L[t])}c.fit(8);c.center();t=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){c.zoomIn()});v=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var A=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),E=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(G){!isNaN(G)&&0<G&&(c.setGridSize(G),c.setGridEnabled(!0),c.refresh())})},D=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(G){mxEvent.isShiftDown(G)?E():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(D,"dblclick",E);var B=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),y);mxUtils.setOpacity(B,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(t);L.appendChild(v);L.appendChild(A);L.appendChild(D);L.appendChild(B);d.appendChild(L);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("value",-"1");Q.style.width="45px";Q.style.position="relative";Q.style.margin="0 4px 0 4px";var T=document.createElement("select");T.style.position="relative";v=["left","right","top","bottom"];for(t=0;t<v.length;t++)A=v[t],D=document.createElement("option"),mxUtils.write(D,mxResources.get(A)),D.value=A,T.appendChild(D);t=mxUtils.button(mxResources.get("add"),function(){var G=parseInt(Q.value);G=1>G?1:100<G?100:G;Q.value=G;for(var H=T.value,g=f.geometry,p=[],C=0;C<G;C++){switch(H){case "left":var I=g.x;var N=-g.y+(C+1)*g.height/(G+1);break;case "right":I=g.x+g.width;N=g.y+(C+1)*g.height/(G+1);break;case "top":I=g.x+(C+1)*g.width/(G+1);N=g.y;break;case "bottom":I=g.x+(C+1)*g.width/(G+1),N=g.y+g.height}p.push(z(I-3,N-3))}c.setSelectionCells(p)});t.style.marginLeft="auto";L.appendChild(t);L.appendChild(Q);L.appendChild(T);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));-U.appendChild(L);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";U.appendChild(P);mxUtils.write(U,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";U.appendChild(q);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);-var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";U.appendChild(J);mxUtils.write(U,"pt");d.appendChild(U);K();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(B,60):+"1");Q.style.width="45px";Q.style.position="relative";Q.style.margin="0 4px 0 4px";var U=document.createElement("select");U.style.position="relative";v=["left","right","top","bottom"];for(t=0;t<v.length;t++)A=v[t],D=document.createElement("option"),mxUtils.write(D,mxResources.get(A)),D.value=A,U.appendChild(D);t=mxUtils.button(mxResources.get("add"),function(){var G=parseInt(Q.value);G=1>G?1:100<G?100:G;Q.value=G;for(var H=U.value,g=f.geometry,p=[],C=0;C<G;C++){switch(H){case "left":var I=g.x;var N=+g.y+(C+1)*g.height/(G+1);break;case "right":I=g.x+g.width;N=g.y+(C+1)*g.height/(G+1);break;case "top":I=g.x+(C+1)*g.width/(G+1);N=g.y;break;case "bottom":I=g.x+(C+1)*g.width/(G+1),N=g.y+g.height}p.push(z(I-3,N-3))}c.setSelectionCells(p)});t.style.marginLeft="auto";L.appendChild(t);L.appendChild(Q);L.appendChild(U);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));+T.appendChild(L);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";T.appendChild(P);mxUtils.write(T,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";T.appendChild(q);mxUtils.write(T,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";T.appendChild(L);+var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";T.appendChild(u);mxUtils.write(T,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";T.appendChild(J);mxUtils.write(T,"pt");d.appendChild(T);K();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(B,60):mxUtils.setOpacity(B,10);K()});c.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(P,"change",F);mxEvent.addListener(u,"change",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(J,"change",F);L=mxUtils.button(mxResources.get("cancel"),function(){n();b.hideDialog()});L.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){var G=c.model.cells,H=[],g=[],p;for(p in G){var C=G[p];C.cp&&g.push(M(C))}g.sort(function(I,N){return I.x!=N.x?I.x-N.x:I.y!=N.y?I.y-N.y:I.dx!=N.dx?I.dx-N.dx:I.dy-N.dy});for(G=0;G<g.length;G++)0<G&&g[G].x==g[G-1].x&&g[G].y==g[G-1].y&&g[G].dx==g[G-1].dx&&g[G].dy==g[G-1].dy||H.push("["+g[G].x+","+g[G].y+",0,"+g[G].dx+","+g[G].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[l]);n();b.hideDialog()});t.className="geBtn gePrimaryBtn";v=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[l]);n();b.hideDialog()});v.className="geBtn";A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign="right";b.isOffline()||A.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&A.appendChild(L);A.appendChild(v);A.appendChild(t);b.editor.cancelFirst||A.appendChild(L);d.appendChild(A)};this.destroy=n;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=@@ -12681,7 +12685,7 @@ arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalfunction(g,p,C,I,N,O,S,R,V,Y,W,X,aa,ba,la,ea){var ca=B.apply(this,arguments);if(null!=X){var fa=ca.getAttribute("style");null==fa&&(fa="");X="auto"==X||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":X;ca.setAttribute("style",fa+(" color-scheme: "+X+";"))}var na=this.getCustomFonts();if(W&&0<na.length){var Z=ca.ownerDocument;fa=null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"style"):Z.createElement("style");null!=Z.setAttributeNS?fa.setAttributeNS("type","text/css"):fa.setAttribute("type","text/css");for(var ha="",ka="",da=0;da<na.length;da++){var va=na[da].name,ra=na[da].url;Graph.isCssFontUrl(ra)?ha+="@import url("+Graph.rewriteGoogleFontUrl(ra)+");\n":ka+='@font-face {\nfont-family: "'+va+'";\nsrc: url("'+ra+'");\n}\n'}fa.appendChild(Z.createTextNode(ha+ka));ca.getElementsByTagName("defs")[0].appendChild(fa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ca);this.mathEnabled&&(document.body.appendChild(ca),Editor.MathJaxRender(ca),ca.parentNode.removeChild(ca),fa=ca.ownerDocument.getElementById("MJX-SVG-styles"),null!=fa&&ca.getElementsByTagName("defs")[0].appendChild(fa.cloneNode(!0)));return ca};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){Q.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(g){return[g.shape,g.text,g.secondLabel,g.control]};-var T=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){T.apply(this,arguments);this.enumerationState=0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(g){null!=g.shape&&this.redrawEnumerationState(g);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(g){g=decodeURIComponent(mxUtils.getValue(g.style,"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'++var U=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){U.apply(this,arguments);this.enumerationState=0};var T=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(g){null!=g.shape&&this.redrawEnumerationState(g);return T.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(g){g=decodeURIComponent(mxUtils.getValue(g.style,"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(g)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(g){var p="1"==mxUtils.getValue(g.style,"enumerate",0);p&&null==g.secondLabel?(g.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),g.secondLabel.size=12,g.secondLabel.state=g,g.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(g,g.secondLabel)):p||null==g.secondLabel||(g.secondLabel.destroy(),g.secondLabel=null);p=g.secondLabel;if(null!=p){var C=g.view.scale,I=this.createEnumerationValue(g);g=this.graph.model.isVertex(g.cell)?new mxRectangle(g.x+g.width-4*C,g.y+4*C,0,0):mxRectangle.fromPoint(g.view.getPoint(g));p.bounds.equals(g)&&p.value==I&&p.scale==C||(p.bounds=g,p.value=I,p.scale=C,p.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(g,p){"data:action/json,"==g.substring(0,17)&&(g=JSON.parse(g.substring(17)),null!=g.actions&&this.executeCustomActions(g.actions,null,p))};Graph.prototype.executeCustomActions=function(g,p,C){if(this.executingCustomActions)this.stoppingCustomActions=@@ -12741,7 +12745,7 @@ p.style.marginTop="30px";p.style.textAlign="right";p.style.whiteSpace="nowrap";gp.appendChild(V));I=null!=I?I:null!=C?"export":PrintDialog.previewEnabled?"print":"ok";I=mxUtils.button(mxResources.get(I),function(){try{g.hideDialog(),O(!0)}catch(Ba){g.handleError(Ba)}});I.className="geBtn gePrimaryBtn";p.appendChild(I);g.editor.cancelFirst||p.appendChild(S);R.appendChild(p);if(g.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(R.classList.add("geDarkMode"),R.style.colorScheme="dark"):(R.classList.remove("geDarkMode"),R.style.colorScheme="light")};g.addListener("darkModeChanged",Ka);Ka();var Na=function(Ba,Ia){Ba=Ia.getProperty("dialog");R.parentNode==Ba.container&&(g.editor.removeListener(Na),g.removeListener(Ka))};g.editor.addListener("hideDialog",Na)}this.container=R};var H=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 g=this.image;null!=g&&null!=g.src&&Graph.isPageLink(g.src)&&(g={originalSrc:g.src});this.page.viewState.backgroundImage=g}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else H.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&-(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(g=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=g?g:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(g=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=g?g:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.4";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.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||"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -12759,10 +12763,10 @@ EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=-function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var m=null==c||null==f;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=this.timeout,A=t.spin,E=null,D=null,B=mxUtils.bind(this,function(U){null!=U&&U()}),Q=this;t.spin=function(U,P,q,u){u=null!=u?u:v;var J=!1;if(!this.active){var G=-Date.now();null!=q&&(E=window.setTimeout(function(){t.stop();E=null;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},u));m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);U==document.body&&"1"==urlParams.embedInline&&(U=Q.diagramContainer,c=U.scrollLeft+U.clientWidth/2,f=U.scrollTop+U.clientHeight/2);A.call(this,U);"1"==urlParams.embedInline&&null!=t.el&&(t.el.style.marginTop=U.scrollTop+"px",t.el.style.marginLeft=-U.scrollLeft+"px");this.active=!0;null!=P&&(J=document.createElement("div"),J.className="geSpinnerStatus",J.setAttribute("title",P),U==document.body?(J.style.left=Math.max(0,c)+"px",J.style.top=Math.max(0,f+66)+"px"):(J.style.left="50%",J.style.top="50%",J.style.marginTop="70px"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),J.innerText=P,U.appendChild(J),t.status=J);this.pause=mxUtils.bind(this,function(){var H=B;this.active&&(u=Math.max(0,u-(Date.now()-G)),H=mxUtils.bind(this,-function(g){this.spin(U,P,q,u);if(null!=g)try{g(),D=mxUtils.bind(this,function(){this.spin(U,P,q,u);try{g()}catch(p){null!=q&&q(p)}})}catch(p){null!=q&&q(p)}}));this.stop();return H});J=!0}return J};var T=t.stop;t.stop=function(){T.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return B};return t};EditorUi.prototype.isCompatibleString=function(c){try{if(c=+function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var m=null==c||null==f;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=this.timeout,A=t.spin,E=null,D=null,B=mxUtils.bind(this,function(T){null!=T&&T()}),Q=this;t.spin=function(T,P,q,u){u=null!=u?u:v;var J=!1;if(!this.active){var G=+Date.now();null!=q&&(E=window.setTimeout(function(){t.stop();E=null;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},u));m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);T==document.body&&"1"==urlParams.embedInline&&(T=Q.diagramContainer,c=T.scrollLeft+T.clientWidth/2,f=T.scrollTop+T.clientHeight/2);A.call(this,T);"1"==urlParams.embedInline&&null!=t.el&&(t.el.style.marginTop=T.scrollTop+"px",t.el.style.marginLeft=+T.scrollLeft+"px");this.active=!0;null!=P&&(J=document.createElement("div"),J.className="geSpinnerStatus",J.setAttribute("title",P),T==document.body?(J.style.left=Math.max(0,c)+"px",J.style.top=Math.max(0,f+66)+"px"):(J.style.left="50%",J.style.top="50%",J.style.marginTop="70px"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),J.innerText=P,T.appendChild(J),t.status=J);this.pause=mxUtils.bind(this,function(){var H=B;this.active&&(u=Math.max(0,u-(Date.now()-G)),H=mxUtils.bind(this,+function(g){this.spin(T,P,q,u);if(null!=g)try{g(),D=mxUtils.bind(this,function(){this.spin(T,P,q,u);try{g()}catch(p){null!=q&&q(p)}})}catch(p){null!=q&&q(p)}}));this.stop();return H});J=!0}return J};var U=t.stop;t.stop=function(){U.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return B};return t};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var f=mxUtils.parseXml(c),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}}catch(m){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,m=this.editor.graph,t=this;f.getFunction=function(v){if(m.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==v.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==v.keyCode)return function(){0<A&&@@ -12771,11 +12775,11 @@ t.movePage(A,0)};if(39==v.keyCode)return function(){A<t.pages.length-1&&t.movePam+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(c),v=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=v?mxUtils.getXml(v):""}}catch(A){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var k=null!=c?this.editor.extractGraphModel(c,!0):null;null!=k&&(c=k);if(null!=c){k=this.editor.graph;k.model.beginUpdate();try{var m=null!=this.pages?this.pages.slice():null,t=c.getElementsByTagName("diagram");if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var v=t.length-1;0<=v;v--){var A=this.updatePageRoot(new DiagramPage(t[v]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[v+1]));k.model.execute(new ChangePage(this,A,0==v?A:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,-this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(v=0;v<m.length;v++)k.model.execute(new ChangePage(this,m[v],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(f)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){f=null!=f?f:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;Q=null!=+this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(v=0;v<m.length;v++)k.model.execute(new ChangePage(this,m[v],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(f)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){f=null!=f?f:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;Q=null!=Q?Q:!Editor.defaultCompressed;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=m;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(Q){var J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());J.appendChild(c)}else{J=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(J);if(Graph.decompress(u)!=J)return J;J=c.ownerDocument.createElement("diagram");J.setAttribute("name",mxResources.get("pageWithNumber",[1]));J.setAttribute("id",Editor.guid());mxUtils.setTextContent(J,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(J)}B?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));-null!=T&&(u=u.cloneNode(!0),u.setAttribute("scale",T));null!=U&&(u=u.cloneNode(!0),u.setAttribute("border",U));c=Q?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!v&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=k?k.getTitle():null,q,P);else if(v||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(m=null),k=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,f,m,null,E,D,P,null,null,k.scale,+null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=T&&(u=u.cloneNode(!0),u.setAttribute("border",T));c=Q?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!v&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(u),f,null!=k?k.getTitle():null,q,P);else if(v||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(m=null),k=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,f,m,null,E,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,m){c=null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var B=D.getElementsByTagName("mxGraphModel"),Q=0<B.length?B[0]:null;B=D;null==Q&&k?(Q=mxUtils.getNodeValue(D),0<Q.length&&(Q=Graph.decompress(Q),null!=Q&&0<Q.length&&(B=D.cloneNode(!1),B.appendChild(mxUtils.parseXml(Q).documentElement)))):null==Q||k?B=D.cloneNode(!0):(B=D.cloneNode(!1),mxUtils.setTextContent(B,Graph.compressNode(Q)));t.appendChild(B)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var v=this.pages[f],A=v.node;if(v!=this.currentPage)if(v.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(v.root));this.editor.graph.saveViewState(v.viewState,E,null,m);EditorUi.removeChildNodes(A);A.appendChild(E);delete v.needsUpdate}else m&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&(null!=v.viewState.backgroundImage.originalSrc?v.viewState.backgroundImage=this.createImageForPageLink(v.viewState.backgroundImage.originalSrc,v):Graph.isPageLink(v.viewState.backgroundImage.src)&&(v.viewState.backgroundImage=this.createImageForPageLink(v.viewState.backgroundImage.src,v))),null!=v.viewState.backgroundImage&&null!=v.viewState.backgroundImage.originalSrc&&@@ -12785,9 +12789,9 @@ v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]delete t.cells[v]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var k=0;k<c.attributes.length;k++)"as"!=c.attributes[k].name&&c.setAttribute(c.attributes[k].name,this.anonymizeString(c.attributes[k].value,f));if(null!=c.childNodes)for(k=0;k<c.childNodes.length;k++)this.anonymizeAttributes(c.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),-this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){t=null!=t?t:!0;v=null!=v?v:!1;B=null!=B?B:!Editor.defaultCompressed;var P=+this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){t=null!=t?t:!0;v=null!=v?v:!1;B=null!=B?B:!Editor.defaultCompressed;var P=this.editor.graph;if((f||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var u=null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&P.setBackgroundImage(u.viewState.backgroundImage);-P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}A=null!=A?A:this.getXmlFileData(t,v,B,Q);D=null!=D?D:this.getCurrentFile();c=this.createFileData(A,P,D,window.location.href,c,f,k,m,t,E,B,T,U);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,k,m,t,v){v=null!=v?v:!0;var A=null,E=EditorUi.drawHost++P.getGlobalVariable=function(J){return"page"==J&&null!=u?u.getName():"pagenumber"==J?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=u&&P.model.setRoot(u.root)}A=null!=A?A:this.getXmlFileData(t,v,B,Q);D=null!=D?D:this.getCurrentFile();c=this.createFileData(A,P,D,window.location.href,c,f,k,m,t,E,B,U,T);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return c};EditorUi.prototype.getHtml=function(c,f,k,m,t,v){v=null!=v?v:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){A=v?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;v=Math.floor(A.x/D-f.view.translate.x);D=Math.floor(A.y/D-f.view.translate.y);A=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(E=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",v);c.setAttribute("y0",D)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=m&&c.setAttribute("edit",m));null!=t&&(t=t.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+@@ -12798,19 +12802,19 @@ EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};Editif(null==m.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=m.pageId&&f.getId()==m.pageId)t=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}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,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(v=0;v<A.length;v++)f[A[v]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(v=0;v<D.length;v++){var B=D[v];E.setVisible(B,f[B.id]||!1)}}catch(Q){}};EditorUi.prototype.getBaseFilename=function(c){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(".")));!c&&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(c,f,k,m,t,v,A,E,D,B,Q,T,U,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&Q?".drawio":"")+"."+c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,S){try{return this.createDownloadRequest(O,c,m,S,A,t,E,D,B,Q,T,void 0,void 0,!v,U,P,q,u,J)}catch(R){this.handleError(R)}}));else{var p=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var I=this.editor.graph.background;+function(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename(!t),H=G+("xml"==c||"pdf"==c&&Q?".drawio":"")+"."+c;if("xml"==c){var g=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,t,null,null,null,f);this.saveData(H,c,g,"text/xml")}else if("html"==c)g=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(H,c,g,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?H=G+".png":"jpeg"==c&&(H=G+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(O,S){try{return this.createDownloadRequest(O,c,m,S,A,t,E,D,B,Q,U,void 0,void 0,!v,T,P,q,u,J)}catch(R){this.handleError(R)}}));else{var p=null,C=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==c){var I=this.editor.graph.background;if(A||I==mxConstants.NONE)I=null;var N=this.editor.graph.getSvg(I,null,null,null,null,m);k&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();C(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else H=G+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();C(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,m,t,v,A,E,D,-B,Q,T,U,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,k,m,t,v,A,E,D,B,Q,T,U,P,q,u,J,G,H);f="";for(var g in c)k=c[g],null!=k&&(f+=g+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,m,t,v,A,E,D,B,Q,T,U,P,q,u,J,G,H){var g=this.editor.graph,p=g.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,N=null;if(!EditorUi.isElectronApp&&(p.width*+B,Q,U,T,P,q,u,J,G,H){c=this.downloadRequestBuilder(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H);f="";for(var g in c)k=c[g],null!=k&&(f+=g+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u,J,G,H){var g=this.editor.graph,p=g.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==v?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var C=null,I=null,N=null;if(!EditorUi.isElectronApp&&(p.width*p.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==f&&(null!=Q?(C=Q.from,I=Q.to):0==v&&(N="1"));"xmlpng"==f&&(B="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){C=v;break}v=g.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?t||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;t={globalVars:g.getExportVariables()};null!=Q&&null!=-Q.from&&(t.globalVars.pagenumber=Q.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:N,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:B,xml:k,filename:null!=c?c:"",extras:JSON.stringify(t),scale:A,border:E,pageMargin:q,w:T&&isFinite(T)?T:null,h:U&&isFinite(U)?U:null,crop:null!=P&&P?"1":"0",fit:null!=+Q.from&&(t.globalVars.pagenumber=Q.from+1);D&&(t.grid={size:g.gridSize,steps:g.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:g.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return{format:f,from:C,to:I,allPages:N,bg:null!=v?v:mxConstants.NONE,base64:m,embedXml:B,xml:k,filename:null!=c?c:"",extras:JSON.stringify(t),scale:A,border:E,pageMargin:q,w:U&&isFinite(U)?U:null,h:T&&isFinite(T)?T:null,crop:null!=P&&P?"1":"0",fit:null!=u&&u?"1":"0",shadows:null!=H&&H?"1":"0",sheetsAcross:J,sheetsDown:G}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+1));try{f=JSON.parse(c)}catch(m){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var k=f.lastIndexOf("#");0<k&&(f=f.substring(0,k));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(m){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var m=window.location.hash,t=mxUtils.bind(this,function(A){var E=null!=c.data?c.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return m};this.fileLoaded(A);"csv"==c.format&&this.importCsv(E,-mxUtils.bind(this,function(U){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?parseInt(c.interval):6E4,B=null,Q=mxUtils.bind(this,function(){var U=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){U===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),T()):this.handleError({message:mxResources.get("error")+-" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(B);B=window.setTimeout(Q,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();Q()}));T();Q()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=+mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?parseInt(c.interval):6E4,B=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){T===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),U()):this.handleError({message:mxResources.get("error")++" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(B);B=window.setTimeout(Q,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();Q()}));U();Q()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(c){function f(g){var p=new mxCellOverlay(g.image||t.warningImage,g.tooltip,g.align,g.valign,g.offset);p.addListener(mxEvent.CLICK,function(C,I){m.alert(g.tooltip)});return p}var k=null,m=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var t=this.editor.graph,v=t.getModel();v.beginUpdate();var A=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=v.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var B=-mxUtils.parseXml(D).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))v.setValue(E,B);else for(var Q=B.attributes,T=0;T<Q.length;T++)t.setAttributeForCell(E,Q[T].nodeName,0<Q[T].nodeValue.length?Q[T].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+E.id+": "+g)}try{var U=c.getAttribute("style");null!=U&&t.model.setStyle(E,U)}catch(g){null!=window.console&&console.log("Error in style for "+E.id+": "+g)}try{var P=c.getAttribute("icon");if(null!=P){var q=+mxUtils.parseXml(D).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))v.setValue(E,B);else for(var Q=B.attributes,U=0;U<Q.length;U++)t.setAttributeForCell(E,Q[U].nodeName,0<Q[U].nodeValue.length?Q[U].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+E.id+": "+g)}try{var T=c.getAttribute("style");null!=T&&t.model.setStyle(E,T)}catch(g){null!=window.console&&console.log("Error in style for "+E.id+": "+g)}try{var P=c.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(E);null!=q&&t.addCellOverlay(E,f(q))}}catch(g){null!=window.console&&console.log("Error in icon for "+E.id+": "+g)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var J=t.getCellGeometry(E);if(null!=J){J=J.clone();for(key in u){var G=parseFloat(u[key]);"dx"==key?J.x+=G:"dy"==key?J.y+=G:"dw"==key?J.width+=G:"dh"==key?J.height+=G:J[key]=parseFloat(u[key])}t.model.setGeometry(E,J)}}}catch(g){null!=window.console&&console.log("Error in icon for "+E.id+": "+g)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(t.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(A=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(c,f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=k.lastIndexOf(".");0<=m&&(c=k.substring(m),k=k.substring(0,m));if(f){f=k;var t=new Date;k=t.getFullYear();m=t.getMonth()+1;var v=t.getDate(),A=t.getHours(),E=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+m+"-"+v+"-"+A+"-"+@@ -12821,7 +12825,7 @@ mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxRec.getMode()){var A="1"==urlParams.sketch?"sketch":uiTheme;if(null==A)A="default";else if("sketch"==A||"min"==A)A+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+A})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||v():v()});f?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else v();return t};EditorUi.prototype.getHashValueForPages=function(c,f){var k=0,m=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var A=c[v].node.cloneNode(!1);-A.removeAttribute("name");m.root=c[v].root;var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=f&&(f.eltCount+=A.getElementsByTagName("*").length,f.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(D,B,Q,T){return!T||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?T&&"mxCell"==D.nodeName&&"previous"==B?null:Q:Math.round(Q)},+A.removeAttribute("name");m.root=c[v].root;var E=t.encode(m);this.editor.graph.saveViewState(c[v].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=f&&(f.eltCount+=A.getElementsByTagName("*").length,f.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(D,B,Q,U){return!U||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?U&&"mxCell"==D.nodeName&&"previous"==B?null:Q:Math.round(Q)},f)<<0}return k};EditorUi.prototype.hashValue=function(c,f,k){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var t=0;t<c.attributes.length;t++){var v=c.attributes[t].name,A=null!=f?f(c,v,c.attributes[t].value,!0):c.attributes[t].value;null!=A&&(m^=this.hashValue(v,f,k)+this.hashValue(A,f,k))}}if(null!=c.childNodes)for(t=0;t<c.childNodes.length;t++)m=(m<<5)-m+this.hashValue(c.childNodes[t],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(t=0;t<c.length;t++)f=(f<<5)-f+c.charCodeAt(t)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,m,t,v,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));@@ -12832,14 +12836,14 @@ m=k+"Window";if(null==this[m]){var t="min"==Editor.currentTheme||"simple"==Editof&&(this[m].doSearch(f),this[m].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,k,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var t=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var v=0;v<this.openLibraries.length;v++)if(this.openLibraries[v].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[v],this.openLibraries);break}t={file:c,images:f,title:k,expand:m};this.openLibraries.push(t)}else this.scratchpad=c;v=this.sidebar.palettes[c.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var A=null,E=mxUtils.bind(this,function(G,H){0==G.length&&c.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),H.appendChild(A)):this.addLibraryEntries(G,H)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=c.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(c.getHash(),k,null!=m?m:!0,mxUtils.bind(this,function(G){E(f,G)}));null!=t&&(t.div=D);this.repositionLibrary(v,"L.scratchpad"!=c.getHash());m=D.parentNode.previousSibling;k=m.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&m.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var B=document.createElement("div");B.style.backgroundColor="inherit";m.style.position="relative";var Q=-document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var T=null;if(".scratchpad"!=c.title||this.closableScratchpad)B.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),-mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var U=this.editor.graph,P=null;k=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",-P.style.marginTop="-2px",B.insertBefore(P,B.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==T&&(T=Q.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),B.insertBefore(T,B.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==T||c.isModified()||(T.parentNode.removeChild(T),-T=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(G,H,g,p){G=U.cloneCells(mxUtils.sortCells(U.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=U.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=A&&null!=-A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),J=mxUtils.bind(this,function(G){if(U.isSelectionEmpty())U.getRubberband().isActive()?(U.getRubberband().execute(G),U.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=U.getSelectionCells(),g=U.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=U.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=U.view.translate.x;g.y-=U.view.translate.y;-u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(G){U.isMouseDown&&null!=U.panningManager&&null!=U.graphHandler.first&&(U.graphHandler.suspend(),null!=U.graphHandler.hint&&(U.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",U.panningManager.stop(),U.autoScroll=!1,mxEvent.consume(G))}),-mxUtils.bind(this,function(G){U.isMouseDown&&null!=U.panningManager&&null!=U.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,U.panningManager.stop(),U.graphHandler.reset(),U.isMouseDown=!1,U.autoScroll=!0,J(G),mxEvent.consume(G))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(G){U.isMouseDown&&null!=U.graphHandler.first&&(U.graphHandler.resume(),null!=U.graphHandler.hint&&(U.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor=-"",D.style.cursor="",U.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){D.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){D.style.cursor="";D.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,+document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)B.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var H=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),+mxResources.get("discardChanges")):H();mxEvent.consume(G)}}));if(c.isEditable()){var T=this.editor.graph,P=null;k=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),D,f,c,c.getMode());mxEvent.consume(G)});var q=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=Q.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",+P.style.marginTop="-2px",B.insertBefore(P,B.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==U&&(U=Q.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),B.insertBefore(U,B.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),+U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(G,H,g,p){G=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(G)));for(var C=0;C<G.length;C++){var I=T.getCellGeometry(G[C]);null!=I&&I.translate(-H.x,-H.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(G,H.width,H.height,p||"",!0,null,!1));G=mxUtils.getXml(this.editor.graph.encodeCells(G));Editor.defaultCompressed&&(G=Graph.compress(G));H={xml:G,w:H.width,h:H.height};null!=p&&(H.title=p);f.push(H);q(g);null!=A&&null!=+A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),J=mxUtils.bind(this,function(G){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(G),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=T.getSelectionCells(),g=T.view.getBounds(H);if(null!=g&&0<g.width&&0<g.height){var p=T.view.scale;g.x/=p;g.y/=p;g.width/=p;g.height/=p;g.x-=T.view.translate.x;g.y-=T.view.translate.y;+u(H,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(G)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(G))}),+mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,J(G),mxEvent.consume(G))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(G){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor=+"",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){D.style.backgroundColor="light-dark(#fefefe, #000000)";G.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){D.style.cursor="";D.style.backgroundColor="";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,g,p,C,I,N,O,S,R){if(null!=H&&"image/"==g.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,I,N),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,I,N),G,mxEvent.isAltDown(G)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null);else{var V=!1,Y=mxUtils.bind(this,function(W,X){null!=W&&"application/pdf"==X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var aa=JSON.parse(mxUtils.getTextContent(W.documentElement));E(aa,D);f=f.concat(aa);q(G);this.spinner.stop();V=!0}catch(ca){}else if("mxfile"==W.documentElement.nodeName)try{var ba=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<ba.length;aa++){var la=this.stringToCells(Editor.getDiagramNodeXml(ba[aa])),ea=this.editor.graph.getBoundingBoxFromGeometry(la);null!=ea&&u(la,new mxRectangle(0,0,ea.width,ea.height),G)}V=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)});null!=R&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(R,function(W){Y(W,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,O)&&null!=R?this.isExternalDataComms()?@@ -12851,27 +12855,27 @@ E,!0,null,!0),f.appendChild(v)}};EditorUi.prototype.getResource=function(c){retut,v,A);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,m,t,v){var A=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=v&&v(E),E==A)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(f,JSON.stringify(D))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(B){this.handleError(B)}}),null,mxResources.get("close"),null,null,null,!0,null,null,t,k,m);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,k,m){c=null!=c?c:mxUtils.bind(this,function(t,v,A,E){v||(t=new ChangePageSetup(this,m?A:null,t),t.ignoreColor=!m,null!=E&&m&&(t.shadowVisible=E),this.editor.graph.model.execute(t))});c=new BackgroundImageDialog(this,c,f,k,m);this.showDialog(c.container,400,m?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,m,t){c=new LibraryDialog(this,c,f,k,m,t);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var n=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=n.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,k,-m,t,v,A){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{A||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",c)}catch(U){}if(null!=D||null!=f){A=mxUtils.htmlEntities(mxResources.get("unknownError"),-!1);var B=mxResources.get("ok"),Q=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(B=mxResources.get("cancel"),Q=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var T=null!=t?null:null!=-v?v: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!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,-function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);null!=m&&m()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function U(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML=" ";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");J.appendChild(H)}H=document.createElement("option");-mxUtils.write(H,mxResources.get("addAccount"));H.value=P.length;J.appendChild(H)}var P=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var J=document.createElement("select");J.style.width="100%";U();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var G=J.value,H=P.length!=G;H&&this.drive.setUser(P[G]);this.drive.authorize(H,mxUtils.bind(this,function(){H||-(P=this.drive.getUsersList(),U())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(J);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=+m,t,v,A){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{A||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=D||null!=f){A=mxUtils.htmlEntities(mxResources.get("unknownError"),+!1);var B=mxResources.get("ok"),Q=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(B=mxResources.get("cancel"),Q=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=t?null:null!=+v?v:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,+function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=m&&m()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){J.innerText="";for(var G=0;G<P.length;G++){var H=document.createElement("option");mxUtils.write(H,P[G].displayName);H.value=G;J.appendChild(H);H=document.createElement("option");H.innerHTML=" ";mxUtils.write(H,"<"+P[G].email+">");H.setAttribute("disabled","disabled");J.appendChild(H)}H=document.createElement("option");+mxUtils.write(H,mxResources.get("addAccount"));H.value=P.length;J.appendChild(H)}var P=this.drive.getUsersList(),q=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");q.appendChild(u);var J=document.createElement("select");J.style.width="100%";T();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var G=J.value,H=P.length!=G;H&&this.drive.setUser(P[G]);this.drive.authorize(H,mxUtils.bind(this,function(){H||+(P=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));q.appendChild(J);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?A=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(A=mxUtils.htmlEntities(D,!1)))}t=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,t=D.alternateAction.funct);this.showError(f,A,B,k,Q,null,null,c,t,null,null,null,m?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,f,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,k,m,t,v){c=null!=c?c:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){A();null!=f&&f()},function(){A();null!=k&&k()},m,t,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,f,k,m,t,v,A,E,D){v=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){A=null!=A?A:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var B=document.createElement("div");B.className="geBtn gePrimaryBtn geBanner"+(t?" geSmallBanner":"");B.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(B.style,"transform",A);mxUtils.setPrefixedStyle(B.style,"transition","all 1000ms ease");null!=D&&mxUtils.setPrefixedStyle(B.style,"transform-origin",D);D=D=document.createElement("img");D.setAttribute("src",Editor.crossImage);D.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));D.setAttribute("border","0");t||(v=document.createElement("img"),v.setAttribute("src",IMAGE_PATH+"/logo.png"),v.setAttribute("border","0"),v.setAttribute("align","absmiddle"),v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",B.appendChild(v),D.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",B.appendChild(D));mxUtils.write(B,f);document.body.appendChild(B);-this.bannerShowing=!0;t&&(D.className="geLibraryButton",B.appendChild(D));f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!m){f.appendChild(Q);var T=document.createElement("label");T.setAttribute("for","geDoNotShowAgainCheckbox");-mxUtils.write(T,mxResources.get("doNotShowAgain"));f.appendChild(T);B.style.paddingBottom=t?"16px":"30px";B.appendChild(f)}var U=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,Q.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);U()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,-"transform",A);window.setTimeout(mxUtils.bind(this,function(){U()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=Q&&u!=T?(null!=k&&k(),U(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+this.bannerShowing=!0;t&&(D.className="geLibraryButton",B.appendChild(D));f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!m){f.appendChild(Q);var U=document.createElement("label");U.setAttribute("for","geDoNotShowAgainCheckbox");+mxUtils.write(U,mxResources.get("doNotShowAgain"));f.appendChild(U);B.style.paddingBottom=t?"16px":"30px";B.appendChild(f)}var T=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,Q.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=D&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(q){mxEvent.consume(q);T()}));var P=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,+"transform",A);window.setTimeout(mxUtils.bind(this,function(){T()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(q){var u=mxEvent.getSource(q);u!=Q&&u!=U?(null!=k&&k(),T(),mxEvent.consume(q)):P()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform",E)}),500);window.setTimeout(P,t?5E3:3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,f,k,m){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,k,m,t){var v="jpeg"==k?"jpg":k;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+v;c=this.createImageDataUri(c,f,k,t);this.saveData(m,v,c.substring(c.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,k,m,t,v){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,k):new Blob([c],{type:k}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(c,!0):(k.document.write(c),k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,k,m);else{var A=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);v=65==(E?parseInt(E[2],10):!1)?!1:v}if(v||this.isOffline()){A.href=URL.createObjectURL(m?this.base64ToBlob(c,k):new Blob([c],{type:k}));v?A.download=f:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(c,f,k,m,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,m,t,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=v?"&base64="+v:"")+(null!=f?"&filename="+-encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,m,t,v,A,E,D){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var B=mxUtils.bind(this,function(T,U,P,q){try{if("_blank"==U)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,-!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,T,k,m,null,E);else if(null!=T&&0<T.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,T,k,m,U,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(U,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);A||t.push("_blank");var Q=new SaveDialog(this,f,mxUtils.bind(this,function(T,U,P){B(T.value,U,T,P);this.hideDialog(null,+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,m,t,v,A,E,D){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var B=mxUtils.bind(this,function(U,T,P,q){try{if("_blank"==T)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var u=new EmbedDialog(this,c);this.showDialog(u.container,450,240,!0,!0);u.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,+!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),J.document.close())}else if(T==App.MODE_DEVICE||"download"==T)this.doSaveLocalFile(c,U,k,m,null,E);else if(null!=U&&0<U.length){var G=mxUtils.bind(this,function(H){try{this.exportFile(c,U,k,m,T,H)}catch(g){this.handleError(g)}});null!=q?G(q):this.pickFolder(T,G)}}catch(H){this.handleError(H)}});t=[];v||t.push(App.MODE_BROWSER);A||t.push("_blank");var Q=new SaveDialog(this,f,mxUtils.bind(this,function(U,T,P){B(U.value,T,U,P);this.hideDialog(null,null,Q.container)}),t,c,k,m,D);this.showDialog(Q.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));Q.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(c,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var v=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=v&&(t="background: "+v+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(v=k?c:btoa(unescape(encodeURIComponent(c))),m.document.write(t+'<img style="max-width:100%;" src="data:'+f+";base64,"+v+'"/></body></html>')):m.document.write(t+c+"</body></html>"):m.document.write(t+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");m.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(m){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"),@@ -12885,18 +12889,18 @@ this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bspeed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(E){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",D);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,k,m,t,v){this.isLocalFileSave()?this.saveLocalFile(k,c,m,t,f,v):this.saveRequest(c,f,mxUtils.bind(this,function(A,E){return this.createEchoRequest(k,A,m,t,f,E)}),k,t,m)};EditorUi.prototype.saveRequest=function(c,f,k,m,t,v,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,-function(B,Q,T,U){if("_blank"==Q||null!=B&&0<B.length){var P=k("_blank"==Q?null:B,Q==App.MODE_DEVICE||"download"==Q||null==Q||"_blank"==Q?"0":"1");null!=P&&(Q==App.MODE_DEVICE||"download"==Q||"_blank"==Q?P.simulate(document,"_blank"):(T=mxUtils.bind(this,function(q){v=null!=v?v:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,B,v,!0,Q,q)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),B,v,!0,Q,q)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=U?T(U):this.pickFolder(Q,T)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(B,Q,T){E(B.value,Q,B,T);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,+function(B,Q,U,T){if("_blank"==Q||null!=B&&0<B.length){var P=k("_blank"==Q?null:B,Q==App.MODE_DEVICE||"download"==Q||null==Q||"_blank"==Q?"0":"1");null!=P&&(Q==App.MODE_DEVICE||"download"==Q||"_blank"==Q?P.simulate(document,"_blank"):(U=mxUtils.bind(this,function(q){v=null!=v?v:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,B,v,!0,Q,q)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),B,v,!0,Q,q)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=T?U(T):this.pickFolder(Q,U)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(B,Q,U){E(B.value,Q,B,U);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,k,m,t,v){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,k){f(null)};EditorUi.prototype.exportSvg=function(c,f,k,m,t,v,-A,E,D,B,Q,T,U,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(c,f,k,m,t,v,A,E,D,B,Q,T,U,P)}));this.handleError(W)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var u=f?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==f&&(u=this.editor.graph.shapeBackgroundColor);var J=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+A,E,D,B,Q,U,T,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(W){Editor.addRetryToError(W,mxUtils.bind(this,function(){this.exportSvg(c,f,k,m,t,v,A,E,D,B,Q,U,T,P)}));this.handleError(W)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var u=f?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==f&&(u=this.editor.graph.shapeBackgroundColor);var J=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var G=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==Q||"dark"==Q)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Q;var g=Graph.addFont,p={};Graph.addFont=function(W,X,aa,ba){g.call(this,W,X,aa,p)};var C=this.editor.graph.createSvgImageExport(t),I=C.drawCellState;C.drawCellState=function(W,X){null!=W&&Graph.processFontStyle(W.style);I.apply(this,arguments)};var N=this.editor.graph.getSvg(u,c,A,E,null,-k,null,C,"blank"==B?"_blank":"self"==B?"_top":null,null,!U,Q,T);mxUtils.lightDarkColorSupported=G;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=J;m&&this.editor.graph.addSvgShadow(N);var O=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});-var S=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,c,A));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&this.editor.addMathCss(N);var R=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&v&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&U?this.replaceAlternateContent(W,Q,S):S(W)}),V=Graph.customFontElements;-Graph.customFontElements=p;var Y=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=g;v&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,R,this.thumbImageCache)):R(W)});U?this.embedFonts(N,Y):(this.editor.addFontCss(N),Y(N))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(c,f,k){function m(T,U,P,q,u){var J=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");-J.setAttribute("x",U);J.setAttribute("y",P+.5);J.setAttribute("width",q.width);J.setAttribute("height",q.height);null==J.setAttributeNS?J.setAttribute("xlink:href",u):J.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);T.replaceChild(J,T.lastChild);E()}function t(){if(A<Q.length)Q[A++](t)}var v="";f=c.getElementsByTagName("style");for(var A=0;A<f.length;A++)v+=f[A].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),D={},-B={},Q=[];for(A=0;A<f.length;A++)mxUtils.bind(this,function(T){var U=T.getElementsByTagName("div");if(0<U.length)try{var P=U[0].cloneNode(!0),q=parseInt(P.style.marginLeft),u=parseInt(P.style.paddingTop),J=P.getElementsByTagName("div")[1],G=U=!1,H=P.style.alignItems,g=P.style.justifyContent;if(null!=P.style.writingMode){var p=P.style.writingMode;G="vertical-"==p.substring(0,9);U="-rl"==p.substring(p.length-3)}var C=!G&&"1px"==P.style.width||G&&"1px"==P.style.height;if(!G&&"1px"==P.style.height||G&&-"1px"==P.style.width)P.style.alignItems=G&&U?"unsafe flex-end":"unsafe flex-start";C&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,N=D[I];null==N&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),p=1,p="1px"==P.style.width?J.offsetWidth:parseInt(P.style.width),C=1,C="1px"==P.style.height?J.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),N=new mxRectangle(q,u,p,C),D[I]=N);"1px"==P.style.height&&-("unsafe center"==H?u-=N.height/2:"unsafe flex-end"==H&&(u-=N.height));if("1px"==P.style.width)if(!G&&"unsafe center"==g||G&&"unsafe center"==H)q-=N.width/2;else if(!G&&"unsafe flex-end"==g||G&&(!U&&"unsafe flex-end"==H||U&&"unsafe flex-start"==H))q-=N.width;N=new mxRectangle(q,u,N.width,N.height+parseInt(J.style.fontSize)/4);Q.push(mxUtils.bind(this,function(O){var S=B[I];null==S?Graph.htmlToPng(I,N.width,N.height,mxUtils.bind(this,function(R){m(T,q,u,N,R);B[I]=R;O()}),v):(m(T,q,u,N,S),O())}))}catch(O){E()}else E()})(f[A]);+k,null,C,"blank"==B?"_blank":"self"==B?"_top":null,null,!T,Q,U);mxUtils.lightDarkColorSupported=G;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=J;m&&this.editor.graph.addSvgShadow(N);var O=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});+var S=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,c,A));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&this.editor.addMathCss(N);var R=mxUtils.bind(this,function(W){Editor.replaceSvgDataUris&&v&&EditorUi.embedSvgImages(W);Editor.foreignObjectImages&&T?this.replaceAlternateContent(W,Q,S):S(W)}),V=Graph.customFontElements;+Graph.customFontElements=p;var Y=mxUtils.bind(this,function(W){Graph.customFontElements=V;Graph.addFont=g;v&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,R,this.thumbImageCache)):R(W)});T?this.embedFonts(N,Y):(this.editor.addFontCss(N),Y(N))}catch(W){this.handleError(W)}};EditorUi.prototype.replaceAlternateContent=function(c,f,k){function m(U,T,P,q,u){var J=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");+J.setAttribute("x",T);J.setAttribute("y",P+.5);J.setAttribute("width",q.width);J.setAttribute("height",q.height);null==J.setAttributeNS?J.setAttribute("xlink:href",u):J.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(J,U.lastChild);E()}function t(){if(A<Q.length)Q[A++](t)}var v="";f=c.getElementsByTagName("style");for(var A=0;A<f.length;A++)v+=f[A].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),D={},+B={},Q=[];for(A=0;A<f.length;A++)mxUtils.bind(this,function(U){var T=U.getElementsByTagName("div");if(0<T.length)try{var P=T[0].cloneNode(!0),q=parseInt(P.style.marginLeft),u=parseInt(P.style.paddingTop),J=P.getElementsByTagName("div")[1],G=T=!1,H=P.style.alignItems,g=P.style.justifyContent;if(null!=P.style.writingMode){var p=P.style.writingMode;G="vertical-"==p.substring(0,9);T="-rl"==p.substring(p.length-3)}var C=!G&&"1px"==P.style.width||G&&"1px"==P.style.height;if(!G&&"1px"==P.style.height||G&&+"1px"==P.style.width)P.style.alignItems=G&&T?"unsafe flex-end":"unsafe flex-start";C&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,N=D[I];null==N&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),p=1,p="1px"==P.style.width?J.offsetWidth:parseInt(P.style.width),C=1,C="1px"==P.style.height?J.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),N=new mxRectangle(q,u,p,C),D[I]=N);"1px"==P.style.height&&+("unsafe center"==H?u-=N.height/2:"unsafe flex-end"==H&&(u-=N.height));if("1px"==P.style.width)if(!G&&"unsafe center"==g||G&&"unsafe center"==H)q-=N.width/2;else if(!G&&"unsafe flex-end"==g||G&&(!T&&"unsafe flex-end"==H||T&&"unsafe flex-start"==H))q-=N.width;N=new mxRectangle(q,u,N.width,N.height+parseInt(J.style.fontSize)/4);Q.push(mxUtils.bind(this,function(O){var S=B[I];null==S?Graph.htmlToPng(I,N.width,N.height,mxUtils.bind(this,function(R){m(U,q,u,N,R);B[I]=R;O()}),v):(m(U,q,u,N,S),O())}))}catch(O){E()}else E()})(f[A]);0==counter&&k(c);A=0;t()};EditorUi.prototype.addRadiobox=function(c,f,k,m,t,v,A){return this.addCheckbox(c,k,m,t,v,A,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,k,m,t,v,A,E){v=null!=v?v:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=E&&D.setAttribute("name",E);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);m&&D.setAttribute("disabled","disabled");v&&(c.appendChild(D),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",A),c.appendChild(k),t||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,f){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var m=this.getCurrentFile(),t="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var v=document.createElement("select");v.style.maxWidth="200px";v.style.width="auto";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));v.appendChild(m);var A=document.createElement("option");A.setAttribute("value","custom");mxUtils.write(A,mxResources.get("custom")+"...");v.appendChild(A);c.appendChild(v);mxEvent.addListener(v,"change",mxUtils.bind(this,function(){if("custom"==v.value){var E=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",@@ -12905,69 +12909,70 @@ EditorUi.prototype.addLinkSection=function(c,f){function k(){var E=document.cream.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));m.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));m.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));m.appendChild(t);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));c.appendChild(m);mxUtils.write(c,mxResources.get("borderColor")+":");var v="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(v||"none",function(D){v=D;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";c.appendChild(A);mxUtils.br(c);return{getColor:function(){return v},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,k,m,t,v){v=null!=v?v:[];k&&(v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=f&&f!=mxConstants.NONE&&v.push("highlight="+("#"==f.charAt(0)?f.substring(1):-f)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),t&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));return v};EditorUi.prototype.createLink=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){var P=this.getCurrentFile();D=this.createUrlParameters(c,f,m,t,v,D);c=!0;null!=A?k="#U"+encodeURIComponent(A):E||null==P||""==P.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k=-"#"+P.getHash(),c=!1);c&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));B&&1<k.length&&(D.push("open="+k.substring(1)),k="");Q&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());T&&D.push("transparent=1");null!=U&&D.push("dark="+U);return(m&&(null!=A||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==m&&(P.target=m);B||(P.lightbox=!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),-P.resize=!0);E&&k.push("layers");D&&k.push("tags");null!=U&&(P["dark-mode"]=U);0<k.length&&(B&&k.push("lightbox"),P.toolbar=k.join(" "));null!=Q&&0<Q.length&&(P.edit=Q);null!=c?P.url=c:P.xml=this.getFileData(!0,null,null,null,null,!A);f='<div class="mxgraph" style="'+(v?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";T(f,'<script type="text/javascript" src="'+(0<c.length?+f)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),t&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));return v};EditorUi.prototype.createLink=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){var P=this.getCurrentFile();D=this.createUrlParameters(c,f,m,t,v,D);c=!0;null!=A?k="#U"+encodeURIComponent(A):E||null==P||""==P.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k=+"#"+P.getHash(),c=!1);c&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));B&&1<k.length&&(D.push("open="+k.substring(1)),k="");Q&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());U&&D.push("transparent=1");null!=T&&D.push("dark="+T);return(m&&(null!=A||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==m&&(P.target=m);B||(P.lightbox=!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),+P.resize=!0);E&&k.push("layers");D&&k.push("tags");null!=T&&(P["dark-mode"]=T);0<k.length&&(B&&k.push("lightbox"),P.toolbar=k.join(" "));null!=Q&&0<Q.length&&(P.edit=Q);null!=c?P.url=c:P.xml=this.getFileData(!0,null,null,null,null,!A);f='<div class="mxgraph" style="'+(v?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,k,m){var t=document.createElement("div");t.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("html"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(v);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");v=E.cloneNode(!0);v.setAttribute("value","copy");A.appendChild(v);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(D);mxUtils.br(A);A.appendChild(E);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var B=this.getCurrentFile();null==k&&null!=B&&B.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")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(B.getId(),-B)})));v.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");t.appendChild(A);A=380;var Q=this.addLinkSection(t),T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));T.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));T.appendChild(D);-D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");T.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+":");t.appendChild(T);mxUtils.br(t);A+=26;var U=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft=+B)})));v.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");t.appendChild(A);A=380;var Q=this.addLinkSection(t),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));U.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));U.appendChild(D);+D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");U.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+":");t.appendChild(U);mxUtils.br(t);A+=26;var T=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(t,mxResources.get("allPages"),D,!D),J=this.addCheckbox(t,mxResources.get("layers"),!0),G=this.addCheckbox(t,mxResources.get("tags"),!0),H=this.addCheckbox(t,mxResources.get("lightbox"),!0),g=null;if(EditorUi.enableHtmlEditOption){g=this.addEditButton(t,H);var p=g.getEditInput();p.style.marginBottom="16px";A+=50;mxEvent.addListener(H,-"change",function(){H.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");p.checked&&H.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,t,mxUtils.bind(this,function(){m(E.checked?k:null,U.checked,P.value,Q.getTarget(),Q.getColor(),q.checked,u.checked,J.checked,G.checked,H.checked,null!=g?g.getLink():null,null!=T?T.value:null)}),null,c,f);this.showDialog(c.container,340,A,!0,!0);v.focus()};-EditorUi.prototype.showPublishLinkDialog=function(c,f,k,m,t,v,A,E,D,B,Q){var T=document.createElement("div");T.style.whiteSpace="nowrap";var U=document.createElement("h3");mxUtils.write(U,c||mxResources.get("publish"));U.style.width="100%";U.style.textAlign="center";U.style.marginTop="2px";U.style.marginBottom="20px";T.appendChild(U);var P=document.createElement("select");c=30;P.className="geBtn";P.style.marginBottom="8px";P.style.marginLeft="0px";P.style.width="100%";P.style.boxSizing="border-box";-if(null==E||""==E.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",U=document.createElement("option"),mxUtils.write(U,mxResources.get("makeCopy")),U.setAttribute("value","copy"),P.appendChild(U);U=document.createElement("option");mxUtils.write(U,mxResources.get("authorizationRequired"));U.setAttribute("value","auth");P.appendChild(U);null!=E&&""!=E.getHash()||U.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");P.appendChild(E);-null!=A?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",A),P.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));T.appendChild(P);mxUtils.br(T);P.focus();var q=null,u=null;if(null!=f||null!=k)c+=30,mxUtils.write(T,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft=-"6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",T.appendChild(q),mxUtils.write(T,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=k+"px",T.appendChild(u),mxUtils.br(T);var J=this.addLinkSection(T,m),G=B?this.addCheckbox(T,mxResources.get("transparentBackground"),!1):null;null!=G&&(c+=20);var H=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&-(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),H=this.addCheckbox(T,mxResources.get("selectedPage")+": "+f));var g=document.createElement("select");g.style.maxWidth="260px";g.style.marginLeft="8px";g.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));g.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));-g.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");g.appendChild(f);Q&&(mxUtils.write(T,mxResources.get("appearance")+":"),T.appendChild(g),mxUtils.br(T),c+=30);var p=this.addCheckbox(T,mxResources.get("lightbox"),!0,null,null,!m),C=this.addEditButton(T,p),I=C.getEditInput();m&&(I.style.marginLeft=p.style.marginLeft,p.style.display="none",c-=20);var N=this.addCheckbox(T,mxResources.get("layers"),-!0);N.style.marginLeft=I.style.marginLeft;N.style.marginTop="8px";var O=this.addCheckbox(T,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(p,"change",function(){p.checked?(N.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&p.checked?C.getEditSelect().removeAttribute("disabled"):-C.getEditSelect().setAttribute("disabled","disabled")});m=new CustomDialog(this,T,mxUtils.bind(this,function(){D(J.getTarget(),J.getColor(),null==H?!1:H.checked,p.checked,C.getLink(),N.checked,null!=q?q.value:null,null!=u?u.value:null,O.checked,P.value,null!=G?G.checked:!1,g.value)}),null,mxResources.get("create"),t,v);this.showDialog(m.container,340,296+c,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):null==-P.parentNode;J.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,k,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";v.appendChild(A);if(t){mxUtils.write(v,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";-E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";v.appendChild(E);mxUtils.write(v,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";v.appendChild(D);mxUtils.br(v)}var B=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Q=m?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),-Editor.defaultIncludeDiagram);A=this.editor.graph;var T=m?null:this.addCheckbox(v,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=T&&(T.style.marginBottom="16px");c=new CustomDialog(this,v,mxUtils.bind(this,function(){var U=parseInt(E.value)/100||1,P=parseInt(D.value)||0;k(!B.checked,null!=Q?Q.checked:!1,null!=T?T.checked:!1,U,P)}),null,c,f);this.showDialog(c.container,300,(t?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,-f,k,m,t,v,A,E,D){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var Q=this.editor.graph,T="jpeg"==E||"webp"==E?220:320,U=document.createElement("h3");mxUtils.write(U,c);U.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";B.appendChild(U);mxUtils.write(B,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft=+"change",function(){H.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");p.checked&&H.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,t,mxUtils.bind(this,function(){m(E.checked?k:null,T.checked,P.value,Q.getTarget(),Q.getColor(),q.checked,u.checked,J.checked,G.checked,H.checked,null!=g?g.getLink():null,null!=U?U.value:null)}),null,c,f);this.showDialog(c.container,340,A,!0,!0);v.focus()};+EditorUi.prototype.showPublishLinkDialog=function(c,f,k,m,t,v,A,E,D,B,Q,U){var T=document.createElement("div");T.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,c||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";P.style.marginTop="2px";P.style.marginBottom="20px";T.appendChild(P);var q=document.createElement("select");c=30;q.className="geBtn";q.style.marginBottom="8px";q.style.marginLeft="0px";q.style.width="100%";q.style.boxSizing="border-box";+if(null==E||""==E.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),q.appendChild(P);P=document.createElement("option");mxUtils.write(P,mxResources.get("authorizationRequired"));P.setAttribute("value","auth");q.appendChild(P);null!=E&&""!=E.getHash()||P.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");q.appendChild(E);+null!=A?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",A),q.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));T.appendChild(q);mxUtils.br(T);q.focus();var u=null,J=null;if(null!=f||null!=k)c+=30,mxUtils.write(T,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft=+"6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",T.appendChild(u),mxUtils.write(T,mxResources.get("height")+":"),J=document.createElement("input"),J.setAttribute("type","text"),J.style.width="50px",J.style.marginLeft="6px",J.style.marginBottom="10px",J.value=k+"px",T.appendChild(J),mxUtils.br(T);var G=this.addLinkSection(T,m),H=B?this.addCheckbox(T,mxResources.get("transparentBackground"),!1):null;null!=H&&(c+=20);var g=document.createElement("select");g.className="geBtn";+g.style.marginTop="8px";f=document.createElement("option");mxUtils.write(f,mxResources.get("allPages"));f.setAttribute("value","allPages");g.appendChild(f);f=document.createElement("option");mxUtils.write(f,mxResources.get("currentPage"));f.setAttribute("value","currentPage");g.appendChild(f);var p=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),U&&(mxUtils.write(T,+mxResources.get("pages")+":"),T.appendChild(g),mxUtils.br(T),c+=30),p=this.addCheckbox(T,mxResources.get("selectedPage")+": "+f));var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginTop="16px";U=document.createElement("option");U.setAttribute("value","0");mxUtils.write(U,mxResources.get("light"));C.appendChild(U);U=document.createElement("option");U.setAttribute("value","1");mxUtils.write(U,mxResources.get("dark"));C.appendChild(U);U=document.createElement("option");+U.setAttribute("value","auto");mxUtils.write(U,mxResources.get("automatic"));U.setAttribute("selected","selected");C.appendChild(U);Q&&(mxUtils.write(T,mxResources.get("appearance")+":"),T.appendChild(C),mxUtils.br(T),c+=30);var I=this.addCheckbox(T,mxResources.get("lightbox"),!0,null,null,!m),N=this.addEditButton(T,I),O=N.getEditInput();m&&(O.style.marginLeft=I.style.marginLeft,I.style.display="none",c-=20);var S=this.addCheckbox(T,mxResources.get("layers"),!0);S.style.marginLeft=O.style.marginLeft;+S.style.marginTop="8px";var R=this.addCheckbox(T,mxResources.get("tags"),!0);R.style.marginLeft=O.style.marginLeft;R.style.marginBottom="16px";R.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(S.removeAttribute("disabled"),O.removeAttribute("disabled"),R.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"));O.checked&&I.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled",+"disabled")});m=new CustomDialog(this,T,mxUtils.bind(this,function(){D(G.getTarget(),G.getColor(),null==p?!1:p.checked,I.checked,N.getLink(),S.checked,null!=u?u.value:null,null!=J?J.value:null,R.checked,q.value,null!=H?H.checked:!1,C.value,"allPages"==g.value)}),null,mxResources.get("create"),t,v);this.showDialog(m.container,340,296+c,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):null==q.parentNode;G.focus()};+EditorUi.prototype.showRemoteExportDialog=function(c,f,k,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";v.appendChild(A);if(t){mxUtils.write(v,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft=+"4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";v.appendChild(E);mxUtils.write(v,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";v.appendChild(D);mxUtils.br(v)}var B=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Q=m?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),+Editor.defaultIncludeDiagram);A=this.editor.graph;var U=m?null:this.addCheckbox(v,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=U&&(U.style.marginBottom="16px");c=new CustomDialog(this,v,mxUtils.bind(this,function(){var T=parseInt(E.value)/100||1,P=parseInt(D.value)||0;k(!B.checked,null!=Q?Q.checked:!1,null!=U?U.checked:!1,T,P)}),null,c,f);this.showDialog(c.container,300,(t?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,+f,k,m,t,v,A,E,D){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var Q=this.editor.graph,U="jpeg"==E||"webp"==E?220:320,T=document.createElement("h3");mxUtils.write(T,c);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";B.appendChild(T);mxUtils.write(B,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";B.appendChild(P);mxUtils.write(B,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";B.appendChild(q);mxUtils.br(B);var u=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,Q.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight=-"8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(U=0;U<c.length;U++)if(!Q.isSelectionEmpty()||"selectionOnly"!=c[U]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[U]));H.setAttribute("value",c[U]);G.appendChild(H)}D?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(G),mxUtils.br(B),-T+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(u.checked=!0)})):v&&(B.appendChild(J),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),T+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));Q.isSelectionEmpty()?D&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",T-=30):(G.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=+"8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(T=0;T<c.length;T++)if(!Q.isSelectionEmpty()||"selectionOnly"!=c[T]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[T]));H.setAttribute("value",c[T]);G.appendChild(H)}D?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(G),mxUtils.br(B),+U+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(u.checked=!0)})):v&&(B.appendChild(J),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),U+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));Q.isSelectionEmpty()?D&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(G.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){G.value=u.checked?"selectionOnly":"diagram"}));var g=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),p=document.createElement("select");p.style.maxWidth="260px";p.style.marginLeft="8px";p.style.marginTop="16px";v=document.createElement("option");v.setAttribute("value","light");mxUtils.write(v,mxResources.get("light"));p.appendChild(v);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,-mxResources.get("dark"));p.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?(v=document.createElement("option"),v.setAttribute("value","auto"),mxUtils.write(v,mxResources.get("automatic")),v.setAttribute("selected","selected"),p.appendChild(v)):Editor.isDarkMode()?D.setAttribute("selected","selected"):v.setAttribute("selected","selected");mxUtils.write(B,mxResources.get("appearance")+":");B.appendChild(p);mxUtils.br(B);T+=26;var C=this.addCheckbox(B,mxResources.get("shadow"),Q.shadowVisible),-I=null;if("png"==E||"jpeg"==E||"webp"==E)I=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),T+=30;Q=null!=this.pages?this.pages.length:1;var N=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram")+(1<Q?":":""),A,null,null,"jpeg"!=E&&"webp"!=E),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==E||"svg"==E?(A=function(){N.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},v=document.createElement("option"),-v.setAttribute("value","allPages"),mxUtils.write(v,mxResources.get("allPages")),O.appendChild(v),v=document.createElement("option"),v.setAttribute("value","currentPage"),mxUtils.write(v,mxResources.get("currentPage")),O.appendChild(v),1<Q?(N.style.marginBottom="12px",O.style.marginBottom="16px",B.appendChild(O),mxUtils.br(B),T+=20):N.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(N,"change",A),A()):N.style.marginBottom="16px";var S=document.createElement("input");-S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");var R=document.createElement("input");R.style.marginBottom="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");f&&(S.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,B.appendChild(S),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),R.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,B.appendChild(R),mxUtils.write(B,mxResources.get("embedFonts")),mxUtils.br(B),T+=50);+mxResources.get("dark"));p.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?(v=document.createElement("option"),v.setAttribute("value","auto"),mxUtils.write(v,mxResources.get("automatic")),v.setAttribute("selected","selected"),p.appendChild(v)):Editor.isDarkMode()?D.setAttribute("selected","selected"):v.setAttribute("selected","selected");mxUtils.write(B,mxResources.get("appearance")+":");B.appendChild(p);mxUtils.br(B);U+=26;var C=this.addCheckbox(B,mxResources.get("shadow"),Q.shadowVisible),+I=null;if("png"==E||"jpeg"==E||"webp"==E)I=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!Editor.canvasSupported,!1,!0),U+=30;Q=null!=this.pages?this.pages.length:1;var N=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram")+(1<Q?":":""),A,null,null,"jpeg"!=E&&"webp"!=E),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==E||"svg"==E?(A=function(){N.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},v=document.createElement("option"),+v.setAttribute("value","allPages"),mxUtils.write(v,mxResources.get("allPages")),O.appendChild(v),v=document.createElement("option"),v.setAttribute("value","currentPage"),mxUtils.write(v,mxResources.get("currentPage")),O.appendChild(v),1<Q?(N.style.marginBottom="12px",O.style.marginBottom="16px",B.appendChild(O),mxUtils.br(B),U+=20):N.style.marginBottom="16px",null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(N,"change",A),A()):N.style.marginBottom="16px";var S=document.createElement("input");+S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");var R=document.createElement("input");R.style.marginBottom="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");f&&(S.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,B.appendChild(S),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),R.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,B.appendChild(R),mxUtils.write(B,mxResources.get("embedFonts")),mxUtils.br(B),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";v=document.createElement("option");v.setAttribute("value","auto");mxUtils.write(v,mxResources.get("automatic"));V.appendChild(v);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));V.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));V.appendChild(A);A=document.createElement("div");-mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(V),B.appendChild(A),mxUtils.br(B),mxUtils.br(B),T+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=S.checked;this.lastEmbedFonts=R.checked;this.lastEmbedInclude=O.value;t(P.value,g.checked,!u.checked,C.checked,N.checked,S.checked&&f,q.value,J.checked,-("png"==E||"svg"==E)&&"currentPage"==O.value,V.value,null!=I?I.checked:null,null!=p?p.value:null,G.value,R.checked)}),null,k,m);this.showDialog(k.container,340,T,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=f){var E=document.createElement("h3");-mxUtils.write(E,f);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(E)}var D=this.addCheckbox(v,mxResources.get("fit"),!0),B=this.addCheckbox(v,mxResources.get("shadow"),A.shadowVisible&&m,!m),Q=this.addCheckbox(v,k),T=this.addCheckbox(v,mxResources.get("lightbox"),!0),U=this.addEditButton(v,T),P=U.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),u=this.addCheckbox(v,mxResources.get("layers"),q,!q);u.style.marginLeft=P.style.marginLeft;u.style.marginBottom=-"12px";u.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?(q&&u.removeAttribute("disabled"),P.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&T.checked?U.getEditSelect().removeAttribute("disabled"):U.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,v,mxUtils.bind(this,function(){c(D.checked,B.checked,Q.checked,T.checked,U.getLink(),u.checked)}),null,mxResources.get("embed"),+mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(V),B.appendChild(A),mxUtils.br(B),mxUtils.br(B),U+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=S.checked;this.lastEmbedFonts=R.checked;this.lastEmbedInclude=O.value;t(P.value,g.checked,!u.checked,C.checked,N.checked,S.checked&&f,q.value,J.checked,+("png"==E||"svg"==E)&&"currentPage"==O.value,V.value,null!=I?I.checked:null,null!=p?p.value:null,G.value,R.checked)}),null,k,m);this.showDialog(k.container,340,U,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=f){var E=document.createElement("h3");+mxUtils.write(E,f);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(E)}var D=this.addCheckbox(v,mxResources.get("fit"),!0),B=this.addCheckbox(v,mxResources.get("shadow"),A.shadowVisible&&m,!m),Q=this.addCheckbox(v,k),U=this.addCheckbox(v,mxResources.get("lightbox"),!0),T=this.addEditButton(v,U),P=T.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),u=this.addCheckbox(v,mxResources.get("layers"),q,!q);u.style.marginLeft=P.style.marginLeft;u.style.marginBottom=+"12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(q&&u.removeAttribute("disabled"),P.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&U.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,v,mxUtils.bind(this,function(){c(D.checked,B.checked,Q.checked,U.checked,T.getLink(),u.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,k,m,t,v,A,E){function D(P){var q=" ",u="";m&&(q=" 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!=Q?"&page="+Q:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");var J="";k&&(J=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+P+'"'+J+(""!=u?' style="'+u+'"':"")+q+"/>")}var B=this.editor.graph.getGraphBounds(),Q=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=m?this.getFileData(!0):null;P=this.createImageDataUri(P,q,"png");-D(P)}),null,null,null,mxUtils.bind(this,function(P){E({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),B.width*B.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";k&&(T="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var U=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+T+"&xml="+encodeURIComponent(f));U.send(mxUtils.bind(this,function(){200<=U.getStatus()&&299>=U.getStatus()?D("data:image/png;base64,"+-U.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,k,m,t,v,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var B=0;B<D.length;B++){var Q=D[B].getAttribute("href");null!=Q&&"#"==Q.charAt(0)&&"_blank"==D[B].getAttribute("target")&&D[B].removeAttribute("target")}m&&E.setAttribute("content",this.getFileData(!0));-f&&this.editor.graph.addSvgShadow(E);if(k){var T=" ",U="";m&&(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"+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",U+="cursor:pointer;");c&&-(U+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=U?' style="'+U+'"':"")+T+"/>")}))}else U="",m&&(f=this.getSelectedPageIndex(),E.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:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),U+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+t),U+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=U&&E.setAttribute("style",U),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=+D(P)}),null,null,null,mxUtils.bind(this,function(P){E({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),B.width*B.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";k&&(U="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var T=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+U+"&xml="+encodeURIComponent(f));T.send(mxUtils.bind(this,function(){200<=T.getStatus()&&299>=T.getStatus()?D("data:image/png;base64,"++T.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,k,m,t,v,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var B=0;B<D.length;B++){var Q=D[B].getAttribute("href");null!=Q&&"#"==Q.charAt(0)&&"_blank"==D[B].getAttribute("target")&&D[B].removeAttribute("target")}m&&E.setAttribute("content",this.getFileData(!0));+f&&this.editor.graph.addSvgShadow(E);if(k){var U=" ",T="";m&&(U="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"+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",T+="cursor:pointer;");c&&+(T+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=T?' style="'+T+'"':"")+U+"/>")}))}else T="",m&&(f=this.getSelectedPageIndex(),E.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:"")+(t?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),T+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+t),T+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=T&&E.setAttribute("style",T),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var k=null;if("diagram"==c.nodeName)k=c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){k=m[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(v){return"page"==v?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==v?1:t.apply(this,arguments)}}}null!=k&&(c=Editor.parseDiagramNode(k))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(v){}finally{this.editor.graph=m}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var f=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(k=m))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,f,k,m,t){try{var v=this.editor.graph,A=null;if(null!=k&&0<k.length)v=this.createTemporaryGraph(v.getStylesheet()),document.body.appendChild(v.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0),v),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){v=this.createTemporaryGraph(v.getStylesheet());var E=v.getGlobalVariable;v.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?v.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&v.setBackgroundImage(D.viewState.backgroundImage);v.getGlobalVariable=function(B){return"page"==B?D.getName():"pagenumber"==B?1:E.apply(this,arguments)};document.body.appendChild(v.container);-v.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(B){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Q=B.toDataURL("image/png");Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(A));c(Q.substring(Q.lastIndexOf(",")+1));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container)}catch(T){null!=f&&f(T)}}),null,null,null,mxUtils.bind(this,function(B){null!=f&&f(B)}),null,null,m,null,v.shadowVisible,null,v,t,null,-null,null,"diagram",null)}catch(B){null!=f&&f(B)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){E=null!=E?E:!0;Q=null!=Q?Q:0;A=null!=D?D:f.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==f.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);v=f.getSvg(A,B,Q,null,null,v,null,D,null,f.shadowVisible||T,null,U,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(v,null,null,0==Q);null!=c&&v.setAttribute("content",c);null!=k&&v.setAttribute("resource",+v.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(B){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Q=B.toDataURL("image/png");Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(A));c(Q.substring(Q.lastIndexOf(",")+1));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container)}catch(U){null!=f&&f(U)}}),null,null,null,mxUtils.bind(this,function(B){null!=f&&f(B)}),null,null,m,null,v.shadowVisible,null,v,t,null,+null,null,"diagram",null)}catch(B){null!=f&&f(B)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){E=null!=E?E:!0;Q=null!=Q?Q:0;A=null!=D?D:f.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==f.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);v=f.getSvg(A,B,Q,null,null,v,null,D,null,f.shadowVisible||U,null,T,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(v,null,null,0==Q);null!=c&&v.setAttribute("content",c);null!=k&&v.setAttribute("resource",k);var P=mxUtils.bind(this,function(q){q=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});f.mathEnabled&&this.editor.addMathCss(v);if(null!=t)this.embedFonts(v,mxUtils.bind(this,function(q){E?this.editor.convertImages(q,mxUtils.bind(this,function(u){P(u)})):P(q)}));else return P(v)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(m){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(c,f,k,m,t,v,A,E,D,B,Q,T,U)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();-k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,E,null,null,null,null,null,c,v):null,D,null==this.pages||0==this.pages.length,Q)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,c||1,f,m,null,null,v,A,B,T,U)}catch(q){this.spinner.stop(),this.handleError(q)}}};+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(m){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(c,f,k,m,t,v,A,E,D,B,Q,U,T)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();+k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,E,null,null,null,null,null,c,v):null,D,null==this.pages||0==this.pages.length,Q)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,c||1,f,m,null,null,v,A,B,U,T)}catch(q){this.spinner.stop(),this.handleError(q)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,k,m,t,v,A){f=null!=f?f:0;k=null!=k?k:0;var E=[];try{var D=this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var B=mxUtils.parseXml(c);c={};var Q=this.editor.extractGraphModel(B.documentElement,-null!=this.pages);if(null!=Q&&"mxfile"==Q.nodeName&&null!=this.pages){var T=Q.getElementsByTagName("diagram");if(1==T.length&&!v){if(Q=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(c[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var U=T[0].getAttribute("name");null!=U&&""!=U&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,U))}}else if(0<T.length){v=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[T[0].getAttribute("id")]=-this.pages[0].getId(),U=T[0].getAttribute("name"),null!=U&&""!=U&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],U)),Q=Editor.parseDiagramNode(T[0]),m=!1,P=1);for(;P<T.length;P++){var q=T[P].getAttribute("id");T[P].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(T[P]));c[q]=T[P].getAttribute("id");var J=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[J+1]));D.model.execute(new ChangePage(this,u,u,J,!0));v.push(u)}this.updatePageLinks(c,+null!=this.pages);if(null!=Q&&"mxfile"==Q.nodeName&&null!=this.pages){var U=Q.getElementsByTagName("diagram");if(1==U.length&&!v){if(Q=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var T=U[0].getAttribute("name");null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,T))}}else if(0<U.length){v=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=+this.pages[0].getId(),T=U[0].getAttribute("name"),null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],T)),Q=Editor.parseDiagramNode(U[0]),m=!1,P=1);for(;P<U.length;P++){var q=U[P].getAttribute("id");U[P].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[P]));c[q]=U[P].getAttribute("id");var J=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[J+1]));D.model.execute(new ChangePage(this,u,u,J,!0));v.push(u)}this.updatePageLinks(c,v)}}if(null!=Q&&"mxGraphModel"===Q.nodeName){E=D.importGraphModel(Q,f,k,m);if(null!=E)for(this.addLocalPagesToMapping(c),P=0;P<E.length;P++)this.updatePageLinksForCell(c,E[P]);var G=D.parseBackgroundImage(Q.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;D.model.execute(H)}}A&&D.pasteCellStyles(D.includeDescendants(E),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(g){if(t)throw g;this.handleError(g)}return E};EditorUi.prototype.updatePageLinks=function(c,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(c,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(c,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc="data:page/id,"+k)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var k=document.createElement("div"),m=this.editor.graph,t=m.getLinkForCell(f);null!=t&&m.setLinkForCell(f,this.updatePageLink(c,t));if(m.isHtmlLabel(f)){k.innerHTML=Graph.sanitizeHtml(m.getLabel(f));for(var v=k.getElementsByTagName("a"),A=!1,E=0;E<v.length;E++)t=v[E].getAttribute("href"),null!=t&&(v[E].setAttribute("href",this.updatePageLink(c,t)),A=!0);A&&m.labelChanged(f,k.innerHTML)}for(E=0;E<m.model.getChildCount(f);E++)this.updatePageLinksForCell(c,m.model.getChildAt(f,E))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var k=c[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var t=0;t<m.actions.length;t++){var v=m.actions[t];if(null!=v.open&&Graph.isPageLink(v.open)){var A=v.open.substring(v.open.indexOf(",")+1);k=c[A];null!=k?v.open="data:page/id,"+k:null==this.getPageById(A)&&delete v.open}}f="data:action/json,"+JSON.stringify(m)}}catch(E){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,k,m,t){var v=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){m=null!=m?m:c.name;var E=mxUtils.bind(this,function(B){A.clear()&&v(B)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var B=this.isRemoteVisioFormat(m);-try{var Q=m.lastIndexOf(".");if(0<=Q&&Q<m.length)m.substring(Q+1).toUpperCase();else{var T=m.lastIndexOf("/");0<=T&&T<m.length&&(m=m.substring(T+1))}}catch(P){}if(B)if(null==VSS_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{B=new FormData;B.append("file1",c,m);var U=new XMLHttpRequest;U.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);-null!=t&&U.setRequestHeader("x-convert-custom",t);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState&&A.clear())if(200<=U.status&&299>=U.status)try{var P=U.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(u){try{f(u.target.result)}catch(J){E({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,f,E,m)}catch(u){E(u)}else try{""==U.responseType||"text"==U.responseType?E({message:U.responseText}):(q=new FileReader,-q.onload=function(){try{E({message:JSON.parse(q.result).Message})}catch(u){null!=q.result&&0<q.result.length?E({message:q.result}):E(u)}},q.readAsText(U.response))}catch(u){E({})}});U.send(B)}else if(A.clear())try{this.doImportVisio(c,f,E,m)}catch(P){E(P)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),v)};+try{var Q=m.lastIndexOf(".");if(0<=Q&&Q<m.length)m.substring(Q+1).toUpperCase();else{var U=m.lastIndexOf("/");0<=U&&U<m.length&&(m=m.substring(U+1))}}catch(P){}if(B)if(null==VSS_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{B=new FormData;B.append("file1",c,m);var T=new XMLHttpRequest;T.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);+null!=t&&T.setRequestHeader("x-convert-custom",t);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState&&A.clear())if(200<=T.status&&299>=T.status)try{var P=T.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(u){try{f(u.target.result)}catch(J){E({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,f,E,m)}catch(u){E(u)}else try{""==T.responseType||"text"==T.responseType?E({message:T.responseText}):(q=new FileReader,+q.onload=function(){try{E({message:JSON.parse(q.result).Message})}catch(u){null!=q.result&&0<q.result.length?E({message:q.result}):E(u)}},q.readAsText(T.response))}catch(u){E({})}});T.send(B)}else if(A.clear())try{this.doImportVisio(c,f,E,m)}catch(P){E(P)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),v)};EditorUi.prototype.importGraphML=function(c,f,k){var m=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(E){t.clear()&&m(E)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,m)}catch(E){v(E)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,v))}),m)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(v){k.clear()&&f(v)}),t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||m({message:mxResources.get("unknownError")})}catch(v){m(v)}else m({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,m))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};@@ -12975,53 +12980,53 @@ EditorUi.prototype.convertLucidChart=function(c,f,k){var m=mxUtils.bind(this,fun"convertLucidChart",E];null!=E.state&&D.push(JSON.parse(E.state));if(null!=E.svgThumbs)for(var B=0;B<E.svgThumbs.length;B++)D.push(Editor.createSvgDataUri(E.svgThumbs[B]));null!=E.thumb&&D.push(E.thumb);console.log.apply(console,D)}}catch(Q){}}catch(Q){null!=window.console&&console.error(Q),v(Q)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,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",A,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,v))}),m)};EditorUi.prototype.createMermaidXml=function(c,f,k,m,t,v){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,m,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=v&&A.setAttributeForCell(k,"templatePrompt",v);c=(new mxCodec).encode(A.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,k){var m=0,t=function(){for(var A=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),-E=0;E<A.length;E++)null!=A[E].parentNode&&A[E].parentNode.removeChild(A[E])},v=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(A){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(B){A.clear()&&(t(),k(B))});E.send(mxUtils.bind(this,function(B){if(A.isAlive())if(200<=B.getStatus()&&299>=B.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var T=mxUtils.trim(B.getText());this.generateMermaidImage(T,null,mxUtils.bind(this,-function(U,P,q){this.tryAndHandle(mxUtils.bind(this,function(){A.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[T]),t(),f(T,U,P,q))}),D)}),D,mxUtils.bind(this,function(U){3>m++?A.clear()&&v():D(U)}))}),D);else{var Q={message:mxResources.get("error")+" "+B.getStatus()};try{Q=JSON.parse(B.getText()),Q=Q.error}catch(T){}D(Q)}}),D)}),k)});v()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));+E=0;E<A.length;E++)null!=A[E].parentNode&&A[E].parentNode.removeChild(A[E])},v=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(A){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(B){A.clear()&&(t(),k(B))});E.send(mxUtils.bind(this,function(B){if(A.isAlive())if(200<=B.getStatus()&&299>=B.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var U=mxUtils.trim(B.getText());this.generateMermaidImage(U,null,mxUtils.bind(this,+function(T,P,q){this.tryAndHandle(mxUtils.bind(this,function(){A.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[U]),t(),f(U,T,P,q))}),D)}),D,mxUtils.bind(this,function(T){3>m++?A.clear()&&v():D(T)}))}),D);else{var Q={message:mxResources.get("error")+" "+B.getStatus()};try{Q=JSON.parse(B.getText()),Q=Q.error}catch(U){}D(Q)}}),D)}),k)});v()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var k=1<f.length?f[1]:null;if(null!=k){var m=k.indexOf("-");0<m&&(k=k.substring(0,m))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");k=f[0].split(" ")[0].replace(/:$/,"");m=k.indexOf("-");0<m&&(k=k.substring(0,m));try{"mindmap"==k&&2<f.length&&(c=extractMermaidMindmap(f))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,k,m,t){var v=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=m?m(E):this.handleError(E)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var E=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');D=D.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var B=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<B.length&&-"error"!=B[0].getAttribute("aria-roledescription")){var Q=parseFloat(B[0].getAttribute("width")),T=parseFloat(B[0].getAttribute("height"));if(isNaN(Q)||isNaN(T))try{var U=B[0].getAttribute("viewBox").split(/\s+/);Q=parseFloat(U[2]);T=parseFloat(U[3])}catch(P){Q=Q||100,T=T||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),Q,T)}else null!=t?t():m({message:mxResources.get("invalidInput")})}catch(P){m(P)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),+"error"!=B[0].getAttribute("aria-roledescription")){var Q=parseFloat(B[0].getAttribute("width")),U=parseFloat(B[0].getAttribute("height"));if(isNaN(Q)||isNaN(U))try{var T=B[0].getAttribute("viewBox").split(/\s+/);Q=parseFloat(T[2]);U=parseFloat(T[3])}catch(P){Q=Q||100,U=U||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),Q,U)}else null!=t?t():m({message:mxResources.get("invalidInput")})}catch(P){m(P)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(D){E(D.svg)}).catch(function(D){null!=t?t(D):m(D)})}catch(D){m(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,v)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,v))};EditorUi.prototype.generatePlantUmlImage=function(c,f,k,m){function t(E,D,B){c1=E>>2;c2=(E&3)<<4|D>>4;c3=(D&15)<<2|B>>6;c4=B&63;r="";r+=v(c1&63);r+=v(c2&63);r+=v(c3&63);return r+=v(c4&63)}function v(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";-for(i=0;i<E.length;i+=3)r=i+2==E.length?r+t(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+t(E.charCodeAt(i),0,0):r+t(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(B){var Q=new Image;Q.onload=function(){try{var T=Q.width,U=Q.height;-if(0==T&&0==U){var P=D.result,q=P.indexOf(","),u=decodeURIComponent(escape(atob(P.substring(q+1)))),J=mxUtils.parseXml(u).getElementsByTagName("svg");0<J.length&&(T=parseFloat(J[0].getAttribute("width")),U=parseFloat(J[0].getAttribute("height")))}k(D.result,T,U)}catch(G){m(G)}};Q.src=D.result};D.onerror=function(B){m(B)}}else m(E)};A.onerror=function(E){m(E)};A.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var m=this.editor.graph,t=null;m.getModel().beginUpdate();try{t=m.insertVertex(null,-null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(t,!0)}finally{m.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(c,f,k,m,t,v,A,E){v=null!=v?v:!0;A=null!=A?A:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(U){4==U.readyState&&200<=-U.status&&299>=U.status&&this.editor.graph.setSelectionCells(this.insertTextAt(U.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var B=Editor.extractGraphModelFromPdf(c);if(null!=B&&0<B.length)return this.importXml(B,f,k,v,!0,E)}if(Editor.isPngDataUrl(c)&&(B=Editor.extractGraphModelFromPng(c),null!=B&&0<B.length))return this.importXml(B,f,k,v,-!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(B=c.substring(c.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(c.substring(c.indexOf(",")+1));var Q=this.importXml(B,f,k,v,!0,E);if(0<Q.length)return Q}catch(U){}this.loadImage(c,mxUtils.bind(this,function(U){if("data:"==c.substring(0,5))this.resizeImage(U,c,mxUtils.bind(this,function(u,J,G){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),-D.snap(k),J,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/U.width,this.maxImageSize/U.height)),q=Math.round(U.width*P);U=Math.round(U.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(k),q,U,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-c+";"))}}),mxUtils.bind(this,function(){var U=null;D.getModel().beginUpdate();try{U=D.insertVertex(D.getDefaultParent(),null,c,D.snap(f),D.snap(k),1,1,"text;"+(m?"html=1;":"")),D.updateCellSize(U),D.fireEvent(new mxEventObject("textInserted","cells",[U]))}finally{D.getModel().endUpdate()}D.setSelectionCell(U)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,v,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,-function(U){this.editor.graph.setSelectionCells(this.importXml(U,f,k,v,null,E))}),mxUtils.bind(this,function(U){this.handleError(U)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(k),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));m&&(c=D.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");t.value=c;D.updateCellSize(t);if(0<this.maxTextWidth&&-t.geometry.width>this.maxTextWidth){var T=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=T.width;t.geometry.height=T.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=+for(i=0;i<E.length;i+=3)r=i+2==E.length?r+t(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+t(E.charCodeAt(i),0,0):r+t(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(B){var Q=new Image;Q.onload=function(){try{var U=Q.width,T=Q.height;+if(0==U&&0==T){var P=D.result,q=P.indexOf(","),u=decodeURIComponent(escape(atob(P.substring(q+1)))),J=mxUtils.parseXml(u).getElementsByTagName("svg");0<J.length&&(U=parseFloat(J[0].getAttribute("width")),T=parseFloat(J[0].getAttribute("height")))}k(D.result,U,T)}catch(G){m(G)}};Q.src=D.result};D.onerror=function(B){m(B)}}else m(E)};A.onerror=function(E){m(E)};A.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var m=this.editor.graph,t=null;m.getModel().beginUpdate();try{t=m.insertVertex(null,+null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(t,!0)}finally{m.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(c,f,k,m,t,v,A,E){v=null!=v?v:!0;A=null!=A?A:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(T){4==T.readyState&&200<=+T.status&&299>=T.status&&this.editor.graph.setSelectionCells(this.insertTextAt(T.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var B=Editor.extractGraphModelFromPdf(c);if(null!=B&&0<B.length)return this.importXml(B,f,k,v,!0,E)}if(Editor.isPngDataUrl(c)&&(B=Editor.extractGraphModelFromPng(c),null!=B&&0<B.length))return this.importXml(B,f,k,v,+!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(B=c.substring(c.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(c.substring(c.indexOf(",")+1));var Q=this.importXml(B,f,k,v,!0,E);if(0<Q.length)return Q}catch(T){}this.loadImage(c,mxUtils.bind(this,function(T){if("data:"==c.substring(0,5))this.resizeImage(T,c,mxUtils.bind(this,function(u,J,G){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),+D.snap(k),J,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/T.width,this.maxImageSize/T.height)),q=Math.round(T.width*P);T=Math.round(T.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(k),q,T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++c+";"))}}),mxUtils.bind(this,function(){var T=null;D.getModel().beginUpdate();try{T=D.insertVertex(D.getDefaultParent(),null,c,D.snap(f),D.snap(k),1,1,"text;"+(m?"html=1;":"")),D.updateCellSize(T),D.fireEvent(new mxEventObject("textInserted","cells",[T]))}finally{D.getModel().endUpdate()}D.setSelectionCell(T)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,v,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,+function(T){this.editor.graph.setSelectionCells(this.importXml(T,f,k,v,null,E))}),mxUtils.bind(this,function(T){this.handleError(T)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(k),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));m&&(c=D.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");t.value=c;D.updateCellSize(t);if(0<this.maxTextWidth&&+t.geometry.width>this.maxTextWidth){var U=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=U.width;t.geometry.height=U.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,E){StorageFile.listFiles(this,"F",A,E)});window.openBrowserFile=mxUtils.bind(this,function(A,E,D){StorageFile.getFileContent(this,A,E,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,E,D){StorageFile.deleteFile(this,A,E,D)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var t=this.dialog,v=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=m;v.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=-function(c,f,k){var m=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(v){if(mxUtils.isEmptyObject(v.files))k();else{var A=0,E,D=!1;v.forEach(function(B,Q){B=Q.name.toLowerCase();"diagram/diagram.xml"==B?(D=!0,Q.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=Q))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(B,+function(c,f,k){var m=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(v){if(mxUtils.isEmptyObject(v.files))k();else{var A=0,E,D=!1;v.forEach(function(B,Q){B=Q.name.toLowerCase();"diagram/diagram.xml"==B?(D=!0,Q.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=Q))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(B,c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):m.parseFileData(B,mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?f(Q.responseText):k())}),c.name):k()}):D||k()}},function(v){k(v)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(c,f,k,m,t,v,A,-E,D,B,Q,T){B=null!=B?B:!0;var U=!1,P=null,q=mxUtils.bind(this,function(u){var J=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,A)),this.showSidebar()):J=this.importXml(u,k,m,B,null,null!=T?mxEvent.isControlDown(T):null);null!=E&&E(J)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(Q=Q?null:this.extractGraphModelFromPng(c),null!=Q&&0<Q.length&&(P=this.importXml(Q,k,m,B,null,null!=T?mxEvent.isControlDown(T):null),D=!0)),D||(D=this.editor.graph,-Q=c.indexOf(";"),0<Q&&(c=c.substring(0,Q)+c.substring(c.indexOf(",",Q+1))),B&&D.isGridEnabled()&&(k=D.snap(k),m=D.snap(m)),Q="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Q+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,m,t,v,Q+"image="+c+";")])):/(\.*<graphml )/.test(c)?(U=!0,this.importGraphML(c,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(U=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(c,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(U=!0,f=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?q(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,A):this.parseFile(D,f,A)):0==c.indexOf("PK")&&null!=D?(U=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=-this.insertTextAt(this.validateFileData(c),k,m,!0,null,B);E(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(c),k,m,!0,null,B,null,null!=T?mxEvent.isControlDown(T):null));U||null==E||E(P);return P};EditorUi.prototype.importFiles=function(c,f,k,m,t,v,A,E,D,B,Q,T,U){m=null!=m?m:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var P=null!=f&&null!=k,q=!0;f=null!=f?f:0;k=null!=k?k:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var J=Q||-this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>J){u=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[f],"y",[k],"maxSize",[m],"maxBytes",[B],"resampleThreshold",[this.resampleThreshold],"largeImages",[u],"crop",[P],"resizeImages",[q],"ignoreEmbeddedXml",[T],"evt",[U]);var H=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;t=null!=t?t:mxUtils.bind(this,function(R,V,Y,W,X,aa,ba,-la,ea){try{if(null!=R&&"<mxlibrary"==R.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,R,ba)),this.showSidebar(),null;this.isCompatibleString(R)&&1==c.length&&null!=U&&"drop"==U.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=Y=0);return this.importFile(R,V,Y,W,X,aa,ba,la,ea,P,T,U)}catch(ca){return this.handleError(ca),null}});v=null!=v?v:mxUtils.bind(this,function(R){g.setSelectionCells(R)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=+E,D,B,Q,U){B=null!=B?B:!0;var T=!1,P=null,q=mxUtils.bind(this,function(u){var J=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,A)),this.showSidebar()):J=this.importXml(u,k,m,B,null,null!=U?mxEvent.isControlDown(U):null);null!=E&&E(J)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(Q=Q?null:this.extractGraphModelFromPng(c),null!=Q&&0<Q.length&&(P=this.importXml(Q,k,m,B,null,null!=U?mxEvent.isControlDown(U):null),D=!0)),D||(D=this.editor.graph,+Q=c.indexOf(";"),0<Q&&(c=c.substring(0,Q)+c.substring(c.indexOf(",",Q+1))),B&&D.isGridEnabled()&&(k=D.snap(k),m=D.snap(m)),Q="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Q+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,m,t,v,Q+"image="+c+";")])):/(\.*<graphml )/.test(c)?(T=!0,this.importGraphML(c,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(T=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(c,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,f=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?q(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,A):this.parseFile(D,f,A)):0==c.indexOf("PK")&&null!=D?(T=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=+this.insertTextAt(this.validateFileData(c),k,m,!0,null,B);E(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(c),k,m,!0,null,B,null,null!=U?mxEvent.isControlDown(U):null));T||null==E||E(P);return P};EditorUi.prototype.importFiles=function(c,f,k,m,t,v,A,E,D,B,Q,U,T){m=null!=m?m:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var P=null!=f&&null!=k,q=!0;f=null!=f?f:0;k=null!=k?k:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var J=Q||+this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>J){u=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[f],"y",[k],"maxSize",[m],"maxBytes",[B],"resampleThreshold",[this.resampleThreshold],"largeImages",[u],"crop",[P],"resizeImages",[q],"ignoreEmbeddedXml",[U],"evt",[T]);var H=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;t=null!=t?t:mxUtils.bind(this,function(R,V,Y,W,X,aa,ba,+la,ea){try{if(null!=R&&"<mxlibrary"==R.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,R,ba)),this.showSidebar(),null;this.isCompatibleString(R)&&1==c.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(P=!1,W=Y=0);return this.importFile(R,V,Y,W,X,aa,ba,la,ea,P,U,T)}catch(ca){return this.handleError(ca),null}});v=null!=v?v:mxUtils.bind(this,function(R){g.setSelectionCells(R)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var C=c.length,I=C,N=[],O=mxUtils.bind(this,function(R,V){N[R]=V;if(0==--I){this.spinner.stop();if(null!=E)E(N);else{var Y=[];g.getModel().beginUpdate();try{for(R=0;R<N.length;R++){var W=N[R]();null!=W&&(Y=Y.concat(W))}}finally{g.getModel().endUpdate()}}v(Y)}}),S=0;S<C;S++)mxUtils.bind(this,function(R){var V=c[R];if(null!=V){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(W){if(null==A||A(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var X=Graph.clipSvgDataUri(W.target.result),-aa=X.indexOf(","),ba=decodeURIComponent(escape(atob(X.substring(aa+1)))),la=mxUtils.parseXml(ba),ea=la.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],fa=T?null:ca.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel>"!==fa.substring(0,14)&&"<mxGraphModel "!==fa.substring(0,14)?O(R,mxUtils.bind(this,function(){try{if(null!=+aa=X.indexOf(","),ba=decodeURIComponent(escape(atob(X.substring(aa+1)))),la=mxUtils.parseXml(ba),ea=la.getElementsByTagName("svg");if(0<ea.length){var ca=ea[0],fa=U?null:ca.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel>"!==fa.substring(0,14)&&"<mxGraphModel "!==fa.substring(0,14)?O(R,mxUtils.bind(this,function(){try{if(null!=la){var ha=la.getElementsByTagName("svg");if(0<ha.length){var ka=ha[0],da=ka.getAttribute("width"),va=ka.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;var ra=ka.getAttribute("viewBox");if(null==ra||0==ra.length)ka.setAttribute("viewBox","0 0 "+da+" "+va);else if(isNaN(da)||isNaN(va)){var wa=ra.split(" ");3<wa.length&&(da=parseFloat(wa[2]),va=parseFloat(wa[3]))}X=Editor.createSvgDataUri(mxUtils.getXml(ka));var pa=Math.min(1,Math.min(m/Math.max(1,da)),m/Math.max(1,va)),ja=t(X,V.type,f+R*p,k+R*p,Math.max(1,Math.round(da*pa)),Math.max(1,Math.round(va*pa)),V.name);if(null!=ja&&(isNaN(da)||isNaN(va))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){da=Math.max(1,ma.width);va=Math.max(1,ma.height);ja[0].geometry.width=da;ja[0].geometry.height=va;ka.setAttribute("viewBox","0 0 "+da+" "+va);X=Editor.createSvgDataUri(mxUtils.getXml(ka));var xa=X.indexOf(";");0<xa&&(X=X.substring(0,xa)+X.substring(X.indexOf(",",-xa+1)));g.setCellStyles("image",X,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(ka))}return ja}}}catch(xa){}return null})):O(R,mxUtils.bind(this,function(){return t(fa,"text/xml",f+R*p,k+R*p,0,0,V.name)}))}else O(R,mxUtils.bind(this,function(){return null}))}else{aa=!1;if("image/png"==V.type){var na=T?null:this.extractGraphModelFromPng(W.target.result);if(null!=na&&0<na.length){var Z=new Image;Z.src=W.target.result;O(R,mxUtils.bind(this,function(){return t(na,"text/xml",f+R*p,k+R*p,Z.width,+xa+1)));g.setCellStyles("image",X,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(ka))}return ja}}}catch(xa){}return null})):O(R,mxUtils.bind(this,function(){return t(fa,"text/xml",f+R*p,k+R*p,0,0,V.name)}))}else O(R,mxUtils.bind(this,function(){return null}))}else{aa=!1;if("image/png"==V.type){var na=U?null:this.extractGraphModelFromPng(W.target.result);if(null!=na&&0<na.length){var Z=new Image;Z.src=W.target.result;O(R,mxUtils.bind(this,function(){return t(na,"text/xml",f+R*p,k+R*p,Z.width,Z.height,V.name)}));aa=!0}}aa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(W.target.result,mxUtils.bind(this,function(ha){this.resizeImage(ha,W.target.result,mxUtils.bind(this,function(ka,da,va){O(R,mxUtils.bind(this,function(){if(null!=ka&&ka.length<B){var ra=q&&this.isResampleImageSize(V.size,Q)?Math.min(1,Math.min(m/da,m/va)):1;return t(ka,V.type,f+R*p,k+R*p,Math.round(da*ra),Math.round(va*ra),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,m,Q,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else X=W.target.result,t(X,V.type,f+R*p,k+R*p,240,160,V.name,function(ha){O(R,function(){return ha})},V)}catch(ha){O(R,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(ha,V)}else O(R,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?t(null,V.type,f+R*p,k+R*p,240,160,V.name,function(W){O(R,function(){return W})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?Y.readAsDataURL(V):Y.readAsText(V)}})(S)});if(u){u=[];for(G=0;G<c.length;G++)u.push(c[G]);c=u;this.confirmImageResize(function(g){q=g;H()},D)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(v,A){if(v||f)mxSettings.setResizeImages(v?A:null),mxSettings.save();k();c(A)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(v){t(v,!0)},function(v){t(v,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):t(!1,m)};EditorUi.prototype.parseFile=function(c,f,k){k=null!=k?k:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,k)});m.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,k){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,k,m,t,v,-A){t=null!=t?t:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),B=f;if(m&&this.isResampleImageSize(null!=A?A:f.length,v))try{var Q=Math.max(E/t,D/t);if(1<Q){var T=Math.round(E/Q),U=Math.round(D/Q),P=document.createElement("canvas");P.width=T;P.height=U;P.getContext("2d").drawImage(c,0,0,T,U);var q=P.toDataURL();if(q.length<f.length){var u=document.createElement("canvas");u.width=T;u.height=U;var J=u.toDataURL();q!==J&&(f=q,E=T,D=U)}}}catch(G){}m&&B!=f&&t>this.maxImageSize/2&&f.length>+A){t=null!=t?t:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),B=f;if(m&&this.isResampleImageSize(null!=A?A:f.length,v))try{var Q=Math.max(E/t,D/t);if(1<Q){var U=Math.round(E/Q),T=Math.round(D/Q),P=document.createElement("canvas");P.width=U;P.height=T;P.getContext("2d").drawImage(c,0,0,U,T);var q=P.toDataURL();if(q.length<f.length){var u=document.createElement("canvas");u.width=U;u.height=T;var J=u.toDataURL();q!==J&&(f=q,E=U,D=T)}}}catch(G){}m&&B!=f&&t>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,k,m,t/1.5,v,A):k(f,E,D)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,k){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=k&&(m.onerror=k);m.src=c}catch(t){if(null!=k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var x=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());x.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,k=f.isEnabled;f.isEnabled=function(){return k.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(p){var C=p.getEvent();return null==p.getState()&&!mxEvent.isMouseEvent(C)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(C)&&(null==p.getState()||mxEvent.isControlDown(C)||mxEvent.isShiftDown(C))});-f.cellEditor.editPlantUmlData=function(p,C,I){var N=JSON.parse(I);C=new TextareaDialog(c,mxResources.get("plantUml")+":",N.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,N.format,function(S,R,V){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==N.format)f.labelChanged(p,"<pre>"+S+"</pre>"),f.updateCellSize(p,!0);else{f.setCellStyles("image",c.convertDataUri(S),[p]);var Y=f.model.getGeometry(p);null!=Y&&(Y=Y.clone(),Y.width=R,-Y.height=V,f.cellsResized([p],[Y],!1))}f.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:O,format:N.format}))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})},null,null,400,220);c.showDialog(C.container,420,300,!0,!0);C.init()};f.cellEditor.editMermaidData=function(p,C,I){var N=JSON.parse(I);C=new TextareaDialog(c,mxResources.get("mermaid")+":",N.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,N.config,function(S,-R,V){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",S,[p]);var Y=f.model.getGeometry(p);null!=Y&&(Y=Y.clone(),Y.width=Math.max(Y.width,R),Y.height=Math.max(Y.height,V),f.cellsResized([p],[Y],!1));f.setAttributeForCell(p,"mermaidData",JSON.stringify({data:O,config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})},null,null,400,220);c.showDialog(C.container,420,300,!0,!0);C.init()};var m=f.cellEditor.startEditing;f.cellEditor.startEditing=+f.cellEditor.editPlantUmlData=function(p,C,I){var N=JSON.parse(I);C=new SimpleTextareaDialog(c,N.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,N.format,function(S,R,V){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==N.format)f.labelChanged(p,"<pre>"+S+"</pre>"),f.updateCellSize(p,!0);else{f.setCellStyles("image",c.convertDataUri(S),[p]);var Y=f.model.getGeometry(p);null!=Y&&(Y=Y.clone(),Y.width=R,Y.height=V,f.cellsResized([p],+[Y],!1))}f.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:O,format:N.format}))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};f.cellEditor.editMermaidData=function(p,C,I){var N=JSON.parse(I);C=new SimpleTextareaDialog(c,N.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,N.config,function(S,R,V){c.spinner.stop();+f.getModel().beginUpdate();try{f.setCellStyles("image",S,[p]);var Y=f.model.getGeometry(p);null!=Y&&(Y=Y.clone(),Y.width=Math.max(Y.width,R),Y.height=Math.max(Y.height,V),f.cellsResized([p],[Y],!1));f.setAttributeForCell(p,"mermaidData",JSON.stringify({data:O,config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})});c.showDialog(C.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));C.init()};var m=f.cellEditor.startEditing;f.cellEditor.startEditing=function(p,C){try{var I=this.graph.getAttributeForCell(p,"plantUmlData");if(null!=I)this.editPlantUmlData(p,C,I);else if(I=this.graph.getAttributeForCell(p,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(p,C,I);else{var N=f.getCellStyle(p);"1"==mxUtils.getValue(N,"metaEdit","0")?c.showDataDialog(p):m.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(p){return c.getLinkTitle(p)};f.customLinkClicked=function(p,C){var I=!1;try{var N=this.getGraphBounds();c.handleCustomLink(p,C);I=!0;c.chromelessResize&&!N.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(C))}catch(O){c.handleError(O)}return I};var t=f.parseBackgroundImage;f.parseBackgroundImage=function(p){var C=t.apply(this,arguments);null!=C&&null!=C.src&&Graph.isPageLink(C.src)&&(C={originalSrc:C.src});return C};var v=f.setBackgroundImage;f.setBackgroundImage=function(p){null!=p&&null!=p.originalSrc&&(p=c.createImageForPageLink(p.originalSrc,c.currentPage,this));v.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(p,C){p=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=p){var I=p.indexOf(",");if(0<I)for(p=p.substring(I+1),C=C.getProperty("patches"),I=0;I<C.length;I++)if(null!=C[I][EditorUi.DIFF_UPDATE]&&null!=C[I][EditorUi.DIFF_UPDATE][p]||@@ -13031,8 +13036,8 @@ S&&f.isCustomLink(S)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.cnull==c.addSelectionToScratchpad||this.addMenuItems(p,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(p,["-","exitGroup","home"],null,I)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(p,C,I){if(c.editor.graph.isSelectionEmpty())Q.apply(this,arguments),c.menus.addMenuItems(p,["copyAsImage","copyAsSvg"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(p,C,I):this.addPopupMenuArrangeItems(p,C,I),this.addMenuItems(p,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(p,C,I),this.addMenuItems(p,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(C)&&f.isCellEditable(C)&&(this.addSubmenu("editCell",p,null,mxResources.get("edit")),p.addSeparator(),f.getModel().isEdge(C))){this.addSubmenu("line",p);var N=f.getModel().getGeometry(C);null!=N&&null!=N.points&&0<N.points.length&&this.addMenuItems(p,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(p,["enterGroup"],null,I);N=c.getSelectionState();null!=N.mergeCell?this.addMenuItem(p,"mergeCells"):(1<N.style.colspan||1<N.style.rowspan)&&this.addMenuItem(p,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var T=f.getExportVariables;f.getExportVariables=function(){var p=T.apply(this,arguments),C=c.getCurrentFile();null!=C&&(p.filename=C.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=-c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var U=f.getGlobalVariable;f.getGlobalVariable=function(p){var C=c.getCurrentFile();return"filename"==p&&null!=C?C.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:U.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var U=f.getExportVariables;f.getExportVariables=function(){var p=U.apply(this,arguments),C=c.getCurrentFile();null!=C&&(p.filename=C.getTitle());p.pagecount=null!=c.pages?c.pages.length:1;p.page=null!=c.currentPage?c.currentPage.getName():"";p.pagenumber=null!=c.pages&&null!=+c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return p};var T=f.getGlobalVariable;f.getGlobalVariable=function(p){var C=c.getCurrentFile();return"filename"==p&&null!=C?C.getTitle():"page"==p&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==p?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==p?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var p=this.getCurrentFile(),C=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;P!=C&&p==q&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());P=C;q=p}));var u=f.labelLinkClicked;f.labelLinkClicked=function(p,C,I){var N=C.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))u.apply(this,arguments);else{if(!f.isEnabled()||null!=p&&f.isCellLocked(p.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var p=c.defaultFilename,C=c.getCurrentFile();null!=C&&(p=null!=C.getTitle()?C.getTitle():p);return p};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=@@ -13125,17 +13130,17 @@ EditorUi.prototype.copyImage=function(c,f,k){try{k=null!=k?k:4,null!=navigator.cA,E,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var D=this.getBaseFilename(!1)+(null!=f?".drawio":"")+".png";this.saveLocalFile(v.substring(v.lastIndexOf(",")+1),D,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,k,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.copyCells=function(c,f){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(t));f?(k.removeCells(m,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,k,m,t,v){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[f],"compat",[k],"evt",[m],"html",[t],"pt",[v]);t=null!=t?t:!0;var A=this.editor.graph,E=null!=v?v:Editor.pasteAtMousePointer&&A.isMouseInsertPoint()?-A.getInsertPoint():null;v=null;A.lastPasteXml==c?null==E&&A.pasteCounter++:(A.lastPasteXml=c,A.pasteCounter=0);var D=A.pasteCounter*A.gridSize;if(k||this.isCompatibleString(c)){A.model.beginUpdate();try{if(v=this.importXml(c,D,D),null!=E){var B=A.getBoundingBoxFromGeometry(v,!0);if(null!=B){var Q=Math.round(A.snap(E.x)),T=Math.round(A.snap(E.y));A.cellsMoved(v,Q-B.x,T-B.y)}}}finally{A.model.endUpdate()}A.setSelectionCells(v)}else if(f&&1==A.getSelectionCount()){f=A.getStartEditingCell(A.getSelectionCell(),+A.getInsertPoint():null;v=null;A.lastPasteXml==c?null==E&&A.pasteCounter++:(A.lastPasteXml=c,A.pasteCounter=0);var D=A.pasteCounter*A.gridSize;if(k||this.isCompatibleString(c)){A.model.beginUpdate();try{if(v=this.importXml(c,D,D),null!=E){var B=A.getBoundingBoxFromGeometry(v,!0);if(null!=B){var Q=Math.round(A.snap(E.x)),U=Math.round(A.snap(E.y));A.cellsMoved(v,Q-B.x,U-B.y)}}}finally{A.model.endUpdate()}A.setSelectionCells(v)}else if(f&&1==A.getSelectionCount()){f=A.getStartEditingCell(A.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==A.getCurrentCellStyle(f)[mxConstants.STYLE_SHAPE])A.setCellStyles(mxConstants.STYLE_IMAGE,c,[f]);else{A.model.beginUpdate();try{A.labelChanged(f,c),Graph.isLink(c)&&A.setLinkForCell(f,c)}finally{A.model.endUpdate()}}A.setSelectionCell(f)}else E=null!=E?E:A.getInsertPoint(),A.isMouseInsertPoint()&&(D=0,A.lastPasteXml==c&&0<A.pasteCounter&&A.pasteCounter--),v=this.insertTextAt(c,E.x+D,E.y+D,t),A.setSelectionCells(v);A.isSelectionEmpty()||(A.scrollCellToVisible(A.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(A.view.getState(A.getSelectionCell())));return v};EditorUi.prototype.pasteCells=function(c,f,k,m){if(!mxEvent.isConsumed(c)){var t=c.clipboardData,v=this.editor.graph,A=!1,E=f;if(k&&null!=t&&t.getData){var D=t.getData("text/plain"),B=!1;if(null!=D&&0<D.length&&"%3CmxGraphModel%3E"==D.substring(0,18))try{var Q=decodeURIComponent(D);this.isCompatibleString(Q)&&(B=!0,D=Q)}catch(G){}B=B?null:t.getData("text/html");null!=B&&0<B.length?(E=this.parseHtmlData(B),A="text/plain"!=E.getAttribute("data-type")):null!=D&&0<D.length&&(E=document.createElement("div"),mxUtils.setTextContent(E,B))}D=E.getElementsByTagName("span");if(null!=D&&0<D.length&&"application/vnd.lucid.chart.objects"===D[0].getAttribute("data-lucid-type"))k=D[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var H=this.editor.graph;H.lastPasteXml==G?H.pasteCounter++:(H.lastPasteXml=G,H.pasteCounter=0);var g=H.pasteCounter*H.gridSize;-H.setSelectionCells(this.importXml(G,g,g));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(c));else{var T=!1,U="";U=A?null!=E.textContent&&"<mxfile"==E.textContent.substring(0,7)&&"</mxfile>"==E.textContent.substring(E.textContent.length-9)||"<mxGraphModel"==E.textContent.substring(0,13)&&"</mxGraphModel>"==E.textContent.substring(E.textContent.length-15)?E.textContent.replace(/\u00a0/g," "):E.innerHTML:mxUtils.trim(null==E.innerText?-mxUtils.getTextContent(E):E.innerText);try{var P=U.lastIndexOf("%3E");0<=P&&P<U.length-3&&(U=U.substring(0,P+3))}catch(G){}try{D=E.getElementsByTagName("span"),(Q=null!=D&&0<D.length?mxUtils.trim(decodeURIComponent(D[0].textContent)):decodeURIComponent(U))&&(this.isCompatibleString(Q)||0==Q.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(T=!0,U=Q)}catch(G){}Q=null;try{if(!T&&""==E.textContent)for(P=0;P<t.items.length;P++){var q=t.items[P];if("file"===q.kind){Q=q.getAsFile();break}}}catch(G){}EditorUi.debug("EditorUi.pasteCells",-[this],"evt",[c],"realElt",[f.outerHTML],"elt",[E.outerHTML],"useEvent",k,"pasteAsLabel",m,"xml",[U],"compat",T,"asHtml",A,"data",t,"items",[t.items.length],"files",[t.files.length],"types",[JSON.stringify(t.types)],"blob",[Q]);try{if(T||null==Q)if(null!=U&&0<U.length){if(0==U.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var J=mxUtils.bind(this,function(){try{U=(new MiroImporter).importMiroJson(JSON.parse(U)),this.pasteXml(U,m,T,c)}catch(G){console.log("Miro import error:",G)}});-"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",J):J()}else this.pasteXml(U,m,T,c,A);mxEvent.consume(c)}else k||(v.lastPasteXml=null,v.pasteCounter=0);else{var u=v.getInsertPoint();this.importFiles([Q],u.x,u.y,this.maxImageSize);mxEvent.consume(c)}}catch(G){this.handleError(G)}}}f.innerHTML=" "};EditorUi.prototype.pasteFromClipboard=function(c){var f=this.editor.graph;if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,+H.setSelectionCells(this.importXml(G,g,g));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(c));else{var U=!1,T="";T=A?null!=E.textContent&&"<mxfile"==E.textContent.substring(0,7)&&"</mxfile>"==E.textContent.substring(E.textContent.length-9)||"<mxGraphModel"==E.textContent.substring(0,13)&&"</mxGraphModel>"==E.textContent.substring(E.textContent.length-15)?E.textContent.replace(/\u00a0/g," "):E.innerHTML:mxUtils.trim(null==E.innerText?+mxUtils.getTextContent(E):E.innerText);try{var P=T.lastIndexOf("%3E");0<=P&&P<T.length-3&&(T=T.substring(0,P+3))}catch(G){}try{D=E.getElementsByTagName("span"),(Q=null!=D&&0<D.length?mxUtils.trim(decodeURIComponent(D[0].textContent)):decodeURIComponent(T))&&(this.isCompatibleString(Q)||0==Q.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(U=!0,T=Q)}catch(G){}Q=null;try{if(!U&&""==E.textContent)for(P=0;P<t.items.length;P++){var q=t.items[P];if("file"===q.kind){Q=q.getAsFile();break}}}catch(G){}EditorUi.debug("EditorUi.pasteCells",+[this],"evt",[c],"realElt",[f.outerHTML],"elt",[E.outerHTML],"useEvent",k,"pasteAsLabel",m,"xml",[T],"compat",U,"asHtml",A,"data",t,"items",[t.items.length],"files",[t.files.length],"types",[JSON.stringify(t.types)],"blob",[Q]);try{if(U||null==Q)if(null!=T&&0<T.length){if(0==T.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var J=mxUtils.bind(this,function(){try{T=(new MiroImporter).importMiroJson(JSON.parse(T)),this.pasteXml(T,m,U,c)}catch(G){console.log("Miro import error:",G)}});+"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",J):J()}else this.pasteXml(T,m,U,c,A);mxEvent.consume(c)}else k||(v.lastPasteXml=null,v.pasteCounter=0);else{var u=v.getInsertPoint();this.importFiles([Q],u.x,u.y,this.maxImageSize);mxEvent.consume(c)}}catch(G){this.handleError(G)}}}f.innerHTML=" "};EditorUi.prototype.pasteFromClipboard=function(c){var f=this.editor.graph;if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(k,m,t,v,A){if(null!=k){f.getModel().beginUpdate();try{this.pasteXml(k,!0,null,null,null,c)}finally{f.getModel().endUpdate()}}else k=null!=m?m:null!=t?t:v,null!=k?(c=null!=c?c:f.getInsertPoint(),this.importFiles([k],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(k){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var f=this.editor.graph;f.getModel().beginUpdate();try{f.moveCellsTo(mxClipboard.paste(f),c)}finally{f.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){for(var k=null!=f.clipboardData?f.clipboardData:f.originalEvent.clipboardData,m=!1,t=null,v=0;v<k.types.length;v++)if("text/"===k.types[v].substring(0,5)){m=!0;break}for(v=0;v<k.items.length;v++){var A=k.items[v];if("file"===A.kind){t=A.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[f],"data",[k],"items",[k.items.length],"files",-[k.files.length],"types",[JSON.stringify(k.types)],"containsText",m,"file",[t],"editing",c.isEditing());var E=mxUtils.bind(this,function(){try{if(!m&&null!=t){if(c.isEditing())this.importFiles([t],0,0,this.maxImageSize,function(B,Q,T,U,P,q){c.insertImage(B,P,q)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var Q=0;Q<B.length;Q++)B[Q]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([t],D.x,D.y,this.maxImageSize)}mxEvent.consume(f)}}catch(B){}});+[k.files.length],"types",[JSON.stringify(k.types)],"containsText",m,"file",[t],"editing",c.isEditing());var E=mxUtils.bind(this,function(){try{if(!m&&null!=t){if(c.isEditing())this.importFiles([t],0,0,this.maxImageSize,function(B,Q,U,T,P,q){c.insertImage(B,P,q)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var Q=0;Q<B.length;Q++)B[Q]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([t],D.x,D.y,this.maxImageSize)}mxEvent.consume(f)}}catch(B){}});if(!mxEvent.isConsumed(f)&&!m)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(D){this.readTypeFromClipboardData(D,"image/svg+xml",mxUtils.bind(this,function(B){if(null!=B){B=new Blob([B],{type:"image/svg+xml"});var Q=this.editor.graph.getInsertPoint();this.importFiles([B],Q.x,Q.y,this.maxImageSize)}else E()}),"image")}))["catch"](E);else E()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(f){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",f,"types",null!=f&&0<f.length?[JSON.stringify(f[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(f,mxUtils.bind(this,function(k,m){null!=k?c(k):this.readGraphModelFromImageClipboardData(f,mxUtils.bind(this,function(t,v,A){null!=t?c(t):this.readTypeFromClipboardData(f,"text/plain",mxUtils.bind(this,function(E){c(E,v,A,m,f)}))}))}))}catch(k){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,f){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(k){var m=null,t=null;try{var v=this.parseHtmlData(k);if(null!=v){m="text/plain"!=v.getAttribute("data-type")?v.innerHTML:mxUtils.trim(null==v.innerText?mxUtils.getTextContent(v):v.innerText);try{var A=m.lastIndexOf("%3E");0<=A&&A<m.length-3&&(m=m.substring(0,A+3))}catch(B){}try{null==m&&(k=null,""==v.textContent&&1==v.children.length&&"IMG"==v.firstChild.nodeName&&(k=v.firstChild.getAttribute("src")),null!=k&&0<@@ -13153,9 +13158,9 @@ ha[ka].url;Graph.isCssFontUrl(va)?na.writeln('<link rel="stylesheet" href="'+mxUm.disableSvgLinks(na.node,function(Z){Z.setAttribute("href","javascript:void(0)")}))}}var fa=H.addGraphFragment;H.addGraphFragment=function(na,Z,ha,ka,da,va){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:da.classList.add("geDisableMathJax");if(this.graph.shadowVisible)for(var ra=da.getElementsByTagName("svg"),wa=0;wa<ra.length;wa++)G.addSvgShadow(ra[wa])};f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.open(null,null,g,!0,p,W,f.selection?G.getSelectionCells():null)}else{R=G.background;if(null==R||""==R||R==mxConstants.NONE)R="#ffffff";H.backgroundColor=R;H.autoOrigin=X;f.grid&&(H.gridSize=G.gridSize,H.gridSteps=G.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:G.view.gridColor);H.appendGraph(G,ba,V,Y,g,!0,p,W,f.selection?G.getSelectionCells():null);g=G.getCustomFonts();if(null!=H.wnd)for(W=0;W<g.length;W++)V=g[W].name,Y=g[W].url,Graph.isCssFontUrl(Y)?H.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Y)+'" charset="UTF-8" type="text/css">'):(H.wnd.document.writeln('<style type="text/css">'),H.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(Y)+'");\n}'),H.wnd.document.writeln("</style>"))}C&&(G.useCssTransforms=C,G.currentTranslate=I,G.currentScale=N,G.view.translate=O,G.view.scale=S);return H}),E=f.pagesFrom,D=f.pagesTo,B=!f.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-f);else{B&&(B=f.selection||E==v&&D==v);if(!B&&null!=this.pages&&this.pages.length){B=0;v=this.pages.length-1;f.allPages||(B=parseInt(E)-1,v=parseInt(D)-1);for(var Q=B;Q<=v;Q++){var T=this.pages[Q];E=T==this.currentPage?m:null;if(null==E){E=this.createTemporaryGraph(m.stylesheet);E.shapeForegroundColor=m.shapeForegroundColor;E.shapeBackgroundColor=m.shapeBackgroundColor;D=!0;var U=B=!1,P=null,q=null;null==T.viewState&&null==T.root&&this.updatePageRoot(T);null!=T.viewState&&(D=T.viewState.pageVisible,-B=T.viewState.mathEnabled,U=T.viewState.shadowVisible,P=T.viewState.background,q=T.viewState.backgroundImage,E.pageFormat=T.viewState.pageFormat,E.gridSize=T.viewState.gridSize);null!=q&&null!=q.originalSrc&&(q=this.createImageForPageLink(q.originalSrc,T));E.background=P;E.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height,q.x,q.y):null;E.pageVisible=D;E.mathEnabled=B;E.shadowVisible=U;var u=E.getGraphBounds;E.getGraphBounds=function(){var G=u.apply(this,arguments),H=this.backgroundImage;-if(null!=H&&null!=H.width&&null!=H.height){var g=this.view.translate,p=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((g.x+H.x)*p,(g.y+H.y)*p,H.width*p,H.height*p))}return G};var J=E.getGlobalVariable;E.getGlobalVariable=function(G){return"page"==G?T.getName():"pagenumber"==G?Q+1:"pagecount"==G?null!=this.pages?this.pages.length:1:J.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(T);E.model.setRoot(T.root)}t=A(E,t,Q!=v,T.getId());E!=m&&E.container.parentNode.removeChild(E.container)}}else t=+f);else{B&&(B=f.selection||E==v&&D==v);if(!B&&null!=this.pages&&this.pages.length){B=0;v=this.pages.length-1;f.allPages||(B=parseInt(E)-1,v=parseInt(D)-1);for(var Q=B;Q<=v;Q++){var U=this.pages[Q];E=U==this.currentPage?m:null;if(null==E){E=this.createTemporaryGraph(m.stylesheet);E.shapeForegroundColor=m.shapeForegroundColor;E.shapeBackgroundColor=m.shapeBackgroundColor;D=!0;var T=B=!1,P=null,q=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(D=U.viewState.pageVisible,+B=U.viewState.mathEnabled,T=U.viewState.shadowVisible,P=U.viewState.background,q=U.viewState.backgroundImage,E.pageFormat=U.viewState.pageFormat,E.gridSize=U.viewState.gridSize);null!=q&&null!=q.originalSrc&&(q=this.createImageForPageLink(q.originalSrc,U));E.background=P;E.backgroundImage=null!=q?new mxImage(q.src,q.width,q.height,q.x,q.y):null;E.pageVisible=D;E.mathEnabled=B;E.shadowVisible=T;var u=E.getGraphBounds;E.getGraphBounds=function(){var G=u.apply(this,arguments),H=this.backgroundImage;+if(null!=H&&null!=H.width&&null!=H.height){var g=this.view.translate,p=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((g.x+H.x)*p,(g.y+H.y)*p,H.width*p,H.height*p))}return G};var J=E.getGlobalVariable;E.getGlobalVariable=function(G){return"page"==G?U.getName():"pagenumber"==G?Q+1:"pagecount"==G?null!=this.pages?this.pages.length:1:J.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(U);E.model.setRoot(U.root)}t=A(E,t,Q!=v,U.getId());E!=m&&E.container.parentNode.removeChild(E.container)}}else t=A(m);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,c||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||c||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,k=0;k<c.length;k++)mxEvent.addListener(c[k],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[k],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[k],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(m);if(null==t){var v=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=v&&(10==document.documentMode||11==document.documentMode?t=v.getData("Text"):(t=null,t=0<=mxUtils.indexOf(v.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(v.types,"text/html")?@@ -13180,10 +13185,10 @@ this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,m,1,this.embedExportBorder,null,this.embedExportTheme)}else c||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(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")))}catch(t){c||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,k=!1,m=!1,t=null,v=mxUtils.bind(this,function(D,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,v);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var B=-D.data,Q=null,T=mxUtils.bind(this,function(Z){if(null!=Z&&"function"===typeof Z.charAt&&"<"!=Z.charAt(0))try{Editor.isPngDataUrl(Z)?Z=Editor.extractGraphModelFromPng(Z):"data:image/svg+xml;base64,"==Z.substring(0,26)?Z=atob(Z.substring(26)):"data:image/svg+xml;utf8,"==Z.substring(0,24)&&(Z=Z.substring(24)),null!=Z&&(""==Z.trim()?Z=null:"%"==Z.charAt(0)?Z=decodeURIComponent(Z):"<"!=Z.charAt(0)&&(Z=Graph.decompress(Z)))}catch(ha){}return Z});if("json"==urlParams.proto){var U=!1;try{B=JSON.parse(B),+D.data,Q=null,U=mxUtils.bind(this,function(Z){if(null!=Z&&"function"===typeof Z.charAt&&"<"!=Z.charAt(0))try{Editor.isPngDataUrl(Z)?Z=Editor.extractGraphModelFromPng(Z):"data:image/svg+xml;base64,"==Z.substring(0,26)?Z=atob(Z.substring(26)):"data:image/svg+xml;utf8,"==Z.substring(0,24)&&(Z=Z.substring(24)),null!=Z&&(""==Z.trim()?Z=null:"%"==Z.charAt(0)?Z=decodeURIComponent(Z):"<"!=Z.charAt(0)&&(Z=Graph.decompress(Z)))}catch(ha){}return Z});if("json"==urlParams.proto){var T=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[B])}catch(Z){B=null}try{if(null==B)return;if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):mxUtils.htmlEntities(B.message),null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));return}if("prompt"==B.action){this.spinner.stop();var P=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Z){null!=Z?A.postMessage(JSON.stringify({event:"prompt",value:Z,message:B}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")});this.showDialog(P.container,300,80,!0,!1);P.init();return}if("draft"==-B.action){var q=T(B.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();+B.action){var q=U(B.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(Z){Z&&this.actions.get("exit").funct()}));try{P.init()}catch(Z){A.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var u=1==B.enableRecent,J=1==B.enableSearch,G=1==B.enableCustomTemp;P=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Z,ha,ka,da){Z=Z||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ha,tempUrl:ka,libs:da,builtIn:!0,message:B}),"*"):(c(Z,D,Z!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(Z){this.remoteInvoke("getRecentDiagrams",[null],null,Z,function(){Z(null,"Network Error!")})}):null,J?mxUtils.bind(this,function(Z,ha){this.remoteInvoke("searchDiagrams",[Z,null],null,ha,function(){ha(null,"Network Error!")})}):null,mxUtils.bind(this,function(Z,ha,ka){A.postMessage(JSON.stringify({event:"template",docUrl:Z,info:ha,name:ka}),"*")}),null,null,G?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},0)})}):null,1==B.withoutType,null,B.templatesOnly);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(Z){null!=this.sidebar&&this.sidebar.hideTooltip();Z&&this.actions.get("exit").funct()}));P.init();@@ -13198,19 +13203,19 @@ V){var Z=p.getGlobalVariable;p=this.createTemporaryGraph(p.getStylesheet());for("html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();Z.xml=mxUtils.getXml(ha);Z.data=this.getFileData(null,null,!0,null,null,null,ha);Z.format=B.format}else if("html"==B.format)ha=this.editor.getGraphXml(),Z.data=this.getHtml(ha,this.editor.graph),Z.xml=mxUtils.getXml(ha),Z.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;ha=null!=B.background?B.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);Z.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Z.format="svg";var ka=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Z.data=B.asText?va:Editor.createSvgDataUri(va);A.postMessage(JSON.stringify(Z),"*")}),da="auto";B.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=B.theme&&(da=B.theme);if("xmlsvg"==B.format){if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=B.theme&&(da=B.theme);this.getEmbeddedSvg(Z.xml,this.editor.graph,null,!0,ka,null,null,B.embedImages,ha,B.scale,B.border,B.shadow,da)}}else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),ha=this.editor.graph.getSvg(ha,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,da),(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(ha),-this.embedFonts(ha,mxUtils.bind(this,function(va){B.embedImages||null==B.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(ra){ka(mxUtils.getXml(ra))})):ka(mxUtils.getXml(va))}));return}A.postMessage(JSON.stringify(Z),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);Y()}}k=!0;this.setFileData(B.xml);k=!1;this.editor.graph.mathEnabled||Y()}else Y();return}if("load"==B.action){U=+this.embedFonts(ha,mxUtils.bind(this,function(va){B.embedImages||null==B.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(ra){ka(mxUtils.getXml(ra))})):ka(mxUtils.getXml(va))}));return}A.postMessage(JSON.stringify(Z),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);Y()}}k=!0;this.setFileData(B.xml);k=!1;this.editor.graph.mathEnabled||Y()}else Y();return}if("load"==B.action){T=B.toSketch;m=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var X=Editor.sketchMode;this.doSetSketchMode(B.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=B.dark&&this.setDarkMode(B.dark);null!=B.border&&(this.embedExportBorder=B.border);null!=B.theme&&(this.embedExportTheme=B.theme);null!=B.background&&(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var aa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,B.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,B.rect.top)+"px";this.minInlineWidth=B.minWidth;this.minInlineHeight=B.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var ba=B.maxFitScale,la=B.rect.width+2*aa,ea=B.rect.height+2*aa;Q=mxUtils.bind(this,function(){var Z=mxUtils.getDocumentSize();la=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,la):la,Z.width-80);Z=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,Z.height-80);this.diagramContainer.style.width=la+"px";this.diagramContainer.style.height=Z+"px";var ha=this.editor.graph;Z=ha.maxFitScale;ha.maxFitScale=ba;ha.fit(2*aa,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ha.getGraphBounds().width<this.minInlineWidth){var ka=ha.container.scrollTop;this.resetScrollbars();ha.container.scrollTop=ka}ha.maxFitScale=Z;ha.container.scrollTop-=aa;ha.container.scrollLeft-=aa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[B]));ha.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ha.container.style.top);var da=ha.getGraphBounds();ha.container.clientWidth>da.width+2*aa&&(ha.container.scrollLeft=-da.x+(da.width+aa-ha.container.clientWidth)/2)}),10)})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&this.setEmbedTitle(B.title);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Z){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var ca=this.getCurrentFile();null!=ca&&(q=T(B.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",+da.x+(da.width+aa-ha.container.clientWidth)/2)}),10)})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&this.setEmbedTitle(B.title);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Z){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var ca=this.getCurrentFile();null!=ca&&(q=U(B.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Z){A.postMessage(JSON.stringify({event:"merge",message:B,error:Z}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,D.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Z){this.handleError(Z)}}var fa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<-this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),na=mxUtils.bind(this,function(Z,ha){k=!0;try{c(Z,ha,null,U)}catch(ka){this.handleError(ka)}k=!1;null!=urlParams.modified&&this.clearStatus();t=fa();m&&null==f&&(f=mxUtils.bind(this,function(ka,da){ka=fa();ka==t||k||(da=this.createLoadMessage("autosave"),da.xml=ka,(window.opener||window.parent).postMessage(JSON.stringify(da),"*"));t=ka}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",+this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),na=mxUtils.bind(this,function(Z,ha){k=!0;try{c(Z,ha,null,T)}catch(ka){this.handleError(ka)}k=!1;null!=urlParams.modified&&this.clearStatus();t=fa();m&&null==f&&(f=mxUtils.bind(this,function(ka,da){ka=fa();ka==t||k||(da=this.createLoadMessage("autosave"),da.xml=ka,(window.opener||window.parent).postMessage(JSON.stringify(da),"*"));t=ka}),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)ha=this.createLoadMessage("load"),-ha.xml=Z,A.postMessage(JSON.stringify(ha),"*");null!=Q&&Q()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(T="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Z){na(Z,D)},mxUtils.bind(this,function(Z){this.handleError(Z)}),T)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),+ha.xml=Z,A.postMessage(JSON.stringify(ha),"*");null!=Q&&Q()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(U="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Z){na(Z,D)},mxUtils.bind(this,function(Z){this.handleError(Z)}),U)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status&&"<mxGraphModel"==Z.responseText.substring(0,13)?na(Z.responseText,D):this.handleError({message:413==Z.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Z){na(Z)}),mxUtils.bind(this,function(Z){this.handleError(Z)})):null==-B||"object"!==typeof B||null==B.format||null==B.data&&null==B.url?(B=T(B),na(B,D)):this.loadDescriptor(B,mxUtils.bind(this,function(Z){na(fa(),D)}),mxUtils.bind(this,function(Z){this.handleError(Z,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;v="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(v,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,B,Q){E.apply(this,arguments);+B||"object"!==typeof B||null==B.format||null==B.data&&null==B.url?(B=U(B),na(B,D)):this.loadDescriptor(B,mxUtils.bind(this,function(Z){na(fa(),D)}),mxUtils.bind(this,function(Z){this.handleError(Z,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;v="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(v,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,B,Q){E.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",href:D,target:B,allowOpener:Q}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,k,m){var t=document.createElement("button");t.className="geEmbedBtn geBtn";t.setAttribute("title",c+(null!=k?" ("+k+")":""));mxUtils.write(t,c);m&&t.classList.add("gePrimaryBtn");mxEvent.addListener(t,"click",f);return t};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+"+Editor.shiftKey+"+S":Editor.ctrlKey+"+S",!0)),"1"==@@ -13219,13 +13224,13 @@ urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mfunction(k){if(0<k.length)try{var m=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(m));this.customLayoutConfig=m;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,m){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var v=m.value;m.value=JSON.stringify(JSON.parse(v));m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));m.value=v}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),m=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;f.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():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",k,null,null,-null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var k=c.split("\n"),m=[],t=[],v=[],A={};if(0<k.length){var E={},D=this.editor.graph,B=null,Q=null,T=null,U=null,P=null,q=null,u=null,J="whiteSpace=wrap;html=1;",G=null,H=null,g=+null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var k=c.split("\n"),m=[],t=[],v=[],A={};if(0<k.length){var E={},D=this.editor.graph,B=null,Q=null,U=null,T=null,P=null,q=null,u=null,J="whiteSpace=wrap;html=1;",G=null,H=null,g="",p="auto",C="auto",I=!1,N=null,O=null,S=40,R=40,V=100,Y=0,W=mxUtils.bind(this,function(){null!=f?f(Na):(D.setSelectionCells(Na),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),X=D.getFreeInsertPoint(),aa=X.x,ba=X.y;X=ba;var la=null,ea="auto";H=null;for(var ca=[],fa=null,na=null,Z=0;Z<k.length&&"#"==k[Z].charAt(0);){c=k[Z].replace(/\r$/,"");for(Z++;Z<k.length&&"\\"==c.charAt(c.length-1)&&"#"==-k[Z].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(k[Z].substring(1)),Z++;if("#"!=c.charAt(1)){var ha=c.indexOf(":");if(0<ha){var ka=mxUtils.trim(c.substring(1,ha)),da=mxUtils.trim(c.substring(ha+1));"label"==ka?la=Graph.sanitizeHtml(da):"labelname"==ka&&0<da.length&&"-"!=da?P=da:"labels"==ka&&0<da.length&&"-"!=da?u=JSON.parse(da):"style"==ka?Q=da:"parentstyle"==ka?J=da:"unknownStyle"==ka&&"-"!=da?q=da:"stylename"==ka&&0<da.length&&"-"!=da?U=da:"styles"==ka&&0<da.length&&"-"!=da?T=JSON.parse(da):+k[Z].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(k[Z].substring(1)),Z++;if("#"!=c.charAt(1)){var ha=c.indexOf(":");if(0<ha){var ka=mxUtils.trim(c.substring(1,ha)),da=mxUtils.trim(c.substring(ha+1));"label"==ka?la=Graph.sanitizeHtml(da):"labelname"==ka&&0<da.length&&"-"!=da?P=da:"labels"==ka&&0<da.length&&"-"!=da?u=JSON.parse(da):"style"==ka?Q=da:"parentstyle"==ka?J=da:"unknownStyle"==ka&&"-"!=da?q=da:"stylename"==ka&&0<da.length&&"-"!=da?T=da:"styles"==ka&&0<da.length&&"-"!=da?U=JSON.parse(da):"vars"==ka&&0<da.length&&"-"!=da?B=JSON.parse(da):"identity"==ka&&0<da.length&&"-"!=da?G=da:"parent"==ka&&0<da.length&&"-"!=da?H=da:"namespace"==ka&&0<da.length&&"-"!=da?g=da:"width"==ka?p=da:"height"==ka?C=da:"collapsed"==ka&&"-"!=da?I="true"==da:"left"==ka&&0<da.length?N=da:"top"==ka&&0<da.length?O=da:"ignore"==ka?na=da.split(","):"connect"==ka?ca.push(JSON.parse(da)):"link"==ka?fa=da:"padding"==ka?Y=parseFloat(da):"edgespacing"==ka?S=parseFloat(da):"nodespacing"==ka?R=parseFloat(da):"levelspacing"==ka?V=parseFloat(da):"layout"==ka&&(ea=da)}}}if(null==k[Z])throw Error(mxResources.get("invalidOrMissingFile"));var va=this.editor.csvToArray(k[Z].replace(/\r$/,""));ha=c=null;ka=[];for(da=0;da<va.length;da++)G==va[da]&&(c=da),H==va[da]&&(ha=da),ka.push(mxUtils.trim(va[da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==la&&(la="%"+ka[0]+"%");if(null!=ca)for(var ra=0;ra<ca.length;ra++)null==E[ca[ra].to]&&(E[ca[ra].to]={});G=[];for(da=Z+1;da<k.length;da++){var wa=this.editor.csvToArray(k[da].replace(/\r$/,""));if(null==wa){var pa=40<k[da].length?k[da].substring(0,40)+"...":k[da];throw Error(pa+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<wa.length&&G.push(wa)}D.model.beginUpdate();try{for(da=0;da<G.length;da++){wa=G[da];var ja=null,ma=null!=c?g+wa[c]:null;k=!1;null!=ma&&(ja=D.model.getCell(ma),k=null==ja||0<=mxUtils.indexOf(m,ja));var xa=new mxCell(la,new mxGeometry(aa,X,0,0),Q||"whiteSpace=wrap;html=1;");xa.collapsed=I;xa.vertex=!0;xa.id=ma;null==ja||k||D.model.setCollapsed(ja,I);-for(var ta=0;ta<wa.length;ta++)D.setAttributeForCell(xa,ka[ta],wa[ta]),null==ja||k||D.setAttributeForCell(ja,ka[ta],wa[ta]);if(null!=P&&null!=u){var za=u[xa.getAttribute(P)];null!=za&&(D.labelChanged(xa,za),null==ja||k||D.cellLabelChanged(ja,za))}if(null!=U&&null!=T){var Ca=T[xa.getAttribute(U)];null!=Ca&&(xa.style=Ca)}D.setAttributeForCell(xa,"placeholders","1");xa.style=D.replacePlaceholders(xa,xa.style,B);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[xa])):(D.model.setStyle(ja,+for(var ta=0;ta<wa.length;ta++)D.setAttributeForCell(xa,ka[ta],wa[ta]),null==ja||k||D.setAttributeForCell(ja,ka[ta],wa[ta]);if(null!=P&&null!=u){var za=u[xa.getAttribute(P)];null!=za&&(D.labelChanged(xa,za),null==ja||k||D.cellLabelChanged(ja,za))}if(null!=T&&null!=U){var Ca=U[xa.getAttribute(T)];null!=Ca&&(xa.style=Ca)}D.setAttributeForCell(xa,"placeholders","1");xa.style=D.replacePlaceholders(xa,xa.style,B);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[xa])):(D.model.setStyle(ja,xa.style),0>mxUtils.indexOf(v,ja)&&v.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=xa;if(!k)for(ra=0;ra<ca.length;ra++)E[ca[ra].to][ja.getAttribute(ca[ra].to)]=ja;null!=fa&&"link"!=fa&&(D.setLinkForCell(ja,ja.getAttribute(fa)),D.setAttributeForCell(ja,fa,null));var Ga=this.editor.graph.getPreferredSizeForCell(ja);H=null!=ha?D.model.getCell(g+wa[ha]):null;if(ja.vertex){pa=null!=H?0:aa;Z=null!=H?0:ba;null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.x=pa+parseFloat(ja.getAttribute(N)));null!=O&&null!=ja.getAttribute(O)&&(ja.geometry.y=Z+parseFloat(ja.getAttribute(O)));var Aa="@"==p.charAt(0)?ja.getAttribute(p.substring(1)):null;ja.geometry.width=null!=Aa&&"auto"!=Aa?parseFloat(ja.getAttribute(p.substring(1))):"auto"==p||"auto"==Aa?Ga.width+Y:parseFloat(p);var Da="@"==C.charAt(0)?ja.getAttribute(C.substring(1)):null;ja.geometry.height=null!=Da&&"auto"!=Da&&"width"!=C?parseFloat(Da):"auto"==C||"auto"==Da?Ga.height+Y:"width"==C?ja.geometry.width:parseFloat(C);X+=ja.geometry.height+R}k?(null==A[ma]&&(A[ma]=[]),A[ma].push(ja)):(m.push(ja),null!=H?(H.style=D.replacePlaceholders(H,J,B),D.addCell(ja,H),t.push(H)):v.push(D.addCell(ja)))}for(da=0;da<t.length;da++)Aa="@"==p.charAt(0)?t[da].getAttribute(p.substring(1)):null,Da="@"==C.charAt(0)?t[da].getAttribute(C.substring(1)):null,"auto"!=p&&"auto"!=Aa||"auto"!=C&&"auto"!=Da||D.updateGroupBounds([t[da]],Y,!0);var Ka=v.slice(),Na=v.slice();for(ra=0;ra<ca.length;ra++){var Ba=ca[ra];for(da=0;da<m.length;da++){ja=m[da];var Ia=mxUtils.bind(this,@@ -13249,23 +13254,23 @@ this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());this.actions.(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,k,m,t,v,A,E){var D=c.editor.graph;if("xml"==k)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==k)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(D.getSvg(m,-t,v)),"image/svg+xml");else{var B=c.getFileData(!0,null,null,null,null,!0),Q=D.getGraphBounds(),T=Math.floor(Q.width*t/D.view.scale),U=Math.floor(Q.height*t/D.view.scale);if(B.length<=MAX_REQUEST_SIZE&&T*U<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.editor.isExportToCanvas()){var P={globalVars:D.getExportVariables()};E&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(f,k,function(q,u){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+-(u||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=m?m:"none")+"&w="+T+"&h="+U+"&border="+v+"&xml="+encodeURIComponent(B))})}else"png"==k?c.exportImage(t,null==m||"none"==m,!0,!1,!1,v,!0,!1,null,E,A):c.exportImage(t,!1,!0,!1,!1,v,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,+t,v)),"image/svg+xml");else{var B=c.getFileData(!0,null,null,null,null,!0),Q=D.getGraphBounds(),U=Math.floor(Q.width*t/D.view.scale),T=Math.floor(Q.height*t/D.view.scale);if(B.length<=MAX_REQUEST_SIZE&&U*T<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.editor.isExportToCanvas()){var P={globalVars:D.getExportVariables()};E&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(f,k,function(q,u){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="++(u||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=m?m:"none")+"&w="+U+"&h="+T+"&border="+v+"&xml="+encodeURIComponent(B))})}else"png"==k?c.exportImage(t,null==m||"none"==m,!0,!1,!1,v,!0,!1,null,E,A):c.exportImage(t,!1,!0,!1,!1,v,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var m=c;this.currentPage!=this.pages[k]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),m.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+m.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},k=document.createElement("div");k.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var v={};try{var A=mxSettings.getCustomLibraries();for(c=0;c<A.length;c++){var E=A[c];if("R"==E.substring(0,1)){var D=JSON.parse(decodeURIComponent(E.substring(1)));-v[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){t.innerText="";if(0==B.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Q=0;Q<B.length;Q++){var T=B[Q];v[T.id]&&(f[T.id]=T);var U=this.addCheckbox(t,T.title,v[T.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?f[P.id]=P:delete f[P.id]})})(T,U)}},mxUtils.bind(this,-function(B){t.innerText="";var Q=document.createElement("div");Q.style.padding="8px";Q.style.textAlign="center";mxUtils.write(Q,mxResources.get("error")+": ");mxUtils.write(Q,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));t.appendChild(Q)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,Q;for(Q in f)null==v[Q]&&(B++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",[T.downloadUrl],-null,mxUtils.bind(this,function(U){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,U,T)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Q]));for(Q in v)f[Q]||this.closeLibrary(new RemoteLibrary(this,null,v[Q]));0==B&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");+v[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){t.innerText="";if(0==B.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Q=0;Q<B.length;Q++){var U=B[Q];v[U.id]&&(f[U.id]=U);var T=this.addCheckbox(t,U.title,v[U.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?f[P.id]=P:delete f[P.id]})})(U,T)}},mxUtils.bind(this,+function(B){t.innerText="";var Q=document.createElement("div");Q.style.padding="8px";Q.style.textAlign="center";mxUtils.write(Q,mxResources.get("error")+": ");mxUtils.write(Q,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));t.appendChild(Q)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,Q;for(Q in f)null==v[Q]&&(B++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],+null,mxUtils.bind(this,function(T){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,T,U)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Q]));for(Q in v)f[Q]||this.closeLibrary(new RemoteLibrary(this,null,v[Q]));0==B&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,k,m,t){var v=!0,A=window.setTimeout(mxUtils.bind(this,function(){v=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A);v&&m.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(A);v&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:k});null!=this.remoteWin?-this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(B,Q){var T={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Q?T.error={errResp:Q}:null!=B&&(T.resp=B);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var m=c.funtionName,t=this.remoteInvokableFns[m];if(null!=t&&"function"===typeof this[m]){if(t.allowedDomains){for(var v=!1,A=0;A<t.allowedDomains.length;A++)if(f=="https://"+t.allowedDomains[A]){v=+this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(B,Q){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Q?U.error={errResp:Q}:null!=B&&(U.resp=B);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var m=c.funtionName,t=this.remoteInvokableFns[m];if(null!=t&&"function"===typeof this[m]){if(t.allowedDomains){for(var v=!1,A=0;A<t.allowedDomains.length;A++)if(f=="https://"+t.allowedDomains[A]){v=!0;break}if(!v){k(null,"Invalid Call: "+m+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(t.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}),E.push(function(B){k(null,B||"Unkown Error")}),this[m].apply(this,E);else{var D=this[m].apply(this,E);k([D])}}else k(null,"Invalid Call: "+m+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var m=k.open("database",2);m.onupgradeneeded=function(t){try{var v=m.result;1>t.oldVersion&&v.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(v.createObjectStore("files",{keyPath:"title"}),v.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=f&&f(A)}};m.onsuccess=mxUtils.bind(this,function(t){try{var v=m.result;this.database=v;EditorUi.migrateStorageFiles&&(StorageFile.migrate(v),-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if((!A||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var D=!0,B=!1,Q,T=0,U=mxUtils.bind(this,-function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){T++;q()}),q=mxUtils.bind(this,function(){try{if(T>=Q.length)U();else{var J=Q[T];StorageFile.getFileContent(this,J,mxUtils.bind(this,function(G){null==G||".scratchpad"==J&&G==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if((!A||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var D=!0,B=!1,Q,U=0,T=mxUtils.bind(this,+function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){U++;q()}),q=mxUtils.bind(this,function(){try{if(U>=Q.length)T();else{var J=Q[U];StorageFile.getFileContent(this,J,mxUtils.bind(this,function(G){null==G||".scratchpad"==J&&G==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),"*"):P()}),P)}}catch(G){console.log(G)}}),u=mxUtils.bind(this,function(J){try{this.setDatabaseItem(null,[{title:J.title,size:J.data.length,lastModified:Date.now(),type:J.isLib?"L":"F"},{title:J.title,data:J.data}],P,P,["filesInfo","files"])}catch(G){console.log(G)}});A=mxUtils.bind(this,function(J){try{if(J.source==E.contentWindow){var G={};try{G=JSON.parse(J.data)}catch(H){}"init"==G.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||B||(D?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(Q=G.resp[0],D=!1,q()):U():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?u(G.resp[0]):P())}}catch(H){console.log(H)}});window.addEventListener("message",A)}})));c(v);v.onversionchange=function(){v.close()}}catch(A){null!=f?f(A):null!=window.console&&console.warn(A)}});m.onerror=f;m.onblocked=function(){}}catch(t){null!=f?f(t):null!=window.console&&console.error(t)}else null!=+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||B||(D?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(Q=G.resp[0],D=!1,q()):T():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?u(G.resp[0]):P())}}catch(H){console.log(H)}});window.addEventListener("message",A)}})));c(v);v.onversionchange=function(){v.close()}}catch(A){null!=f?f(A):null!=window.console&&console.warn(A)}});m.onerror=f;m.onblocked=function(){}}catch(t){null!=f?f(t):null!=window.console&&console.error(t)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,k,m,t){this.openDatabase(mxUtils.bind(this,function(v){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c],f=[f]);var A=v.transaction(t,"readwrite");A.oncomplete=k;A.onerror=m;for(v=0;v<t.length;v++)A.objectStore(t[v]).put(null!=c&&null!=c[v]?{key:c[v],data:f[v]}:f[v])}catch(E){null!=m&&m(E)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,f,k,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c]);var v=t.transaction(m,"readwrite");v.oncomplete=f;v.onerror=k;for(t=0;t<m.length;t++)v.objectStore(m[t]).delete(c[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=function(c,f,k,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";var v=t.transaction([m],"readonly").objectStore(m).get(c);v.onsuccess=function(){f(v.result)};v.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var t=m.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),v=[];t.onsuccess=function(A){null==A.target.result?c(v):(v.push(A.target.result.value),A.target.result.continue())};t.onerror=f}catch(A){null!=f&&f(A)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var t=m.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){c(t.result)};t.onerror=@@ -13273,8 +13278,8 @@ f}catch(v){null!=f&&f(v)}}),f)};EditorUi.prototype.commentsSupported=function(){function(c,f,k){var m=this.getCurrentFile();null!=m?m.addComment(c,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var k=this.getCurrentFile();return null!=k?k.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,k,m,t,v,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,k,m,t,v,A,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");-return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,m,t,v,A,E,D,B,Q,T,U,P,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,m,t,v,A,E,-D,B,Q,T,U,P,q,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,k,m)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};+return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,m,t,v,A,E,D,B,Q,U,T,P,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,m,t,v,A,E,+D,B,Q,U,T,P,q,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,k,m)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,k,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,k,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,k,m,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),m=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<m.length){var t="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(t||m)&&c.push(k)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();@@ -13289,13 +13294,13 @@ S.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.sfunction(){I("",!0)},u.isResolved);S=b.getCurrentUser();null==S||null==u.user||S.id!=u.user.id||k||u.isLocked||(p(mxResources.get("edit"),function(){function Y(){F(u,N,function(){K(N);u.editComment(u.content,function(){c(N)},function(W){L(N);Y();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Y()},u.isResolved),p(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(N);u.deleteComment(function(Y){if(!0===Y){Y=N.querySelector(".geCommentTxt");Y.innerText="";mxUtils.write(Y,mxResources.get("msgDeleted"));var W=N.querySelectorAll(".geCommentAction");for(Y=0;Y<W.length;Y++)W[Y].parentNode.removeChild(W[Y]);c(N);N.style.opacity="0.5"}else{W=C(u).replies;for(Y=0;Y<W.length;Y++)E.removeChild(W[Y]);for(Y=0;Y<J.length;Y++)if(J[Y]==u){J.splice(Y,1);break}D.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(Y){L(N);b.handleError(Y,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},u.isResolved));k||u.isLocked||0!=H||p(u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Y){function W(){var X=Y.target;X.innerText="";u.isResolved=!u.isResolved;mxUtils.write(X,u.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var aa=u.isResolved?"none":"",ba=C(u).replies,la="light-dark("+(u.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<ba.length;ea++){ba[ea].style.backgroundColor=la;for(var ca=ba[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=-X.parentNode&&(ca[fa].style.display=aa);U||(ba[ea].style.display="none")}y()}u.isResolved?I(mxResources.get("reOpened")+": ",!0,W,!1,!0):I(mxResources.get("markedAsResolved"),!1,W,!0)});N.appendChild(O);null!=G?E.insertBefore(N,G.nextSibling):E.appendChild(N);for(G=0;null!=u.replies&&G<u.replies.length;G++)O=u.replies[G],O.isResolved=u.isResolved,f(O,u.replies,null,H+1,g);null!=t&&(t.comment.id==u.id?(g=u.content,u.content=t.comment.content,F(u,N,t.saveCallback,t.deleteOnCancel),u.content=g):null==+X.parentNode&&(ca[fa].style.display=aa);T||(ba[ea].style.display="none")}y()}u.isResolved?I(mxResources.get("reOpened")+": ",!0,W,!1,!0):I(mxResources.get("markedAsResolved"),!1,W,!0)});N.appendChild(O);null!=G?E.insertBefore(N,G.nextSibling):E.appendChild(N);for(G=0;null!=u.replies&&G<u.replies.length;G++)O=u.replies[G],O.isResolved=u.isResolved,f(O,u.replies,null,H+1,g);null!=t&&(t.comment.id==u.id?(g=u.content,u.content=t.comment.content,F(u,N,t.saveCallback,t.deleteOnCancel),u.content=g):null==t.comment.id&&t.comment.pCommentId==u.id&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return N}}var k=!b.canComment(),m=b.canReplyToReplies(),t=null,v=document.createElement("div");v.className="geCommentsWin";var A=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.bottom=parseInt(A)+7+"px";v.appendChild(E);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=A;B.style.padding="3px 4px 4px 4px";A=document.createElement("a");A.className="geButton";if(!k){var Q=A.cloneNode();Q.style.backgroundImage="url("+Editor.plusImage+")";Q.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Q,"click",function(u){function J(){F(G,H,function(g){K(H);b.addComment(g,function(p){g.id=p;P.push(g);c(H)},function(p){L(H);-J();b.handleError(p,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),H=f(G,P,null,0);J();u.preventDefault();mxEvent.consume(u)});B.appendChild(Q)}var T=A.cloneNode();T.style.backgroundImage="url("+Editor.checkImage+")";T.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(T,"click",function(u){(U=!U)?T.classList.add("geActiveItem"):T.classList.remove("geActiveItem");q();u.preventDefault();mxEvent.consume(u)});-B.appendChild(T);b.commentsRefreshNeeded()&&(Q=A.cloneNode(),Q.style.backgroundImage="url("+Editor.refreshImage+")",Q.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Q,"click",function(u){q();u.preventDefault();mxEvent.consume(u)}),B.appendChild(Q));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,+J();b.handleError(p,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),H=f(G,P,null,0);J();u.preventDefault();mxEvent.consume(u)});B.appendChild(Q)}var U=A.cloneNode();U.style.backgroundImage="url("+Editor.checkImage+")";U.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(U,"click",function(u){(T=!T)?U.classList.add("geActiveItem"):U.classList.remove("geActiveItem");q();u.preventDefault();mxEvent.consume(u)});+B.appendChild(U);b.commentsRefreshNeeded()&&(Q=A.cloneNode(),Q.style.backgroundImage="url("+Editor.refreshImage+")",Q.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Q,"click",function(u){q();u.preventDefault();mxEvent.consume(u)}),B.appendChild(Q));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,"click",function(u){z();u.preventDefault();mxEvent.consume(u)}),B.appendChild(A));v.appendChild(B);var P=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var u=t.div.querySelector(".geCommentEditTxtArea"),J=t.div.querySelector(".geCommentEditBtns");t.comment.content=u.value;u.parentNode.removeChild(u);J.parentNode.removeChild(J)}catch(G){b.handleError(G)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function H(g){if(null!=g){g.sort(function(C,I){return new Date(C.modifiedDate)-new Date(I.modifiedDate)});for(var p=0;p<g.length;p++)H(g[p].replies)}}G.sort(function(g,p){return new Date(g.modifiedDate)-new Date(p.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";P=G;for(G=0;G<P.length;G++)H(P[G].replies),f(P[G],P,null,0,U);null!=t&&null==t.comment.id&&+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function H(g){if(null!=g){g.sort(function(C,I){return new Date(C.modifiedDate)-new Date(I.modifiedDate)});for(var p=0;p<g.length;p++)H(g[p].replies)}}G.sort(function(g,p){return new Date(g.modifiedDate)-new Date(p.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";P=G;for(G=0;G<P.length;G++)H(P[G].replies),f(P[G],P,null,0,T);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(E.appendChild(t.div),F(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(G){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});q();this.refreshComments=q;B=mxUtils.bind(this,function(){function u(p){var C=G[p.id];if(null!=C)for(M(p,C),C=0;null!=p.replies&&C<p.replies.length;C++)u(p.replies[C])}if(this.window.isVisible()){for(var J=E.querySelectorAll(".geCommentDate"),G={},H=0;H<J.length;H++){var g=J[H];G[g.getAttribute("data-commentId")]=g}for(H=0;H<P.length;H++)u(P[H])}});setInterval(B,6E4);this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),v,l,n,d,x,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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,l,n,d,x,z,y,F,M,K,L){var c=document.createElement("div");c.style.textAlign="center";L=null!=L?L:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=L+"px";f.style.lineHeight="1.2em";mxUtils.write(f,l);c.appendChild(f);null!=K&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",l=document.createElement("img"),l.setAttribute("src",K),f.appendChild(l),@@ -13508,8 +13513,8 @@ App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,l=this.geApp.prototype.getThumbnail=function(b,l,n){n=null!=n?n:0;var d=!1;try{var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;l(null)}),this.timeout),y=mxUtils.bind(this,function(P){window.clearTimeout(z);x&&l(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var F=this.editor.graph,M=F.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());F.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(M):null!=L.viewState&&null!=L.viewState&&(M=L.viewState.backgroundImage,F.setBackgroundImage(M));F.getGlobalVariable=function(P){return"page"==P?L.getName():"pagenumber"==P?1:K.apply(this,arguments)};F.getGlobalVariable=K;document.body.appendChild(F.container);F.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||Editor.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}catch(q){P=null}y(P)}),b,this.thumbImageCache,"#ffffff",function(){y()},null,null,null,null,null,null,F,n,null,null,null,"diagram",null),d=!0;else if(Editor.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),f=F.getGraphBounds(),k=F.view.translate,m=F.view.scale;null!=M&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((k.x+M.x)*m,(k.y+M.y)*m,M.width*m,M.height*m)));var t=b/f.width;t=Math.min(1,Math.min(3*b/(4*-f.height),t));var v=Math.floor(f.x),A=Math.floor(f.y);c.setAttribute("width",Math.ceil(t*(f.width+4)));c.setAttribute("height",Math.ceil(t*(f.height+4)));var E=c.getContext("2d");E.scale(t,t);E.translate(-v,-A);var D=F.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(v,A,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=M){var B=new Image;B.src=M.src;E.drawImage(B,M.x*t,M.y*t,M.width*t,M.height*t)}var Q=new mxJsCanvas(c),T=new mxAsyncCanvas(this.thumbImageCache);-Q.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(P,q){P.shape instanceof mxShape&&P.shape.checkBounds()&&(q.save(),q.translate(.5,.5),P.shape.paint(q),q.translate(-.5,-.5),q.restore())};U.drawText=function(P,q){};U.drawState(F.getView().getState(F.model.root),T);T.finish(mxUtils.bind(this,function(){try{U.drawState(F.getView().getState(F.model.root),Q),F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}catch(P){c=null}y(c)}));+f.height),t));var v=Math.floor(f.x),A=Math.floor(f.y);c.setAttribute("width",Math.ceil(t*(f.width+4)));c.setAttribute("height",Math.ceil(t*(f.height+4)));var E=c.getContext("2d");E.scale(t,t);E.translate(-v,-A);var D=F.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(v,A,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=M){var B=new Image;B.src=M.src;E.drawImage(B,M.x*t,M.y*t,M.width*t,M.height*t)}var Q=new mxJsCanvas(c),U=new mxAsyncCanvas(this.thumbImageCache);+Q.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(P,q){P.shape instanceof mxShape&&P.shape.checkBounds()&&(q.save(),q.translate(.5,.5),P.shape.paint(q),q.translate(-.5,-.5),q.restore())};T.drawText=function(P,q){};T.drawState(F.getView().getState(F.model.root),U);U.finish(mxUtils.bind(this,function(){try{T.drawState(F.getView().getState(F.model.root),Q),F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}catch(P){c=null}y(c)}));d=!0}}catch(P){d=!1,null!=F&&F!=this.editor.graph&&null!=F.container.parentNode&&F.container.parentNode.removeChild(F.container)}d||window.clearTimeout(z);return d};(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(l,n){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();l=null!=d?d.getMode():l;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){l==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):l==App.MODE_DROPBOX?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])):l==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(n)try{if(isLocalStorage)localStorage.setItem(".mode",l);else if("undefined"!=typeof Storage){var x=new Date;x.setYear(x.getFullYear()+1);document.cookie="MODE="+l+"; expires="+@@ -13693,7 +13698,7 @@ y=d.actions.put("darkMode",new Action("dark",function(q){d.setAndPersistDarkModed.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=z;window.mxFreehand&&(d.actions.put("insertFreehand",new Action("freehand...",function(){if(x.isEnabled()){if(null==d.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,q?126:90,q)}x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing();d.freehandWindow.window.setVisible(!0)}},null,null,"X")).isEnabled=function(){return z()});d.actions.put("exportXml",new Action("formatXml...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.pages.length,J=document.createElement("h3");mxUtils.write(J,mxResources.get("formatXml"));J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(J);var G=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,x.isSelectionEmpty()),H=d.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),g=d.addCheckbox(q,mxResources.get("allPages"),!u,u);g.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!G.checked,u||!g.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action("url...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,-null,null,function(q,u,J,G,H,g,p,C,I,N,O,S){p=[];G&&I&&p.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,u,!0,G,H,g,null,!0,p,null,J,null,S));d.showDialog(q.container,450,240,!0,!0);q.init()},null,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("export"),null,q,function(u,J,G,H,g,p,C,I,N,O,S,R){d.createHtml(u,J,G,H,g,p,C,I,N,O,S,mxUtils.bind(this,function(V,Y){var W=d.getBaseFilename(C);+null,null,function(q,u,J,G,H,g,p,C,I,N,O,S,R){p=[];G&&I&&p.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,u,R,G,H,g,null,!0,p,null,J,null,S));d.showDialog(q.container,450,270,!0,!0);q.init()},null,!0,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(q){d.showHtmlDialog(mxResources.get("export"),null,q,function(u,J,G,H,g,p,C,I,N,O,S,R){d.createHtml(u,J,G,H,g,p,C,I,N,O,S,mxUtils.bind(this,function(V,Y){var W=d.getBaseFilename(C);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(W)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+Y+"\n</body>\n</html>";d.saveData(W+(".drawio"==W.substring(W.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),R)})})}));d.actions.put("exportPdf",new Action("formatPdf...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(q,u){q=null!=d.pages?d.pages.length:1;var J=null==d.pages||1>=d.pages.length,G=d.getPageIndex(d.currentPage);G=null!=G?G+1:1;d.downloadFile("pdf",null,null,!u.selection,J||!u.allPages&&u.pagesFrom==G&&u.pagesTo==G,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==G&&u.pagesTo==G?null:{from:Math.max(0,Math.min(q-1,u.pagesFrom-1)),to:Math.max(0,Math.min(q-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown,u.shadows)}):null,mxResources.get("export"))}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=u&&u.removeDraft();d.fileLoaded(new LocalFile(d,d.emptyDiagramXml))}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==x.getSelectionCount()){var q=x.getSelectionCell(),u=x.view.getState(q);null!=u&&null!=@@ -13791,7 +13796,7 @@ d.showDialog(u.container,420,380,!0,!0),u.init()):d.editor.editAsNew(this.editorfunction(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var u=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var J=0;J<q.desc.parents.length;J++)if(q.desc.parents[J].isRoot){u=!0;break}d.pickFolder(q.getMode(),mxUtils.bind(this,function(G){d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(G,mxUtils.bind(this,function(H){d.spinner.stop()}),mxUtils.bind(this,function(H){d.handleError(H)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,u){this.addMenuItems(q,["publishLink","presentationMode"],u)})));EditorUi.isElectronApp||!d.isOwnGDriveDomain()||"draw.io"!=d.getServiceName()||navigator.standalone||d.actions.put("presentationMode",new Action("presentationMode...",function(){var q=null!=d.getCurrentFile()?d.getCurrentFile().getTitle():null;d.editor.editAsNew(d.getFileData(!0),q,!0,null!=d.currentPage?d.currentPage.getId():null)}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=d.getCurrentFile();null!=q&&q.share()}catch(u){d.handleError(u)}})).isEnabled=z;this.put("embed",new Menu(mxUtils.bind(this,function(q,u){var J=d.getCurrentFile();null==J||J.getMode()!=App.MODE_GOOGLE&&J.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(J.getTitle())||this.addMenuItems(q,["liveImage","-"],u);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],u);this.addMenuItems(q,["-","microsoftOffice","-","embedNotion"],u)})));y=function(q){var u=-mxResources.get(q)+"...";d.actions.put(q,new Action(u,function(J){if("fromText"==q||"formatSql"==q||"plantUml"==q||"mermaid"==q){var G=new ParseDialog(d,u,q);d.showDialog(G.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(d,u,q),d.showDialog(G.container,620,420,!0,!1,function(H,g){if(g)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=G.graph&&(null!=G.graph.container.parentNode&&G.graph.container.parentNode.removeChild(G.graph.container),+mxResources.get(q)+"...";d.actions.put(q,new Action(u,function(J){if("fromText"==q||"formatSql"==q||"plantUml"==q||"mermaid"==q){var G=new ParseDialog(d,u,q);d.showDialog(G.container,640,420,!0,!1,null,null,null,new mxRectangle(0,0,440,280))}else G=new CreateGraphDialog(d,u,q),d.showDialog(G.container,620,420,!0,!1,function(H,g){if(g)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=G.graph&&(null!=G.graph.container.parentNode&&G.graph.container.parentNode.removeChild(G.graph.container),G.graph.destroy(),G.graph=null)});G.init()})).isEnabled=z};y("mermaid");y("horizontalFlow");y("verticalFlow");y("horizontalTree");y("verticalTree");y("radialTree");y("organic");y("circle");y("fromText");y("formatSql");("https://plant-aws.diagrams.net"!=window.PLANT_URL||EditorUi.enablePlantUml&&!d.isOffline())&&y("plantUml");var D=function(q){x.getModel().beginUpdate();try{q=x.addCell(q),x.fireEvent(new mxEventObject("cellsInserted","cells",[q])),x.model.isVertex(q)&&x.isAutoSizeCell(q)&&x.updateCellSize(q)}finally{x.getModel().endUpdate()}x.scrollCellToVisible(q);x.setSelectionCell(q);x.container.focus();x.editAfterInsert&&x.startEditing(q);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(x.view.getState(q))},0);return q},B=function(q,u,J,G,H){q=new mxCell(q,new mxGeometry(0,0,u,J),G);q.vertex=!0;null==H&&(H=x.getCenterInsertPoint(x.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=H.x;q.geometry.y=H.y;return D(q)};d.actions.put("insertText",new Action("text",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&x.startEditingAtCell(B("Text",60,30,x.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",x.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!x.isMouseInsertPoint()?null:x.getInsertPoint()))},null,null,"A")).isEnabled=z;d.actions.put("insertRectangle",new Action("rectangle",function(q){x.isEnabled()&&!x.isCellLocked(x.getDefaultParent())&&B("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||@@ -13827,7 +13832,7 @@ u);"1"!=urlParams.sketch&&this.addMenuItems(q,["-","fullscreen"],u)}})));this.puu),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(J)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",q,u,mxResources.get("move")),q.addSeparator(u)),q.addSeparator(u),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(J,mxResources.get("copyOf",[J.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,u){var J=d.currentPage;d.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),u,null,d.editor.graph.isEnabled()),q.addSeparator(u));if(null!=d.pages)for(var G=0;G<d.pages.length;G++)mxUtils.bind(this,function(H){var g=null;g=d.pages[H]==J&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",q,u,d.getShortPageName(J)):q.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u);var p=d.pages[H].getId();g.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=p?" ["+p+"]":""));d.pages[H]==J&&q.addCheckmark(g,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var Q="1"==urlParams.enableSpellCheck;y=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();-Q=!Q;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return Q});var T="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();T=!T});y.setToggleAction(!0);y.setSelectedCallback(function(){return T});var U="1"==urlParams.isGoogleFontsEnabled;y=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();U=!U;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return U});+Q=!Q;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return Q});var U="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});y.setToggleAction(!0);y.setSelectedCallback(function(){return U});var T="1"==urlParams.isGoogleFontsEnabled;y=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();T=!T;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return T});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var q=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,u){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==P||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",q,u);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||"1"==urlParams.embedInline||d.menus.addSubmenu("appearance",q,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",q,u);q.addSeparator(u);d.menus.addSubmenu("units",q,u);d.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var J=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],u),d.menus.addMenuItems(q,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),u);this.addSubmenu("diagramLanguage",q,u);q.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(q,"configuration",u);q.addSeparator(u)}else"1"==@@ -13948,9 +13953,9 @@ p.push(H[C])}H=p;return A.apply(this,arguments)};k.hoverIcons.getStateAt=functiotry{R=I;var Y=this.getCurrentCellStyle(I);if(null!=H&&d(I)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(V=0;V<H.length;V++)if(d(H[V])||m.model.isEdge(H[V])&&null==m.model.getTerminal(H[V],!0)){I=m.model.getParent(H[V]);break}if(null!=R&&I!=R&&null!=this.view.getState(H[0])){var W=m.getIncomingTreeEdges(H[0]);if(0<W.length){var X=m.view.getState(m.model.getTerminal(W[0],!0));if(null!=X){var aa=m.view.getState(R);null!=aa&&(g=(aa.getCenterX()-X.getCenterX())/m.view.scale,p=(aa.getCenterY()-X.getCenterY())/m.view.scale)}}}}S=D.apply(this,arguments);if(null!=S&&null!=H&&S.length==H.length)for(V=0;V<S.length;V++)if(this.model.isEdge(S[V]))d(R)&&0>mxUtils.indexOf(S,this.model.getTerminal(S[V],!0))&&this.model.setTerminal(S[V],R,!0);else if(d(H[V])&&(W=m.getIncomingTreeEdges(H[V]),0<W.length))if(!C)d(R)&&0>mxUtils.indexOf(H,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],R,!0);else if(0==m.getIncomingTreeEdges(S[V]).length){Y=R;if(null==Y||Y==m.model.getParent(H[V]))Y=m.model.getTerminal(W[0],!0);C=this.cloneCell(W[0]);this.addEdge(C,m.getDefaultParent(),Y,S[V])}}finally{this.model.endUpdate()}return S};if(null!=k.sidebar){var B=k.sidebar.dropAndConnect;k.sidebar.dropAndConnect=function(H,g,p,C){var I=m.model,N=null;I.beginUpdate();try{if(N=B.apply(this,arguments),d(H))for(var O=0;O<N.length;O++)if(I.isEdge(N[O])&&null==I.getTerminal(N[O],!0)){I.setTerminal(N[O],H,!0);var S=m.getCellGeometry(N[O]);S.points=null;null!=S.getTerminalPoint(!0)&&S.setTerminalPoint(null,!0)}}finally{I.endUpdate()}return N}}var Q=-{67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},T={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},U=k.onKeyDown;k.onKeyDown=function(H){try{var g=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=g){var p=mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)?Q[H.keyCode]:mxEvent.isAltDown(H)?T[H.keyCode]:null;null!=p?(p.funct(H),mxEvent.consume(H)):d(g)&&(p=null,0<m.getIncomingTreeEdges(g).length&&+{67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},U={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},T=k.onKeyDown;k.onKeyDown=function(H){try{var g=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=g){var p=mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)?Q[H.keyCode]:mxEvent.isAltDown(H)?U[H.keyCode]:null;null!=p?(p.funct(H),mxEvent.consume(H)):d(g)&&(p=null,0<m.getIncomingTreeEdges(g).length&&(9==H.which?p=mxEvent.isShiftDown(H)?K(g):L(g):13==H.which&&(p=M(g,!mxEvent.isShiftDown(H)))),null!=p&&0<p.length?(1==p.length&&m.model.isEdge(p[0])?m.setSelectionCell(m.model.getTerminal(p[0],!1)):m.setSelectionCell(p[p.length-1]),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(g)),m.startEditingAtCell(g),mxEvent.consume(H)):37==H.keyCode?(f(g,mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(f(g,mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(f(g,mxConstants.DIRECTION_EAST),-mxEvent.consume(H)):40==H.keyCode&&(f(g,mxConstants.DIRECTION_SOUTH),mxEvent.consume(H)))}}catch(C){k.handleError(C)}mxEvent.isConsumed(H)||U.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(H,g,p,C,I,N,O){var S=m.getIncomingTreeEdges(H);if(d(H)){var R=F(H),V=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,Y=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;return R==g||0==S.length?L(H,g):V==Y?K(H):M(H,g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_WEST)}return P.apply(this,+mxEvent.consume(H)):40==H.keyCode&&(f(g,mxConstants.DIRECTION_SOUTH),mxEvent.consume(H)))}}catch(C){k.handleError(C)}mxEvent.isConsumed(H)||T.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(H,g,p,C,I,N,O){var S=m.getIncomingTreeEdges(H);if(d(H)){var R=F(H),V=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,Y=g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST;return R==g||0==S.length?L(H,g):V==Y?K(H):M(H,g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_WEST)}return P.apply(this,arguments)};m.getSubtree=function(H){var g=[H];!x(H)&&!d(H)||y(H)||m.traverse(H,!0,function(p,C){var I=null!=C&&m.isTreeEdge(C);I&&0>mxUtils.indexOf(g,C)&&g.push(C);(null==C||I)&&0>mxUtils.indexOf(g,p)&&g.push(p);return null==C||I});return g};var q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){q.apply(this,arguments);(x(this.state.cell)||d(this.state.cell))&&!y(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);this.graph.isMouseDown=!0;k.hoverIcons.reset();mxEvent.consume(H)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var u=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){u.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=@@ -13988,34 +13993,34 @@ function(){if(!F&&null!=this.formatWindow){F=!0;var K=this.formatWindow.window.tmxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var M=EditorUi.prototype.init;EditorUi.prototype.init=function(){function K(C,I,N){var O=m.menus.get(C);I=A.addMenu(mxResources.get(C),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));I.className="geButton";I.setAttribute("title",mxResources.get(C));m.menus.menuCreated(O,I,"geButton");null!=N&&(I.style.backgroundImage="url("+N+")",I.innerText="");return I}function L(C,I,N,O,S,R){var V=document.createElement("a");V.className="geButton";v.appendChild(V);null!=R?V.style.backgroundImage="url("+R+")":mxUtils.write(V,C);mxEvent.addListener(V,"click",function(Y){"disabled"!=V.getAttribute("disabled")&&I(Y);mxEvent.consume(Y)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=S&&(C=function(){S.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},S.addListener("stateChanged",C),t.addListener("enabledChanged",C),C());return V}function c(C,I,N){I=document.createElement("div");I.className="geButtonGroup";for(N=0;N<C.length;N++)null!=C[N]&&I.appendChild(C[N]);v.appendChild(I);return I}function f(){n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;v.innerHTML="";var C=1E3>n,I=K("diagram",null,C?Editor.menuImage:null);c([I,L(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),-C?Editor.shapesImage:null),L(mxResources.get("format"),m.actions.get("format").funct,null,mxResources.get("format")+" ("+m.actions.get("format").shortcut+")",m.actions.get("image"),C?Editor.formatImage:null)]);I=K("insert",!0,C?T:null);c([I,L(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),C?Editor.trashImage:null)]);t.isEnabled()||I.setAttribute("disabled","disabled");H.setAttribute("title",mxResources.get("undo")+" ("+J.shortcut+")");+C?Editor.shapesImage:null),L(mxResources.get("format"),m.actions.get("format").funct,null,mxResources.get("format")+" ("+m.actions.get("format").shortcut+")",m.actions.get("image"),C?Editor.formatImage:null)]);I=K("insert",!0,C?U:null);c([I,L(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),C?Editor.trashImage:null)]);t.isEnabled()||I.setAttribute("disabled","disabled");H.setAttribute("title",mxResources.get("undo")+" ("+J.shortcut+")");g.setAttribute("title",mxResources.get("redo")+" ("+G.shortcut+")");p.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=n&&(c([H,g]),520<=n&&c([p,640<=n?L("",q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=n?L("",u.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",u,Editor.zoomOutImage):null]));v.appendChild(m.statusContainer);v.appendChild(m.buttonContainer)}M.apply(this,arguments);var k=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=k&&(k.classList.add("geSimple"),k.classList.add("geMinimal"),k.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var m=this,t=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));var v=document.createElement("div");v.className="geMenubarContainer";var A=new Menubar(m,v),E=m.hideCurrentMenu;m.hideCurrentMenu=function(){E.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var D=m.descriptorChanged;m.descriptorChanged=function(){D.apply(this,arguments);var C=m.getCurrentFile();if(null!=C&&null!=C.getTitle()){var I=C.getMode();"google"==I?I="googleDrive":"github"==I?I="gitHub":"gitlab"==I?I="gitLab":"onedrive"==I&&(I="oneDrive");I=mxResources.get(I);v.setAttribute("title",C.getTitle()+(null!=I?" ("+I+")":""))}else v.removeAttribute("title")};m.setStatusText(m.editor.getStatus());v.appendChild(m.statusContainer);m.buttonContainer=this.createButtonContainer();v.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=this.createTabContainer();var B=this.createZoomInput(!0),Q=m.updateTabContainer;-m.updateTabContainer=function(){Q.apply(this,arguments);m.tabContainer.appendChild(B)};var T=Editor.addBoxImage;if(null!=m.hoverIcons){var U=m.hoverIcons.update;m.hoverIcons.update=function(){t.freehand.isDrawing()||U.apply(this,arguments)}}if(null!=t.freehand){var P=t.freehand.createStyle;t.freehand.createStyle=function(C){return P.apply(this,arguments)+"sketch=0;"}}m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));m.setStatusText(m.editor.getStatus());+m.updateTabContainer=function(){Q.apply(this,arguments);m.tabContainer.appendChild(B)};var U=Editor.addBoxImage;if(null!=m.hoverIcons){var T=m.hoverIcons.update;m.hoverIcons.update=function(){t.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=t.freehand){var P=t.freehand.createStyle;t.freehand.createStyle=function(C){return P.apply(this,arguments)+"sketch=0;"}}m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));m.setStatusText(m.editor.getStatus());var q=m.actions.get("zoomIn"),u=m.actions.get("zoomOut");k=m.actions.get("resetView");var J=m.actions.get("undo"),G=m.actions.get("redo"),H=L("",J.funct,null,"",J,Editor.undoImage),g=L("",G.funct,null,"",G,Editor.redoImage),p=L("",function(C){mxEvent.isAltDown(C)?(m.hideCurrentMenu(),m.actions.get("customZoom").funct()):(m.hideCurrentMenu(),m.actions.get("smartFit").funct());mxEvent.consume(C)},!0,"",k,Editor.zoomFitImage);m.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){l(m,null)});m.container.appendChild(m.tabContainer);m.container.appendChild(v);m.updateTabContainer();!EditorUi.windowed&&1E3<=n&&b(this,!0);f();m.addListener("lockedChanged",f);m.addListener("languageChanged",f);m.editor.graph.addListener("enabledChanged",f);mxEvent.addListener(window,"resize",function(){f();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.chatWindow&&m.menus.chatWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var l=EditorUi.initTheme;EditorUi.initTheme=function(){l.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,x,z,y){var F=x.y,M=x.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=x){var c=this,f=new mxCellState,k=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);f.x=d.x+M;f.y=d.y+F;f.width=d.width;f.height=d.height;for(var t=[],v=[],A=0;A<this.states.length;A++){var E=this.states[A];E instanceof mxCellState&&(y||!this.graph.isCellSelected(E.cell))&&((f.x>=E.x&&f.x<=E.x+E.width||E.x>=f.x&&E.x<=f.x+f.width)&&(f.y>-E.y+E.height+4||f.y+f.height+4<E.y)?t.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&v.push(E))}var D=0,B=0,Q=E=0,T=0,U=0,P=0,q=0,u=5*k;if(1<t.length){t.push(f);t.sort(function(g,p){return g.y-p.y});var J=!1;A=f==t[0];k=f==t[t.length-1];if(!A&&!k)for(A=1;A<t.length-1;A++)if(f==t[A]){k=t[A-1];A=t[A+1];E=B=Q=(A.y-k.y-k.height-f.height)/2;break}for(A=0;A<t.length-1;A++){k=t[A];var G=t[A+1],H=f==k||f==G;G=G.y-k.y-k.height;J|=f==k;if(0==B&&0==-D)B=G,D=1;else if(Math.abs(B-G)<=(H||1==A&&J?m:0))D+=1;else if(1<D&&J){t=t.slice(0,A+1);break}else if(3<=t.length-A&&!J)D=0,E=B=0!=Q?Q:0,t.splice(0,0==A?1:A),A=-1;else break;0!=E||H||(B=E=G)}3==t.length&&t[1]==f&&(E=0)}if(1<v.length){v.push(f);v.sort(function(g,p){return g.x-p.x});J=!1;A=f==v[0];k=f==v[v.length-1];if(!A&&!k)for(A=1;A<v.length-1;A++)if(f==v[A]){k=v[A-1];A=v[A+1];P=U=q=(A.x-k.x-k.width-f.width)/2;break}for(A=0;A<v.length-1;A++){k=v[A];G=v[A+1];H=f==k||f==G;G=G.x-k.x-k.width;J|=f==k;-if(0==U&&0==T)U=G,T=1;else if(Math.abs(U-G)<=(H||1==A&&J?m:0))T+=1;else if(1<T&&J){v=v.slice(0,A+1);break}else if(3<=v.length-A&&!J)T=0,P=U=0!=q?q:0,v.splice(0,0==A?1:A),A=-1;else break;0!=P||H||(U=P=G)}3==v.length&&v[1]==f&&(P=0)}m=function(g,p,C,I){var N=[];if(I){I=u;var O=0}else I=0,O=u;N.push(new mxPoint(g.x-I,g.y-O));N.push(new mxPoint(g.x+I,g.y+O));N.push(g);N.push(p);N.push(new mxPoint(p.x-I,p.y-O));N.push(new mxPoint(p.x+I,p.y+O));if(null!=C)return C.points=N,C;g=new mxPolyline(N,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);g.dialect=mxConstants.DIALECT_SVG;g.pointerEvents=!1;g.init(c.graph.getView().getOverlayPane());return g};U=function(g,p){if(g&&null!=c.guidesArrHor)for(g=0;g<c.guidesArrHor.length;g++)c.guidesArrHor[g].node.style.visibility="hidden";if(p&&null!=c.guidesArrVer)for(g=0;g<c.guidesArrVer.length;g++)c.guidesArrVer[g].node.style.visibility="hidden"};if(1<T&&T==v.length-1){T=[];q=c.guidesArrHor;K=[];M=0;A=v[0]==f?1:0;J=v[A].y+v[A].height;if(0<P)for(A=0;A<v.length-1;A++)k=+E.y+E.height+4||f.y+f.height+4<E.y)?t.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&v.push(E))}var D=0,B=0,Q=E=0,U=0,T=0,P=0,q=0,u=5*k;if(1<t.length){t.push(f);t.sort(function(g,p){return g.y-p.y});var J=!1;A=f==t[0];k=f==t[t.length-1];if(!A&&!k)for(A=1;A<t.length-1;A++)if(f==t[A]){k=t[A-1];A=t[A+1];E=B=Q=(A.y-k.y-k.height-f.height)/2;break}for(A=0;A<t.length-1;A++){k=t[A];var G=t[A+1],H=f==k||f==G;G=G.y-k.y-k.height;J|=f==k;if(0==B&&0==+D)B=G,D=1;else if(Math.abs(B-G)<=(H||1==A&&J?m:0))D+=1;else if(1<D&&J){t=t.slice(0,A+1);break}else if(3<=t.length-A&&!J)D=0,E=B=0!=Q?Q:0,t.splice(0,0==A?1:A),A=-1;else break;0!=E||H||(B=E=G)}3==t.length&&t[1]==f&&(E=0)}if(1<v.length){v.push(f);v.sort(function(g,p){return g.x-p.x});J=!1;A=f==v[0];k=f==v[v.length-1];if(!A&&!k)for(A=1;A<v.length-1;A++)if(f==v[A]){k=v[A-1];A=v[A+1];P=T=q=(A.x-k.x-k.width-f.width)/2;break}for(A=0;A<v.length-1;A++){k=v[A];G=v[A+1];H=f==k||f==G;G=G.x-k.x-k.width;J|=f==k;+if(0==T&&0==U)T=G,U=1;else if(Math.abs(T-G)<=(H||1==A&&J?m:0))U+=1;else if(1<U&&J){v=v.slice(0,A+1);break}else if(3<=v.length-A&&!J)U=0,P=T=0!=q?q:0,v.splice(0,0==A?1:A),A=-1;else break;0!=P||H||(T=P=G)}3==v.length&&v[1]==f&&(P=0)}m=function(g,p,C,I){var N=[];if(I){I=u;var O=0}else I=0,O=u;N.push(new mxPoint(g.x-I,g.y-O));N.push(new mxPoint(g.x+I,g.y+O));N.push(g);N.push(p);N.push(new mxPoint(p.x-I,p.y-O));N.push(new mxPoint(p.x+I,p.y+O));if(null!=C)return C.points=N,C;g=new mxPolyline(N,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);g.dialect=mxConstants.DIALECT_SVG;g.pointerEvents=!1;g.init(c.graph.getView().getOverlayPane());return g};T=function(g,p){if(g&&null!=c.guidesArrHor)for(g=0;g<c.guidesArrHor.length;g++)c.guidesArrHor[g].node.style.visibility="hidden";if(p&&null!=c.guidesArrVer)for(g=0;g<c.guidesArrVer.length;g++)c.guidesArrVer[g].node.style.visibility="hidden"};if(1<U&&U==v.length-1){U=[];q=c.guidesArrHor;K=[];M=0;A=v[0]==f?1:0;J=v[A].y+v[A].height;if(0<P)for(A=0;A<v.length-1;A++)k=v[A],G=v[A+1],f==k?(M=G.x-k.width-P,K.push(new mxPoint(M+k.width+u,J)),K.push(new mxPoint(G.x-u,J))):f==G?(K.push(new mxPoint(k.x+k.width+u,J)),M=k.x+k.width+P,K.push(new mxPoint(M-u,J))):(K.push(new mxPoint(k.x+k.width+u,J)),K.push(new mxPoint(G.x-u,J)));else k=v[0],A=v[2],M=k.x+k.width+(A.x-k.x-k.width-f.width)/2,K.push(new mxPoint(k.x+k.width+u,J)),K.push(new mxPoint(M-u,J)),K.push(new mxPoint(M+f.width+u,J)),K.push(new mxPoint(A.x-u,J));for(A=0;A<K.length;A+=2)v=K[A],P=K[A+1],v=m(v,P,null!=q?-q[A/2]:null),v.node.style.visibility="visible",v.redraw(),T.push(v);for(A=K.length/2;null!=q&&A<q.length;A++)q[A].destroy();c.guidesArrHor=T;M-=d.x;K=!0}else U(!0);if(1<D&&D==t.length-1){T=[];q=c.guidesArrVer;L=[];F=0;A=t[0]==f?1:0;D=t[A].x+t[A].width;if(0<E)for(A=0;A<t.length-1;A++)k=t[A],G=t[A+1],f==k?(F=G.y-k.height-E,L.push(new mxPoint(D,F+k.height+u)),L.push(new mxPoint(D,G.y-u))):f==G?(L.push(new mxPoint(D,k.y+k.height+u)),F=k.y+k.height+E,L.push(new mxPoint(D,F-u))):(L.push(new mxPoint(D,k.y+-k.height+u)),L.push(new mxPoint(D,G.y-u)));else k=t[0],A=t[2],F=k.y+k.height+(A.y-k.y-k.height-f.height)/2,L.push(new mxPoint(D,k.y+k.height+u)),L.push(new mxPoint(D,F-u)),L.push(new mxPoint(D,F+f.height+u)),L.push(new mxPoint(D,A.y-u));for(A=0;A<L.length;A+=2)v=L[A],P=L[A+1],v=m(v,P,null!=q?q[A/2]:null,!0),v.node.style.visibility="visible",v.redraw(),T.push(v);for(A=L.length/2;null!=q&&A<q.length;A++)q[A].destroy();c.guidesArrVer=T;F-=d.y;L=!0}else U(!1,!0)}if(K||L)return f=new mxPoint(M,F),t=b.call(this,-d,f,z,y),K&&!L?f.y=t.y:L&&!K&&(f.x=t.x),t.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;U(!0,!0);return b.apply(this,arguments)};var l=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){l.call(this,d);var x=this.guidesArrVer,z=this.guidesArrHor;if(null!=x)for(var y=0;y<x.length;y++)x[y].node.style.visibility=d?"visible":"hidden";if(null!=-z)for(y=0;y<z.length;y++)z[y].node.style.visibility=d?"visible":"hidden"};var n=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){n.call(this);var d=this.guidesArrVer,x=this.guidesArrHor;if(null!=d){for(var z=0;z<d.length;z++)d[z].destroy();this.guidesArrVer=null}if(null!=x){for(z=0;z<x.length;z++)x[z].destroy();this.guidesArrHor=null}}})();function mxRuler(b,l,n,d){function x(){var D=b.getDiagramContainerOffset(),B=b.diagramContainer;c.style.top=B.offsetTop-D.y+"px";c.style.left=B.offsetLeft-D.x+"px";c.style.width=(n?0:B.offsetWidth)+M+"px";c.style.height=(n?B.offsetHeight:0)+M+"px"}function z(D,B,Q){if(null!=y)return D;var T;return function(){var U=this,P=arguments,q=Q&&!T;clearTimeout(T);T=setTimeout(function(){T=null;Q||D.apply(U,P)},B);q&&D.apply(U,P)}}var y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||+q[A/2]:null),v.node.style.visibility="visible",v.redraw(),U.push(v);for(A=K.length/2;null!=q&&A<q.length;A++)q[A].destroy();c.guidesArrHor=U;M-=d.x;K=!0}else T(!0);if(1<D&&D==t.length-1){U=[];q=c.guidesArrVer;L=[];F=0;A=t[0]==f?1:0;D=t[A].x+t[A].width;if(0<E)for(A=0;A<t.length-1;A++)k=t[A],G=t[A+1],f==k?(F=G.y-k.height-E,L.push(new mxPoint(D,F+k.height+u)),L.push(new mxPoint(D,G.y-u))):f==G?(L.push(new mxPoint(D,k.y+k.height+u)),F=k.y+k.height+E,L.push(new mxPoint(D,F-u))):(L.push(new mxPoint(D,k.y++k.height+u)),L.push(new mxPoint(D,G.y-u)));else k=t[0],A=t[2],F=k.y+k.height+(A.y-k.y-k.height-f.height)/2,L.push(new mxPoint(D,k.y+k.height+u)),L.push(new mxPoint(D,F-u)),L.push(new mxPoint(D,F+f.height+u)),L.push(new mxPoint(D,A.y-u));for(A=0;A<L.length;A+=2)v=L[A],P=L[A+1],v=m(v,P,null!=q?q[A/2]:null,!0),v.node.style.visibility="visible",v.redraw(),U.push(v);for(A=L.length/2;null!=q&&A<q.length;A++)q[A].destroy();c.guidesArrVer=U;F-=d.y;L=!0}else T(!1,!0)}if(K||L)return f=new mxPoint(M,F),t=b.call(this,+d,f,z,y),K&&!L?f.y=t.y:L&&!K&&(f.x=t.x),t.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;T(!0,!0);return b.apply(this,arguments)};var l=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){l.call(this,d);var x=this.guidesArrVer,z=this.guidesArrHor;if(null!=x)for(var y=0;y<x.length;y++)x[y].node.style.visibility=d?"visible":"hidden";if(null!=+z)for(y=0;y<z.length;y++)z[y].node.style.visibility=d?"visible":"hidden"};var n=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){n.call(this);var d=this.guidesArrVer,x=this.guidesArrHor;if(null!=d){for(var z=0;z<d.length;z++)d[z].destroy();this.guidesArrVer=null}if(null!=x){for(z=0;z<x.length;z++)x[z].destroy();this.guidesArrHor=null}}})();function mxRuler(b,l,n,d){function x(){var D=b.getDiagramContainerOffset(),B=b.diagramContainer;c.style.top=B.offsetTop-D.y+"px";c.style.left=B.offsetLeft-D.x+"px";c.style.width=(n?0:B.offsetWidth)+M+"px";c.style.height=(n?B.offsetHeight:0)+M+"px"}function z(D,B,Q){if(null!=y)return D;var U;return function(){var T=this,P=arguments,q=Q&&!U;clearTimeout(U);U=setTimeout(function(){U=null;Q||D.apply(T,P)},B);q&&D.apply(T,P)}}var y=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,F=window.cancelAnimationFrame||window.mozCancelAnimationFrame,M=this.RULER_THICKNESS,K=this;this.unit=l;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[n?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;c.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(D){K.editorUiRefresh.apply(b,-arguments);x()};x();var f=document.createElement("canvas");f.width=c.offsetWidth;f.height=c.offsetHeight;c.style.overflow="hidden";f.style.position="relative";c.appendChild(f);var k=f.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=c;this.canvas=f;var t=function(D,B,Q,T,U){D=Math.round(D);B=Math.round(B);Q=Math.round(Q);T=Math.round(T);k.beginPath();k.moveTo(D+.5,B+.5);k.lineTo(Q+.5,T+.5);k.stroke();U&&(n?(k.save(),k.translate(D,B),k.rotate(-Math.PI/2),k.fillText(U,0,0),-k.restore()):k.fillText(U,D,B))},v=function(){k.clearRect(0,0,f.width,f.height);k.beginPath();k.lineWidth=.7;k.strokeStyle=L.strokeClr;k.setLineDash([]);k.font="9px Arial";k.textAlign="center";var D=m.view.scale,B=m.view.getBackgroundPageBounds(),Q=m.view.translate,T=m.pageVisible;Q=T?M+(n?B.y-m.container.scrollTop:B.x-m.container.scrollLeft):M+(n?Q.y*D-m.container.scrollTop:Q.x*D-m.container.scrollLeft);var U=0;T&&(U=m.getPageLayout(),U=n?U.y*m.pageFormat.height:U.x*m.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var q=-P=10;var u=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=D||4<=D?8:16,q=mxConstants.PIXELS_PER_INCH/P,u=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=q;2<=D?J=q/(2*Math.floor(D/2)):.5>=D&&(J=q*Math.floor(1/D/2)*(K.unit==mxConstants.MILLIMETERS?2:1));q=null;B=T?Math.min(Q+(n?B.height:B.width),n?-f.height:f.width):n?f.height:f.width;if(T)if(k.fillStyle=L.outBkgClr,n){var G=Q-M;0<G&&k.fillRect(0,M,M,G);B<f.height&&k.fillRect(0,B,M,f.height)}else G=Q-M,0<G&&k.fillRect(M,0,G,M),B<f.width&&k.fillRect(B,0,f.width,M);k.fillStyle=L.fontClr;for(T=T?Q:Q%(J*D);T<=B;T+=J*D)if(G=Math.round((T-Q)/D/J),!(T<M||G==q)){q=G;var H=null;0==G%P&&(H=K.formatText(U+G*J)+"");n?t(M-u[Math.abs(G)%P],T,M,T,H):t(T,M-u[Math.abs(G)%P],T,M,H)}k.lineWidth=1;t(n?0:M,n?M:0,M,M);k.fillStyle=L.cornerClr;k.fillRect(0,0,M,M)},+arguments);x()};x();var f=document.createElement("canvas");f.width=c.offsetWidth;f.height=c.offsetHeight;c.style.overflow="hidden";f.style.position="relative";c.appendChild(f);var k=f.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=c;this.canvas=f;var t=function(D,B,Q,U,T){D=Math.round(D);B=Math.round(B);Q=Math.round(Q);U=Math.round(U);k.beginPath();k.moveTo(D+.5,B+.5);k.lineTo(Q+.5,U+.5);k.stroke();T&&(n?(k.save(),k.translate(D,B),k.rotate(-Math.PI/2),k.fillText(T,0,0),+k.restore()):k.fillText(T,D,B))},v=function(){k.clearRect(0,0,f.width,f.height);k.beginPath();k.lineWidth=.7;k.strokeStyle=L.strokeClr;k.setLineDash([]);k.font="9px Arial";k.textAlign="center";var D=m.view.scale,B=m.view.getBackgroundPageBounds(),Q=m.view.translate,U=m.pageVisible;Q=U?M+(n?B.y-m.container.scrollTop:B.x-m.container.scrollLeft):M+(n?Q.y*D-m.container.scrollTop:Q.x*D-m.container.scrollLeft);var T=0;U&&(T=m.getPageLayout(),T=n?T.y*m.pageFormat.height:T.x*m.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var q=+P=10;var u=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;q=mxConstants.PIXELS_PER_MM;u=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=D||4<=D?8:16,q=mxConstants.PIXELS_PER_INCH/P,u=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=q;2<=D?J=q/(2*Math.floor(D/2)):.5>=D&&(J=q*Math.floor(1/D/2)*(K.unit==mxConstants.MILLIMETERS?2:1));q=null;B=U?Math.min(Q+(n?B.height:B.width),n?+f.height:f.width):n?f.height:f.width;if(U)if(k.fillStyle=L.outBkgClr,n){var G=Q-M;0<G&&k.fillRect(0,M,M,G);B<f.height&&k.fillRect(0,B,M,f.height)}else G=Q-M,0<G&&k.fillRect(M,0,G,M),B<f.width&&k.fillRect(B,0,f.width,M);k.fillStyle=L.fontClr;for(U=U?Q:Q%(J*D);U<=B;U+=J*D)if(G=Math.round((U-Q)/D/J),!(U<M||G==q)){q=G;var H=null;0==G%P&&(H=K.formatText(T+G*J)+"");n?t(M-u[Math.abs(G)%P],U,M,U,H):t(U,M-u[Math.abs(G)%P],U,M,H)}k.lineWidth=1;t(n?0:M,n?M:0,M,M);k.fillStyle=L.cornerClr;k.fillRect(0,0,M,M)},A=-1,E=function(){null!=y?(null!=F&&F(A),A=y(v)):v()};this.drawRuler=E;this.sizeListener=l=z(function(){var D=m.container;n?(D=D.offsetHeight+M,f.height!=D&&(f.height=D,c.style.height=D+"px",E())):(D=D.offsetWidth+M,f.width!=D&&(f.width=D,c.style.width=D+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=d=z(function(){var D=n?m.container.scrollTop:m.container.scrollLeft;K.lastScroll!=D&&(K.lastScroll=D,E())},10);this.unitListener=function(D,B){K.setUnit(B.getProperty("unit"))};-m.addListener(mxEvent.SIZE,l);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){L=D;c.style.background=L.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,B,Q,T){if(n&&4<D.height||!n&&4<D.width){if(null!=K.guidePart)try{k.putImageData(K.guidePart.imgData1,-K.guidePart.x1,K.guidePart.y1),k.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),k.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(I){}var U=K.origGuideMove.apply(this,arguments);try{k.lineWidth=.5;k.strokeStyle=L.guideClr;k.setLineDash([2]);if(n){var P=D.y+U.y+M-this.graph.container.scrollTop;var q=0;var u=P+D.height/2;var J=M/2;var G=P+D.height;var H=0;var g=k.getImageData(q,P-1,M,3);t(q,P,M,P);P--;var p=k.getImageData(J,u-1,M,3);t(J,u,M,u);u--;var C=k.getImageData(H,-G-1,M,3);t(H,G,M,G);G--}else P=0,q=D.x+U.x+M-this.graph.container.scrollLeft,u=M/2,J=q+D.width/2,G=0,H=q+D.width,g=k.getImageData(q-1,P,3,M),t(q,P,q,M),q--,p=k.getImageData(J-1,u,3,M),t(J,u,J,M),J--,C=k.getImageData(H-1,G,3,M),t(H,G,H,M),H--;if(null==K.guidePart||K.guidePart.x1!=q||K.guidePart.y1!=P)K.guidePart={imgData1:g,x1:q,y1:P,imgData2:p,x2:J,y2:u,imgData3:C,x3:H,y3:G}}catch(I){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+m.addListener(mxEvent.SIZE,l);m.container.addEventListener("scroll",d);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){L=D;c.style.background=L.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,B,Q,U){if(n&&4<D.height||!n&&4<D.width){if(null!=K.guidePart)try{k.putImageData(K.guidePart.imgData1,+K.guidePart.x1,K.guidePart.y1),k.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),k.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(I){}var T=K.origGuideMove.apply(this,arguments);try{k.lineWidth=.5;k.strokeStyle=L.guideClr;k.setLineDash([2]);if(n){var P=D.y+T.y+M-this.graph.container.scrollTop;var q=0;var u=P+D.height/2;var J=M/2;var G=P+D.height;var H=0;var g=k.getImageData(q,P-1,M,3);t(q,P,M,P);P--;var p=k.getImageData(J,u-1,M,3);t(J,u,M,u);u--;var C=k.getImageData(H,+G-1,M,3);t(H,G,M,G);G--}else P=0,q=D.x+T.x+M-this.graph.container.scrollLeft,u=M/2,J=q+D.width/2,G=0,H=q+D.width,g=k.getImageData(q-1,P,3,M),t(q,P,q,M),q--,p=k.getImageData(J-1,u,3,M),t(J,u,J,M),J--,C=k.getImageData(H-1,G,3,M),t(H,G,H,M),H--;if(null==K.guidePart||K.guidePart.x1!=q||K.guidePart.y1!=P)K.guidePart={imgData1:g,x1:q,y1:P,imgData2:p,x2:J,y2:u,imgData3:C,x3:H,y3:G}}catch(I){}}else T=K.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var D=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{k.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),k.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),k.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(B){}return D}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};@@ -14024,15 +14029,15 @@ function(z){x=null!=b.currentMenu;mxEvent.consume(z)}),null,mxUtils.bind(this,fufunction(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);b.resetCurrentMenu();y.destroy()});var F=mxEvent.getClientX(z),M=mxEvent.getClientY(z);y.popup(F,M,null,z);b.setCurrentMenu(y,d)}mxEvent.consume(z)}}))});l(this.hRuler.container);l(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var l=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=l){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var n=mxFreehand.prototype.MILD_SMOOTHING,d=null,x=[],z,y=[],F,M=!1,K=!0,L=!0,c=!0,f=!0,k=[],m=!1,t=!1,v=!1,A="default",E={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},D=!0;this.setClosedPath=function(u){M=u};this.setAutoClose=function(u){K=u};this.setAutoInsert=function(u){L=u};this.setAutoScroll=function(u){c=u};this.setOpenFill=function(u){f=u};this.setStopClickEnabled=function(u){t=u};this.setSelectInserted=function(u){v=u};this.setSmoothing=function(u){n=u};this.getSmoothing=function(){return n};this.setPerfectFreehandMode=function(u){D=u};this.isPerfectFreehandMode=function(){return D};this.setBrushSize=function(u){E.size=u};this.getBrushSize=function(){return E.size};var B=function(u){m=u;b.getRubberband().setEnabled(!u);b.graphHandler.setSelectEnabled(!u);-b.graphHandler.setMoveEnabled(!u);b.container.style.cursor=u?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){B(!0)};this.isDrawing=function(){return m};var Q=mxUtils.bind(this,function(u){if(d){var J=F.length,G=t&&0<y.length&&null!=F&&2>F.length;G||y.push.apply(y,F);F=[];y.push(null);x.push(d);d=null;(G||L)&&this.stopDrawing();L&&(!G||2<=J)&&this.startDrawing();mxEvent.consume(u)}}),T=new mxCell;T.edge=!0;this.getStrokeColor=function(u){var J=null!=-A?A:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(T),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=J||u||(J=b.shapeForegroundColor);return J};this.setStrokeColor=function(u){A=u};this.createStyle=function(u){var J=";fillColor=none;";D&&(J=";lineShape=1;");J+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+u+J};this.stopDrawing=function(){if(0<x.length){if(D){for(var u=[],J=0;J<y.length;J++)null!=y[J]&&u.push([y[J].x,+b.graphHandler.setMoveEnabled(!u);b.container.style.cursor=u?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){B(!0)};this.isDrawing=function(){return m};var Q=mxUtils.bind(this,function(u){if(d){var J=F.length,G=t&&0<y.length&&null!=F&&2>F.length;G||y.push.apply(y,F);F=[];y.push(null);x.push(d);d=null;(G||L)&&this.stopDrawing();L&&(!G||2<=J)&&this.startDrawing();mxEvent.consume(u)}}),U=new mxCell;U.edge=!0;this.getStrokeColor=function(u){var J=null!=+A?A:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(U),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=J||u||(J=b.shapeForegroundColor);return J};this.setStrokeColor=function(u){A=u};this.createStyle=function(u){var J=";fillColor=none;";D&&(J=";lineShape=1;");J+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+u+J};this.stopDrawing=function(){if(0<x.length){if(D){for(var u=[],J=0;J<y.length;J++)null!=y[J]&&u.push([y[J].x,y[J].y]);u=PerfectFreehand.getStroke(u,E);y=[];for(J=0;J<u.length;J++)y.push({x:u[J][0],y:u[J][1]});y.push(null)}u=y[0].x;var G=y[0].x,H=y[0].y,g=y[0].y;for(J=1;J<y.length;J++)null!=y[J]&&(u=Math.max(u,y[J].x),G=Math.min(G,y[J].x),H=Math.max(H,y[J].y),g=Math.min(g,y[J].y));u-=G;H-=g;if(0<u&&0<H){var p=100/u,C=100/H;y.map(function(R){if(null==R)return R;R.x=(R.x-G)*p;R.y=(R.y-g)*C;return R});var I='<shape strokewidth="inherit"><foreground>',N=0;for(J=0;J<y.length;J++){var O=y[J];if(null==O){O=!1;N=y[N];var S=y[J-1];!M&&K&&(O=N.x-S.x,S=N.y-S.y,O=Math.sqrt(O*O+S*S)<=b.tolerance);if(M||O)I+='<line x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>';I+="</path>"+(f||M||O?"<fillstroke/>":"<stroke/>");N=J+1}else I=J==N?I+('<path><move x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>'):I+('<line x="'+O.x.toFixed(2)+'" y="'+O.y.toFixed(2)+'"/>')}I+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=this.createStyle("stencil("+Graph.compress(I)+")");I=b.view.scale;N=b.view.translate;J=new mxCell("",new mxGeometry(G/I-N.x,g/I-N.y,u/I,H/I),J);J.vertex=1;b.model.beginUpdate();try{J=b.addCell(J),b.fireEvent(new mxEventObject("cellsInserted","cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}v&&b.setSelectionCells([J])}}for(J=0;J<x.length;J++)x[J].parentNode.removeChild(x[J]);d=null;x=[];y=[]}B(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,J){u=J.getProperty("eventName");J=J.getProperty("event");u==mxEvent.MOUSE_MOVE&&m&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(u,J){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u=J.getEvent(),m&&!mxEvent.isPopupTrigger(u)&&!mxEvent.isMiddleMouseButton(u)&&!mxEvent.isMultiTouchEvent(u))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var H=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");-d.setAttribute("fill",D?H:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",H);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(H=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",H=H.split(" ").map(function(g){return parseFloat(g)*G}).join(" "),d.setAttribute("stroke-dasharray",H));k=[];u=U(u);P(u);z="M"+u.x+" "+u.y;y.push(u);F=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[u.x,u.y]],E):z);l.appendChild(d);J.consume()}}),-mouseMove:mxUtils.bind(this,function(u,J){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=J.getEvent();u=U(u);P(u);var G=q(0);if(G)if(y.push(G),D){var H=[];for(G=0;G<y.length;G++)H.push([y[G].x,y[G].y]);F=[];for(var g=2;g<k.length;g+=2)G=q(g),H.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(H,E))}else{z+=" L"+G.x+" "+G.y;H="";F=[];for(g=2;g<k.length;g+=2)G=q(g),H+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",z+H)}c&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(u.x--G.x,u.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(u,J){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(Q(J.getEvent()),J.consume())})});var U=function(u){return mxUtils.convertPoint(b.container,mxEvent.getClientX(u),mxEvent.getClientY(u))},P=function(u){for(k.push(u);k.length>n;)k.shift()},q=function(u){var J=k.length;if(1===J%2||J>=n){var G=0,H=0,g,p=0;for(g=u;g<J;g++)p++,u=k[g],G+=u.x,H+=u.y;return{x:G/p,y:H/p}}return null}}}+d.setAttribute("fill",D?H:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",H);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(H=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",H=H.split(" ").map(function(g){return parseFloat(g)*G}).join(" "),d.setAttribute("stroke-dasharray",H));k=[];u=T(u);P(u);z="M"+u.x+" "+u.y;y.push(u);F=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[u.x,u.y]],E):z);l.appendChild(d);J.consume()}}),+mouseMove:mxUtils.bind(this,function(u,J){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=J.getEvent();u=T(u);P(u);var G=q(0);if(G)if(y.push(G),D){var H=[];for(G=0;G<y.length;G++)H.push([y[G].x,y[G].y]);F=[];for(var g=2;g<k.length;g+=2)G=q(g),H.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(H,E))}else{z+=" L"+G.x+" "+G.y;H="";F=[];for(g=2;g<k.length;g+=2)G=q(g),H+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",z+H)}c&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(u.x-+G.x,u.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(u,J){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(Q(J.getEvent()),J.consume())})});var T=function(u){return mxUtils.convertPoint(b.container,mxEvent.getClientX(u),mxEvent.getClientY(u))},P=function(u){for(k.push(u);k.length>n;)k.shift()},q=function(u){var J=k.length;if(1===J%2||J>=n){var G=0,H=0,g,p=0;for(g=u;g<J;g++)p++,u=k[g],G+=u.x,H+=u.y;return{x:G/p,y:H/p}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,l,n,d,x){this.id=b;this.email=l;this.displayName=n;this.pictureUrl=d;this.locale=x};DrawioComment=function(b,l,n,d,x,z,y){this.file=b;this.id=l;this.content=n;this.modifiedDate=d;this.createdDate=x;this.isResolved=z;this.user=y;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,l,n,d,x){l()};DrawioComment.prototype.editComment=function(b,l,n){l()};DrawioComment.prototype.deleteComment=function(b,l){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];LucidImporter={};diff --git a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.jsindex 065ade592..c0e92b95a 100644--- a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js+++ b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js@@ -1,2 +1,2 @@-if(!self.define){let e,c={};const n=(n,i)=>(n=new URL(n+".js",i).href,c[n]||new Promise((c=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=c,document.head.appendChild(e)}else e=n,importScripts(n),c()})).then((()=>{let e=c[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(i,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(c[r])return;let o={};const a=e=>n(e,r),d={module:{uri:r},exports:o,require:a};c[r]=Promise.all(i.map((e=>d[e]||a(e)))).then((e=>(s(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"1a78eb9fd9223f088ecb257f752f8574"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"282777c4fe68ba971ce14c503466a45a"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"d381db23d3c925eb81854c07b46776a5"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"78b87563d88943ab816a3463927b9b50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"174e06ff4578aa4e2cadf5434494d8dd"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"resources/dia.txt",revision:"fad8b817bb8630008946ac0442c26c41"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,c={};const n=(n,i)=>(n=new URL(n+".js",i).href,c[n]||new Promise((c=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=c,document.head.appendChild(e)}else e=n,importScripts(n),c()})).then((()=>{let e=c[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(i,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(c[r])return;let o={};const a=e=>n(e,r),d={module:{uri:r},exports:o,require:a};c[r]=Promise.all(i.map((e=>d[e]||a(e)))).then((e=>(s(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"6d05bed2a81cec4877db56c9f4bad25e"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"06ea84f36f261faf66e05e3ed9b16f2f"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"d381db23d3c925eb81854c07b46776a5"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"78b87563d88943ab816a3463927b9b50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"174e06ff4578aa4e2cadf5434494d8dd"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"resources/dia.txt",revision:"f9a270e56f91d7b63e219306ff2b63ac"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-ac-draw-io.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.map b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.mapindex cb16a7cae..e6fa92cdf 100644--- a/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-ac-draw-io.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-ac-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/833ac2b9779db6c01baa055795ca027c/service-worker-ac-draw-io.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1a78eb9fd9223f088ecb257f752f8574\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"282777c4fe68ba971ce14c503466a45a\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"d381db23d3c925eb81854c07b46776a5\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"78b87563d88943ab816a3463927b9b50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"174e06ff4578aa4e2cadf5434494d8dd\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"fad8b817bb8630008946ac0442c26c41\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-ac-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/6febaf834acda3bd877fb3a53f27c123/service-worker-ac-draw-io.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6d05bed2a81cec4877db56c9f4bad25e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"06ea84f36f261faf66e05e3ed9b16f2f\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"d381db23d3c925eb81854c07b46776a5\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"78b87563d88943ab816a3463927b9b50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"174e06ff4578aa4e2cadf5434494d8dd\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"f9a270e56f91d7b63e219306ff2b63ac\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.jsindex 97888d0e6..0022ea88f 100644--- a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js+++ b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const r=(r,c)=>(r=new URL(r+".js",c).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(c,n)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let o={};const a=e=>r(e,s),f={module:{uri:s},exports:o,require:a};i[s]=Promise.all(c.map((e=>f[e]||a(e)))).then((e=>(n(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"1a78eb9fd9223f088ecb257f752f8574"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"282777c4fe68ba971ce14c503466a45a"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"resources/dia.txt",revision:"fad8b817bb8630008946ac0442c26c41"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,i={};const r=(r,c)=>(r=new URL(r+".js",c).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(c,n)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let o={};const a=e=>r(e,s),f={module:{uri:s},exports:o,require:a};i[s]=Promise.all(c.map((e=>f[e]||a(e)))).then((e=>(n(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"6d05bed2a81cec4877db56c9f4bad25e"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"06ea84f36f261faf66e05e3ed9b16f2f"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"resources/dia.txt",revision:"f9a270e56f91d7b63e219306ff2b63ac"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-aj-draw-io.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.map b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.mapindex 0e3deb8cf..aae5896d8 100644--- a/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-aj-draw-io.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-aj-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/a880f59d48a04a26e214fd52adbffdd6/service-worker-aj-draw-io"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1a78eb9fd9223f088ecb257f752f8574\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"282777c4fe68ba971ce14c503466a45a\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"ce61a0e62031a160e057809fefe64aa2\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"fad8b817bb8630008946ac0442c26c41\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-aj-draw-io.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/cf8bc17dcfc3c151c09a2c61b531d596/service-worker-aj-draw-io"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6d05bed2a81cec4877db56c9f4bad25e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"06ea84f36f261faf66e05e3ed9b16f2f\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"ce61a0e62031a160e057809fefe64aa2\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"f9a270e56f91d7b63e219306ff2b63ac\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.jsindex 2359bb455..a73016ab8 100644--- a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js+++ b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const s=(s,a)=>(s=new URL(s+".js",a).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(a,r)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const d=e=>s(e,c),b={module:{uri:c},exports:o,require:d};i[c]=Promise.all(a.map((e=>b[e]||d(e)))).then((e=>(r(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"1a78eb9fd9223f088ecb257f752f8574"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"fad8b817bb8630008946ac0442c26c41"},{url:"resources/dia_da.txt",revision:"a6244c3b58703cd2a29fd15b2bd13056"},{url:"resources/dia_de.txt",revision:"eff66c7f27c5a473b9ee8445bfa21364"},{url:"resources/dia_es.txt",revision:"f9f47547d0cb2ea0d5bec80ba1942cbd"},{url:"resources/dia_fr.txt",revision:"4fd0e2aa2d0409c2b2ad91fb666b1626"},{url:"resources/dia_id.txt",revision:"86ec19a2e1447a469019e06b5b45ea58"},{url:"resources/dia_it.txt",revision:"20b500274046dbe3af90f4ad562df90c"},{url:"resources/dia_ja.txt",revision:"67e73b5b9b37c370733fc88a17f88166"},{url:"resources/dia_ko.txt",revision:"4e25ea93d4ba97a9bacaa704d51c535b"},{url:"resources/dia_nl.txt",revision:"b6e0431168d72e1a515bcef3e2c5aff0"},{url:"resources/dia_pl.txt",revision:"c28ea47141a75166431d5be478ba4abe"},{url:"resources/dia_pt.txt",revision:"5c94edca8dac2f7fb47dd8861e696391"},{url:"resources/dia_ru.txt",revision:"a3c3718265bbd2e961fe7a7f542ef711"},{url:"resources/dia_vi.txt",revision:"07913aa51ac0d59f9d99eb6fc5c07f19"},{url:"resources/dia_zh.txt",revision:"c2a5fd91517c85d4615fdb98563b4544"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,i={};const s=(s,r)=>(s=new URL(s+".js",r).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(r,a)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(i[c])return;let o={};const d=e=>s(e,c),f={module:{uri:c},exports:o,require:d};i[c]=Promise.all(r.map((e=>f[e]||d(e)))).then((e=>(a(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"6d05bed2a81cec4877db56c9f4bad25e"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"f9a270e56f91d7b63e219306ff2b63ac"},{url:"resources/dia_da.txt",revision:"0efd12fd7f0e123bb9423ad1ffe9e656"},{url:"resources/dia_de.txt",revision:"469fb636bc289ba77a097ab7adf16a34"},{url:"resources/dia_es.txt",revision:"82f09fd89c36d86b3fef59329a613c65"},{url:"resources/dia_fr.txt",revision:"c2a77b9e1f6d0b19dfc1e7bd40af2b42"},{url:"resources/dia_id.txt",revision:"86ec19a2e1447a469019e06b5b45ea58"},{url:"resources/dia_it.txt",revision:"9e23d17c9eb7a8d074336f267f7bd2f8"},{url:"resources/dia_ja.txt",revision:"b76dd5c357b3ff1dfcabaddeab376d65"},{url:"resources/dia_ko.txt",revision:"229e8f9c3d84e4635561ba392c465d11"},{url:"resources/dia_nl.txt",revision:"b6e0431168d72e1a515bcef3e2c5aff0"},{url:"resources/dia_pl.txt",revision:"ae3475b10f2824045fa7076f4584c085"},{url:"resources/dia_pt.txt",revision:"d0c985f25e2924dd25bd540a82c3fd66"},{url:"resources/dia_ru.txt",revision:"5aed41ed91e16b0e77879e74c8843768"},{url:"resources/dia_vi.txt",revision:"8576286953704e5cdd6727eb3ec484f4"},{url:"resources/dia_zh.txt",revision:"f2fcdf5b619faf471bff3703fc0bf75f"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-app-diagrams-net.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.map b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.mapindex ded6c70d9..6777c0e5d 100644--- a/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-app-diagrams-net.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-app-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/c50bfd7d50779a90d87ef79cc64f28b8/service-worker-app-diagrams-net.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1a78eb9fd9223f088ecb257f752f8574\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"fad8b817bb8630008946ac0442c26c41\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"a6244c3b58703cd2a29fd15b2bd13056\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"eff66c7f27c5a473b9ee8445bfa21364\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f9f47547d0cb2ea0d5bec80ba1942cbd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"4fd0e2aa2d0409c2b2ad91fb666b1626\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"86ec19a2e1447a469019e06b5b45ea58\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"20b500274046dbe3af90f4ad562df90c\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"67e73b5b9b37c370733fc88a17f88166\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"4e25ea93d4ba97a9bacaa704d51c535b\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"b6e0431168d72e1a515bcef3e2c5aff0\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"c28ea47141a75166431d5be478ba4abe\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5c94edca8dac2f7fb47dd8861e696391\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"a3c3718265bbd2e961fe7a7f542ef711\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"07913aa51ac0d59f9d99eb6fc5c07f19\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"c2a5fd91517c85d4615fdb98563b4544\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-app-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/fe7359531a0298b4254a1f28663e3e96/service-worker-app-diagrams-net.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6d05bed2a81cec4877db56c9f4bad25e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"f9a270e56f91d7b63e219306ff2b63ac\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"0efd12fd7f0e123bb9423ad1ffe9e656\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"469fb636bc289ba77a097ab7adf16a34\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"82f09fd89c36d86b3fef59329a613c65\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c2a77b9e1f6d0b19dfc1e7bd40af2b42\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"86ec19a2e1447a469019e06b5b45ea58\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"9e23d17c9eb7a8d074336f267f7bd2f8\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b76dd5c357b3ff1dfcabaddeab376d65\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"229e8f9c3d84e4635561ba392c465d11\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"b6e0431168d72e1a515bcef3e2c5aff0\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"ae3475b10f2824045fa7076f4584c085\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"d0c985f25e2924dd25bd540a82c3fd66\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"5aed41ed91e16b0e77879e74c8843768\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"8576286953704e5cdd6727eb3ec484f4\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f2fcdf5b619faf471bff3703fc0bf75f\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.jsindex b3e93ac91..5c2e0659a 100644--- a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js+++ b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js@@ -1,2 +1,2 @@-if(!self.define){let e,s={};const i=(i,r)=>(i=new URL(i+".js",r).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(r,c)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let o={};const a=e=>i(e,n),t={module:{uri:n},exports:o,require:a};s[n]=Promise.all(r.map((e=>t[e]||a(e)))).then((e=>(c(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"1a78eb9fd9223f088ecb257f752f8574"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"282777c4fe68ba971ce14c503466a45a"},{url:"resources/dia.txt",revision:"fad8b817bb8630008946ac0442c26c41"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,s={};const i=(i,r)=>(i=new URL(i+".js",r).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(r,c)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let o={};const d=e=>i(e,n),a={module:{uri:n},exports:o,require:d};s[n]=Promise.all(r.map((e=>a[e]||d(e)))).then((e=>(c(...e),o)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"6d05bed2a81cec4877db56c9f4bad25e"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"06ea84f36f261faf66e05e3ed9b16f2f"},{url:"resources/dia.txt",revision:"f9a270e56f91d7b63e219306ff2b63ac"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker-embed-viewer-diagrams-net.js.mapdiff --git a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.map b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.mapindex d5cccc319..36a85c2ee 100644--- a/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.map+++ b/src/main/webapp/js/serviceworker/service-worker-embed-viewer-diagrams-net.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker-embed-viewer-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/6a8fc0a41e81cd9a3fd6a8983121e97c/service-worker-embed-viewer-diagrams-net.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1a78eb9fd9223f088ecb257f752f8574\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"282777c4fe68ba971ce14c503466a45a\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"fad8b817bb8630008946ac0442c26c41\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker-embed-viewer-diagrams-net.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/3e0c7ab54f3543a829ca4e39e61b73a2/service-worker-embed-viewer-diagrams-net.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6d05bed2a81cec4877db56c9f4bad25e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"06ea84f36f261faf66e05e3ed9b16f2f\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"f9a270e56f91d7b63e219306ff2b63ac\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of filediff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.jsindex 8b5c58174..ca5cb8cd7 100644--- a/src/main/webapp/js/viewer-static.min.js+++ b/src/main/webapp/js/viewer-static.min.js@@ -28,7 +28,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"28.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -408,9 +408,9 @@ mxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r){k=null!=k&&"verticl+"; ");null!=m&&(d+="border-width: 1px; border-style: solid; border-color: inherit; border: 1px solid "+m+"; ");""==c||g?p+=d:q+=d;e&&(k&&0<b||!k&&0<a)?(p+="white-space: normal; word-wrap: "+mxConstants.WORD_WRAP+"; ",k?v="height: "+Math.round(b)+"px; ":u="width: "+Math.round(a)+"px; ",""!=c&&"fill"!=f&&(k?y=0:t=0)):(p+="white-space: nowrap; ",""==c&&"block"!=f&&(y=0));r(y,t,n+u+v,q+c,p,c)};mxSvgCanvas2D.prototype.getTextCss=function(){var a=this.state,b=mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;b="display: inline-block; font-size: "+mxUtils.htmlEntities(a.fontSize)+"px; font-family: "+mxUtils.parseCssFontFamily(a.fontFamily,!0)+"; color: "+this.getLightDarkColor(mxUtils.htmlEntities(a.fontColor)).cssText+"; line-height: "+mxUtils.htmlEntities(b)+"; pointer-events: "+(this.pointerEvents?mxUtils.htmlEntities(this.pointerEventsValue):"none")+"; ";(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="font-weight: bold; ");(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="font-style: italic; ");var c=[];(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push("underline");(a.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push("line-through");0<c.length&&(b+="text-decoration: "+c.join(" ")+"; ");return b};-mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):"SUP"==l.nodeName||"SUB"==l.nodeName||"B"==l.nodeName||"I"==l.nodeName||"SPAN"==l.nodeName||"FONT"==l.nodeName||"STRIKE"==l.nodeName||"U"==l.nodeName?(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),-k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration","line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration",-"underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d)):e=!1;l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};+mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):""!=l.style.backgroundColor||"SUP"!=l.nodeName&&"SUB"!=l.nodeName&&"B"!=l.nodeName&&"I"!=l.nodeName&&"SPAN"!=l.nodeName&&"FONT"!=l.nodeName&&"STRIKE"!=l.nodeName&&"U"!=l.nodeName?e=!1:(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),+""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration",+"line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration","underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d));l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e)if(p=null!=p?p:0,this.foEnabled&&"html"==l){var r=this.createDiv(e);if(null!=r){var t=this.createElement("text"),u=new mxPoint(0,0);this.allowConvertHtmlToSvg&&this.convertHtmlToSvg(r.firstChild.firstChild,t,u)?(0>u.y&&g==mxConstants.ALIGN_TOP?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_BOTTOM?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_TOP&&(t.style.transform="translateY("+u.y+"em)"),this.plainText(a+this.state.dx,b+this.state.dy,c,d,"",f,g,k,m,n,p,q,t)):(null!=q&&"vertical-"!=q.substring(0,9)&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))}}else this.plainText(a+this.state.dx,b+this.state.dy,c,d,e,f,g,k,m,n,p,q)};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;e=this.createElement("clipPath");e.setAttribute("id",g);g=this.createElement("rect");g.setAttribute("x",a);g.setAttribute("y",b);g.setAttribute("width",c);g.setAttribute("height",d);e.appendChild(g);return e};@@ -1965,8 +1965,8 @@ Editor.toUnit=function(b,f){return f==mxConstants.INCHES?Math.round(100*b/mxConsEditor.fromUnit=function(b,f){return f==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):f==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):f==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};-Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?(f+=(0<f.length?"&":"?")+"lightbox=1",null!=u&&(f+="&page-id="+u)):null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});mxEvent.addListener(window,-"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};+Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});+mxEvent.addListener(window,"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var l=b.isCssTransformsSupported,u=this;b.isCssTransformsSupported=function(){return l.apply(this,arguments)&&(!u.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});return b};Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};@@ -2043,38 +2043,38 @@ this.scale-g+H,n)+I*B)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scaH){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var E=[],Q=1;Q<this.gridSteps;Q++){var c=Q*S;E.push("M 0 "+c+" L "+H+" "+c+" M "+c+" 0 L "+c+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+E.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var E=this.gridSize*this.view.scale*this.view.gridSteps;E=-Math.round(E-mxUtils.mod(this.view.translate.x*this.view.scale+B,E))+"px "+-Math.round(E-mxUtils.mod(this.view.translate.y*this.view.scale+H,E))+"px";S.style.backgroundPosition=E}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var E=this.view.scale,Q=this.view.translate,c=this.pageFormat,g=E*this.pageScale,m=this.view.getBackgroundPageBounds();-H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ia=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),-Math.round(m.y+(aa+1)*n.height)),new mxPoint(Math.round(I),Math.round(m.y+(aa+1)*n.height))]:[new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(M))];null!=L[aa]?(L[aa].points=ia,L[aa].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),L[aa]=ia)}for(aa=K;aa<L.length;aa++)null!=L[aa]&&L[aa].destroy();L.splice(K,L.length-+H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ja=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),+Math.round(m.y+(aa+1)*n.height)),new mxPoint(Math.round(I),Math.round(m.y+(aa+1)*n.height))]:[new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(M))];null!=L[aa]?(L[aa].points=ja,L[aa].redraw()):(ja=new mxPolyline(ja,this.pageBreakColor),ja.dialect=this.dialect,ja.isDashed=this.pageBreakDashed,ja.pointerEvents=!1,ja.init(this.view.backgroundPane),ja.redraw(),L[aa]=ja)}for(aa=K;aa<L.length;aa++)null!=L[aa]&&L[aa].destroy();L.splice(K,L.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var E=0;E<H.length;E++){if(this.graph.isTableCell(H[E])||this.graph.isTableRow(H[E]))return!1;if(this.graph.getModel().isVertex(H[E])){var Q=this.graph.getCellGeometry(H[E]);if(null!=Q&&Q.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=l.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,E=this.graph.pageFormat,Q=this.graph.pageScale,c=E.width*Q;E=E.height*Q;Q=Math.floor(Math.min(0,H)/c);var g=Math.floor(Math.min(0,S)/E);return new mxRectangle(this.scale*(this.translate.x+Q*c),this.scale*(this.translate.y+g*E),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/c)-Q)*c,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/E)-g)*E)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,E,Q,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var E=this.graph.model.getParent(B);if(H){var Q=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);Q=!this.graph.model.isEdge(E)&&!this.graph.isSiblingSelected(B)&&(null!=Q&&Q.relative||!this.graph.isContainer(E)||this.graph.isPart(B))}else if(Q=q.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))Q=E,this.graph.isTable(Q)||(Q=this.graph.model.getParent(Q)),Q=!this.graph.selectionCellsHandler.isHandled(Q)||this.graph.isCellSelected(Q)&&this.graph.isToggleEvent(S.getEvent())||-this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(B);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var X=q.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var ha=this.view.translate,Z=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ha.x+ca.x)*Z,(ha.y+ca.y)*Z,ca.width*Z,ca.height*Z))}return X};y.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ca){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=-function(){return!1};y.panningHandler.isForcePanningEvent=function(X){for(var ca=X.getSource();null!=ca&&ca!=y.container;){if("foreignObject"===ca.nodeName||"text"===ca.nodeName)return!1;ca=ca.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{y.getModel().isEdge(X)?-S=y.pasteEdgeStyle=!1:H=!1;var ca=y.getCellStyle(X,!1),ha=[],Z=[],k;for(k in ca)ha.push(ca[k]),Z.push(k);y.getModel().isEdge(X)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",ha,"cells",[X],"force",!0));y.getModel().isEdge(X)?S=y.pasteEdgeStyle=!0:H=!0}catch(v){this.handleError(v)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);H=S=y.pasteEdgeStyle=-!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(X,ca){y.pasteCellStyles(y.includeDescendants(ca.getProperty("cells")))});y.addListener("textInserted",function(X,ca){y.pasteCellStyles(ca.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var E=mxUtils.bind(this,function(X){null==X&&(X=window.event);return y.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&-!this.editor.editable||(this.menubarContainer.onselectstart=E,this.menubarContainer.onmousedown=E,this.toolbarContainer.onselectstart=E,this.toolbarContainer.onmousedown=E,this.diagramContainer.onselectstart=E,this.diagramContainer.onmousedown=E,this.sidebarContainer.onselectstart=E,this.sidebarContainer.onmousedown=E,this.formatContainer.onselectstart=E,this.formatContainer.onmousedown=E,null!=this.tabContainer&&(this.tabContainer.onselectstart=E),mxClient.IS_IOS&&(f=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ca=-navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ca[1],10),parseInt(ca[2],10),parseInt(ca[3]||0,10)]}catch(ha){}}return X}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,-"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(X){if(null!=X){var ca=mxEvent.getSource(X);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return E(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&-(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var Q=y.graphHandler.start;y.graphHandler.start=function(){null!=u.hoverIcons&&u.hoverIcons.reset();Q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(X){var ca=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ca.y-this.diagramContainer.clientHeight?-this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ca){return u.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){16==X.which?this.shiftDown=!0:32!=X.which||y.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",y.isEditing()||-mxEvent.getSource(X)!=y.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(X){return g.apply(this,arguments)||u.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&-(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var m=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(X){return m.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 n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return u.isSpaceDown()||n.apply(this,arguments)};var x=mxUtils.bind(this,-function(){if(null!=this.toolbar)for(var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ca=this.toolbar.container.firstChild;null!=ca;){var ha=ca.getAttribute("data-min-width");null!=ha&&parseInt(ha)>X?ca.style.display="none":ca.style.display="";ca=ca.nextSibling}}),F=!1,I=null,M=null,L=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ca=[];null!=X;){var ha=X.nextSibling;-X.parentNode.removeChild(X);ca.push(X);X=ha}X=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var Z=0;Z<L.length;Z++)this.toolbar.container.appendChild(L[Z]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=M}F=y.cellEditor.isContentEditing();I=X;M=ha;L=ca;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",x);mxEvent.addListener(window,-"resize",x);x();var aa=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){aa.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var X=!1,ca=function(){X||(X=!0,window.setTimeout(function(){var ha=y.getSelectedEditingElement();null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=u.toolbar&&(u.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),u.toolbar.setFontSize(parseInt(ha.fontSize))));X=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",ca);mxEvent.addListener(y.cellEditor.textarea,-"touchend",ca);mxEvent.addListener(y.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(y.cellEditor.textarea,"keyup",ca);ca()}};var ia=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(X,ca){try{ia.apply(this,arguments),K()}catch(ha){u.handleError(ha)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(X){}var da=y.fireMouseEvent;y.fireMouseEvent=function(X,ca,ha){try{X==-mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(Z){u.handleError(Z)}};var ba=y.foldCells;y.foldCells=function(X,ca,ha,Z,k){try{ba.apply(this,arguments)}catch(v){u.handleError(v)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ca,ha){this.menus.createPopupMenu(X,ca,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){y.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);-this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(X,ca){var ha=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(ha.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(ha[ha.length-1]))},0));y.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ca){X=ca.getProperty("force");(this.updateDefaultStyle||X)&&y.copyCellStyles(ca.getProperty("cells"),-ca.getProperty("keys"),ca.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==y.currentEdgeStyle.edgeStyle&&"1"==y.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==y.currentEdgeStyle.edgeStyle||+this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(B);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var Y=q.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ha=this.view.translate,Z=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((ha.x+da.x)*Z,(ha.y+da.y)*Z,da.width*Z,da.height*Z))}return Y};y.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(Y,da){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=+function(){return!1};y.panningHandler.isForcePanningEvent=function(Y){for(var da=Y.getSource();null!=da&&da!=y.container;){if("foreignObject"===da.nodeName||"text"===da.nodeName)return!1;da=da.parentNode}return!mxEvent.isPopupTrigger(Y.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(Y){try{y.getModel().isEdge(Y)?+S=y.pasteEdgeStyle=!1:H=!1;var da=y.getCellStyle(Y,!1),ha=[],Z=[],k;for(k in da)ha.push(da[k]),Z.push(k);y.getModel().isEdge(Y)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",ha,"cells",[Y],"force",!0));y.getModel().isEdge(Y)?S=y.pasteEdgeStyle=!0:H=!0}catch(v){this.handleError(v)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);H=S=y.pasteEdgeStyle=+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(Y,da){y.pasteCellStyles(y.includeDescendants(da.getProperty("cells")))});y.addListener("textInserted",function(Y,da){y.pasteCellStyles(da.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var E=mxUtils.bind(this,function(Y){null==Y&&(Y=window.event);return y.isEditing()||null!=Y&&this.isSelectionAllowed(Y)});this.container!=document.body||this.editor.chromeless&&+!this.editor.editable||(this.menubarContainer.onselectstart=E,this.menubarContainer.onmousedown=E,this.toolbarContainer.onselectstart=E,this.toolbarContainer.onmousedown=E,this.diagramContainer.onselectstart=E,this.diagramContainer.onmousedown=E,this.sidebarContainer.onselectstart=E,this.sidebarContainer.onmousedown=E,this.formatContainer.onselectstart=E,this.formatContainer.onmousedown=E,null!=this.tabContainer&&(this.tabContainer.onselectstart=E),mxClient.IS_IOS&&(f=function(){var Y=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var da=+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{Y=[parseInt(da[1],10),parseInt(da[2],10),parseInt(da[3]||0,10)]}catch(ha){}}return Y}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(Y){if(null!=Y){var da=mxEvent.getSource(Y);if("A"==da.nodeName)for(;null!=da;){if("geHint"==da.className)return!0;da=da.parentNode}}return E(Y)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&+(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var Q=y.graphHandler.start;y.graphHandler.start=function(){null!=u.hoverIcons&&u.hoverIcons.reset();Q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Y){var da=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(Y)-da.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(Y)-da.y-this.diagramContainer.clientHeight?+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(Y,da){return u.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(Y){16==Y.which?this.shiftDown=!0:32!=Y.which||y.isEditing()?mxEvent.isConsumed(Y)||27!=Y.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",y.isEditing()||+mxEvent.getSource(Y)!=y.container||mxEvent.consume(Y))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(Y){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(Y){return g.apply(this,arguments)||u.isSpaceDown()||mxEvent.isMouseEvent(Y.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(Y.getEvent()))&&+(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var m=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(Y){return m.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return u.isSpaceDown()||n.apply(this,arguments)};var x=mxUtils.bind(this,+function(){if(null!=this.toolbar)for(var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,da=this.toolbar.container.firstChild;null!=da;){var ha=da.getAttribute("data-min-width");null!=ha&&parseInt(ha)>Y?da.style.display="none":da.style.display="";da=da.nextSibling}}),F=!1,I=null,M=null,L=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var Y=this.toolbar.container.firstChild,da=[];null!=Y;){var ha=Y.nextSibling;+Y.parentNode.removeChild(Y);da.push(Y);Y=ha}Y=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var Z=0;Z<L.length;Z++)this.toolbar.container.appendChild(L[Z]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=M}F=y.cellEditor.isContentEditing();I=Y;M=ha;L=da;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",x);mxEvent.addListener(window,+"resize",x);x();var aa=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){aa.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var Y=!1,da=function(){Y||(Y=!0,window.setTimeout(function(){var ha=y.getSelectedEditingElement();null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=u.toolbar&&(u.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),u.toolbar.setFontSize(parseInt(ha.fontSize))));Y=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",da);mxEvent.addListener(y.cellEditor.textarea,+"touchend",da);mxEvent.addListener(y.cellEditor.textarea,"mouseup",da);mxEvent.addListener(y.cellEditor.textarea,"keyup",da);da()}};var ja=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(Y,da){try{ja.apply(this,arguments),K()}catch(ha){u.handleError(ha)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(Y){}var ca=y.fireMouseEvent;y.fireMouseEvent=function(Y,da,ha){try{Y==+mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(Z){u.handleError(Z)}};var ba=y.foldCells;y.foldCells=function(Y,da,ha,Z,k){try{ba.apply(this,arguments)}catch(v){u.handleError(v)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(Y,da,ha){this.menus.createPopupMenu(Y,da,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(Y){y.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);+this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(Y,da){var ha=[da.getProperty("cell")];da.getProperty("terminalInserted")&&(ha.push(da.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(ha[ha.length-1]))},0));y.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(Y,da){Y=da.getProperty("force");(this.updateDefaultStyle||Y)&&y.copyCellStyles(da.getProperty("cells"),+da.getProperty("keys"),da.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==y.currentEdgeStyle.edgeStyle&&"1"==y.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==y.currentEdgeStyle.edgeStyle||"none"==y.currentEdgeStyle.edgeStyle||null==y.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==y.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==y.currentEdgeStyle.edgeStyle?"vertical"==y.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==y.currentEdgeStyle.edgeStyle?"vertical"==y.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):"filledEdge"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.filledEdgeImage.src):"pipe"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.pipeEdgeImage.src):"wire"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,-Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=y.currentVertexStyle.fontFamily||"Helvetica",ca=String(y.currentVertexStyle.fontSize||"12"),ha=y.getView().getState(y.getSelectionCell());null!=ha&&(X=ha.style[mxConstants.STYLE_FONTFAMILY]||X,ca=ha.style[mxConstants.STYLE_FONTSIZE]||ca,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ca)}),-y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(X,ca){X=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&&y.getModel().isLayer(ca)&&!y.isCellVisible(ca)&&null!=X&&0<X.length&&y.getModel().setVisible(ca,!0)});Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var X=y.getLayerForCells(y.getSelectionCells());null!=X&&y.setDefaultParent(X)}});-this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});+Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var Y=y.currentVertexStyle.fontFamily||"Helvetica",da=String(y.currentVertexStyle.fontSize||"12"),ha=y.getView().getState(y.getSelectionCell());null!=ha&&(Y=ha.style[mxConstants.STYLE_FONTFAMILY]||Y,da=ha.style[mxConstants.STYLE_FONTSIZE]||da,10<Y.length&&(Y=Y.substring(0,8)+"..."));this.toolbar.setFontName(Y);this.toolbar.setFontSize(da)}),+y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(Y,da){Y=da.getProperty("cells");da=da.getProperty("parent");null!=da&&y.getModel().isLayer(da)&&!y.isCellVisible(da)&&null!=Y&&0<Y.length&&y.getModel().setVisible(da,!0)});Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var Y=y.getLayerForCells(y.getSelectionCells());null!=Y&&y.setDefaultParent(Y)}});+this.gestureHandler=mxUtils.bind(this,function(Y){null!=this.currentMenu&&mxEvent.getSource(Y)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=null;this.windowResized()}),100)});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(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;EditorUi.parsePng=function(b,f,l){function u(H,S){var E=q;q+=S;return H.substring(E,q)}function y(H){H=u(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var B=u(b,4);if(null!=f&&f(q-8,B,l))break;value=u(b,l);u(b,4);if("IEND"==B)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);@@ -2130,44 +2130,44 @@ EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipb0),g=0;g<E.length;g++){Q.add(c,E[g]);var m=q.view.getState(B[g]);if(null!=m){var n=q.getCellGeometry(E[g]);null!=n&&n.relative&&!Q.isEdge(B[g])&&null==S[mxObjectIdentity.get(Q.getParent(B[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(H,S),E);mxClipboard.insertCount=1;mxClipboard.setCells(E)}b.updatePasteActionStates();return B};var l=mxClipboard.paste;mxClipboard.paste=function(q){var B=null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=l.apply(this,arguments);b.updatePasteActionStates();return B};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,B){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;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 U=this.graph.getPageLayout(),Y=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*Y.width),this.scale*(this.translate.y+U.y*Y.height),this.scale*U.width*Y.width,-this.scale*U.height*Y.height)};b.getPreferredPageSize=function(U,Y,fa){U=this.getPageLayout();Y=this.getPageSize();return new mxRectangle(0,0,U.width*Y.width,U.height*Y.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,Y,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,-Ja=mxRectangle.fromRectangle(la);Ja.x=Ja.x/wa-ya.x;Ja.y=Ja.y/wa-ya.y;Ja.width/=wa;Ja.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(Y||1,Ga/Ja.width)):wa;Y=(Ga-U*Ja.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ja.height)/this.lightboxVerticalDivider/U;qa&&(Y=Math.max(Y,0),Ma=Math.max(Ma,-0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(Y-Ja.x),Math.floor(Ma-Ja.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+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 U=this.graph.getPageLayout(),X=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*X.width),this.scale*(this.translate.y+U.y*X.height),this.scale*U.width*X.width,+this.scale*U.height*X.height)};b.getPreferredPageSize=function(U,X,fa){U=this.getPageLayout();X=this.getPageSize();return new mxRectangle(0,0,U.width*X.width,U.height*X.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,X,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,+Ja=mxRectangle.fromRectangle(la);Ja.x=Ja.x/wa-ya.x;Ja.y=Ja.y/wa-ya.y;Ja.width/=wa;Ja.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(X||1,Ga/Ja.width)):wa;X=(Ga-U*Ja.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ja.height)/this.lightboxVerticalDivider/U;qa&&(X=Math.max(X,0),Ma=Math.max(Ma,+0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(X-Ja.x),Math.floor(Ma-Ja.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",u)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=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 q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,Y,fa){B++;-var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var H=Graph.sanitizeLink(y.backBtn.url);null!=H&&q(mxUtils.bind(this,function(U){window.location.href=+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,X,fa){B++;+var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",X);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var H=Graph.sanitizeLink(y.backBtn.url);null!=H&&q(mxUtils.bind(this,function(U){window.location.href=H;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),E=document.createElement("div");E.style.fontFamily=Editor.defaultHtmlFont;E.style.display="inline-block";E.style.verticalAlign="top";E.style.fontWeight="bold";E.style.marginTop="8px";E.style.fontSize="14px";E.style.cursor="default";E.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(E);var Q=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){E.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(E,U+1+" / "+this.pages.length);E.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());Q.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";Q.style.paddingLeft="4px";Q.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(Q.style.display="",S.style.display=-"",E.style.display="inline-block"):(Q.style.display="none",S.style.display="none",E.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(E);Y.popup(fa.x,fa.y+E.offsetHeight,null,U);mxEvent.addListener(Y.div,-"mouseleave",mxUtils.bind(this,function(){Y.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?+"",E.style.display="inline-block"):(Q.style.display="none",S.style.display="none",E.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(U){var X=new mxPopupMenu(m.funct);X.smartSeparators=!0;X.showDisabled=!0;X.autoExpand=!0;X.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(X,arguments);X.destroy()});var fa=mxUtils.getOffset(E);X.popup(fa.x,fa.y+E.offsetHeight,null,U);mxEvent.addListener(X.div,+"mouseleave",mxUtils.bind(this,function(){X.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(U)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,x=null,F=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),600)}),U||200)}),I=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var Y=M.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=-Y.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));Y=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-Y.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){M.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(U)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var K=this.lightboxToolbarActions[g];K.elem=q(K.fn,K.icon,K.tooltip)}if(null!=y.refreshBtn){var aa=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);q(mxUtils.bind(this,function(U){null!=-aa?window.location.href=aa:window.location.reload();mxEvent.consume(U)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(U){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(U)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&q(mxUtils.bind(this,function(U){"1"==urlParams.close||y.closeBtn?window.close():(this.destroy(),mxEvent.consume(U))}),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(U){mxEvent.isTouchEvent(U)||-(mxEvent.isShiftDown(U)||I(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?F():I(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||I(30)}));var ia=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,Y){this.startX=Y.getGraphX();this.startY=Y.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,Y){},mouseUp:function(U,Y){mxEvent.isTouchEvent(Y.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ia&&Math.abs(this.scrollTop-b.container.scrollTop)<-ia&&Math.abs(this.startX-Y.getGraphX())<ia&&Math.abs(this.startY-Y.getGraphY())<ia&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ba=new mxPoint,oa=!1,X=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&X!=l.currentPage){X=l.currentPage;oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,-!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var Y=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(Y.x!=this.translate.x||Y.y!=this.translate.y)this.invalidate(),this.translate.x=Y.x,this.translate.y=Y.y}Y=b.getPagePadding();var fa=b.getPageSize();U=Y.x-(this.x0||0)*fa.width;Y=Y.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=Y)this.invalidate(),this.translate.x=U,this.translate.y=Y}da.apply(this,-arguments)};if(!b.isViewer()){var ca=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var Y=this.getPageLayout(),fa=this.getDefaultTranslate(Y),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=Y.x;this.view.y0=Y.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;U||(this.container.scrollLeft+=Math.round((fa.x-na)*-this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}ca.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=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)),Z.style.transformOrigin="",ha.style.transformOrigin="",mxClient.IS_SF?(Z.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){Z.style.transform="";ha.style.transform=""},0)):(Z.style.transform="",ha.style.transform=""),b.view.getDecoratorPane().style.opacity=-"",b.view.getOverlayPane().style.opacity="");var Y=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=J&&(la+=Y.x-J.x,qa+=Y.y-J.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||-0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,Y,fa,na){na=null!=na?na:this.zoomFactor;(Y=Y||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?-this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*-this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=Z.getAttribute("filter")&&(T=Z.getAttribute("filter"),Z.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=Y||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-b.container.offsetLeft;var la=Y||null==v?b.container.scrollTop+b.container.clientHeight/-2:v.y+b.container.scrollTop-b.container.offsetTop;Z.style.transformOrigin=na+"px "+la+"px";Z.style.transform="scale("+U+")";ha.style.transformOrigin=na+"px "+la+"px";ha.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(Y||null==v?b.container.clientWidth/2+b.container.scrollLeft-na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+-"px")+" "+(Y||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",U))}V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,-function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,Y,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+-(Y?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(Y?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/-20*(fa-1),na=-1),b.lazyZoom(Y,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),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)};+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var X=M.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=+X.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));X=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+X.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){M.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();+else if("_blank"==this.editor.editButtonLink){var X=null!=this.currentPage?this.currentPage.getId():null;this.editor.editAsNew(this.getEditBlankXml(),null,null,X)}else b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(U)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var K=this.lightboxToolbarActions[g];K.elem=q(K.fn,K.icon,K.tooltip)}if(null!=y.refreshBtn){var aa=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);+q(mxUtils.bind(this,function(U){null!=aa?window.location.href=aa:window.location.reload();mxEvent.consume(U)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(U){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(U)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&+("1"==urlParams.close||this.container!=document.body))&&q(mxUtils.bind(this,function(U){"1"==urlParams.close||y.closeBtn?window.close():(this.destroy(),mxEvent.consume(U))}),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(U){mxEvent.isTouchEvent(U)||(mxEvent.isShiftDown(U)||I(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?+F():I(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||I(30)}));var ja=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,X){},mouseUp:function(U,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-+b.container.scrollLeft)<ja&&Math.abs(this.scrollTop-b.container.scrollTop)<ja&&Math.abs(this.startX-X.getGraphX())<ja&&Math.abs(this.startY-X.getGraphY())<ja&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ca=b.view.validate,ba=new mxPoint,oa=!1,Y=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&Y!=l.currentPage){Y=l.currentPage;+oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var X=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(X.x!=this.translate.x||X.y!=this.translate.y)this.invalidate(),this.translate.x=X.x,this.translate.y=X.y}X=b.getPagePadding();var fa=b.getPageSize();U=X.x-(this.x0||0)*fa.width;X=X.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=X)this.invalidate(),+this.translate.x=U,this.translate.y=X}ca.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var X=this.getPageLayout(),fa=this.getDefaultTranslate(X),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=X.x;this.view.y0=X.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;+U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=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)),Z.style.transformOrigin="",ha.style.transformOrigin="",mxClient.IS_SF?(Z.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){Z.style.transform="";ha.style.transform=""},0)):(Z.style.transform=+"",ha.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var X=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=J&&(la+=X.x-J.x,qa+=X.y-J.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-+1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,X,fa,na){na=null!=na?na:this.zoomFactor;(X=X||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop++b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*+100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=Z.getAttribute("filter")&&(T=Z.getAttribute("filter"),Z.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=X||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-+b.container.offsetLeft;var la=X||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;Z.style.transformOrigin=na+"px "+la+"px";Z.style.transform="scale("+U+")";ha.style.transformOrigin=na+"px "+la+"px";ha.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(X||null==v?b.container.clientWidth/2+b.container.scrollLeft-+na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+"px")+" "+(X||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview",+"factor",U))}V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,X,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),+na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(X?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(X?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):+null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),na=-1),b.lazyZoom(X,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),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;if(null!=this.format){var f=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+f+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),1E3*f)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var f=urlParams.border,l=60;null!=f&&(l=parseInt(f));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(l,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};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};@@ -2278,13 +2278,13 @@ mxShape.prototype.getConstraints=function(b,f,l){return null};mxImageShape.protoGraph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,E=null,Q=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(J.cell);if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),V=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=V+2;T.grow(V);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+-N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){V*=v;var Y=2*V;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,Y))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,Y,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,Y))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,Y,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,+N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){V*=v;var X=2*V;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,X))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,X,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,X))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,X,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(V=N.getHandleForEvent(k),null!=V&&(N.start(k.getGraphX(),k.getGraphY(),V),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(N=this.getActualStartSize(J.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(N.x-N.width-1)*v+(0==N.x?J.width:0),J.y,1,J.height))||(0<N.y||0<N.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(N.y-N.height-1)*v+(0==N.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(J.cell),null!=N&&null!=N.customHandles&&(V=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),V),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(B=new mxPoint(k.getGraphX(),k.getGraphY()),Q=this.isCellSelected(J.cell),S=J,H=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?E=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(E=v.getHandleForEvent(k))))}}));this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=B&&null!=S&&null!=H){if(J=S,null!=E||Math.abs(B.x-v.getGraphX())>N||Math.abs(B.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=-T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),Y=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=N&&(V=E,null==V&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?V=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?V=T.bends.length-1:null!=N&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&-(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,B.x,B.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!Y&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?+T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),X=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=N&&(V=E,null==V&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?V=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?V=T.bends.length-1:null!=N&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&+(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,B.x,B.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!X&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());Q=!1;B=H=S=E=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=J.absolutePoints,null!=N)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(J.x,@@ -2292,16 +2292,16 @@ J.y-2,J.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRecV=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*V+(0==N.x?v.width*V:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*V+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){E=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*V,(U.y*J+N.y)*V,T*V,J*V));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*V,((U.y+Y)*J+N.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=+this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)v.push(new mxRectangle(((U.x+X)*T+N.x)*V,(U.y*J+N.y)*V,T*V,J*V));for(X=1;X<U.height;X++)v.push(new mxRectangle((U.x*T+N.x)*V,((U.y+X)*J+N.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,N=[],T=0;T<v.length;T++){var V=this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==V||J.get(V)||(J.put(V,!0),N.push(V))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,N,T,V){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),M=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;L.apply(this,arguments);k!=this.currentState?(I=(new Date).getTime(),M=0):M=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<M||(null==this.currentState||-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(k){return aa.apply(this,arguments)||mxEvent.isShiftDown(k)};var ia=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ia=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=-ia)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var da=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return da.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(k){return aa.apply(this,arguments)||mxEvent.isShiftDown(k)};var ja=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ja=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=+ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(k,v){var J=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,J,null,!0);if(this.isToggleEvent(v))for(J=-0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:X.apply(this,arguments)};var ca=this.updateMouseEvent;this.updateMouseEvent=function(k){k=ca.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),+0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var Y=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:Y.apply(this,arguments)};var da=this.updateMouseEvent;this.updateMouseEvent=function(k){k=da.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ha=this.isCellSelectable;this.isCellSelectable=function(k){return ha.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var Z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),Z=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var J=v.getProperty("cell");null==J?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,k.y)):null!=Z?this.addSelectionCells(Z):1<this.getSelectionCount()&&this.isCellSelected(J)&&this.removeSelectionCell(J);Z=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var J=k.view.graph;return v&&(J.isCellSelected(k.cell)||J.isTableRow(k.cell)&&J.selectionCellsHandler.isHandled(J.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,@@ -2334,14 +2334,14 @@ Graph.fadeNodes=function(b,f,l,u,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function B(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=l&&null!=l.pageSize?l.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=u.model.getCell(x.sourceCellId),I=u.getEdges(F,null,!0,!0,!1,!0),M=[],L=0;L<I.length;L++)null!=I[L].getTerminal(!0)&&null!=I[L].getTerminal(!1)&&u.isCellVisible(I[L])&&!u.isEdgeIgnored(I[L])&&u.isCellVisible(I[L].getTerminal(!0))&&u.isCellVisible(I[L].getTerminal(!1))&&u.isCellVisible(u.getLayerForCell(I[L]))&&M.push(I[L]);M=I=M;if(null!=g.startIndex||0<pageSize&&I.length>pageSize){var K=g.startIndex||0;M=I.slice(Math.max(0,K),Math.min(I.length,K+pageSize))}M=u.getOpposites(M,F).concat(M);var aa=c.cloneCells(M);for(L=0;L<M.length;L++)if(aa[L].sourceCellId=M[L].id,c.model.isEdge(aa[L]))for(aa[L].geometry.x=0,aa[L].geometry.y=0,aa[L].geometry.points=null,aa[L].setStyle(aa[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),-aa[L].setTerminal(x,null==aa[L].getTerminal(!0)),F=0;F<aa[L].getChildCount();F++){var ia=aa[L].getChildAt(F);null!=ia.geometry&&ia.geometry.relative&&(ia.setStyle(ia.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ia.geometry.offset=new mxPoint(0,0),ia.geometry.y=0,ia.geometry.x=.5>ia.geometry.x?-.8:.5<ia.geometry.x?.8:0)}if(0<g.startIndex){var da=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(I.length/pageSize)+")",-0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=x;da.startIndex=Math.max(0,(g.startIndex||0)-pageSize);aa.splice(0,0,da)}if(I.length>(g.startIndex||0)+pageSize){var ba=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(I.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ba.referenceCell=x;ba.startIndex=(g.startIndex||0)+pageSize;aa.splice(0,0,ba)}for(var oa in c.getModel().cells){var X=-c.getModel().getCell(oa);X!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,X)&&c.getModel().isVertex(X)&&c.removeCells([X])}c.addCells(aa);var ca=c.getModel().getGeometry(c.rootCell);null!=ca&&(ca=ca.clone(),ca.x=m-ca.width/2,ca.y=n-ca.height/3,c.getModel().setGeometry(c.rootCell,ca));g=[];for(oa in c.getModel().cells)X=c.getModel().getCell(oa),X!=c.rootCell&&c.getModel().isVertex(X)&&c.getModel().getParent(X)==c.getDefaultParent()&&(g.push(X),ca=c.getModel().getGeometry(X),null!=ca&&(ca.x=m-ca.width/-2,ca.y=n-ca.height/2));var ha=g.length,Z=2*Math.PI/ha,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ha;m++)ca=c.getModel().getGeometry(g[m]),null!=ca&&(ca=ca.clone(),ca.x+=k*Math.sin(m*Z),ca.y+=k*Math.cos(m*Z),c.getModel().setGeometry(g[m],ca))}finally{c.getModel().endUpdate()}}}var H=document.createElement("div");H.style.position="absolute";H.style.display="block";H.style.overflow="auto";H.style.width="100%";H.style.height="100%";H.style.left=+aa[L].setTerminal(x,null==aa[L].getTerminal(!0)),F=0;F<aa[L].getChildCount();F++){var ja=aa[L].getChildAt(F);null!=ja.geometry&&ja.geometry.relative&&(ja.setStyle(ja.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ja.geometry.offset=new mxPoint(0,0),ja.geometry.y=0,ja.geometry.x=.5>ja.geometry.x?-.8:.5<ja.geometry.x?.8:0)}if(0<g.startIndex){var ca=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(I.length/pageSize)+")",+0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=x;ca.startIndex=Math.max(0,(g.startIndex||0)-pageSize);aa.splice(0,0,ca)}if(I.length>(g.startIndex||0)+pageSize){var ba=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(I.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ba.referenceCell=x;ba.startIndex=(g.startIndex||0)+pageSize;aa.splice(0,0,ba)}for(var oa in c.getModel().cells){var Y=+c.getModel().getCell(oa);Y!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,Y)&&c.getModel().isVertex(Y)&&c.removeCells([Y])}c.addCells(aa);var da=c.getModel().getGeometry(c.rootCell);null!=da&&(da=da.clone(),da.x=m-da.width/2,da.y=n-da.height/3,c.getModel().setGeometry(c.rootCell,da));g=[];for(oa in c.getModel().cells)Y=c.getModel().getCell(oa),Y!=c.rootCell&&c.getModel().isVertex(Y)&&c.getModel().getParent(Y)==c.getDefaultParent()&&(g.push(Y),da=c.getModel().getGeometry(Y),null!=da&&(da.x=m-da.width/+2,da.y=n-da.height/2));var ha=g.length,Z=2*Math.PI/ha,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ha;m++)da=c.getModel().getGeometry(g[m]),null!=da&&(da=da.clone(),da.x+=k*Math.sin(m*Z),da.y+=k*Math.cos(m*Z),c.getModel().setGeometry(g[m],da))}finally{c.getModel().endUpdate()}}}var H=document.createElement("div");H.style.position="absolute";H.style.display="block";H.style.overflow="auto";H.style.width="100%";H.style.height="100%";H.style.left="0px";H.style.top="0px";H.style.zIndex=2;H.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";H.appendChild(S);var E=document.createElement("div");E.style.position="absolute";E.style.cursor="pointer";E.style.right="38px";E.style.top="14px";E.style.textAlign="right";E.style.verticalAlign="top";mxUtils.write(E,mxResources.get("close"));H.appendChild(E);document.body.appendChild(H);var Q=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",Q);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",Q);c.parentNode.removeChild(c);u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(E,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?B(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x--F.geometry.height/2;g.model.endUpdate();var I=!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){I||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,I=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var aa=K.layout;K.layout=function(ia){K.spacing=Math.min(60,Math.max(30,60-5*ia.length));aa.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();+F.geometry.height/2;g.model.endUpdate();var I=!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){I||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,I=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var aa=K.layout;K.layout=function(ja){K.spacing=Math.min(60,Math.max(30,60-5*ja.length));aa.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);I=!1}))});B(g,F)})(H)})(b,f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(u=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,u.outerHTML))}b=l}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};@@ -2370,7 +2370,7 @@ delete H[Q]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStthis.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,E){null!=B&&(E||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(Q){return 0>mxUtils.indexOf(S,Q)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,S,E,Q,c,g){var m=!1,n=!1;if(0<B.length)for(var x=0;x<B.length&&(m=this.getModel().isVertex(B[x])||m,!(n=this.getModel().isEdge(B[x])||n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<H.length;x++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[x]),"strokeColor"!=H[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,H[x])||"shape"==H[x])if("shape"!=H[x]&&(m||B)&&(null==S[x]?delete E[H[x]]:E[H[x]]=S[x]),n||B)null==S[x]?delete Q[H[x]]:Q[H[x]]=S[x]};Graph.prototype.includeDescendants=function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,E,Q){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;Q=null!=Q?Q:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<B.length;c++){var g=B[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!E)for(var F=null!=m?m.split(";"):[],I=0;I<F.length;I++){var M=F[I],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),aa=mxUtils.indexOf(x,K);0<=aa&&x.splice(aa,-1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ia=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ia,K))for(var da=0;da<ia.length;da++){var ba=mxUtils.indexOf(x,ia[da]);0<=ba&&x.splice(ba,1)}}}}var oa=this.model.isEdge(g);n=oa?S:H;for(I=0;I<x.length;I++){K=x[I];var X=n[K];null!=X&&("edgeStyle"!=K||Q)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,X),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==X&&null==n.curved&&+1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ja=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ja,K))for(var ca=0;ca<ja.length;ca++){var ba=mxUtils.indexOf(x,ja[ca]);0<=ba&&x.splice(ba,1)}}}}var oa=this.model.isEdge(g);n=oa?S:H;for(I=0;I<x.length;I++){K=x[I];var Y=n[K];null!=Y&&("edgeStyle"!=K||Q)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,Y),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==Y&&null==n.curved&&(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var E=this.getCellStyle(H[S],!1),Q=E[mxConstants.STYLE_PERIMETER],c=!1;for(m in B){var g=B[m];if(E[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==E[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[H[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,Q,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,E,Q,c){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,E,Q,c){E=null!=E?E:!0;Q=null!=Q?Q:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(B,H,m,E,Q,@@ -2435,9 +2435,9 @@ Graph.prototype.connectVertex=function(b,f,l,u,y,q,B,H){q=q?q:!1;if(b.geometry.rmxConstants.DIRECTION_SOUTH?(Q.x+=E.geometry.width/2,Q.y+=E.geometry.height+l):(Q.x=f==mxConstants.DIRECTION_WEST?Q.x-l:Q.x+(E.geometry.width+l),Q.y+=E.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;E=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(E=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(Q.x+=b.parent.geometry.x,Q.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(E+Q.x*l,g+Q.y*l)).grow(40*l);q=null!=q?this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var I=!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;I&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?Q.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=b.geometry.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-b.geometry.width/2:Q.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==B||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&I){var aa=this.getAbsoluteParent(null!=K?K:b);aa=S?b:this.getCompositeParent(aa);L=null!=K?K:this.duplicateCells([aa],-!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(L);null!=ia&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?Q.y-=ia.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=ia.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-ia.width/2:Q.x+ia.width/2),ia.x=Q.x-ia.width/2,ia.y=Q.y-ia.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):I&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(u)&&-mxEvent.isShiftDown(u)&&I||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=da&&(M.push(da),this.applyNewEdgeStyle(b,[da],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==n&&null!=L&&M.push(L);null==L&&null!=da&&da.geometry.setTerminalPoint(Q,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==B||null!=L||!I||null==n&&S)return y(L);B(E+Q.x*l,g+Q.y*l,y)};+!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ja=this.getCellGeometry(L);null!=ja&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?Q.y-=ja.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=ja.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-ja.width/2:Q.x+ja.width/2),ja.x=Q.x-ja.width/2,ja.y=Q.y-ja.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):I&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&+mxEvent.isShiftDown(u)&&I||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(Q,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==B||null!=L||!I||null==n&&S)return y(L);B(E+Q.x*l,g+Q.y*l,y)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),null==l&&(l=f.getAttribute("label")||"");return l||""}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,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2531,13 +2531,13 @@ arguments);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.stylg)for(var m=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=m&&m!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==m&&(m=g[n].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var l=mxShape.prototype.paint;mxShape.prototype.paint=function(c){l.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var u=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(c){c=u.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var y=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,g){return y.apply(this,arguments)||null!=c.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,c.routedPoints)};var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var m=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(Z,k,v){var J=new mxPoint(k,v);J.type=Z;n.push(J);-J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=Z||J.x!=k||J.y!=v},F=.5*this.scale;m=!1;n=[];for(var I=0;I<g.length-1;I++){for(var M=g[I+1],L=g[I],K=[],aa=g[I+2];I<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,aa.x,aa.y,M.x,M.y)<1*this.scale*this.scale;)M=aa,I++,aa=g[I+2];m=x(0,L.x,L.y)||m;for(var ia=0;ia<this.validEdges.length;ia++){var da=this.validEdges[ia],ba=da.absolutePoints;if(null!=ba&&mxUtils.intersects(c,da)&&"1"!=da.style.noJump){var oa=null;for(da=0;da<ba.length--1;da++){var X=ba[da+1],ca=ba[da];for(aa=ba[da+2];da<ba.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,aa.x,aa.y,X.x,X.y)<1*this.scale*this.scale;)X=aa,da++,aa=ba[da+2];var ha=mxUtils.intersection(L.x,L.y,M.x,M.y,ca.x,ca.y,X.x,X.y);if(null!=ha&&(Math.abs(ha.x-L.x)>F||Math.abs(ha.y-L.y)>F)&&(Math.abs(ha.x-M.x)>F||Math.abs(ha.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,ca.x,ca.y)>F)&&(null==aa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,aa.x,aa.y)>F||mxUtils.ptLineDist(L.x,-L.y,M.x,M.y,X.x,X.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=ca}}}for(da=0;da<K.length;da++)m=x(1,K[da].x,K[da].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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)B.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ia=0;ia<this.state.routedPoints.length;ia++){var da=-this.state.routedPoints[ia],ba=new mxPoint(da.x/this.scale,da.y/this.scale);0==ia?ba=g[0]:ia==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var oa=!1;if(null!=M&&1==da.type){var X=this.state.routedPoints[ia+1];da=X.x/this.scale-ba.x;X=X.y/this.scale-ba.y;da=da*da+X*X;null==aa&&(aa=new mxPoint(ba.x-M.x,ba.y-M.y),L=Math.sqrt(aa.x*aa.x+aa.y*aa.y),0<L?(aa.x=aa.x*x/L,aa.y=aa.y*x/L):aa=null);da>x*x&&0<L&&(da=M.x-ba.x,X=M.y-ba.y,da=da*da+X*X,da>x*x&&(oa=new mxPoint(ba.x-aa.x,ba.y-aa.y),da=new mxPoint(ba.x+-aa.x,ba.y+aa.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,I),K=0>Math.round(aa.x)||0==Math.round(aa.x)&&0>=Math.round(aa.y)?1:-1,I=!1,"sharp"==F?(c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.lineTo(da.x-aa.y*K,da.y+aa.x*K),c.lineTo(da.x,da.y)):"line"==F?(c.moveTo(oa.x+aa.y*K,oa.y-aa.x*K),c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.moveTo(da.x-aa.y*K,da.y+aa.x*K),c.lineTo(da.x+aa.y*K,da.y-aa.x*K),c.moveTo(da.x,da.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-aa.y*K,oa.y+aa.x*K,da.x-aa.y*K,da.y+aa.x*K,da.x,da.y)):(c.moveTo(da.x,-da.y),I=!0),K=[da],oa=!0))}else aa=null;oa||(K.push(ba),M=ba)}this.addPoints(c,K,m,n,!1,null,I);c.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==+J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=Z||J.x!=k||J.y!=v},F=.5*this.scale;m=!1;n=[];for(var I=0;I<g.length-1;I++){for(var M=g[I+1],L=g[I],K=[],aa=g[I+2];I<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,aa.x,aa.y,M.x,M.y)<1*this.scale*this.scale;)M=aa,I++,aa=g[I+2];m=x(0,L.x,L.y)||m;for(var ja=0;ja<this.validEdges.length;ja++){var ca=this.validEdges[ja],ba=ca.absolutePoints;if(null!=ba&&mxUtils.intersects(c,ca)&&"1"!=ca.style.noJump){var oa=null;for(ca=0;ca<ba.length-+1;ca++){var Y=ba[ca+1],da=ba[ca];for(aa=ba[ca+2];ca<ba.length-2&&mxUtils.ptSegDistSq(da.x,da.y,aa.x,aa.y,Y.x,Y.y)<1*this.scale*this.scale;)Y=aa,ca++,aa=ba[ca+2];var ha=mxUtils.intersection(L.x,L.y,M.x,M.y,da.x,da.y,Y.x,Y.y);if(null!=ha&&(Math.abs(ha.x-L.x)>F||Math.abs(ha.y-L.y)>F)&&(Math.abs(ha.x-M.x)>F||Math.abs(ha.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,da.x,da.y)>F)&&(null==aa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,aa.x,aa.y)>F||mxUtils.ptLineDist(L.x,+L.y,M.x,M.y,Y.x,Y.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=da}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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)B.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var ca=+this.state.routedPoints[ja],ba=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ja?ba=g[0]:ja==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var Y=this.state.routedPoints[ja+1];ca=Y.x/this.scale-ba.x;Y=Y.y/this.scale-ba.y;ca=ca*ca+Y*Y;null==aa&&(aa=new mxPoint(ba.x-M.x,ba.y-M.y),L=Math.sqrt(aa.x*aa.x+aa.y*aa.y),0<L?(aa.x=aa.x*x/L,aa.y=aa.y*x/L):aa=null);ca>x*x&&0<L&&(ca=M.x-ba.x,Y=M.y-ba.y,ca=ca*ca+Y*Y,ca>x*x&&(oa=new mxPoint(ba.x-aa.x,ba.y-aa.y),ca=new mxPoint(ba.x++aa.x,ba.y+aa.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,I),K=0>Math.round(aa.x)||0==Math.round(aa.x)&&0>=Math.round(aa.y)?1:-1,I=!1,"sharp"==F?(c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.lineTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+aa.y*K,oa.y-aa.x*K),c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.moveTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x+aa.y*K,ca.y-aa.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-aa.y*K,oa.y+aa.x*K,ca.x-aa.y*K,ca.y+aa.x*K,ca.x,ca.y)):(c.moveTo(ca.x,+ca.y),I=!0),K=[ca],oa=!0))}else aa=null;oa||(K.push(ba),M=ba)}this.addPoints(c,K,m,n,!1,null,I);c.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),I=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=I){var L=Math.cos(-I),K=Math.sin(-I);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);x=this.getPerimeterPoint(g,x,0==I&&F,L);0!=I&&(L=Math.cos(I),K=Math.sin(I),x=mxUtils.getRotatedPoint(x,L,K,M));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,m,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,m,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=m=null;if(null!=c)for(var F=0;F<c.length;F++){var I=this.graph.getConnectionPoint(g,c[F]);if(null!=I){var M=(I.x-x.x)*(I.x-x.x)+(I.y-x.y)*(I.y-x.y);if(null==n||M<n)m=I,n=M}}null!=m&&(x=m)}return x};var E=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,m){var n=E.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=m.state&&(n=m.state.view.graph.replacePlaceholders(m.state.cell,n));return n};var Q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,@@ -2555,110 +2555,110 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#005;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" 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="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(C){return!mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(C){return l.apply(this,arguments)||this.graph.isTableRow(C)||this.graph.isTableCell(C)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(C){return u.apply(this,arguments)||this.graph.isEdgeIgnored(C)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(C){return this.graph.isCloneEvent(C)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var C=new mxEllipse(null,this.highlightColor,this.highlightColor,0);C.opacity=mxConstants.HIGHLIGHT_OPACITY;return C};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var P in this.graph.currentEdgeStyle)C.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)C.style[P]=W[P]}catch(ja){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var P in this.graph.currentEdgeStyle)C.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)C.style[P]=W[P]}catch(ia){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var C=q.apply(this,arguments);C.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return C};mxConnectionHandler.prototype.updatePreview=function(C){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var C=B.apply(this,arguments),P=C.getCell;C.getCell=mxUtils.bind(this,function(R){var W=P.apply(this,arguments);this.error=null;return W});return C};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var C="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",P="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<P.length;R++)null!=this.currentEdgeStyle[P[R]]&&(C+=P[R]+"="+this.currentEdgeStyle[P[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?C+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(C+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?C+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(C+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(C+="elbow="+this.currentEdgeStyle.elbow+";");return C=null!=this.currentEdgeStyle.html?C+("html="+this.currentEdgeStyle.html+";"):C+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var C=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,P){P=null!=P?P:{};for(var R=0;R<C.length;R++){var W=C[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ja=this.model.getChildCount(W),ka=0;ka<ja;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(C,P,R){R=null!=R?R:{};for(var W in C){var ja=P[W];null==R[ja]&&(R[ja]=C[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,-P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ja=new mxCodec(C.ownerDocument),ka=new mxGraphModel;ja.decode(C,ka);C=[];ja={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ja));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=-ka.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ja,ta,pa),this.updateCustomLinks(pa,C),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ia=this.getBoundingBoxFromGeometry(C,!0);null!=Ia&&this.moveCells(C,P-Ia.x,R-Ia.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var P={},R=this.cloneCells(C,null,P),W=-new mxDictionary,ja=0;ja<C.length;ja++)W.put(C[ja],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ja=0;ja<R.length;ja++){pa.add(xa,R[ja]);var ta=this.view.getState(C[ja]);if(null!=ta){var ua=this.getCellGeometry(R[ja]);null!=ua&&ua.relative&&!this.model.isEdge(C[ja])&&null==W.get(this.model.getParent(C[ja]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(P,+C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,P){P=null!=P?P:{};for(var R=0;R<C.length;R++){var W=C[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ia=this.model.getChildCount(W),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(C,P,R){R=null!=R?R:{};for(var W in C){var ia=P[W];null==R[ia]&&(R[ia]=C[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,+P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ia=new mxCodec(C.ownerDocument),ka=new mxGraphModel;ia.decode(C,ka);C=[];ia={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=+ka.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ia,ta,pa),this.updateCustomLinks(pa,C),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ia=this.getBoundingBoxFromGeometry(C,!0);null!=Ia&&this.moveCells(C,P-Ia.x,R-Ia.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var P={},R=this.cloneCells(C,null,P),W=+new mxDictionary,ia=0;ia<C.length;ia++)W.put(C[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ta=this.view.getState(C[ia]);if(null!=ta){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(C[ia])&&null==W.get(this.model.getParent(C[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(P,this.createCellLookup(C)),R);return ka.encode(pa)};Graph.prototype.isSwimlane=function(C,P){var R=null;null==C||this.model.isEdge(C)||this.model.getParent(C)==this.model.getRoot()||(R=this.getCurrentCellStyle(C,P)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(C){return null!=C&&H.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellEditable(this.model.getParent(C)):!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(C){return null!=C&&S.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellMovable(this.model.getParent(C)):!0:!1};var E=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(C){var P=this.model.getParent(C);if(null!=P){var R=this.getCurrentCellStyle(P);if(null!=R.expand)return"0"!=R.expand}return E.apply(this,arguments)&&(null==P||!this.isTable(P))};var Q=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(C,P,R,W,ja,ka,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{R=Q.apply(this,[C,P,R,W,ja,ka,pa,xa]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(P=0;P<ta.length;P++){var ua=this.getCellGeometry(ta[P]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[P])}var Ia=this.getChildCells(C,!0);for(P=0;P<Ia.length;P++)ua=this.getCellGeometry(Ia[P]),+Graph.prototype.splitEdge=function(C,P,R,W,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{R=Q.apply(this,[C,P,R,W,ia,ka,pa,xa]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(P=0;P<ta.length;P++){var ua=this.getCellGeometry(ta[P]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[P])}var Ia=this.getChildCells(C,!0);for(P=0;P<Ia.length;P++)ua=this.getCellGeometry(Ia[P]),null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Ia[P]);var Va=this.model.getTerminal(R,!1);if(null!=Va){var Wa=this.getCurrentCellStyle(Va);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(C,-P,R){if(P||R)c.apply(this,arguments);else{var W=this.getSelectionCell(),ja=null,ka=[],pa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==W)ja=ka.length-1;else if(C&&null==W&&0<ka.length||null!=ja&&C&&ka.length>ja||!C&&0<ja)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)pa(this.model.getChildAt(xa,ta))});pa(this.model.root);0<ka.length&&(ja=null!=ja?mxUtils.mod(ja+(C?1:-1),ka.length):0,this.setSelectionCell(ka[ja]))}};-Graph.prototype.swapShapes=function(C,P){if(this.model.isVertex(C)&&this.model.isVertex(P)&&2==this.getMovableCells([C,P]).length){var R=this.getCellGeometry(C),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ja=R.clone(),ka=W.clone();this.model.beginUpdate();try{ja.x=W.getCenterX()-R.width/2,ja.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(C,ja),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(C,P,R,W,ja,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ja)){for(var xa=[],ta=0;ta<C.length;ta++)this.isTable(C[ta])?xa=xa.concat(this.model.getChildCells(C[ta],!0).reverse()):xa.push(C[ta]);C=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<C.length;ta++)if(null!=ja&&this.isTableRow(C[ta])){var ua=this.model.getParent(C[ta]),Ia=this.getCellGeometry(C[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ia&&this.isTable(ua)&&this.isTable(ja)&&(W||ua!=ja)){if(!W){var Va=-this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ia.height,this.model.setGeometry(ua,Va))}Va=this.getCellGeometry(ja);null!=Va&&(Va=Va.clone(),Va.height+=Ia.height,this.model.setGeometry(ja,Va));var Wa=this.model.getChildCells(ja,!0);if(0<Wa.length){C[ta]=W?this.cloneCell(C[ta]):C[ta];var Ta=this.model.getChildCells(C[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Pa=ab.length-Ta.length;if(0<Pa)for(var Sa=0;Sa<Pa;Sa++){var gb=this.cloneCell(Ta[Ta.length-1]);null!=gb&&(gb.value="",this.model.add(C[ta],+P,R){if(P||R)c.apply(this,arguments);else{var W=this.getSelectionCell(),ia=null,ka=[],pa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==W)ia=ka.length-1;else if(C&&null==W&&0<ka.length||null!=ia&&C&&ka.length>ia||!C&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)pa(this.model.getChildAt(xa,ta))});pa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(C?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};+Graph.prototype.swapShapes=function(C,P){if(this.model.isVertex(C)&&this.model.isVertex(P)&&2==this.getMovableCells([C,P]).length){var R=this.getCellGeometry(C),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ia=R.clone(),ka=W.clone();this.model.beginUpdate();try{ia.x=W.getCenterX()-R.width/2,ia.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(C,ia),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;+Graph.prototype.moveCells=function(C,P,R,W,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<C.length;ta++)this.isTable(C[ta])?xa=xa.concat(this.model.getChildCells(C[ta],!0).reverse()):xa.push(C[ta]);C=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<C.length;ta++)if(null!=ia&&this.isTableRow(C[ta])){var ua=this.model.getParent(C[ta]),Ia=this.getCellGeometry(C[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ia&&this.isTable(ua)&&this.isTable(ia)&&(W||ua!=ia)){if(!W){var Va=+this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ia.height,this.model.setGeometry(ua,Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ia.height,this.model.setGeometry(ia,Va));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){C[ta]=W?this.cloneCell(C[ta]):C[ta];var Ta=this.model.getChildCells(C[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Pa=ab.length-Ta.length;if(0<Pa)for(var Sa=0;Sa<Pa;Sa++){var gb=this.cloneCell(Ta[Ta.length-1]);null!=gb&&(gb.value="",this.model.add(C[ta],gb))}else if(0>Pa)for(Sa=0;Sa>Pa;Sa--)this.model.remove(Ta[Ta.length+Sa-1]);Ta=this.model.getChildCells(C[ta],!0);for(Sa=0;Sa<ab.length;Sa++){var fb=this.getCellGeometry(ab[Sa]),cb=this.getCellGeometry(Ta[Sa]);null!=fb&&null!=cb&&(cb=cb.clone(),cb.width=fb.width,this.model.setGeometry(Ta[Sa],cb))}}}}var eb=g.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!W&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);W&&this.updateCustomLinks(this.createCellMapping(pa,-this.createCellLookup(C)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(C,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<C.length;W++)if(this.isTableCell(C[W])){var ja=this.model.getParent(C[W]),ka=this.model.getParent(ja);1==this.model.getChildCount(ja)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(C[W],"")}else{if(this.isTableRow(C[W])&&(ka=this.model.getParent(C[W]),+this.createCellLookup(C)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(C,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<C.length;W++)if(this.isTableCell(C[W])){var ia=this.model.getParent(C[W]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(C[W],"")}else{if(this.isTableRow(C[W])&&(ka=this.model.getParent(C[W]),0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka))){for(var pa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<pa.length;ta++)0<=mxUtils.indexOf(C,pa[ta])&&xa++;xa==pa.length&&R.push(ka)}R.push(C[W])}R=m.apply(this,[R,P])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(C,P,R){R=null!=R?R:new Graph;for(var W=0;W<P.length;W++)null!=P[W]&&R.updateCustomLinksForCell(C,P[W],R)};Graph.prototype.updateCustomLinksForCell=function(C,P){this.doUpdateCustomLinksForCell(C,P);for(var R=this.model.getChildCount(P),W=0;W<R;W++)this.updateCustomLinksForCell(C,this.model.getChildAt(P,W))};Graph.prototype.doUpdateCustomLinksForCell=function(C,P){};Graph.prototype.getAllConnectionConstraints=function(C,P){if(null!=C){P=mxUtils.getValue(C.style,"points",null);if(null!=P){C=[];try{var R=JSON.parse(P);for(P=0;P<R.length;P++){var W=R[P];C.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return C}if(null!=-C.shape&&null!=C.shape.bounds){W=C.shape.direction;P=C.shape.bounds;var ja=C.shape.scale;R=P.width/ja;P=P.height/ja;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=C.shape.getConstraints(C.style,R,P);if(null!=P)return P;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var P=this.getCurrentCellStyle(C);P=-mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[C])}};Graph.prototype.isValidRoot=function(C){for(var P=this.model.getChildCount(C),R=0,W=0;W<P;W++){var ja=this.model.getChildAt(C,W);this.model.isVertex(ja)&&(ja=this.getCellGeometry(ja),null==ja||ja.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,P,-R){for(var W=this.getCurrentCellStyle(C),ja=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ja=ja&&this.isTable(P[pa]),ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ka||ja))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,+C.shape&&null!=C.shape.bounds){W=C.shape.direction;P=C.shape.bounds;var ia=C.shape.scale;R=P.width/ia;P=P.height/ia;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=C.shape.getConstraints(C.style,R,P);if(null!=P)return P;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var P=this.getCurrentCellStyle(C);P=+mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[C])}};Graph.prototype.isValidRoot=function(C){for(var P=this.model.getChildCount(C),R=0,W=0;W<P;W++){var ia=this.model.getChildAt(C,W);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,P,+R){for(var W=this.getCurrentCellStyle(C),ia=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ia=ia&&this.isTable(P[pa]),ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ka||ia))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,arguments);C.setStyle("group");return C};Graph.prototype.isExtendParentsOnAdd=function(C){var P=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(P&&null!=C&&null!=this.layoutManager){var R=this.model.getParent(C);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(P=!1))}return P};Graph.prototype.getPreferredSizeForCell=function(C,P,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=-10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(C,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ja=0;ja<C.length;ja++){var ka=C[ja];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Ia=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,+10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(C,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ia=0;ia<C.length;ia++){var ka=C[ia];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Ia=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,!1);ta.setTerminalPoint(Ia,!0);R.setGeometry(ka,ta);var Va=this.view.getState(ka),Wa=this.view.getState(pa),Ta=this.view.getState(xa);if(null!=Va){var ab=null!=Wa?this.getConnectionConstraint(Va,Wa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ka,pa,!0,Pa);this.setConnectionConstraint(ka,xa,!1,ab);var Sa=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Sa,[ka])}W.push(ka)}}else if(R.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var gb=ta.width;ta.width=ta.height;ta.height=gb;R.setGeometry(ka,ta)}var fb=this.view.getState(ka);if(null!=fb){var cb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(fb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,cb[mxUtils.mod(mxUtils.indexOf(cb,eb)+(P?-1:1),cb.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(C){if(null!=C&&null!=C.fgNode)for(C=C.fgNode.firstChild;null!=C;){if("text"==C.nodeName&&"1"==C.getAttribute("placeholders"))return!0;C=C.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(C){if(C instanceof mxGeometryChange&&(this.isTableCell(C.cell)||this.isTableRow(C.cell))&&(null==C.previous&&null!=C.geometry||null!=C.previous&&!C.previous.equals(C.geometry))){var P=C.cell;this.isTableCell(P)&&(P=this.model.getParent(P));this.isTableRow(P)&&(P=this.model.getParent(P));var R=this.view.getState(P);null!=R&&null!=R.shape&&(this.view.invalidate(P),R.shape.bounds=null)}n.apply(this,arguments);C instanceof mxValueChange&&null!=C.cell&&null!=C.cell.value&&"object"==typeof C.cell.value&&this.invalidateDescendantsWithPlaceholders(C.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(C){C=this.model.getDescendants(C);if(0<C.length)for(var P=0;P<C.length;P++){var R=this.view.getState(C[P]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(C[P]):this.isReplacePlaceholders(C[P])&&this.view.invalidate(C[P],!1,!1)}};Graph.prototype.replaceElement=function(C,P){P=C.ownerDocument.createElement(null!=P?P:"span");for(var R=Array.prototype.slice.call(C.attributes);attr=R.pop();)P.setAttribute(attr.nodeName,attr.nodeValue);P.innerHTML=C.innerHTML;C.parentNode.replaceChild(P,C)};Graph.prototype.processElements=function(C,P){if(null!=C){C=C.getElementsByTagName("*");for(var R=0;R<C.length;R++)null!=C[R]&&P(C[R])}};Graph.prototype.updateLabelElements=function(C,P,R){C=null!=C?C:this.getSelectionCells();for(var W=document.createElement("div"),-ja=0;ja<C.length;ja++){var ka=this.getCurrentCellStyle(C[ja]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(C[ja]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(C[ja],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&-null!=C.getAttribute("placeholder"))for(var W=C.getAttribute("placeholder"),ja=C;null!=ja;){if(ja==this.model.getRoot()||null!=ja.value&&"object"==typeof ja.value&&ja.hasAttribute(W)){this.setAttributeForCell(ja,W,P);break}ja=this.model.getParent(ja)}var ka=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var P=new mxDictionary,R=0;R<C.length;R++)P.put(C[R],!0);var W=[];for(R=0;R<C.length;R++){var ja=this.model.getParent(C[R]);null==ja||P.get(ja)||(P.put(ja,!0),W.push(ja))}for(R=0;R<W.length;R++)if(ja=this.view.getState(W[R]),null!=ja&&(this.model.isEdge(ja.cell)||this.model.isVertex(ja.cell))&&this.isCellDeletable(ja.cell)&&this.isTransparentState(ja)){for(var ka=!0,pa=0;pa<this.model.getChildCount(ja.cell)&&-ka;pa++)P.get(this.model.getChildAt(ja.cell,pa))||(ka=!1);ka&&C.push(ja.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var P=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&P.push(C[R]);C=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,P){this.setAttributeForCell(C,"link",P)};Graph.prototype.setTooltipForCell=function(C,+ia=0;ia<C.length;ia++){var ka=this.getCurrentCellStyle(C[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(C[ia]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(C[ia],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&+null!=C.getAttribute("placeholder"))for(var W=C.getAttribute("placeholder"),ia=C;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(W)){this.setAttributeForCell(ia,W,P);break}ia=this.model.getParent(ia)}var ka=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var P=new mxDictionary,R=0;R<C.length;R++)P.put(C[R],!0);var W=[];for(R=0;R<C.length;R++){var ia=this.model.getParent(C[R]);null==ia||P.get(ia)||(P.put(ia,!0),W.push(ia))}for(R=0;R<W.length;R++)if(ia=this.view.getState(W[R]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&+ka;pa++)P.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&C.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var P=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&P.push(C[R]);C=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,P){this.setAttributeForCell(C,"link",P)};Graph.prototype.setTooltipForCell=function(C,P){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(C.value)&&C.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(C,R,P)};Graph.prototype.getAttributeForCell=function(C,P,R){C=null!=C.value&&"object"===typeof C.value?C.value.getAttribute(P):null;return null!=C?C:R};Graph.prototype.setAttributeForCell=function(C,P,R){if(null!=C.value&&"object"==typeof C.value)var W=C.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),W.setAttribute("label",C.value||"");null!=R?W.setAttribute(P,R):W.removeAttribute(P);this.model.setValue(C,W)};Graph.prototype.isTargetShape=function(C,P,R){C=mxUtils.getValue(this.getCurrentCellStyle(C),mxConstants.STYLE_SHAPE,"");for(R=0;R<P.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(P[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,C))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(C,P,R,W){if(mxEvent.isAltDown(P))return null;-for(var ja=0;ja<C.length;ja++){var ka=this.model.getParent(C[ja]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(C,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ja=0;ja<C.length&&pa;ja++)pa=pa&&this.isTableRow(C[ja]);pa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};-Graph.prototype.dblClick=function(C,P){this.isEnabled()&&(P=this.insertTextForEvent(C,P),mxGraph.prototype.dblClick.call(this,C,P))};Graph.prototype.insertTextForEvent=function(C,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ja=mxEvent.getSource(C);this.firstClickState!=W||this.firstClickSource!=ja||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&-(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(C)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ja==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var C=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ja=this.getPageSize();P=Math.max(P,W.x*ja.width);R=Math.max(R,W.y*ja.height)}return new mxPoint(this.snap(P+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(){var C=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/C.scale-C.translate.x+(0==P.width?2*this.gridSize:0))));C=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/C.scale-+for(var ia=0;ia<C.length;ia++){var ka=this.model.getParent(C[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(C,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ia=0;ia<C.length&&pa;ia++)pa=pa&&this.isTableRow(C[ia]);pa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};+Graph.prototype.dblClick=function(C,P){this.isEnabled()&&(P=this.insertTextForEvent(C,P),mxGraph.prototype.dblClick.call(this,C,P))};Graph.prototype.insertTextForEvent=function(C,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ia=mxEvent.getSource(C);this.firstClickState!=W||this.firstClickSource!=ia||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&+(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(C)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var C=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ia=this.getPageSize();P=Math.max(P,W.x*ia.width);R=Math.max(R,W.y*ia.height)}return new mxPoint(this.snap(P+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(){var C=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/C.scale-C.translate.x+(0==P.width?2*this.gridSize:0))));C=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/C.scale-C.translate.y+2*this.gridSize)));return new mxPoint(W,C)};Graph.prototype.getCenterInsertPoint=function(C){C=null!=C?C: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-C.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-C.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-C.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(C,P){C=null!=C?C:"";null!=P&&(0<C.length&&";"!=C.charAt(C.length-1)&&(C+=";"),C+="fontSize="+P+";");return C};Graph.prototype.addText=function(C,P,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ja=this.view.getRelativePoint(R,C,P);W.geometry.x=Math.round(1E4*ja.x)/1E4;W.geometry.y=Math.round(ja.y);W.geometry.offset=new mxPoint(0,0);ja=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((C-ja.x)/ka),Math.round((P-ja.y)/ka))}else ja=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(C/this.view.scale)-ja.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ja.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(C,P,R){var W=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Ia=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Ia&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Ia),null!=P&&mxEvent.addGestureListeners(ta[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ja=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ia=this.view.getRelativePoint(R,C,P);W.geometry.x=Math.round(1E4*ia.x)/1E4;W.geometry.y=Math.round(ia.y);W.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((C-ia.x)/ka),Math.round((P-ia.y)/ka))}else ia=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(C/this.view.scale)-ia.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ia.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(C,P,R){var W=mxUtils.bind(this,+function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Ia=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Ia&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Ia),null!=P&&mxEvent.addGestureListeners(ta[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&C!=mxConstants.NONE?new mxCellHighlight(pa,C,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ta=pa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Ia,Va,Wa){return null==pa.getLinkForCell(Ia.cell)}),ua=null==ua||pa.model.isAncestor(ta,ua.cell)?pa.view.getState(ta):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,ua){this.startX=ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(pa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ta>ka||ua>ka)&&this.clear());else{for(ta=ua.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Ia=ua.getSource();for(ta=ua.getEvent();null!=Ia&&"a"!=Ia.nodeName.toLowerCase();)Ia=Ia.parentNode;null==Ia&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Ia=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ia||null==P||P(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Ia?pa.linkTarget:"_top",pa.openLink(this.currentLink,ta),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&R(ua.getEvent()));this.clear()},activate:function(ta){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ta.cell));null!=this.currentLink&&-(this.currentTarget=pa.getLinkTargetForCell(ta.cell),pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ja);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ta){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=-function(C,P){C=null!=C?C:this.getSelectionCells();P=null!=P?P:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var W=this.getModel(),ja=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ta=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=W.getParent(C[R]);if(null!=ua){var Ia=this.moveCells([ta[R]],ja,ja,!1)[0];ka.push(Ia);if(P)W.add(ua,ta[R]);else{var Va=ua.getIndex(C[R]);W.add(ua,ta[R],Va+-1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[R]),Ta=this.getCellGeometry(ua);null!=Wa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Wa.height,W.setGeometry(ua,Ta))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(C,P,R){if(null!=C&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ja=-[],ka=0;ka<W.length;ka++)ja.push(W[ka]);document.execCommand("insertimage",!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ja.length+1)for(ka=C.length-1;0<=ka;ka--)if(0==ka||C[ka]!=ja[ka-1]){C[ka].setAttribute("width",P);C[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=+(this.currentTarget=pa.getLinkTargetForCell(ta.cell),pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ta){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=+function(C,P){C=null!=C?C:this.getSelectionCells();P=null!=P?P:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var W=this.getModel(),ia=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ta=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=W.getParent(C[R]);if(null!=ua){var Ia=this.moveCells([ta[R]],ia,ia,!1)[0];ka.push(Ia);if(P)W.add(ua,ta[R]);else{var Va=ua.getIndex(C[R]);W.add(ua,ta[R],Va++1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[R]),Ta=this.getCellGeometry(ua);null!=Wa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Wa.height,W.setGeometry(ua,Ta))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(C,P,R){if(null!=C&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ia=+[],ka=0;ka<W.length;ka++)ia.push(W[ka]);document.execCommand("insertimage",!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ia.length+1)for(ka=C.length-1;0<=ka;ka--)if(0==ka||C[ka]!=ia[ka-1]){C[ka].setAttribute("width",P);C[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=0;W<P.length;W++)R.push(P[W]);document.execCommand("createlink",!1,mxUtils.trim(C));P=this.cellEditor.textarea.getElementsByTagName("a");if(P.length==R.length+1)for(W=P.length-1;0<=W;W--)if(P[W]!=R[W-1]){for(P=P[W].getElementsByTagName("a");0<P.length;){for(R=P[0].parentNode;null!=P[0].firstChild;)R.insertBefore(P[0].firstChild,P[0]);R.removeChild(P[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(C))};Graph.prototype.isCellResizable=function(C){var P=mxGraph.prototype.isCellResizable.apply(this,-arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&!this.isTableRow(C)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ja=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ta=this.view.getState(P[xa]);if(null!=ta){var ua=C?ta.getCenterX():ta.getCenterY();ja=null!=ja?Math.max(ja,-ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=C?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Pa){return C?ab.x-Pa.x:ab.y-Pa.y});R&&(pa-=C?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(C?ta.x:ta.y);ja=ja/ua-(C?ta.x:ta.y);this.getModel().beginUpdate();try{var Ia=(ja-ka-pa)/(W.length-1),Va=ka+(R?C?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Wa=this.view.getState(this.model.getParent(W[xa].cell)),+arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&!this.isTableRow(C)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ia=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ta=this.view.getState(P[xa]);if(null!=ta){var ua=C?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,+ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=C?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Pa){return C?ab.x-Pa.x:ab.y-Pa.y});R&&(pa-=C?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(C?ta.x:ta.y);ia=ia/ua-(C?ta.x:ta.y);this.getModel().beginUpdate();try{var Ia=(ia-ka-pa)/(W.length-1),Va=ka+(R?C?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Wa=this.view.getState(this.model.getParent(W[xa].cell)),Ta=this.getCellGeometry(W[xa].cell);Va+=Ia;null!=Ta&&null!=Wa&&(Ta=Ta.clone(),C?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Wa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Wa.origin.y,this.getModel().setGeometry(W[xa].cell,Ta));R&&(Va+=C?W[xa].width:W[xa].height)}}finally{this.getModel().endUpdate()}}}return P};Graph.prototype.isCloneEvent=function(C){return mxClient.IS_MAC&&mxEvent.isMetaDown(C)||mxEvent.isControlDown(C)};Graph.prototype.createSvgImageExport=function(C){C=new mxImageExport;C.addCellData=-function(R,W,ja){W.setAttribute("data-cell-id",R.id);if(ja)if(mxUtils.isNode(R.value))for(ja=0;ja<R.value.attributes.length;ja++){var ka=R.value.attributes[ja];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=C.visitStatesRecursive;C.visitStatesRecursive=function(R,W,ja){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,+function(R,W,ia){W.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=0;ia<R.value.attributes.length;ia++){var ka=R.value.attributes[ia];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=C.visitStatesRecursive;C.visitStatesRecursive=function(R,W,ia){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(W.root);P.apply(this,arguments);W.root=ka}};C.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});C.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return C};Graph.prototype.parseBackgroundImage=function(C){var P=null;null!=C&&0<C.length&&(C=JSON.parse(C),P=new mxImage(C.src,-C.width,C.height));return P};Graph.prototype.getBackgroundImageObject=function(C){return C};Graph.prototype.getSvg=function(C,P,R,W,ja,ka,pa,xa,ta,ua,Ia,Va,Wa,Ta,ab,Pa){var Sa=null;if(null!=Ta)for(Sa=new mxDictionary,Ia=0;Ia<Ta.length;Ia++)Sa.put(Ta[Ia],!0);Ta=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ja=null!=ja?ja:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:+C.width,C.height));return P};Graph.prototype.getBackgroundImageObject=function(C){return C};Graph.prototype.getSvg=function(C,P,R,W,ia,ka,pa,xa,ta,ua,Ia,Va,Wa,Ta,ab,Pa){var Sa=null;if(null!=Ta)for(Sa=new mxDictionary,Ia=0;Ia<Ta.length;Ia++)Sa.put(Ta[Ia],!0);Ta=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var fb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Sa||W||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),cb=this.backgroundImage,eb=this.view.translate,lb=this.view.scale;"diagram"==Wa&&null!=cb&&null!=cb.width&&null!=cb.height&&(fb=mxRectangle.fromRectangle(fb),fb.add(new mxRectangle((eb.x+cb.x)*lb,(eb.y+cb.y)*lb,cb.width*lb,cb.height*lb)));if(null==fb)throw Error(mxResources.get("drawingEmpty"));W=P/lb;var kb=Math.max(1,Math.ceil(fb.width*-W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);ja=ja?-.5:0;var hb=mxUtils.getLightDarkColor(C),pb=Graph.createSvgNode(ja,ja,kb,ob,hb),sb=pb.ownerDocument;if(null!=C){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,+W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);ia=ia?-.5:0;var hb=mxUtils.getLightDarkColor(C),pb=Graph.createSvgNode(ia,ia,kb,ob,hb),sb=pb.ownerDocument;if(null!=C){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"g");pb.appendChild(mb);var nb=this.createSvgCanvas(mb);nb.translate(Math.floor(R/P-fb.x/lb),Math.floor(R/P-fb.y/lb));nb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=nb.getAlternateText;nb.getAlternateText=function(bb,yb,tb,xb,vb,rb,Db,Fb,d,p,A,t,z){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var D=Math.ceil(2*xb/this.state.fontSize),G=[],ea=0,O=0;(0==D||ea<D)&&O<-rb.length;){var sa=rb.charCodeAt(O);if(10==sa||13==sa){if(0<ea)break}else G.push(rb.charAt(O)),255>sa&&ea++;O++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(C=lb/P,ja=new mxRectangle((cb.x+eb.x)*C,(cb.y+eb.y)*C,cb.width*C,cb.height*C),mxUtils.intersects(fb,ja)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);+rb.length;){var sa=rb.charCodeAt(O);if(10==sa||13==sa){if(0<ea)break}else G.push(rb.charAt(O)),255>sa&&ea++;O++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(C=lb/P,ia=new mxRectangle((cb.x+eb.x)*C,(cb.y+eb.y)*C,cb.width*C,cb.height*C),mxUtils.intersects(fb,ia)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);nb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var zb=xa.getLinkForCellState;xa.getLinkForCellState=function(bb,yb){var tb=bb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==tb||bb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(bb,yb){return bb.view.graph.getLinkTargetForCell(bb.cell)};var Cb=xa.drawCellState,Ab=null,Bb=mxUtils.bind(this,function(){if(null==Ab){Ab="ge-flow-animation-"+Editor.guid();var bb=null!=sb.createElementNS?sb.createElementNS(mxConstants.NS_SVG,"style"):sb.createElement("style");bb.innerHTML=this.createFlowAnimationCss(Ab);sb.getElementsByTagName("defs")[0].appendChild(bb)}return Ab});xa.drawCellState=function(bb,yb){for(var tb=bb.view.graph,xb=null!=Sa?Sa.get(bb.cell):tb.isCellSelected(bb.cell),vb=tb.model.getParent(bb.cell);!(ka&&null==Sa||xb)&&null!=vb;)xb=null!=Sa?Sa.get(vb):tb.isCellSelected(vb),vb=tb.model.getParent(vb);if(null!=bb.shape)try{var rb=bb.shape.isFlowAnimationEnabled,Db=bb.shape.addFlowAnimationToShape;bb.shape.isFlowAnimationEnabled=function(){return gb&&tb.model.isEdge(bb.cell)&&"1"==mxUtils.getValue(bb.style,"flowAnimation","0")};bb.shape.addFlowAnimationToShape=function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),bb.style,P,Bb())};if(ka&&null==Sa||xb)tb.view.redrawEnumerationState(bb),Cb.apply(this,arguments),this.doDrawShape(bb.secondLabel,yb)}finally{bb.shape.isFlowAnimationEnabled=rb,bb.shape.addFlowAnimationToShape=Db}};var wb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(wb),-nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ta,!0);return pb}finally{this.enableFlowAnimation=gb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),W=C.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ja=-C.createElement("a");ja.setAttribute("transform","translate(0,-5)");null==ja.setAttributeNS||P.ownerDocument!=document&&null==document.documentMode?(ja.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ja.setAttribute("target","_blank")):(ja.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ja.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x",-"50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(W);ja.appendChild(C);R.appendChild(ja);P.appendChild(R)}};Graph.prototype.disableSvgLinks=function(C,P){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var W=C[R].getAttribute("href");null==W&&(W=C[R].getAttribute("xlink:href"));null!=W&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));P&&P(C[R])}};Graph.prototype.updateSvgLinks=function(C,P,R){C=C.getElementsByTagName("a");for(var W=-0;W<C.length;W++)if(null==C[W].getAttribute("target")){var ja=C[W].getAttribute("href");null==ja&&(ja=C[W].getAttribute("xlink:href"));null!=ja&&(null!=P&&/^https?:\/\//.test(ja)?C[W].setAttribute("target",P):R&&this.isCustomLink(ja)&&C[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=+nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ta,!0);return pb}finally{this.enableFlowAnimation=gb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),W=C.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=+C.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||P.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x",+"50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(W);ia.appendChild(C);R.appendChild(ia);P.appendChild(R)}};Graph.prototype.disableSvgLinks=function(C,P){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var W=C[R].getAttribute("href");null==W&&(W=C[R].getAttribute("xlink:href"));null!=W&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));P&&P(C[R])}};Graph.prototype.updateSvgLinks=function(C,P,R){C=C.getElementsByTagName("a");for(var W=+0;W<C.length;W++)if(null==C[W].getAttribute("target")){var ia=C[W].getAttribute("href");null==ia&&(ia=C[W].getAttribute("xlink:href"));null!=ia&&(null!=P&&/^https?:\/\//.test(ia)?C[W].setAttribute("target",P):R&&this.isCustomLink(ia)&&C[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=function(){var C=null;if(window.getSelection){var P=window.getSelection();P.getRangeAt&&P.rangeCount&&(C=P.getRangeAt(0).commonAncestorContainer)}else document.selection&&(C=document.selection.createRange().parentElement());return C};Graph.prototype.getSelectedEditingElement=function(){var C=null;if(null!=this.cellEditor.textarea)for(C=this.getSelectedElement();null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.parentNode;return C};Graph.prototype.getParentByName=function(C,P,R){for(;null!=C&&C.nodeName!=P;){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.getParentByNames=function(C,P,R){for(;null!=C&&!(0<=mxUtils.indexOf(P,C.nodeName));){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.selectNode=function(C){var P=null;if(window.getSelection){if(P=window.getSelection(),P.getRangeAt&&P.rangeCount){var R=document.createRange();R.selectNode(C);P.removeAllRanges();P.addRange(R)}}else(P=document.selection)&&"Control"!=P.type&&(C=P.createRange(),C.collapse(!0),R=P.createRange(),-R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,P,R){var W=this.getCellGeometry(C);if(null!=W){W=W.clone();if(null!=W.points)for(var ja=0;ja<W.points.length;ja++)P?W.points[ja].x=R+(R-W.points[ja].x):W.points[ja].y=R+(R-W.points[ja].y);ja=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ja(W.getTerminalPoint(!0));ja(W.getTerminalPoint(!1));this.model.setGeometry(C,W)}};Graph.prototype.flipChildren=function(C,P,R){this.model.beginUpdate();try{for(var W=-this.model.getChildCount(C),ja=0;ja<W;ja++){var ka=this.model.getChildAt(C,ja);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,P){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],W=0;W<C.length;W++)if(this.model.isEdge(C[W])){var ja=this.view.getState(C[W]);-null!=ja&&this.flipEdgePoints(C[W],P,(P?ja.getCenterX():ja.getCenterY())/this.view.scale-(P?ja.origin.x:ja.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(C[W]);null!=ka&&this.flipChildren(C[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(C[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,P){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();-try{for(var W=0;W<C.length;W++){var ja=this.model.getParent(C[W]);if(this.isTable(ja)){var ka=this.getCellGeometry(C[W]),pa=this.getCellGeometry(ja);null!=ka&&null!=pa&&(pa=pa.clone(),pa.height-=ka.height,this.model.setGeometry(ja,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(C):null;this.removeCells(C,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};-Graph.prototype.insertTableColumn=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ja=0;if(this.isTableCell(C)){var ka=R.getParent(C);W=R.getParent(ka);ja=mxUtils.indexOf(R.getChildCells(ka,!0),C)}else this.isTableRow(C)?W=R.getParent(C):C=R.getChildCells(W,!0)[0],P||(ja=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ta=R.getChildCells(pa[C],!0)[ja],ua=R.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Ia=-this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ia){null!=Ia.alternateBounds&&(Ia.width=Ia.alternateBounds.width,Ia.height=Ia.alternateBounds.height,Ia.alternateBounds=null);xa=Ia.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ia.height=Va.height)}R.add(pa[C],ua,ja+(P?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=xa,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=-function(C){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:P.getParent(C);var W=P.getChildCells(R,!0);0==W.length?P.remove(R):(R==C&&(C=W[W.length-1]),P.remove(C))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){W=C;var ja=R.getChildCells(W,!0);C=ja[P?0:ja.length-1]}else W=R.getParent(C);var ka=W.getIndex(C);-C=R.cloneCell(C,!1);C.value=null;R.add(W,C,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ja=C;if(this.isTableCell(C))ja=R.getParent(C),W=R.getParent(ja);else if(this.isTableRow(C))W=R.getParent(C);else{var ka=R.getChildCells(W,!0);ja=ka[P?0:ka.length-1]}var pa=R.getChildCells(ja,!0),xa=W.getIndex(ja);ja=R.cloneCell(ja,!1);ja.value=null;var ta=this.getCellGeometry(ja);if(null!=ta){for(ka=0;ka<pa.length;ka++){C=R.cloneCell(pa[ka],-!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ja.insert(C)}R.add(W,ja,xa+(P?0:1));var Ia=this.getCellGeometry(W);null!=Ia&&(Ia=Ia.clone(),Ia.height+=ta.height,R.setGeometry(W,Ia))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var P=this.getModel();-P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(W=P.getParent(C));this.isTableRow(W)&&(R=P.getParent(W));var ja=P.getChildCells(R,!0);if(0==ja.length)P.remove(R);else{this.isTableRow(W)||(W=ja[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ka,C));for(W=C=0;W<ja.length;W++){var xa=P.getChildCells(ja[W],!0)[pa];P.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(C=Math.max(C,ta.width))}var ua=this.getCellGeometry(R);-null!=ua&&(ua=ua.clone(),ua.width-=C,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var P=this.getModel();P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(C=W=P.getParent(C));this.isTableRow(C)&&(R=P.getParent(W));var ja=P.getChildCells(R,!0);if(1>=ja.length)P.remove(R);else{this.isTableRow(W)||(W=ja[ja.length-1]);P.remove(W);C=0;var ka=this.getCellGeometry(W);null!=ka&&(C=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=-C,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(C,P){for(var R=C.tBodies[0],W=R.rows[0].cells,ja=C=0;ja<W.length;ja++){var ka=W[ja].getAttribute("colspan");C+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ja=0;ja<C;ja++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(C,P){C.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(C,P){var R=C.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ja=document.createElement("th");-R.rows[W].appendChild(ja);mxUtils.br(ja)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)W=C.rows[R].insertCell(P),mxUtils.br(W);return C.rows[0].cells[0<=P?P:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(C,P){if(0<=P){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>P&&C[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");-R.innerHTML=C;C=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=C.appendChild(W);P.insertNode(C)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(C)};Graph.prototype.createLinkForHint=function(C,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}C=null!=C?C:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(C)?this.getLinkTitle(C):C;var ja=document.createElement("a");-ja.setAttribute("rel",this.linkRelation);ja.setAttribute("href",this.getAbsoluteUrl(C));ja.setAttribute("title",W(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&ja.setAttribute("target",this.linkTarget);mxUtils.write(ja,W(P,40));this.isCustomLink(C)&&mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(C,R);mxEvent.consume(ka)}));return ja};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=+R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,P,R){var W=this.getCellGeometry(C);if(null!=W){W=W.clone();if(null!=W.points)for(var ia=0;ia<W.points.length;ia++)P?W.points[ia].x=R+(R-W.points[ia].x):W.points[ia].y=R+(R-W.points[ia].y);ia=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ia(W.getTerminalPoint(!0));ia(W.getTerminalPoint(!1));this.model.setGeometry(C,W)}};Graph.prototype.flipChildren=function(C,P,R){this.model.beginUpdate();try{for(var W=+this.model.getChildCount(C),ia=0;ia<W;ia++){var ka=this.model.getChildAt(C,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,P){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],W=0;W<C.length;W++)if(this.model.isEdge(C[W])){var ia=this.view.getState(C[W]);+null!=ia&&this.flipEdgePoints(C[W],P,(P?ia.getCenterX():ia.getCenterY())/this.view.scale-(P?ia.origin.x:ia.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(C[W]);null!=ka&&this.flipChildren(C[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(C[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,P){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();+try{for(var W=0;W<C.length;W++){var ia=this.model.getParent(C[W]);if(this.isTable(ia)){var ka=this.getCellGeometry(C[W]),pa=this.getCellGeometry(ia);null!=ka&&null!=pa&&(pa=pa.clone(),pa.height-=ka.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(C):null;this.removeCells(C,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};+Graph.prototype.insertTableColumn=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=0;if(this.isTableCell(C)){var ka=R.getParent(C);W=R.getParent(ka);ia=mxUtils.indexOf(R.getChildCells(ka,!0),C)}else this.isTableRow(C)?W=R.getParent(C):C=R.getChildCells(W,!0)[0],P||(ia=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ta=R.getChildCells(pa[C],!0)[ia],ua=R.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Ia=+this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ia){null!=Ia.alternateBounds&&(Ia.width=Ia.alternateBounds.width,Ia.height=Ia.alternateBounds.height,Ia.alternateBounds=null);xa=Ia.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ia.height=Va.height)}R.add(pa[C],ua,ia+(P?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=xa,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=+function(C){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:P.getParent(C);var W=P.getChildCells(R,!0);0==W.length?P.remove(R):(R==C&&(C=W[W.length-1]),P.remove(C))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){W=C;var ia=R.getChildCells(W,!0);C=ia[P?0:ia.length-1]}else W=R.getParent(C);var ka=W.getIndex(C);+C=R.cloneCell(C,!1);C.value=null;R.add(W,C,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=C;if(this.isTableCell(C))ia=R.getParent(C),W=R.getParent(ia);else if(this.isTableRow(C))W=R.getParent(C);else{var ka=R.getChildCells(W,!0);ia=ka[P?0:ka.length-1]}var pa=R.getChildCells(ia,!0),xa=W.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);if(null!=ta){for(ka=0;ka<pa.length;ka++){C=R.cloneCell(pa[ka],+!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(C)}R.add(W,ia,xa+(P?0:1));var Ia=this.getCellGeometry(W);null!=Ia&&(Ia=Ia.clone(),Ia.height+=ta.height,R.setGeometry(W,Ia))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var P=this.getModel();+P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(W=P.getParent(C));this.isTableRow(W)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(0==ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ka,C));for(W=C=0;W<ia.length;W++){var xa=P.getChildCells(ia[W],!0)[pa];P.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(C=Math.max(C,ta.width))}var ua=this.getCellGeometry(R);+null!=ua&&(ua=ua.clone(),ua.width-=C,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var P=this.getModel();P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(C=W=P.getParent(C));this.isTableRow(C)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(1>=ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[ia.length-1]);P.remove(W);C=0;var ka=this.getCellGeometry(W);null!=ka&&(C=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=+C,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(C,P){for(var R=C.tBodies[0],W=R.rows[0].cells,ia=C=0;ia<W.length;ia++){var ka=W[ia].getAttribute("colspan");C+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ia=0;ia<C;ia++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(C,P){C.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(C,P){var R=C.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ia=document.createElement("th");+R.rows[W].appendChild(ia);mxUtils.br(ia)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)W=C.rows[R].insertCell(P),mxUtils.br(W);return C.rows[0].cells[0<=P?P:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(C,P){if(0<=P){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>P&&C[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");+R.innerHTML=C;C=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=C.appendChild(W);P.insertNode(C)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(C)};Graph.prototype.createLinkForHint=function(C,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}C=null!=C?C:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(C)?this.getLinkTitle(C):C;var ia=document.createElement("a");+ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(C));ia.setAttribute("title",W(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,W(P,40));this.isCustomLink(C)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(C,R);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,pa){this.popupMenuHandler.hideMenu()});var C=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=C.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var pa=this.getCellAt(ka.graphX,ka.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(pa),null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=-ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var P=!1,R=!1,W=!1,ja=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=this.popupMenuHandler.isMenuShowing());ja.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ka,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=+ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var P=!1,R=!1,W=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ka,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||!W&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||P&&this.isCellSelected(pa.getCell())));xa=!P||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ta,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var C=this.graph.view.getState(this.editingCell);return null!=C&&1==C.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var C="";window.getSelection?C=window.getSelection():document.getSelection?C=document.getSelection():document.selection&&(C=document.selection.createRange().text);return""!=C};mxCellEditor.prototype.insertTab=function(C){var P=this.textarea.ownerDocument.defaultView.getSelection(),R=P.getRangeAt(0);C=Graph.createTabNode(C);R.insertNode(C);R.setStartAfter(C);R.setEndAfter(C);P.removeAllRanges();P.addRange(R)};mxCellEditor.prototype.alignText=function(C,P){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,-mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ja=null!=P&&mxEvent.isShiftDown(P);if(ja||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ja||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(C)}W||document.execCommand("justify"+C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=+mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ia=null!=P&&mxEvent.isShiftDown(P);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(C)}W||document.execCommand("justify"+C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var C=window.getSelection();if(C.getRangeAt&&C.rangeCount){for(var P=[],R=0,W=C.rangeCount;R<W;++R)P.push(C.getRangeAt(R));return P}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(C){try{if(C)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var P=0,R=C.length;P<R;++P)sel.addRange(C[P])}else document.selection&&C.select&&C.select()}catch(W){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(C){null!=C.text&&(C.text.replaceLinefeeds="0"!=mxUtils.getValue(C.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(C,P){this.isKeepFocusEvent(C)||!mxEvent.isAltDown(C.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(C){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(C,P){C=this.graph.getStartEditingCell(C,P);M.apply(this,arguments);var R=this.graph.view.getState(C);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(C)};mxCellEditor.prototype.toggleViewMode=function(){var C=this.graph.view.getState(this.editingCell);if(null!=C){var P=null!=C&&"0"!=mxUtils.getValue(C.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(P?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className=-"mxCellEditor geContentEditable";ta=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);P=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ja=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,+"mxCellEditor geContentEditable";ta=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);P=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&pa.push("underline");(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.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=-pa.join(" ");this.textarea.style.fontWeight=ja?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=P;this.textarea.style.textAlign=W;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));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());+pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=P;this.textarea.style.textAlign=W;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));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(P?xa.replace(/\n/g,"").replace(/<br\s*.?>/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=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(C,P){if(null!=this.textarea)if(C=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=C){var R=C.view.scale;this.bounds=mxRectangle.fromRectangle(C);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=@@ -2671,36 +2671,36 @@ function(C){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetCthis.graph.isTransparentState(C)&&this.graph.removeCells([C.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getBorderColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getMinimumSize=function(C){var P=this.graph.getView().scale;return new mxRectangle(0,0,null==C.text?30:C.text.size*P+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(C,P){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(P.getEvent)};mxGraphView.prototype.formatUnitText=function(C){return C?f(C,this.unit):C};mxGraphHandler.prototype.updateHint=function(C){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var P=this.graph.view.translate,R=this.graph.view.scale;C=this.roundLength((this.bounds.x+this.currentDx)/R-P.x);P=this.roundLength((this.bounds.y+this.currentDy)/R-P.y);R=this.graph.view.unit;this.hint.innerHTML=f(C,R)+", "+f(P,R);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ia=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,P){ia.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var W=this.graph.model.getParent(C),ja=null!=W?this.graph.getCellGeometry(W):null;if(null!=ja&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));-R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);ja=ja.clone();R?ja.height=P.height+pa.y+pa.height+2*ka:ja.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ja)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ja.push(xa))}for(var P=da.apply(this,arguments),R=new mxDictionary,W=this.graph.model,ja=[],ka=0;ka<P.length;ka++){var pa=-P[ka];this.graph.isTableCell(pa)?C(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&C(W.getParent(pa));C(pa)}return ja};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&-!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var P=X.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var ca=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(C){var P=ca.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=+function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,P){ja.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var W=this.graph.model.getParent(C),ia=null!=W?this.graph.getCellGeometry(W):null;if(null!=ia&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));+R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);ia=ia.clone();R?ia.height=P.height+pa.y+pa.height+2*ka:ia.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var P=ca.apply(this,arguments),R=new mxDictionary,W=this.graph.model,ia=[],ka=0;ka<P.length;ka++){var pa=+P[ka];this.graph.isTableCell(pa)?C(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&C(W.getParent(pa));C(pa)}return ia};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&+!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var P=Y.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var da=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(C){var P=da.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var C=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+C.x/2,this.bounds.y+this.rotationHandleVSpacing-C.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(C,P){return this.graph.isRecursiveVertexResize(C)&&!mxEvent.isAltDown(P.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(C,P){return mxEvent.isControlDown(P.getEvent())||mxEvent.isMetaDown(P.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Z=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(C){return C.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var C=0;this.graph.isTableRow(this.state.cell)?C=1:this.graph.isTableCell(this.state.cell)&&(C=2);return C};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var C=N.apply(this,arguments);-if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(ab,Pa,Sa){for(var gb=[],fb=0;fb<ab.length;fb++){var cb=ab[fb];gb.push(null==cb?null:new mxPoint((ta+cb.x+Pa)*ka,(ua+cb.y+Sa)*ka))}return gb},R=this,W=this.graph,ja=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,ua=this.state.origin.y+W.view.translate.y;null==C&&(C=[]);var Ia=W.view.getCellStates(ja.getChildCells(this.state.cell,!0));if(0<Ia.length){var Va=-ja.getChildCells(Ia[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Ta=W.getTableLines(this.state.cell,!0,!1);for(ja=0;ja<Ia.length;ja++)mxUtils.bind(this,function(ab){var Pa=Ia[ab],Sa=null;if(W.isCellMovable(Pa.cell)){Sa=ab<Ia.length-1?Ia[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa.cell):null;var gb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Ta[ab]?new J(Ta[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;+if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(ab,Pa,Sa){for(var gb=[],fb=0;fb<ab.length;fb++){var cb=ab[fb];gb.push(null==cb?null:new mxPoint((ta+cb.x+Pa)*ka,(ua+cb.y+Sa)*ka))}return gb},R=this,W=this.graph,ia=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,ua=this.state.origin.y+W.view.translate.y;null==C&&(C=[]);var Ia=W.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ia.length){var Va=+ia.getChildCells(Ia[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Ta=W.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Ia.length;ia++)mxUtils.bind(this,function(ab){var Pa=Ia[ab],Sa=null;if(W.isCellMovable(Pa.cell)){Sa=ab<Ia.length-1?Ia[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa.cell):null;var gb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Ta[ab]?new J(Ta[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Sa=new mxHandle(Pa,"row-resize",null,Sa);Sa.tableHandle=!0;var fb=0;Sa.shape.node.parentNode.insertBefore(Sa.shape.node,Sa.shape.node.parentNode.firstChild);Sa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==fb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Ta[ab],0,fb),this.shape.updateBoundsFromLine();else{var eb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+fb*ka;this.shape.bounds.x=pa.x+(ab==Ia.length-1?0:eb.x*ka);this.shape.bounds.width=pa.width-(ab==Ia.length-1?0:eb.width+eb.x+ka)}this.shape.redraw()}};var cb=!1;Sa.setPosition=function(eb,lb,kb){fb=Math.max(Graph.minTableRowHeight-eb.height,lb.y-eb.y-eb.height);cb=mxEvent.isShiftDown(kb.getEvent());null!=gb&&cb&&(fb=Math.min(fb,gb.height-Graph.minTableRowHeight))};Sa.execute=function(eb){if(0!=fb)W.setTableRowHeight(this.state.cell,fb,!cb);else if(!R.blockDelayedSelection){var lb=W.getCellAt(eb.getGraphX(),eb.getGraphY())||pa.cell;-W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Sa.reset=function(){fb=0}}C.push(Sa)})(ja);for(ja=0;ja<Va.length;ja++)mxUtils.bind(this,function(ab){var Pa=W.view.getState(Va[ab]),Sa=W.getCellGeometry(Va[ab]),gb=null!=Sa.alternateBounds?Sa.alternateBounds:Sa;null==Pa&&(Pa=new mxCellState(W.view,Va[ab],W.getCellStyle(Va[ab])),Pa.x=pa.x+Sa.x*ka,Pa.y=pa.y+Sa.y*ka,Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Sa=ab<Va.length-1?Va[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa):null;+W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Sa.reset=function(){fb=0}}C.push(Sa)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,function(ab){var Pa=W.view.getState(Va[ab]),Sa=W.getCellGeometry(Va[ab]),gb=null!=Sa.alternateBounds?Sa.alternateBounds:Sa;null==Pa&&(Pa=new mxCellState(W.view,Va[ab],W.getCellStyle(Va[ab])),Pa.x=pa.x+Sa.x*ka,Pa.y=pa.y+Sa.y*ka,Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Sa=ab<Va.length-1?Va[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa):null;var fb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Wa[ab]?new J(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Sa);Pa.tableHandle=!0;var cb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Wa[ab],cb,0),this.shape.updateBoundsFromLine();else{var lb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(gb.width+cb)*ka;this.shape.bounds.y=pa.y+(ab==Va.length-1?0:lb.y*ka);this.shape.bounds.height=pa.height-(ab==Va.length-1?0:(lb.height+lb.y)*ka)}this.shape.redraw()}};var eb=!1;Pa.setPosition=function(lb,kb,ob){cb=Math.max(Graph.minTableColumnWidth-gb.width,kb.x-lb.x-gb.width);eb=mxEvent.isShiftDown(ob.getEvent());null==fb||eb||(cb=Math.min(cb,fb.width--Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};C.push(Pa)})(ja)}}return null!=C?C.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=+Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};C.push(Pa)})(ia)}}return null!=C?C.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=0;P<this.moveHandles.length;P++)null!=this.moveHandles[P]&&(this.moveHandles[P].node.style.visibility=C?"":"hidden");if(null!=this.cornerHandles)for(P=0;P<this.cornerHandles.length;P++)this.cornerHandles[P].node.style.visibility=C?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var C=this.isMoveHandlesVisible();C&&null==this.moveHandles?-this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=this.graph,P=C.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ja){if(null!=ja&&P.isVertex(ja.cell)&&C.isCellMovable(ja.cell)){var ka=-new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ja;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ja.cell)||-this.graph.selectCellForEvent(ja.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ja.cell,pa),mxEvent.consume(pa))}));+this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=this.graph,P=C.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ia){if(null!=ia&&P.isVertex(ia.cell)&&C.isCellMovable(ia.cell)){var ka=+new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||+this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(P.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var C=0;C<this.cornerHandles.length;C++)null!=this.cornerHandles[C]&&null!=this.cornerHandles[C].node&&null!=this.cornerHandles[C].node.parentNode&&this.cornerHandles[C].node.parentNode.removeChild(this.cornerHandles[C].node);this.cornerHandles=null}};var V=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){V.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var C=0;4>C;C++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();C=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var U=-mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ja=-this.customHandles[W].shape.bounds,ka=ja.getCenterX(),pa=ja.getCenterY();if(Math.abs(this.state.x-ka)<ja.width/2||Math.abs(this.state.y-pa)<ja.height/2||Math.abs(this.state.x+this.state.width-ka)<ja.width/2||Math.abs(this.state.y+this.state.height-pa)<ja.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),C.x=this.sizers[0].bounds.width+P,C.y=this.sizers[0].bounds.height+P):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=+mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ia=+this.customHandles[W].shape.bounds,ka=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),C.x=this.sizers[0].bounds.width+P,C.y=this.sizers[0].bounds.height+P):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=function(C){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+"°";else{C=this.state.view.scale;var P=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/C),P)+" x "+f(this.roundLength(this.bounds.height/C),P)}C=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||-"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=C.y+C.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),+"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=C.y+C.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var X=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){X.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var fa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(C,P){fa.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 na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(C,P){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&-1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(C,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ja=this.graph.view.scale,ka=this.roundLength(P.x/ja-W.x);W=this.roundLength(P.y/ja-W.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==-mxConstants.POINTS?Math.round(R.length/ja):f(R.length/ja,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=+1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(C,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(P.x/ia-W.x);W=this.roundLength(P.y/ia-W.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==+mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(C.getGraphY(),P.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"/>');@@ -2714,9 +2714,9 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.protfunction(C){return!mxEvent.isShiftDown(C.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(C){return!mxEvent.isShiftDown(C.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(C){return mxEvent.isMouseEvent(C.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(P)||mxEvent.isPopupTrigger(P)&&(null==C.getState()||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P))}}else mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return mxEvent.isLeftMouseButton(P)&&(this.useLeftButtonForPanning&&null==C.getState()||mxEvent.isControlDown(P)&&!mxEvent.isShiftDown(P))||this.usePopupTrigger&&mxEvent.isPopupTrigger(P)};mxRubberband.prototype.isSpaceEvent=function(C){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(C.getEvent())||mxEvent.isMetaDown(C.getEvent()))&&mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(C,P){if(this.cancelled)this.cancelled=!1,P.consume();else{var R=-null!=this.div&&"none"!=this.div.style.display,W=null,ja=null,ka=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ja=this.first.y,C=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ja)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(C=this.graph.snap(C),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();-try{var pa=this.graph.getCellsBeyond(W,ja,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ta=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(C,ka),this.graph.model.setGeometry(pa[R],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(C,-P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-C,ja=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ja)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(P)?(C=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||+null!=this.div&&"none"!=this.div.style.display,W=null,ia=null,ka=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ia=this.first.y,C=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(C=this.graph.snap(C),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();+try{var pa=this.graph.getCellsBeyond(W,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ta=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(C,ka),this.graph.model.setGeometry(pa[R],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(C,+P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-C,ia=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(P)?(C=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=C-this.width),this.y<this.first.y&&(this.y=R-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)),P.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=@@ -2725,16 +2725,16 @@ function(C,P,R,W){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(newnull!=C&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(C,P,R,W){W=P==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:P==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(C){if(null!=C&&1==C.length){var P=this.graph.getModel(),R=P.getParent(C[0]),W=this.graph.getCellGeometry(C[0]);if(P.isEdge(R)&&null!=W&&W.relative&&(P=this.graph.view.getState(C[0]),null!=P&&2>P.width&&2>P.height&&null!=P.text&&null!=P.text.boundingBox))return mxRectangle.fromRectangle(P.text.boundingBox)}return Ba.apply(this,arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var C=Ga.apply(this,arguments),P=[],R=0;R<C.length;R++)"1"!=mxUtils.getValue(C[R].style,"part","0")&&P.push(C[R]);return P};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(C){var P=this.graph.getModel(),R=P.getParent(C.cell),W=this.graph.getCellGeometry(C.cell);return P.isEdge(R)&&null!=W&&W.relative&&2>C.width&&2>C.height&&null!=-C.text&&null!=C.text.boundingBox?(P=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var ra=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ja=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ja||!ja.relative||null==this.state||+C.text&&null!=C.text.boundingBox?(P=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var ra=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ia||!ia.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ra.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var C=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),P=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&C==mxConstants.NONE&&P==mxConstants.NONE?(C=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,C,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(C,P){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 Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(C,P){Da.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&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(C,P){try{if(null==C&&(null==P||0==P.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=C||null!=P&&0<P.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-W.style.paddingLeft="4px";W.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),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!=C){var ja=document.createElement("div");-ja.style.display="flex";ja.style.alignItems="center";ja.appendChild(this.graph.createLinkForHint(C,null,this.state.cell));this.linkHint.appendChild(ja);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=R.cloneNode(!0);ja.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=W.cloneNode(!0);ja.appendChild(pa);mxEvent.addListener(pa,-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=P)for(ja=0;ja<P.length;ja++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=C||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ia=R.cloneNode(!0);ua.appendChild(Ia);var Va=mxUtils.bind(this,function(Wa){var Ta=+W.style.paddingLeft="4px";W.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),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!=C){var ia=document.createElement("div");+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(C,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=R.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=W.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=P)for(ia=0;ia<P.length;ia++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=C||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ia=R.cloneNode(!0);ua.appendChild(Ia);var Va=mxUtils.bind(this,function(Wa){var Ta=document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Ta.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Ta.innerHTML)}});mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Va);mxEvent.consume(Wa)}));Ia=W.cloneNode(!0);ua.appendChild(Ia);mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){Va();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(P[ja],ja)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,+"",mxResources.get("ok"),Va);mxEvent.consume(Wa)}));Ia=W.cloneNode(!0);ua.appendChild(Ia);mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){Va();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(P[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,arguments);C.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return C};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&(this.moveHandles[C].bounds.x=Math.round(this.moveHandles[C].rowState.x+this.moveHandles[C].rowState.width-this.moveHandles[C].bounds.width/2),this.moveHandles[C].bounds.y=Math.round(this.moveHandles[C].rowState.y+(this.moveHandles[C].rowState.height-this.moveHandles[C].bounds.height)/2),this.moveHandles[C].redraw());if(null!=this.cornerHandles){C=this.getSelectionBorderInset();var P=this.cornerHandles,R=P[0].bounds.height/2;P[0].bounds.x=this.state.x-P[0].bounds.width/2+C;P[0].bounds.y=this.state.y-R+C;P[0].redraw();P[1].bounds.x=P[0].bounds.x+this.state.width-2*C;P[1].bounds.y=P[0].bounds.y;P[1].redraw();P[2].bounds.x=P[0].bounds.x;P[2].bounds.y=this.state.y+this.state.height-2*C;P[2].redraw();P[3].bounds.x=P[1].bounds.x;P[3].bounds.y=P[2].bounds.y;P[3].redraw();for(C=0;C<this.cornerHandles.length;C++)this.cornerHandles[C].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",@@ -2743,11 +2743,11 @@ this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,P=null!=this.statethis.destroyMoveHandles();this.destroyCornerHandles();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 Ra=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ra.apply(this),null!=this.state&&null!=this.linkHint)){var C=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(C=new mxRectangle(C.x,C.y,C.width,C.height),C.add(this.state.text.bounds));this.linkHint.style.left=C.x+C.width/2+"px";this.linkHint.style.top=Math.round(C.y+C.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.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(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function E(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function c(){mxShape.call(this)}-function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function I(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function aa(){mxActor.call(this)}function ia(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");+function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function I(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}-function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Oa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ja(){mxEllipse.call(this)}+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function Y(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}+function U(){mxShape.call(this)}function X(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Oa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function ab(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Sa(){mxConnector.call(this)}function gb(){mxConnector.call(this)}function fb(d,p,A,t,z,D,G,ea,O,sa){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=D*(2*G+O);z*=G+O;D*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-D-G,2*G,2*G);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var D=0;D<p.length;D++){var G=p[D];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=@@ -2785,8 +2785,8 @@ this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};x.prototymxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};Q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t,0),new mxPoint(t-p,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t-p,0),-new mxPoint(t,z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",aa);mxUtils.extend(ia,mxActor);ia.prototype.size=.5;ia.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,-z)],this.isRounded,A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ia);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};+new mxPoint(t,z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",aa);mxUtils.extend(ja,mxActor);ja.prototype.size=.5;ja.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,+z)],this.isRounded,A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ja);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ca);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.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)};ba.prototype.quadTo=function(d,p,A,t){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=t};ba.prototype.curveTo=function(d,p,A,t,z,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=D};ba.prototype.arcTo=function(d,p,A,t,z,D,G){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=G};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),D=Math.sqrt(t*t+z*z);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(D/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var O=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=D;z/=D;for(D=0;D<G;D++){var sa=(Math.random()-.5)*ea;this.originalLineTo.call(this.canvas,O*D+this.lastX-sa*z,A*D+this.lastY-sa*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var kb=mxShape.prototype.beforePaint;@@ -2796,10 +2796,10 @@ d.handJiggle.constructor!=ba)pb.apply(this,arguments);else{var D=!0;null!=this.smxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(t*D,z*D)),d.moveTo(p+D,A),d.lineTo(p+t-D,A),d.quadTo(p+t,A,p+t,A+D),d.lineTo(p+t,A+z-D),d.quadTo(p+t,A+z,p+t-D,A+z),d.lineTo(p+D,A+z),d.quadTo(p,A+z,p,A+z-D),d.lineTo(p,A+D),d.quadTo(p,A,p+D,A)):(d.moveTo(p,A),d.lineTo(p+t,A),d.lineTo(p+t,A+z),d.lineTo(p,A+z),d.lineTo(p,A)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,A=d.height;d=new mxRectangle(d.x,d.y,p,A);var t=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;t=Math.max(t,Math.min(p*z,A*z))}d.x+=Math.round(t);d.width-=Math.round(2*t);return d}return d};oa.prototype.paintForeground=function(d,p,A,t,z){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),G=parseFloat(mxUtils.getValue(this.style,"size",this.size));G=D?Math.max(0,Math.min(t,G)):t*Math.max(0,Math.min(1,G));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,G=Math.max(G,-Math.min(t*D,z*D)));G=Math.round(G);d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.moveTo(p+t-G,A);d.lineTo(p+t-G,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(X,mxRectangleShape);X.prototype.paintBackground=function(d,p,A,t,z){d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};X.prototype.paintForeground=function(d,p,A,t,z){};mxCellRenderer.registerShape("transparent",-X);mxUtils.extend(ca,mxHexagon);ca.prototype.size=30;ca.prototype.position=.5;ca.prototype.position2=.5;ca.prototype.base=20;ca.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(d,p,A,t,z){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,+Math.min(t*D,z*D)));G=Math.round(G);d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.moveTo(p+t-G,A);d.lineTo(p+t-G,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(Y,mxRectangleShape);Y.prototype.paintBackground=function(d,p,A,t,z){d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};Y.prototype.paintForeground=function(d,p,A,t,z){};mxCellRenderer.registerShape("transparent",+Y);mxUtils.extend(da,mxHexagon);da.prototype.size=30;da.prototype.position=.5;da.prototype.position2=.5;da.prototype.base=20;da.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(d,p,A,t,z){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),G=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-A),new mxPoint(Math.min(t,D+ea),z-A),new mxPoint(G,z),new mxPoint(Math.max(0,D),z-A),new mxPoint(0,z-A)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",-ca);mxUtils.extend(ha,mxActor);ha.prototype.size=.2;ha.prototype.fixedSize=20;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,+da);mxUtils.extend(ha,mxActor);ha.prototype.size=.2;ha.prototype.fixedSize=20;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(0,z),new mxPoint(p,z/2)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("step",ha);mxUtils.extend(Z,mxHexagon);Z.prototype.size=.25;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.5*z),new mxPoint(t-p,z),new mxPoint(p,z),new mxPoint(0,.5*z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("hexagon",Z);mxUtils.extend(k,mxRectangleShape);k.prototype.isHtmlAllowed=function(){return!1};k.prototype.paintForeground=function(d,p,A,t,z){var D=Math.min(t/5,z/5)+1;d.begin();d.moveTo(p+t/2,A+D);d.lineTo(p+t/2,A+z-D);d.moveTo(p+D,A+z/2);d.lineTo(p+t-D,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var sb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=@@ -2809,8 +2809,8 @@ O=this.style["symbol"+D+"VerticalAlign"],sa=this.style["symbol"+D+"Width"],ma=thFa+jb;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,db,Fa,sa,ma);d.restore()}D++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,t,z,D){D?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(t/6,z/2);d.end();d.stroke();d.ellipse(t/6,0,5*t/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/8,A+z);d.lineTo(p+7*t/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",V);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=-function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(Y,mxShape);Y.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};Y.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};Y.prototype.paintForeground=-function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,+function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(X,mxShape);X.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};X.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};X.prototype.paintForeground=+function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",X);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"participant");null==G||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,t,D):(G=this.state.view.graph.cellRenderer.getShape(G),null!=G&&G!=fa&&(G=new G,G.apply(this.state),d.save(),G.paintVertexShape(d,p,A,t,D),d.restore()));D<z&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+t/2,A+D),d.lineTo(p+t/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,t,Math.min(z,D))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(na,mxShape);na.prototype.width=60;na.prototype.height=30;na.prototype.corner=10;na.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};na.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};na.prototype.paintBackground=function(d,p,A,t,z){var D=this.corner,G=Math.min(t,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",@@ -2818,7 +2818,7 @@ this.width)))),ea=Math.min(z,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.styd.begin();d.moveTo(p,A);d.lineTo(p+G,A);d.lineTo(p+G,A+Math.max(0,ea-1.5*D));d.lineTo(p+Math.max(0,G-D),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+G,A);d.lineTo(p+t,A);d.lineTo(p+t,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",na);mxPerimeter.CenterPerimeter=function(d,p,A,t){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,t){t=fa.prototype.size;null!=p&&(t=mxUtils.getValue(p.style,"size",t)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+t,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,A,t){t=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,t){t=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(t+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(t=-1*(t+1)),new mxPoint(d.getCenterX()+t,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&-(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ca.prototype.size))*p.view.scale))),p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);+(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",da.prototype.size))*p.view.scale))),p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+sa),new mxPoint(G,ea+sa),new mxPoint(G+z,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,ea+sa),@@ -2849,8 +2849,8 @@ A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxCoza);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",C);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",P);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(d,-p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);-d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ja);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=+p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);+d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,p,A,t,z){var D=d.state.strokeWidth/2,G=10+2*D,ea=A+z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea-G/2);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea+G/2);d.moveTo(p+D,ea);d.lineTo(p+t-D,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea-G/2);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ia,mxEllipse);Ia.prototype.drawHidden=!0;Ia.prototype.paintVertexShape=function(d,p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=@@ -2945,10 +2945,10 @@ A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize",A)},function(p,A){var t=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/t*2,Math.max(0,p.getCenterX()-A.x)/t*2)))})]},note:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[bb(d,["size"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*t/4)},function(A,t){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(t.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[bb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:Ea.prototype.size));return new mxPoint(p.x+p.width-t*(A?1:-p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[bb(d,["size","position"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));mxUtils.getValue(this.state.style,-"base",ca.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",ca.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ca.prototype.position2)));return new mxPoint(A.x+t*A.width,A.y+A.height)},-function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position))),D=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",ca.prototype.base)));return new mxPoint(A.x+Math.min(A.width,z*A.width+D),A.y+A.height-t)},function(A,t){var z=-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[bb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"dy",va.prototype.dy)));+p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[bb(d,["size","position"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));mxUtils.getValue(this.state.style,+"base",da.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(A.x+t*A.width,A.y+A.height)},+function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))),D=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(A.x+Math.min(A.width,z*A.width+D),A.y+A.height-t)},function(A,t){var z=+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[bb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"dy",va.prototype.dy)));return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[bb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ja.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ja.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Qa.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Qa.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,@@ -2958,14 +2958,14 @@ A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.widMath.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[bb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:ub(g.prototype.size),cylinder3:ub(m.prototype.size),offPageConnector:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ha.prototype.size,!0,null,!0,ha.prototype.fixedSize),hexagon:Cb(Z.prototype.size,!0,.5,!0,Z.prototype.fixedSize),-curlyBracket:Cb(ia.prototype.size,!1),display:Cb(ab.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=+curlyBracket:Cb(ja.prototype.size,!1),display:Cb(ab.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=yb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=yb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=yb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),vb=new mxPoint(1,0),rb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));var Db=mxUtils.toRadians(-150);vb=mxUtils.getRotatedPoint(vb,Math.cos(Db),Math.sin(Db));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var D=d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,ea=G[0];G=G[G.length-1];null!=t&&(t=D.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=xb.x,sa=xb.y,ma=vb.x,$a=vb.y,jb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ka){Fa-=db.x;var Ha=La-db.y;La=($a*Fa-ma*Ha)/(O*$a-sa*ma);Fa=(sa*Fa-O*Ha)/(sa*ma-O*$a);jb?(Ka&&(db=new mxPoint(db.x+O*La,db.y+sa*La),z.push(db)),db=new mxPoint(db.x+ma*Fa,db.y+$a*Fa)):(Ka&&(db=new mxPoint(db.x+ma*Fa,db.y+$a*Fa),z.push(db)),db=new mxPoint(db.x+O*La,db.y+sa*La));z.push(db)};var db=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);A.snapToTerminals=!1;return A}return Fb.apply(this,arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+(1-z)*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*t));return d};c.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;t=Math.min(p*Math.tan(t),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};ca.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,+0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};da.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-t)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-t)));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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,@@ -2982,7 +2982,7 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnect0),!1,null,.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return d};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=-mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,+mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ja.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ja.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ja.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-@@ -3070,8 +3070,8 @@ this.addAction("clearWaypoints",function(){var E=q.getSelectionCells();if(null!=document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var E=q.getCurrentCellStyle(q.getSelectionCell());E=mxUtils.getValue(E,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,E-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var E=q.getCurrentCellStyle(q.getSelectionCell());E=mxUtils.getValue(E,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,E+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var E=mxResources.get("image")+" ("+mxResources.get("url")+"):",Q=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=Q&&(c=Q.style[mxConstants.STYLE_IMAGE]||c,g=Q.style[mxConstants.STYLE_CLIP_PATH]||g);var m=q.cellEditor.saveSelection();u.showImageDialog(E,c,function(n,x,F,I,M,L){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(m),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var aa=null;-q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ia=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ia.x;K[0].geometry.y=ia.y;null!=I&&l(K[0],I,M,L,q);aa=K;q.fireEvent(new mxEventObject("cellsInserted","cells",aa))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var da=q.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&-"label"!=da[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var oa=q.getModel().getGeometry(ba);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(ba,oa))}null!=I&&l(ba,I,M,L,q)}}finally{q.getModel().endUpdate()}null!=aa&&(q.setSelectionCells(aa),+q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ja=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ja.x;K[0].geometry.y=ja.y;null!=I&&l(K[0],I,M,L,q);aa=K;q.fireEvent(new mxEventObject("cellsInserted","cells",aa))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var ca=q.getCurrentCellStyle(K[0]);"image"!=ca[mxConstants.STYLE_SHAPE]&&+"label"!=ca[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var oa=q.getModel().getGeometry(ba);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(ba,oa))}null!=I&&l(ba,I,M,L,q)}}finally{q.getModel().endUpdate()}null!=aa&&(q.setSelectionCells(aa),q.scrollCellToVisible(aa[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=B;this.addAction("crop...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E){var Q=q.getCurrentCellStyle(E),c=Q[mxConstants.STYLE_IMAGE],g=Q[mxConstants.STYLE_SHAPE];c&&"image"==g&&(Q=new CropImageDialog(u,c,Q[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(E,m,n,x,q)}),u.showDialog(Q.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(u,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){u.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return u.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?@@ -3254,33 +3254,33 @@ Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # forEditor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(N){}};v.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(J){}})();Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(J){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var J=document.createElement("style");J.type="text/css";var N=J.appendChild,T=document,V=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(J,V.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=-rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var V=N[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,N,T){var V=k.state.strokeColor,U=k.state.strokeWidth,Y=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);-k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(Y)};v._drawToContext=function(J,N,T){J.begin();for(var V=0;V<N.ops.length;V++){var U=N.ops[V],Y=U.data;switch(U.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,-U,Y){this.canvas=V;this.rc=U;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;+rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var V=N[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,N,T){var V=k.state.strokeColor,U=k.state.strokeWidth,X=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);+k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(X)};v._drawToContext=function(J,N,T){J.begin();for(var V=0;V<N.ops.length;V++){var U=N.ops[V],X=U.data;switch(U.op){case "move":J.moveTo(X[0],X[1]);break;case "bcurveTo":J.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":J.lineTo(X[0],X[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,+U,X){this.canvas=V;this.rc=U;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp=-"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(V,U){var Y=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var na=0;na<fa.length;na++)Y=(Y<<5)-Y+fa.charCodeAt(na)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};fa=this.rc.getDefaultOptions();Y.stroke=V?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;V=null;(Y.filled=U)?(Y.fill=-this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,V=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);Y.simplification=mxUtils.getValue(this.shape.style,-"simplification",fa.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==U?-1:U;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);Y.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",U);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",-U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=Y.fill&&(null!=V||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(Y.fill)))?"solid":fa.fillStyle);Y.fillStyle=U;return Y};k.prototype.begin=+"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(V,U){var X=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var na=0;na<fa.length;na++)X=(X<<5)-X+fa.charCodeAt(na)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};fa=this.rc.getDefaultOptions();X.stroke=V?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;V=null;(X.filled=U)?(X.fill=+this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,V=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);X.simplification=mxUtils.getValue(this.shape.style,+"simplification",fa.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==U?-1:U;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);X.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",U);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",+U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=X.fill&&(null!=V||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(X.fill)))?"solid":fa.fillStyle);X.fillStyle=U;return X};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var V=2;V<arguments.length;V+=2)this.lastX=arguments[V-1],this.lastY=arguments[V],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(V,U){this.passThrough?-this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,V,U),this.lastX=V,this.lastY=U)};k.prototype.moveTo=function(V,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,V,U),this.lastX=V,this.lastY=U,this.firstX=V,this.firstY=U)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(V,U,Y,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,-arguments):(this.addOp(this.quadOp,V,U,Y,fa),this.lastX=Y,this.lastY=fa)};k.prototype.curveTo=function(V,U,Y,fa,na,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,V,U,Y,fa,na,la),this.lastX=na,this.lastY=la)};k.prototype.arcTo=function(V,U,Y,fa,na,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,V,U,Y,fa,na,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],-ya[wa+1],ya[wa+2],ya[wa+3],ya[wa+4],ya[wa+5]);this.lastX=la;this.lastY=qa}};k.prototype.rect=function(V,U,Y,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(V,U,Y,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(V,U,Y,fa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(V+Y/2,U+fa/2,Y,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(V,-U,Y,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(V+na,U),this.lineTo(V+Y-na,U),this.quadTo(V+Y,U,V+Y,U+la),this.lineTo(V+Y,U+fa-la),this.quadTo(V+Y,U+fa,V+Y-na,U+fa),this.lineTo(V+na,U+fa),this.quadTo(V,U+fa,V,U+fa-la),this.lineTo(V,U+la),this.quadTo(V,U,V+na,U))};k.prototype.drawPath=function(V){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),V)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in V)this.nextShape.options[U]=+this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,V,U),this.lastX=V,this.lastY=U)};k.prototype.moveTo=function(V,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,V,U),this.lastX=V,this.lastY=U,this.firstX=V,this.firstY=U)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(V,U,X,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,+arguments):(this.addOp(this.quadOp,V,U,X,fa),this.lastX=X,this.lastY=fa)};k.prototype.curveTo=function(V,U,X,fa,na,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,V,U,X,fa,na,la),this.lastX=na,this.lastY=la)};k.prototype.arcTo=function(V,U,X,fa,na,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,V,U,X,fa,na,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],+ya[wa+1],ya[wa+2],ya[wa+3],ya[wa+4],ya[wa+5]);this.lastX=la;this.lastY=qa}};k.prototype.rect=function(V,U,X,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(V,U,X,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(V,U,X,fa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(V+X/2,U+fa/2,X,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(V,+U,X,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(V+na,U),this.lineTo(V+X-na,U),this.quadTo(V+X,U,V+X,U+la),this.lineTo(V+X,U+fa-la),this.quadTo(V+X,U+fa,V+X-na,U+fa),this.lineTo(V+na,U+fa),this.quadTo(V,U+fa,V,U+fa-la),this.lineTo(V,U+la),this.quadTo(V,U,V+na,U))};k.prototype.drawPath=function(V){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),V)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in V)this.nextShape.options[U]=V[U];V.stroke!=mxConstants.NONE&&null!=V.stroke||delete this.nextShape.options.stroke;V.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;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(V){return new k(V,Editor.createRoughCanvas(V),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(V){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,Y,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();-var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};Y||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;N.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();Y&&null!=fa&&(V.addTolerance=function(){})}N.apply(this,arguments);-V.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,U,Y,fa,na,la){null!=V.handJiggle&&V.handJiggle.constructor==k?(V.handJiggle.passThrough=!0,T.apply(this,arguments),V.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?+"sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,X,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();+var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};X||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;N.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();X&&null!=fa&&(V.addTolerance=function(){})}N.apply(this,arguments);+V.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,U,X,fa,na,la){null!=V.handJiggle&&V.handJiggle.constructor==k?(V.handJiggle.passThrough=!0,T.apply(this,arguments),V.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,J){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var V=0;V<N.length;V++)if("mxgraph"==N[V].getAttribute("class")){T.push(N[V]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,J),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(T=k[0],J&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),J=null;0<v.length?J=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var N=k.indexOf("stream",J)+9;if(0<k.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(J=-k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var V=[],U=null;T<k.length;){var Y=k.charCodeAt(T);T+=-1;10!=Y&&(J+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==Y&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=+k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var V=[],U=null;T<k.length;){var X=k.charCodeAt(T);T+=+1;10!=X&&(J+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==X&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,J=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,v){var J=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(J=mxUtils.getTextContent(v[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=@@ -3308,35 +3308,35 @@ this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.ba"^"+T.url}),J.setAttribute("extFonts",N.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var J=mxUtils.parseXml(v).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=function(k,v,J){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var u=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){u.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var J=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=-function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(Y){MathJax.typesetClear([U]),null!=Y.retry?(N=U,Y.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+Y.toString())}};window.MathJax=null!=+function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(X){MathJax.typesetClear([U]),null!=X.retry?(N=U,X.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+X.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};-var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(Y,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",k);v[0].parentNode.appendChild(V)}}};+var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(X,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",k);v[0].parentNode.appendChild(V)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],N=0,T=!0,V;k=$jscomp.makeIterator(k);for(V=k.next();!V.done;V=k.next())V=V.value,'"'===V?(T&&V===v&&(J[N]+=V),T=!T):","===V&&T?V=J[++N]="":J[N]+=V,v=V;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,J=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+-"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),Y=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||-299<na.getStatus()?Y():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&Y()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=-J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<V.length?V.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(Y,fa){Y=k.getElementsByTagName(Y);for(var na=0;na<Y.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,-function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(Y[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,V,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),X=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||+299<na.getStatus()?X():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&X()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=+J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<V.length?V.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(X,fa){X=k.getElementsByTagName(X);for(var na=0;na<X.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,+function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(X[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,V,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4);v+="==";break}V=k.charCodeAt(J++);if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&-3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,V,U,Y){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&-299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(V=null!=V?V:"data:image/png;base64,",la=V+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:na})},Y)});na()}catch(la){null!=+3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,V,U,X){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&+299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(V=null!=V?V:"data:image/png;base64,",la=V+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:na})},X)});na()}catch(la){null!=J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),N=JSON.parse(J);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=N&&0<N.length&&(T=N[0].getAttribute("href"));for(var V=1;V<J.length;V++)if(N=J[V].indexOf(")"),0<N){var U=Editor.trimCssUrl(J[V].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[V].substring(N))}else v.push(J[V])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));-J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,Y=J[k].indexOf("format(",V);0<Y&&(U=Editor.trimCssUrl(J[k].substring(Y+-7,J[k].indexOf(")",Y))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na=+J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,X=J[k].indexOf("format(",V);0<X&&(U=Editor.trimCssUrl(J[k].substring(X++7,J[k].indexOf(")",X))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na="application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,V)),U)}T()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var J=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(J.join(""),k)}),-V=0;V<v.length;V++)mxUtils.bind(this,function(U,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(Y),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[Y]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+Y+");\n");T()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+Y+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");+V=0;V<v.length;V++)mxUtils.bind(this,function(U,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(X),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[X]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+X+");\n");T()}))):J.push(this.cachedGoogleFonts[X]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+X+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var N=mxUtils.getTextContent(v[J]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],V=0;V<N.length;V++)"@import"==N[V].substring(0,7)?v.push(N[V]):T.push(N[V]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var N=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=-function(k,v,J,N,T,V,U,Y,fa,na,la,qa,ya,wa,Ja,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(ra){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ra.drawImage(Ca,-0,0);k(Na,ra)},0):(Ra.drawImage(Ca,0,0),k(Na,ra))},Na=document.createElement("canvas"),Oa=parseInt(ra.getAttribute("width")),Qa=parseInt(ra.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=V?Math.min(1,Math.min(3*v/(4*Qa),v/Oa)):v/Oa);Y=this.getMaxCanvasScale(Oa,Qa,Y);Oa=Math.ceil(Y*Oa);Qa=Math.ceil(Y*Qa);Na.setAttribute("width",Oa);Na.setAttribute("height",Qa);var Ra=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ra.beginPath();Ra.rect(0,0,Oa,Qa);Ra.fillStyle="dark"==Aa&&-"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ra.fill()}1!=Y&&Ra.scale(Y,Y);if(Ja){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*Y,W=qa.getGraphBounds(),ja=Ea.translate.x*C,ka=Ea.translate.y*C,pa=ja+(W.x-ja)/C-ya,xa=ka+(W.y-ka)/C-ya,ta=new Image;ta.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ja-pa)*Y,R)),Ia=-Math.round(R-mxUtils.mod((ka-xa)*Y,-R));ua<Oa;ua+=R)for(var Va=Ia;Va<Qa;Va+=R)Ra.drawImage(ta,ua/Y,Va/Y);va()}catch(Wa){null!=T&&T(Wa)}};ta.onerror=function(ua){null!=T&&T(ua)};ta.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(ra);this.graph.mathEnabled&&this.addMathCss(ra);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ra,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ra))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,+function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(ra){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ra.drawImage(Ca,+0,0);k(Na,ra)},0):(Ra.drawImage(Ca,0,0),k(Na,ra))},Na=document.createElement("canvas"),Oa=parseInt(ra.getAttribute("width")),Qa=parseInt(ra.getAttribute("height"));X=null!=X?X:1;null!=v&&(X=V?Math.min(1,Math.min(3*v/(4*Qa),v/Oa)):v/Oa);X=this.getMaxCanvasScale(Oa,Qa,X);Oa=Math.ceil(X*Oa);Qa=Math.ceil(X*Qa);Na.setAttribute("width",Oa);Na.setAttribute("height",Qa);var Ra=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ra.beginPath();Ra.rect(0,0,Oa,Qa);Ra.fillStyle="dark"==Aa&&+"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ra.fill()}1!=X&&Ra.scale(X,X);if(Ja){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*X,W=qa.getGraphBounds(),ia=Ea.translate.x*C,ka=Ea.translate.y*C,pa=ia+(W.x-ia)/C-ya,xa=ka+(W.y-ka)/C-ya,ta=new Image;ta.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*X,R)),Ia=-Math.round(R-mxUtils.mod((ka-xa)*X,+R));ua<Oa;ua+=R)for(var Va=Ia;Va<Qa;Va+=R)Ra.drawImage(ta,ua/X,Va/X);va()}catch(Wa){null!=T&&T(Wa)}};ta.onerror=function(ua){null!=T&&T(ua)};ta.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(ra);this.graph.mathEnabled&&this.addMathCss(ra);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ra,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ra))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(ra,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(ra){null!=T&&T(ra)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,B=0;8>B;B++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];-return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,-4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=Y(J)+Y(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=Y(J.length)+v+J+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?+return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function X(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,+4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=X(J)+X(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=X(J.length)+v+J+X(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var J=null;null!=k.editor.graph.getModel().getParent(v)?J=v.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var E=Format.prototype.init;Format.prototype.init=function(){E.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var Q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?Q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;if(J.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},@@ -3366,28 +3366,28 @@ stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"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;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=-this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,N){function T(Ra,za,Ea,C,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ja=Ea.parentRow.nextSibling;ja&&ja.getAttribute("data-pName")==-Ra;)W.push(ja.getAttribute("data-pValue")),ja=ja.nextSibling;Ea.index<W.length?null!=C?W.splice(C,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ra,za,ya.getSelectionCells());P.push(Ra);R.push(za);if(null!=Ea.dependentProps)for(Ra=0;Ra<Ea.dependentProps.length;Ra++){var ka=Ea.dependentPropsDefVal[Ra],+this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,N){function T(Ra,za,Ea,C,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==+Ra;)W.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<W.length?null!=C?W.splice(C,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ra,za,ya.getSelectionCells());P.push(Ra);R.push(za);if(null!=Ea.dependentProps)for(Ra=0;Ra<Ea.dependentProps.length;Ra++){var ka=Ea.dependentPropsDefVal[Ra],pa=Ea.dependentPropsVals[Ra];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ka);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Ra],pa,ya.getSelectionCells());P.push(Ea.dependentProps[Ra]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",P,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function V(Ra,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Ra,za,Ea){function C(R){if(null==R||R==mxConstants.NONE)P.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)P.style.background="";else{var W=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&W.light!=W.dark?P.style.background="linear-gradient(to right bottom, "+W.cssText+" 50%, "+mxUtils.invertLightDarkColor(W).cssText+-" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ra,W,Ea);C(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function Y(Ra,za,Ea,C,P,-R,W){null!=za&&(za=za.split(","),wa.push({name:Ra,values:za,type:Ea,defVal:C,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ja){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ra)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:P};pa=la(Ra,"",xa,0==pa%2,W);T(Ra,C,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ja)}));btn.style.height=-"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ra,za,Ea,C,P,R,W){if(0<P){var ja=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ja[ka]=null!=za[ka]?za[ka]:null!=C?C:"";wa.push({name:Ra,values:ja,type:Ea,defVal:C,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ra,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Ra,C.checked?"1":"0",Ea,null,C)});return C}-function la(Ra,za,Ea,C,P){var R=Ea.dispName,W=Ea.type,ja=document.createElement("tr");ja.className="gePropRow"+(P?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ja.setAttribute("data-pName",Ra);ja.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ja.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);C&&(ka.style.textAlign="right");ja.appendChild(ka);-ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ja,document.activeElement)&&mxUtils.isAncestorNode(ja.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ra,+" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ra,W,Ea);C(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function X(Ra,za,Ea,C,P,+R,W){null!=za&&(za=za.split(","),wa.push({name:Ra,values:za,type:Ea,defVal:C,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ra)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:P};pa=la(Ra,"",xa,0==pa%2,W);T(Ra,C,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ia)}));btn.style.height=+"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ra,za,Ea,C,P,R,W){if(0<P){var ia=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ia[ka]=null!=za[ka]?za[ka]:null!=C?C:"";wa.push({name:Ra,values:ia,type:Ea,defVal:C,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ra,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Ra,C.checked?"1":"0",Ea,null,C)});return C}+function la(Ra,za,Ea,C,P){var R=Ea.dispName,W=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(P?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Ra);ia.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);C&&(ka.style.textAlign="right");ia.appendChild(ka);+ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ra,za,Ea));else if("bool"==W||"boolean"==W)ka.appendChild(na(Ra,za,Ea));else if("enum"==W){var pa=Ea.enumList;ka.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ka.appendChild(xa);for(P=0;P<pa.length;P++)if(R=pa[P],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){var Ia=mxEvent.getSource(ua);if(!(Ia!=ka&&Ia!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Wa=null;V(ka,Va);for(ua=0;ua<pa.length;ua++){Ia=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ta,mxResources.get(Ia.dispName,null,Ia.dispName));Va.appendChild(Ta);null==Ia.val&&(Ta.value="null",Wa=Ta)}Va.value=null==za&&null!=Wa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var ab=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Wa||"null"==ab.value)ab=null;T(Ra,ab,Ea)});Va.focus();mxEvent.addListener(Va,"blur",-function(){xa.innerHTML="";for(var ab=0;ab<pa.length;ab++){var Pa=pa[ab];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(Y(Ra,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ja,P));else if("staticArr"==W)ka.appendChild(fa(Ra,za,Ea.subType,Ea.subDefVal,Ea.size,ja,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ra?(ja.firstChild.innerHTML=-"",ja.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ja.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ta=document.createElement("div");ta.className="gePropValue";ka.appendChild(ta);ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));+function(){xa.innerHTML="";for(var ab=0;ab<pa.length;ab++){var Pa=pa[ab];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(X(Ra,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,P));else if("staticArr"==W)ka.appendChild(fa(Ra,za,Ea.subType,Ea.subDefVal,Ea.size,ia,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ra?(ia.firstChild.innerHTML=+"",ia.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ia.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ta=document.createElement("div");ta.className="gePropValue";ka.appendChild(ta);ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){function Ia(){var Ta=Wa.value;Ta=0==Ta.length&&"string"!=W&&"numbers"!=W?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",W="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var ab=null;try{ab="numbers"==W?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==W?parseInt(Ta):Ta)+"")}catch(Pa){}T(Ra,ab,Ea,null,Wa)}var Va=mxEvent.getSource(ua);if(!(Va!=ka&&Va!=ta||mxEvent.isConsumed(ua))){ta.innerHTML="";var Wa=document.createElement("input");V(ta,Wa);Wa.value=decodeURIComponent(za);Wa.className="gePropEditor";"int"!=W&&"float"!=W||Ea.allowAuto||(Wa.type="number",Wa.step="int"==W?"1":"any",null!=Ea.min&&(Wa.min=parseFloat(Ea.min)),null!=Ea.max&&(Wa.max=parseFloat(Ea.max)));ta.appendChild(Wa);mxEvent.addListener(Wa,"keypress",function(Ta){13==Ta.keyCode&&Ia()});Wa.focus();mxEvent.addListener(Wa,"blur",function(){Ia()})}}))}Ea.isDeletable&&-(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ra,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ja.appendChild(ka);return ja}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ja=document.createElement("table");Ja.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=+(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ra,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ia.appendChild(ka);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ja=document.createElement("table");Ja.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft="16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Ra=Ja.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var C=k.childNodes[Ea],P=C.nodeName.toUpperCase();"INPUT"!=P&&"SELECT"!=P||k.removeChild(C)}catch(R){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Ra.length;Ea++)Ra[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ja.appendChild(Aa);var ra=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||N||Ja.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var Ca in v)if(N=v[Ca],!N.primary&&("function"!=typeof N.isVisible||N.isVisible(J,this))){var Da=null!=N.getValue?N.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(J,this):N.defVal;if("separator"==N.type)ra=!ra;else{if("staticArr"==N.type)N.size=parseInt(J.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Oa=[];for(Aa=0;Aa<va.length;Aa++){var Qa=J.style[va[Aa]];Oa.push(v[va[Aa]].subDefVal);Na.push(null!=Qa?Qa.split(","):[])}N.dependentPropsDefVal=Oa;N.dependentPropsVals=Na}Ja.appendChild(la(Ca,Da,N,Ma,ra));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,-size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ja);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var Y=document.createElement("div");-Y.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);V.push(Y);T.appendChild(Y)}var fa=mxUtils.bind(this,function(ya){null!=V[ya]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,na(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,+size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ja);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var X=document.createElement("div");+X.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(X,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);V.push(X);T.appendChild(X)}var fa=mxUtils.bind(this,function(ya){null!=V[ya]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,na(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ja=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){J.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=J.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!J.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,@@ -3405,44 +3405,44 @@ null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElemGraph.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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):J.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var V=this.graph.getCellStyle(T);if(null!=V&&"rack"==V.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=V.rackUnitSize?parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=V.marginLeft||0;U.marginRight=V.marginRight||0;U.marginTop=V.marginTop||0;U.marginBottom=V.marginBottom||0;U.allowGaps=V.allowGaps||0;U.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,-arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,V,U,Y,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&-Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function V(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";-var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var ra=0;ra<Aa.length;ra++)(function(Ca){function Da(){var za=Y.getCellsForTags([Ca],null,null,!0);Y.isEnabled()?Y.setSelectionCells(za):Y.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(Y.hiddenTags,Ca),Na=document.createElement("tr"),Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";var Qa=document.createElement("img");Qa.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Qa.setAttribute("title",-mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";Oa.appendChild(Qa);mxEvent.addListener(Qa,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(Y.hiddenTags,Ca)):(Y.toggleHiddenTag(Ca),T(),Y.refresh());mxEvent.consume(za)});Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.align="center";+arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,V,U,X,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&+Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=X.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)X.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);X.setSelectionCells(Ba)}function V(Aa){X.setHiddenTags(Aa?[]:fa.slice());T();X.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";+var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var ra=0;ra<Aa.length;ra++)(function(Ca){function Da(){var za=X.getCellsForTags([Ca],null,null,!0);X.isEnabled()?X.setSelectionCells(za):X.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(X.hiddenTags,Ca),Na=document.createElement("tr"),Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";var Qa=document.createElement("img");Qa.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Qa.setAttribute("title",+mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";Oa.appendChild(Qa);mxEvent.addListener(Qa,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(X.hiddenTags,Ca)):(X.toggleHiddenTag(Ca),T(),X.refresh());mxEvent.consume(za)});Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.selectImage);Qa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){V(!0);Da();mxEvent.consume(za)});Oa.appendChild(Qa);Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.overflow=-"hidden";Oa.style.whiteSpace="nowrap";Oa.style.textOverflow="ellipsis";Oa.style.verticalAlign="middle";Oa.style.cursor="pointer";Oa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Oa.appendChild(a);mxEvent.addListener(Oa,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<Y.hiddenTags.length)V(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);-Y.setHiddenTags(Ea);T();Y.refresh()}mxEvent.consume(za)});Na.appendChild(Oa);if(Y.isEnabled()){Oa=document.createElement("td");Oa.style.verticalAlign="middle";Oa.style.textAlign="center";Oa.style.width="18px";if(null==Ba){Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.trashImage);Qa.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor=-"pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);Y.removeTagsForCells(Y.model.getDescendants(Y.model.getRoot()),[Ca]);Y.refresh();mxEvent.consume(za)});Oa.appendChild(Qa)}else{var Ra=document.createElement("input");Ra.setAttribute("type","checkbox");Ra.style.margin="0px";Ra.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ra.checked=Ra.defaultChecked;Ra.style.background=-"transparent";Ra.setAttribute("title",mxResources.get(Ra.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ra,"change",function(za){Ra.checked?Y.addTagsForCells(Y.getSelectionCells(),[Ca]):Y.removeTagsForCells(Y.getSelectionCells(),[Ca]);mxEvent.consume(za)});Oa.appendChild(Ra)}Na.appendChild(Oa)}Ma.appendChild(Na)})(Aa[ra]);Ga.appendChild(Ma);la.appendChild(Ga)}}var Y=this,fa=Y.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding=-"10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);Y.addListener(mxEvent.ROOT,function(){fa=Y.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=Y.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);-fa.sort();Y.isSelectionEmpty()?U(fa):U(fa,Y.getCommonTagsForCells(Y.getSelectionCells()))}});Y.selectionModel.addListener(mxEvent.CHANGE,qa);Y.model.addListener(mxEvent.CHANGE,qa);Y.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";-ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(Y.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ja=wa.cloneNode(!1);Ja.style.backgroundImage="url("+Editor.visibleImage+")";Ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ja,"click",function(Aa){Y.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=Y.hiddenTags.slice());T();Y.refresh();mxEvent.consume(Aa)});ya.appendChild(Ja);null!=+"hidden";Oa.style.whiteSpace="nowrap";Oa.style.textOverflow="ellipsis";Oa.style.verticalAlign="middle";Oa.style.cursor="pointer";Oa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Oa.appendChild(a);mxEvent.addListener(Oa,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<X.hiddenTags.length)V(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);+X.setHiddenTags(Ea);T();X.refresh()}mxEvent.consume(za)});Na.appendChild(Oa);if(X.isEnabled()){Oa=document.createElement("td");Oa.style.verticalAlign="middle";Oa.style.textAlign="center";Oa.style.width="18px";if(null==Ba){Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.trashImage);Qa.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor=+"pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);X.removeTagsForCells(X.model.getDescendants(X.model.getRoot()),[Ca]);X.refresh();mxEvent.consume(za)});Oa.appendChild(Qa)}else{var Ra=document.createElement("input");Ra.setAttribute("type","checkbox");Ra.style.margin="0px";Ra.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ra.checked=Ra.defaultChecked;Ra.style.background=+"transparent";Ra.setAttribute("title",mxResources.get(Ra.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ra,"change",function(za){Ra.checked?X.addTagsForCells(X.getSelectionCells(),[Ca]):X.removeTagsForCells(X.getSelectionCells(),[Ca]);mxEvent.consume(za)});Oa.appendChild(Ra)}Na.appendChild(Oa)}Ma.appendChild(Na)})(Aa[ra]);Ga.appendChild(Ma);la.appendChild(Ga)}}var X=this,fa=X.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding=+"10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);X.addListener(mxEvent.ROOT,function(){fa=X.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=X.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);+fa.sort();X.isSelectionEmpty()?U(fa):U(fa,X.getCommonTagsForCells(X.getSelectionCells()))}});X.selectionModel.addListener(mxEvent.CHANGE,qa);X.model.addListener(mxEvent.CHANGE,qa);X.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";+ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(X.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ja=wa.cloneNode(!1);Ja.style.backgroundImage="url("+Editor.visibleImage+")";Ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ja,"click",function(Aa){X.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=X.hiddenTags.slice());T();X.refresh();mxEvent.consume(Aa)});ya.appendChild(Ja);null!=J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",!1,J);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,V=0;V<N.length;V++)N[V].getAttribute("face")==J&&(T=!0,N[V].setAttribute("face",k),null!=v?N[V].setAttribute("data-font-src",v):N[V].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=L.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=-function(k,v,J,N,T,V,U,Y,fa,na,la,qa,ya,wa,Ja,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var ra=Ba.ownerDocument;Ga=null!=ra.createElementNS?ra.createElementNS(mxConstants.NS_SVG,"style"):ra.createElement("style");null!=ra.setAttributeNS?+function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var ra=Ba.ownerDocument;Ga=null!=ra.createElementNS?ra.createElementNS(mxConstants.NS_SVG,"style"):ra.createElement("style");null!=ra.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Oa=Ma[va].url;Graph.isCssFontUrl(Oa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Oa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Oa+'");\n}\n'}Ga.appendChild(ra.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var aa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){aa.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,-k.control]};var ia=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ia.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'++k.control]};var ja=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ja.apply(this,arguments);this.enumerationState=0};var ca=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ca.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var J=k.view.scale,N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==J||(v.bounds=k,v.value=N,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,J){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 N=!1,T=0,V=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),Y=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=-this.stoppingCustomActions,qa=k[V++],ya=[];if(null!=qa.open)if(Y(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),Y());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,+!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,T=0,V=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),X=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=+this.stoppingCustomActions,qa=k[V++],ya=[];if(null!=qa.open)if(X(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),X());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(U(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ja=qa.tags.toggle;0==Ja.length&&(Ja=this.getAllTags());for(wa=0;wa<Ja.length;wa++)this.toggleHiddenTag(Ja[wa])}Ja=null;null!=qa.tags.hidden&&(null==Ja&&(Ja=[]),Ja=Ja.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ja&&(Ja=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,-Aa[wa])&&0>mxUtils.indexOf(Ja,Aa[wa])&&Ja.push(Aa[wa])}null!=Ja&&this.setHiddenTags(Ja);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():Y()}else this.stoppingCustomActions=this.executingCustomActions=!1,Y(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");+Aa[wa])&&0>mxUtils.indexOf(Ja,Aa[wa])&&Ja.push(Aa[wa])}null!=Ja&&this.setHiddenTags(Ja);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():X()}else this.stoppingCustomActions=this.executingCustomActions=!1,X(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),V=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),V=!0);V&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(N){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var N=v[J],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var N=[],T=0;T<v[J].length;T++)if("*"==v[J][T])N.push(v[J][T]);else{var V=k[v[J][T]];null!=V?""!=V&&N.push(V):N.push(v[J][T])}v[J]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var X=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return X.apply(this,arguments)&&+null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var Y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return Y.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;-for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},Y=0;Y<k.length;Y++)0<k[Y].length&&(U[k[Y]]=!0,V++);for(Y=0;Y<v.length;Y++)if(J&&this.model.getParent(v[Y])==this.model.root||this.model.isVertex(v[Y])||this.model.isEdge(v[Y])){var fa=this.getTagsForCell(v[Y]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=-na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=N||this.isCellVisible(v[Y]))&&T.push(v[Y])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};+for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},X=0;X<k.length;X++)0<k[X].length&&(U[k[X]]=!0,V++);for(X=0;X<v.length;X++)if(J&&this.model.getParent(v[X])==this.model.root||this.model.isVertex(v[X])||this.model.isEdge(v[X])){var fa=this.getTagsForCell(v[X]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=+na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=N||this.isCellVisible(v[X]))&&T.push(v[X])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var V=0;V<T.length;V++)null==J[T[V]]&&(J[T[V]]=!0,v.push(T[V]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var N=this.getTagsForCell(k[J]),T=N.split(" "),V=!1,U=0;U<-v.length;U++){var Y=mxUtils.trim(v[U]);""!=Y&&0>mxUtils.indexOf(T,Y)&&(N=0<N.length?N+" "+Y:Y,V=!0)}V&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),V=!1,U=0;U<v.length;U++){var Y=mxUtils.indexOf(T,v[U]);0<=Y&&(T.splice(Y,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",+v.length;U++){var X=mxUtils.trim(v[U]);""!=X&&0>mxUtils.indexOf(T,X)&&(N=0<N.length?N+" "+X:X,V=!0)}V&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),V=!1,U=0;U<v.length;U++){var X=mxUtils.indexOf(T,v[U]);0<=X&&(T.splice(X,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,J,N)};Graph.prototype.highlightCell=function(k,v,J,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var V=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),V=new mxCellHighlight(this,v,T,!1),null!=N&&(V.opacity=N),V.highlight(k),window.setTimeout(function(){null!=V.shape&&(mxUtils.setPrefixedStyle(V.shape.node.style,"transition","all 1200ms ease-in-out"),V.shape.node.style.opacity=0);window.setTimeout(function(){V.destroy()},1200)},J));return V};Graph.prototype.addSvgShadow=function(k,v,J,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,@@ -3460,32 +3460,32 @@ mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.x[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=-function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ca=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,V,U,Y,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return ca.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,V){"1"==mxUtils.getValue(v.style,"lineShape",+function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var da=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,V,U,X,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return da.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,V){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ha.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,N){function T(){Ja.value=Math.max(1,Math.min(la,Math.max(parseInt(Ja.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ja.value),parseInt(wa.value))))}function V(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=ra.checked;ya.checked&&wa.value<Ja.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ja.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=P.value;k.lastPrintGrid=W.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=C.value;var Ia={};Ia.border=parseInt(P.value);Ia.scale=parseInt(R.value)/100;-Ia.grid=W.checked;Ia.shadows=ja.checked;Ia.transparent=ka.checked;Ia.includeCopy=pa.checked;Ia.sheetsAcross=parseInt(Ea.value);Ia.sheetsDown=parseInt(C.value);Ia.pagesFrom=parseInt(wa.value);Ia.pagesTo=parseInt(Ja.value);Ia.allPages=qa.checked;Ia.selection=Ba.checked;Ia.pageView=Ga.checked;Ia.crop=Ma.checked;Ia.fit=ra.checked;return null!=J?J(!ua,Ia):k.print(!ua,Ia)}var U=k.editor.graph,Y=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";-fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);+Ia.grid=W.checked;Ia.shadows=ia.checked;Ia.transparent=ka.checked;Ia.includeCopy=pa.checked;Ia.sheetsAcross=parseInt(Ea.value);Ia.sheetsDown=parseInt(C.value);Ia.pagesFrom=parseInt(wa.value);Ia.pagesTo=parseInt(Ja.value);Ia.allPages=qa.checked;Ia.selection=Ba.checked;Ia.pageView=Ga.checked;Ia.crop=Ma.checked;Ia.fit=ra.checked;return null!=J?J(!ua,Ia):k.print(!ua,Ia)}var U=k.editor.graph,X=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";+fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));X.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ja=wa.cloneNode(!0);fa.appendChild(Ja);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ja,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ja,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ja.value=Math.min(la,Math.max(1,-k.lastPrintPagesToInput))):(wa.value=na,Ja.value=na);wa.setAttribute("max",la);Ja.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ja.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&Y.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=-"1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&Y.appendChild(fa);+k.lastPrintPagesToInput))):(wa.value=na,Ja.value=na);wa.setAttribute("max",la);Ja.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ja.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&X.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=+"1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&X.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name","printSize");U.appendChild(Ga);v=document.createElement("span");-mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=-!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom="8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ra);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");+mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=+!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom="8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ra);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Oa=va.cloneNode(!0),Qa=va.cloneNode(!0),Ra=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Qa.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=ra&&(ra.checked=!ra.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Oa.appendChild(v);mxUtils.write(Qa,mxResources.get("fitToBy"));var C=Ea.cloneNode(!0);C.setAttribute("value",k.lastPrintSheetsDown||"1");Ra.appendChild(C);mxEvent.addListener(Ea,"click",function(ua){ra.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(C,"click",function(ua){ra.checked=-!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?ra.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Oa);Da.appendChild(Qa);Da.appendChild(Ra);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";+!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?ra.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Oa);Da.appendChild(Qa);Da.appendChild(Ra);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.style.width="40px";P.style.marginLeft="4px";P.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(P);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var W=document.createElement("input");W.setAttribute("type","checkbox");W.style.marginTop="12px";W.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(W);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,-"click",function(ua){W.checked=!0;mxEvent.consume(ua)});var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="12px";ja.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ja);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,-"click",function(ua){ja.checked=!0;mxEvent.consume(ua)});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ja.style.display="none",v.style.display="none");var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ka),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),U.appendChild(v),mxEvent.addListener(v,+"click",function(ua){W.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,+"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ka),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),mxEvent.addListener(v,"click",-function(ua){pa.checked=!0;mxEvent.consume(ua)}));Y.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&(fa=mxUtils.button(mxResources.get("preview"),-function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);Y.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(Y.classList.add("geDarkMode"),Y.style.colorScheme=-"dark"):(Y.classList.remove("geDarkMode"),Y.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Ia){ua=Ia.getProperty("dialog");Y.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=Y};var Z=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||+function(ua){pa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&(fa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);X.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme=+"dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Ia){ua=Ia.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Z=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Z.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.4";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.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||"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -3503,10 +3503,10 @@ EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=-function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,I=x.spin,M=null,L=null,K=mxUtils.bind(this,function(da){null!=da&&da()}),aa=this;x.spin=function(da,ba,oa,X){X=null!=X?X:F;var ca=!1;if(!this.active){var ha=-Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},X));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);da==document.body&&"1"==urlParams.embedInline&&(da=aa.diagramContainer,c=da.scrollLeft+da.clientWidth/2,g=da.scrollTop+da.clientHeight/2);I.call(this,da);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=da.scrollTop+"px",-x.el.style.marginLeft=da.scrollLeft+"px");this.active=!0;null!=ba&&(ca=document.createElement("div"),ca.className="geSpinnerStatus",ca.setAttribute("title",ba),da==document.body?(ca.style.left=Math.max(0,c)+"px",ca.style.top=Math.max(0,g+66)+"px"):(ca.style.left="50%",ca.style.top="50%",ca.style.marginTop="70px"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-1)&&(ba+="..."),ca.innerText=ba,da.appendChild(ca),x.status=ca);this.pause=mxUtils.bind(this,function(){var Z=K;this.active&&-(X=Math.max(0,X-(Date.now()-ha)),Z=mxUtils.bind(this,function(k){this.spin(da,ba,oa,X);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(da,ba,oa,X);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return Z});ca=!0}return ca};var ia=x.stop;x.stop=function(){ia.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};+function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,I=x.spin,M=null,L=null,K=mxUtils.bind(this,function(ca){null!=ca&&ca()}),aa=this;x.spin=function(ca,ba,oa,Y){Y=null!=Y?Y:F;var da=!1;if(!this.active){var ha=+Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},Y));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=aa.diagramContainer,c=ca.scrollLeft+ca.clientWidth/2,g=ca.scrollTop+ca.clientHeight/2);I.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",+x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=ba&&(da=document.createElement("div"),da.className="geSpinnerStatus",da.setAttribute("title",ba),ca==document.body?(da.style.left=Math.max(0,c)+"px",da.style.top=Math.max(0,g+66)+"px"):(da.style.left="50%",da.style.top="50%",da.style.marginTop="70px"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-1)&&(ba+="..."),da.innerText=ba,ca.appendChild(da),x.status=da);this.pause=mxUtils.bind(this,function(){var Z=K;this.active&&+(Y=Math.max(0,Y-(Date.now()-ha)),Z=mxUtils.bind(this,function(k){this.spin(ca,ba,oa,Y);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,ba,oa,Y);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return Z});da=!0}return da};var ja=x.stop;x.stop=function(){ja.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var I=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<@@ -3515,11 +3515,11 @@ if(40==F.keyCode)return function(){I<x.pages.length-1&&x.selectPage(x.pages[x.pac.lastIndexOf("</mxfile>");n>m&&(g=c.substring(m,n+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(c),F=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=F?mxUtils.getXml(F):""}}catch(I){}return g};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var g=c.indexOf('<meta charset="utf-8">');0<=g&&(c=c.slice(0,g)+'<meta charset="utf-8"/>'+c.slice(g+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",g);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var m=null!=c?this.editor.extractGraphModel(c,!0):null;null!=m&&(c=m);if(null!=c){m=this.editor.graph;m.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,x=c.getElementsByTagName("diagram");if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var F=x.length-1;0<=F;F--){var I=this.updatePageRoot(new DiagramPage(x[F]));null==I.getName()&&I.setName(mxResources.get("pageWithNumber",[F+1]));m.model.execute(new ChangePage(this,I,0==F?I:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",-[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)m.model.execute(new ChangePage(this,n[F],null));var M=this.getCurrentFile();null!=M&&M.fileReplaced(g)}finally{m.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){g=-null!=g?g:this.editor.graph;x=null!=x?x:!1;L=null!=L?L:!0;aa=null!=aa?aa:!Editor.defaultCompressed;var ba=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var oa="_blank";else ba=oa=n;if(null==c)return"";var X=c;if("mxfile"!=X.nodeName.toLowerCase()){if(aa){var ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());ca.appendChild(c)}else{ca=Graph.zapGremlins(mxUtils.getXml(c));X=Graph.compress(ca);-if(Graph.decompress(X)!=ca)return ca;ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());mxUtils.setTextContent(ca,X)}X=c.ownerDocument.createElement("mxfile");X.appendChild(ca)}K?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):-(X.removeAttribute("userAgent"),X.removeAttribute("modified"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),X.removeAttribute("etag"),mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),1<X.getElementsByTagName("diagram").length&&-null!=this.pages&&X.setAttribute("pages",this.pages.length));null!=ia&&(X=X.cloneNode(!0),X.setAttribute("scale",ia));null!=da&&(X=X.cloneNode(!0),X.setAttribute("border",da));c=aa?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!F&&!x&&(I||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(X),g,null!=m?m.getTitle():null,oa,ba);else if(F||!x&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(X),+[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)m.model.execute(new ChangePage(this,n[F],null));var M=this.getCurrentFile();null!=M&&M.fileReplaced(g)}finally{m.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){g=+null!=g?g:this.editor.graph;x=null!=x?x:!1;L=null!=L?L:!0;aa=null!=aa?aa:!Editor.defaultCompressed;var ba=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var oa="_blank";else ba=oa=n;if(null==c)return"";var Y=c;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var da=c.ownerDocument.createElement("diagram");da.setAttribute("name",mxResources.get("pageWithNumber",[1]));da.setAttribute("id",Editor.guid());da.appendChild(c)}else{da=Graph.zapGremlins(mxUtils.getXml(c));Y=Graph.compress(da);+if(Graph.decompress(Y)!=da)return da;da=c.ownerDocument.createElement("diagram");da.setAttribute("name",mxResources.get("pageWithNumber",[1]));da.setAttribute("id",Editor.guid());mxUtils.setTextContent(da,Y)}Y=c.ownerDocument.createElement("mxfile");Y.appendChild(da)}K?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):+(Y.removeAttribute("userAgent"),Y.removeAttribute("modified"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),Y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),1<Y.getElementsByTagName("diagram").length&&+null!=this.pages&&Y.setAttribute("pages",this.pages.length));null!=ja&&(Y=Y.cloneNode(!0),Y.setAttribute("scale",ja));null!=ca&&(Y=Y.cloneNode(!0),Y.setAttribute("border",ca));c=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!F&&!x&&(I||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(Y),g,null!=m?m.getTitle():null,oa,ba);else if(F||!x&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(Y),c=this.getEmbeddedSvg(c,g,n,null,M,L,ba,null,null,m.scale,m.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,m,n){c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var K=L.getElementsByTagName("mxGraphModel"),aa=0<K.length?K[0]:null;K=L;null==aa&&m?(aa=mxUtils.getNodeValue(L),0<aa.length&&(aa=Graph.decompress(aa),null!=aa&&0<aa.length&&(K=L.cloneNode(!1),K.appendChild(mxUtils.parseXml(aa).documentElement)))):null==aa||m?K=L.cloneNode(!0):(K=L.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(aa)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],I=F.node;if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(I);I.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&(null!=F.viewState.backgroundImage.originalSrc?F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.originalSrc,F):Graph.isPageLink(F.viewState.backgroundImage.src)&&(F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.src,F))),null!=F.viewState.backgroundImage&&@@ -3529,9 +3529,9 @@ mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[delete I[M];mxUtils.isEmptyObject(I)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=function(c,g){g=c.getElementsByTagName("mxCell");for(var m=0;m<g.length;m++)null!=g[m].getAttribute("value")&&g[m].setAttribute("value","["+g[m].getAttribute("value").length+"]"),null!=g[m].getAttribute("xmlValue")&&g[m].setAttribute("xmlValue","["+g[m].getAttribute("xmlValue").length+"]"),null!=g[m].getAttribute("style")&&g[m].setAttribute("style","["+g[m].getAttribute("style").length+"]"),null!=g[m].parentNode&&"root"!=g[m].parentNode.nodeName&&null!=g[m].parentNode.parentNode&&(g[m].setAttribute("id",g[m].parentNode.getAttribute("id")),g[m].parentNode.parentNode.replaceChild(g[m],g[m].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;-var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var X=null!=this.pages?this.pages[0]:null;null==X||this.currentPage==X?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=X.viewState&&null!=X.viewState&&ba.setBackgroundImage(X.viewState.backgroundImage);-ba.getGlobalVariable=function(ca){return"page"==ca&&null!=X?X.getName():"pagenumber"==ca?1:oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=X&&ba.model.setRoot(X.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,c,g,m,n,x,M,K,ia,da);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost++(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;+var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var Y=null!=this.pages?this.pages[0]:null;null==Y||this.currentPage==Y?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=Y.viewState&&null!=Y.viewState&&ba.setBackgroundImage(Y.viewState.backgroundImage);+ba.getGlobalVariable=function(da){return"page"==da&&null!=Y?Y.getName():"pagenumber"==da?1:oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=Y&&ba.model.setRoot(Y.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,c,g,m,n,x,M,K,ja,ca);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){I=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var L=g.view.scale;F=Math.floor(I.x/L-g.view.translate.x);L=Math.floor(I.y/L-g.view.translate.y);I=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",L)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+@@ -3542,21 +3542,21 @@ EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};Editif(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var I=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<I.length;F++)g[I[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(aa){}};EditorUi.prototype.getBaseFilename=function(c){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=-function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X,ca){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,K,aa,ia,void 0,void 0,!F,da,ba,oa,X,ca)}catch(Y){this.handleError(Y)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;+function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,K,aa,ja,void 0,void 0,!F,ca,ba,oa,Y,da)}catch(X){this.handleError(X)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;if(I||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else Z=ha+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();J(V)}),n)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,I,M,L,-K,aa,ia,da,ba,oa,X,ca,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X,ca,ha,Z);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X,ca,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&+K,aa,ja,ca,ba,oa,Y,da,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=aa?(J=aa.from,N=aa.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=-aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ia&&isFinite(ia)?ia:null,h:da&&isFinite(da)?da:null,crop:null!=-ba&&ba?"1":"0",fit:null!=X&&X?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:ca,sheetsDown:ha}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m++aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ja&&isFinite(ja)?ja:null,h:ca&&isFinite(ca)?ca:null,crop:null!=+ba&&ba?"1":"0",fit:null!=Y&&Y?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:da,sheetsDown:ha}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m+1));try{g=JSON.parse(c)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(I){var M=null!=c.data?c.data:"";null!=I&&0<I.length&&(0<M.length&&(M+="\n"),M+=I);I=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return n};-this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),-ia()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ia=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ia();aa()}));ia();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};+this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),+ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();aa()}));ja();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,N){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));-if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ia=0;ia<aa.length;ia++)x.setAttributeForCell(M,aa[ia].nodeName,0<aa[ia].nodeValue.length?aa[ia].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var da=c.getAttribute("style");null!=da&&x.model.setStyle(M,da)}catch(k){null!=window.console&&console.log("Error in style for "+-M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var X=c.getAttribute("geometry");if(null!=X){X=JSON.parse(X);var ca=x.getCellGeometry(M);if(null!=ca){ca=ca.clone();for(key in X){var ha=parseFloat(X[key]);"dx"==key?ca.x+=ha:"dy"==key?ca.y+=ha:"dw"==key?ca.width+=ha:"dh"==key?ca.height+=ha:-ca[key]=parseFloat(X[key])}x.model.setGeometry(M,ca)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}else if("model"==c.nodeName){for(var Z=c.firstChild;null!=Z&&Z.nodeType!=mxConstants.NODETYPE_ELEMENT;)Z=Z.nextSibling;null!=Z&&(new mxCodec(c.firstChild)).decode(Z,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||+if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ja=0;ja<aa.length;ja++)x.setAttributeForCell(M,aa[ja].nodeName,0<aa[ja].nodeValue.length?aa[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "++M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var Y=c.getAttribute("geometry");if(null!=Y){Y=JSON.parse(Y);var da=x.getCellGeometry(M);if(null!=da){da=da.clone();for(key in Y){var ha=parseFloat(Y[key]);"dx"==key?da.x+=ha:"dy"==key?da.y+=ha:"dw"==key?da.width+=ha:"dh"==key?da.height+=ha:+da[key]=parseFloat(Y[key])}x.model.setGeometry(M,da)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}else if("model"==c.nodeName){for(var Z=c.firstChild;null!=Z&&Z.nodeType!=mxConstants.NODETYPE_ELEMENT;)Z=Z.nextSibling;null!=Z&&(new mxCodec(c.firstChild)).decode(Z,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(I=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{F.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=x.getDate(),I=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+I+"-"+M+"-"+x))}return m=mxResources.get("copyOf",[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var F=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=n&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():@@ -3566,7 +3566,7 @@ this.chromelessResize&&this.chromelessResize();null!=m&&m();this.editor.fireEven[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var I=c[F].node.cloneNode(!1);I.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");I.appendChild(M);null!=g&&(g.eltCount+=I.getElementsByTagName("*").length,g.nodeCount+=I.getElementsByTagName("mxCell").length);m=(m<<5)-m+-this.hashValue(I,function(L,K,aa,ia){return!ia||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ia&&"mxCell"==L.nodeName&&"previous"==K?null:aa:Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=c.attributes.length);+this.hashValue(I,function(L,K,aa,ja){return!ja||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==L.nodeName&&"previous"==K?null:aa:Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,I=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=I&&(n^=this.hashValue(F,g,m)+this.hashValue(I,g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),@@ -3576,47 +3576,47 @@ function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):thifunction(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,M=mxUtils.bind(this,function(ha,Z){0==ha.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(ha,Z)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ha){M(g,ha)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");-K.style.backgroundColor="inherit";n.style.position="relative";var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ia=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=-ia?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var da=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),-ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ia&&(ia=aa.cloneNode(!1),ia.setAttribute("src",Editor.saveImage),ia.setAttribute("title",mxResources.get("save")),K.insertBefore(ia,K.firstChild),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),-g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ia||c.isModified()||(ia.parentNode.removeChild(ia),ia=null)});mxEvent.consume(Z)})))}),X=mxUtils.bind(this,function(ha,Z,k,v){ha=da.cloneCells(mxUtils.sortCells(da.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var N=da.getCellGeometry(ha[J]);null!=N&&N.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&-(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),ca=mxUtils.bind(this,function(ha){if(da.isSelectionEmpty())da.getRubberband().isActive()?(da.getRubberband().execute(ha),da.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=da.getSelectionCells(),k=da.view.getBounds(Z);if(null!=k&&0<k.width&&-0<k.height){var v=da.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=da.view.translate.x;k.y-=da.view.translate.y;X(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler.first&&(da.graphHandler.suspend(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor=-"light-dark(#fefefe, #000000)",L.style.cursor="copy",da.panningManager.stop(),da.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,da.panningManager.stop(),da.graphHandler.reset(),da.isMouseDown=!1,da.autoScroll=!0,ca(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){da.isMouseDown&&null!=da.graphHandler.first&&-(da.graphHandler.resume(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",da.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor=-"";L.style.backgroundColor="";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,N,T,V,U,Y){if(null!=Z&&"image/"==k.substring(0,6))Z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Z),Z=[new mxCell("",new mxGeometry(0,0,N,T),Z)],Z[0].vertex=!0,X(Z,new mxRectangle(0,0,N,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=+K.style.backgroundColor="inherit";n.style.position="relative";var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=+ja?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var ca=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),+ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=aa.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),+g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ja||c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(Z)})))}),Y=mxUtils.bind(this,function(ha,Z,k,v){ha=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var N=ca.getCellGeometry(ha[J]);null!=N&&N.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&+(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),da=mxUtils.bind(this,function(ha){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ha),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=ca.getSelectionCells(),k=ca.view.getBounds(Z);if(null!=k&&0<k.width&&+0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;Y(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor=+"light-dark(#fefefe, #000000)",L.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,da(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.graphHandler.first&&+(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor=+"";L.style.backgroundColor="";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,N,T,V,U,X){if(null!=Z&&"image/"==k.substring(0,6))Z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Z),Z=[new mxCell("",new mxGeometry(0,0,N,T),Z)],Z[0].vertex=!0,Y(Z,new mxRectangle(0,0,N,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ha);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=la.documentElement.getElementsByTagName("diagram");-for(ya=0;ya<wa.length;ya++){var Ja=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ja);null!=Aa&&X(Ja,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=Y&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(Y,-function(la){na(la,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,V)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):+for(ya=0;ya<wa.length;ya++){var Ja=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ja);null!=Aa&&Y(Ja,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=X&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(X,+function(la){na(la,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Z,k)}}));ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ha){L.style.cursor="";L.style.backgroundColor="";ha.stopPropagation();ha.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));K.insertBefore(aa,K.firstChild);mxEvent.addListener(aa,"click",m);m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));K.insertBefore(m,K.firstChild);-mxEvent.addListener(m,"click",ca);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ca);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,+mxEvent.addListener(m,"click",da);".scratchpad"==c.title&&(this.addSelectionToScratchpad=da);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(F+="aspect=fixed;");F=F+"image="+x+";";null!=n.style&&(F+=n.style);g.appendChild(this.sidebar.createVertexTemplate(F,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var I=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),M=0==I.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(I,n.w,n.h,M,!0,null,!0))}}catch(L){M=null!=L.message?mxResources.get("error")+": "+L.message:String(L),F=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,M,!0,null,!0),g.appendChild(F)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,g,m,n,x,F,I){c=new ImageDialog(this,c,g,m,n,x,F,I);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,g,m,n,x,F){var I=localStorage.getItem(g);c=new TextareaDialog(this,c,null!=I?JSON.stringify(JSON.parse(I),null,2):"",mxUtils.bind(this,function(M){if(null!=M)try{if(null!=F&&F(M),M==I)this.hideDialog();else{if(0<M.length){var L=JSON.parse(M);localStorage.setItem(g,JSON.stringify(L))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(K){this.handleError(K)}}),null,mxResources.get("close"),null,null,null,!0,null,null,x,m,n);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,g,m,n){c=null!=c?c:mxUtils.bind(this,function(x,F,I,M){F||(x=new ChangePageSetup(this,n?I:null,x),x.ignoreColor=!n,null!=M&&n&&(x.shadowVisible=M),this.editor.graph.model.execute(x))});c=new BackgroundImageDialog(this,c,g,m,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,g,m,n,x){c=new LibraryDialog(this,c,g,m,n,x);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(F){F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var g=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(m){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(c,g,m,n,x,F,I){var M=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{I||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,-c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!I||null==window.console||console.error("EditorUi.handleError:",c)}catch(da){}if(null!=L||null!=g){I=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),aa=null;g=null!=g?g:mxResources.get("error");if(null!=L){null!=L.retry&&(K=mxResources.get("cancel"),aa=function(){M();L.retry()});if(404==L.code||404==L.status||403==L.code){I=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),-!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ia=null!=x?null:null!=F?F:window.location.hash;if(null!=ia&&("#G"==ia.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ia.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||-404==L.code||404==L.status)){ia="#U"==ia.substring(0,2)?ia.substring(45,ia.lastIndexOf("%26ex")):ia.substring(2);this.showError(g,I,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ia);null!=n&&n()}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function da(){ca.innerText="";for(var ha=0;ha<ba.length;ha++){var Z=document.createElement("option");mxUtils.write(Z,ba[ha].displayName);Z.value=ha;ca.appendChild(Z);-Z=document.createElement("option");Z.innerHTML=" ";mxUtils.write(Z,"<"+ba[ha].email+">");Z.setAttribute("disabled","disabled");ca.appendChild(Z)}Z=document.createElement("option");mxUtils.write(Z,mxResources.get("addAccount"));Z.value=ba.length;ca.appendChild(Z)}var ba=this.drive.getUsersList(),oa=document.createElement("div"),X=document.createElement("div");X.style.marginBottom="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");oa.appendChild(X);var ca=document.createElement("select");-ca.style.width="100%";da();mxEvent.addListener(ca,"change",mxUtils.bind(this,function(){var ha=ca.value,Z=ba.length!=ha;Z&&this.drive.setUser(ba[ha]);this.drive.authorize(Z,mxUtils.bind(this,function(){Z||(ba=this.drive.getUsersList(),da())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));oa.appendChild(ca);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"),+c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!I||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=L||null!=g){I=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),aa=null;g=null!=g?g:mxResources.get("error");if(null!=L){null!=L.retry&&(K=mxResources.get("cancel"),aa=function(){M();L.retry()});if(404==L.code||404==L.status||403==L.code){I=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ja=null!=x?null:null!=F?F:window.location.hash;if(null!=ja&&("#G"==ja.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ja.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||+404==L.code||404==L.status)){ja="#U"==ja.substring(0,2)?ja.substring(45,ja.lastIndexOf("%26ex")):ja.substring(2);this.showError(g,I,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ja);null!=n&&n()}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){da.innerText="";for(var ha=0;ha<ba.length;ha++){var Z=document.createElement("option");mxUtils.write(Z,ba[ha].displayName);Z.value=ha;da.appendChild(Z);+Z=document.createElement("option");Z.innerHTML=" ";mxUtils.write(Z,"<"+ba[ha].email+">");Z.setAttribute("disabled","disabled");da.appendChild(Z)}Z=document.createElement("option");mxUtils.write(Z,mxResources.get("addAccount"));Z.value=ba.length;da.appendChild(Z)}var ba=this.drive.getUsersList(),oa=document.createElement("div"),Y=document.createElement("div");Y.style.marginBottom="6px";mxUtils.write(Y,mxResources.get("changeUser")+": ");oa.appendChild(Y);var da=document.createElement("select");+da.style.width="100%";ca();mxEvent.addListener(da,"change",mxUtils.bind(this,function(){var ha=da.value,Z=ba.length!=ha;Z&&this.drive.setUser(ba[ha]);this.drive.authorize(Z,mxUtils.bind(this,function(){Z||(ba=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));oa.appendChild(da);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!=m&&m()}),520,150);return}}null!=L.message?I=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?I=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&(L.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout"),!1):L.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof L&&0<L.length&&(I=mxUtils.htmlEntities(L,!1)))}x=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,x=L.alternateAction.funct);this.showError(g,I,K,m,aa,null,null,c,x,null,null,null,n?m:null)}else null!=m&&m()};EditorUi.prototype.alert=function(c,g,m){c=new ErrorDialog(this,null,c,mxResources.get("ok"),g);this.showDialog(c.container,m||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,g,m,n,x,F){c=null!=c?c:"";var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){I();null!=g&&g()},function(){I();null!=m&&m()},n,x,null,null,null,null,M);this.showDialog(c.container,340,46+M,!0,F);c.init()};EditorUi.prototype.showBanner=function(c,g,m,n,x,F,I,M,L){F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){I=null!=I?I:"translate(-50%,120%)";M=null!=M?M:"translate(-50%,0%)";var K=document.createElement("div");K.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");K.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(K.style,"transform",I);mxUtils.setPrefixedStyle(K.style,"transition","all 1000ms ease");null!=L&&mxUtils.setPrefixedStyle(K.style,"transform-origin",L);L=L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));L.setAttribute("border","0");x||(F=document.createElement("img"),F.setAttribute("src",IMAGE_PATH+"/logo.png"),F.setAttribute("border","0"),F.setAttribute("align","absmiddle"),F.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",K.appendChild(F),L.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",K.appendChild(L));mxUtils.write(K,g);document.body.appendChild(K);this.bannerShowing=!0;x&&(L.className="geLibraryButton",K.appendChild(L));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var aa=document.createElement("input");-aa.setAttribute("type","checkbox");aa.setAttribute("id","geDoNotShowAgainCheckbox");aa.style.marginRight="6px";if(!n){g.appendChild(aa);var ia=document.createElement("label");ia.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ia,mxResources.get("doNotShowAgain"));g.appendChild(ia);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var da=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,aa.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&-null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=L&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(oa){mxEvent.consume(oa);da()}));var ba=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",I);window.setTimeout(mxUtils.bind(this,function(){da()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(oa){var X=mxEvent.getSource(oa);X!=aa&&X!=ia?(null!=m&&m(),da(),mxEvent.consume(oa)):ba()}));window.setTimeout(mxUtils.bind(this,+aa.setAttribute("type","checkbox");aa.setAttribute("id","geDoNotShowAgainCheckbox");aa.style.marginRight="6px";if(!n){g.appendChild(aa);var ja=document.createElement("label");ja.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ja,mxResources.get("doNotShowAgain"));g.appendChild(ja);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var ca=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,aa.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&+null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=L&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(oa){mxEvent.consume(oa);ca()}));var ba=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",I);window.setTimeout(mxUtils.bind(this,function(){ca()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(oa){var Y=mxEvent.getSource(oa);Y!=aa&&Y!=ja?(null!=m&&m(),ca(),mxEvent.consume(oa)):ba()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",M)}),500);window.setTimeout(ba,x?5E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,g,m,n){c=c.toDataURL("image/"+m);if(null!=c&&6<c.length)null!=g&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(g))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,g,m,n,x){var F="jpeg"==m?"jpg":m;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+F;c=this.createImageDataUri(c,g,m,x);this.saveData(n,F,c.substring(c.lastIndexOf(",")+1),"image/"+m,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,g){c=new TextareaDialog(this,c,g,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,g,m,n,x,F){"text/xml"!=m||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=F?F:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,m):new Blob([c],{type:m}),navigator.msSaveOrOpenBlob(c,g);else if(mxClient.IS_IE)m=window.open("about:blank","_blank"),null==m?mxUtils.popup(c,!0):(m.document.write(c),m.document.close(),m.document.execCommand("SaveAs",!0,g),m.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==m||"image/"!=m.substring(0,6)?this.showTextDialog(g+":",c):this.openInNewWindow(c,m,n);else{var I=document.createElement("a");F=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var M=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);F=65==(M?parseInt(M[2],10):!1)?!1:F}if(F||this.isOffline()){I.href=URL.createObjectURL(n?this.base64ToBlob(c,m):new Blob([c],{type:m}));F?I.download=g:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(L){}}else this.createEchoRequest(c,g,m,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,g,m,n,x,F){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=m?"&mime="+m:"")+(null!=x?"&format="+x:"")+(null!=F?"&base64="+F:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,g,m,n,x,F,I,M,L){F=null!=F?F:!1;I=null!=I?I:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);-var K=mxUtils.bind(this,function(ia,da,ba,oa){try{if("_blank"==da)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(c,m,n);else if(null!=m&&"text/html"==m.substring(0,9)){var X=new EmbedDialog(this,c);this.showDialog(X.container,450,240,!0,!0);X.init()}else{var ca=window.open("about:blank");null==ca?mxUtils.popup(c,!0):(ca.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ca.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ia,m,n,null,M);else if(null!=-ia&&0<ia.length){var ha=mxUtils.bind(this,function(Z){try{this.exportFile(c,ia,m,n,da,Z)}catch(k){this.handleError(k)}});null!=oa?ha(oa):this.pickFolder(da,ha)}}catch(Z){this.handleError(Z)}});x=[];F||x.push(App.MODE_BROWSER);I||x.push("_blank");var aa=new SaveDialog(this,g,mxUtils.bind(this,function(ia,da,ba){K(ia.value,da,ia,ba);this.hideDialog(null,null,aa.container)}),x,c,m,n,L);this.showDialog(aa.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));aa.init()};EditorUi.prototype.openInNewWindow=+var K=mxUtils.bind(this,function(ja,ca,ba,oa){try{if("_blank"==ca)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(c,m,n);else if(null!=m&&"text/html"==m.substring(0,9)){var Y=new EmbedDialog(this,c);this.showDialog(Y.container,450,240,!0,!0);Y.init()}else{var da=window.open("about:blank");null==da?mxUtils.popup(c,!0):(da.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),da.document.close())}else if(ca==App.MODE_DEVICE||"download"==ca)this.doSaveLocalFile(c,ja,m,n,null,M);else if(null!=+ja&&0<ja.length){var ha=mxUtils.bind(this,function(Z){try{this.exportFile(c,ja,m,n,ca,Z)}catch(k){this.handleError(k)}});null!=oa?ha(oa):this.pickFolder(ca,ha)}}catch(Z){this.handleError(Z)}});x=[];F||x.push(App.MODE_BROWSER);I||x.push("_blank");var aa=new SaveDialog(this,g,mxUtils.bind(this,function(ja,ca,ba){K(ja.value,ca,ja,ba);this.hideDialog(null,null,aa.container)}),x,c,m,n,L);this.showDialog(aa.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));aa.init()};EditorUi.prototype.openInNewWindow=function(c,g,m){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var F=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=F&&(x="background: "+F+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||m?(F=m?c:btoa(unescape(encodeURIComponent(c))),n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+F+'"/></body></html>')):n.document.write(x+c+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var u=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=c(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",@@ -3630,19 +3630,19 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});I.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(M){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(M,null,"png");M=document.createElement("img");M.style.maxWidth="140px";M.style.maxHeight="140px";M.style.cursor="pointer";M.style.backgroundColor="white";M.setAttribute("title",mxResources.get("openInNewWindow"));M.setAttribute("border","0");M.setAttribute("src",L);this.exportDialog.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(M){I.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(M)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,g,m,n,x,F){this.isLocalFileSave()?this.saveLocalFile(m,c,n,x,g,F):this.saveRequest(c,g,mxUtils.bind(this,function(I,M){return this.createEchoRequest(m,I,n,x,g,M)}),m,x,n)};EditorUi.prototype.saveRequest=function(c,g,m,n,x,F,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var M=mxUtils.bind(this,-function(K,aa,ia,da){if("_blank"==aa||null!=K&&0<K.length){var ba=m("_blank"==aa?null:K,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=ba&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?ba.simulate(document,"_blank"):(ia=mxUtils.bind(this,function(oa){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,aa,oa)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,-function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,aa,oa)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(X){this.spinner.stop();this.handleError(X)}))}),null!=da?ia(da):this.pickFolder(aa,ia)))}});x=[App.MODE_BROWSER];I||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,aa,ia){M(K.value,aa,K,ia);this.hideDialog(null,null,L.container)}),+function(K,aa,ja,ca){if("_blank"==aa||null!=K&&0<K.length){var ba=m("_blank"==aa?null:K,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=ba&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?ba.simulate(document,"_blank"):(ja=mxUtils.bind(this,function(oa){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,aa,oa)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,+function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,aa,oa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(Y){this.spinner.stop();this.handleError(Y)}))}),null!=ca?ja(ca):this.pickFolder(aa,ja)))}});x=[App.MODE_BROWSER];I||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,aa,ja){M(K.value,aa,K,ja);this.hideDialog(null,null,L.container)}),x,null,"application/pdf");this.showDialog(L.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,m,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,m){g(null)};-EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var X=g?null:this.editor.graph.background;X==mxConstants.NONE&&(X=null);null==X&&0==g&&(X=this.editor.graph.shapeBackgroundColor);var ca=this.editor.graph.addForeignObjectWarning;+EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var Y=g?null:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);null==Y&&0==g&&(Y=this.editor.graph.shapeBackgroundColor);var da=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ha=mxUtils.lightDarkColorSupported,Z=mxUtils.preferDarkColor;if("light"==aa||"dark"==aa)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==aa;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),N=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=-this.editor.graph.getSvg(X,c,I,M,null,m,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!da,aa,ia);mxUtils.lightDarkColorSupported=ha;mxUtils.preferDarkColor=Z;this.editor.graph.addForeignObjectWarning=ca;n&&this.editor.graph.addSvgShadow(T);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,I));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var Y=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&-da?this.replaceAlternateContent(la,aa,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,Y,this.thumbImageCache)):Y(la)});da?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ia,-da,ba,oa,X){var ca=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ca.setAttribute("x",da);ca.setAttribute("y",ba+.5);ca.setAttribute("width",oa.width);ca.setAttribute("height",oa.height);null==ca.setAttributeNS?ca.setAttribute("xlink:href",X):ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",X);ia.replaceChild(ca,ia.lastChild);M()}function x(){if(I<aa.length)aa[I++](x)}var F="";g=c.getElementsByTagName("style");for(var I=0;I<g.length;I++)F+=g[I].innerHTML;g=c.getElementsByTagName("switch");-counter=g.length;var M=mxUtils.bind(this,function(){counter--;0==counter&&m(c)}),L={},K={},aa=[];for(I=0;I<g.length;I++)mxUtils.bind(this,function(ia){var da=ia.getElementsByTagName("div");if(0<da.length)try{var ba=da[0].cloneNode(!0),oa=parseInt(ba.style.marginLeft),X=parseInt(ba.style.paddingTop),ca=ba.getElementsByTagName("div")[1],ha=da=!1,Z=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;ha="vertical-"==v.substring(0,9);da="-rl"==v.substring(v.length--3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&da?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=L[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?ca.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?-ca.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,X,v,J),L[N]=T);"1px"==ba.style.height&&("unsafe center"==Z?X-=T.height/2:"unsafe flex-end"==Z&&(X-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!da&&"unsafe flex-end"==Z||da&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,X,T.width,T.height+parseInt(ca.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=-K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,function(Y){n(ia,oa,X,T,Y);K[N]=Y;V()}),F):(n(ia,oa,X,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"++this.editor.graph.getSvg(Y,c,I,M,null,m,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!ca,aa,ja);mxUtils.lightDarkColorSupported=ha;mxUtils.preferDarkColor=Z;this.editor.graph.addForeignObjectWarning=da;n&&this.editor.graph.addSvgShadow(T);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,I));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var X=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&+ca?this.replaceAlternateContent(la,aa,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,X,this.thumbImageCache)):X(la)});ca?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ja,+ca,ba,oa,Y){var da=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");da.setAttribute("x",ca);da.setAttribute("y",ba+.5);da.setAttribute("width",oa.width);da.setAttribute("height",oa.height);null==da.setAttributeNS?da.setAttribute("xlink:href",Y):da.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Y);ja.replaceChild(da,ja.lastChild);M()}function x(){if(I<aa.length)aa[I++](x)}var F="";g=c.getElementsByTagName("style");for(var I=0;I<g.length;I++)F+=g[I].innerHTML;g=c.getElementsByTagName("switch");+counter=g.length;var M=mxUtils.bind(this,function(){counter--;0==counter&&m(c)}),L={},K={},aa=[];for(I=0;I<g.length;I++)mxUtils.bind(this,function(ja){var ca=ja.getElementsByTagName("div");if(0<ca.length)try{var ba=ca[0].cloneNode(!0),oa=parseInt(ba.style.marginLeft),Y=parseInt(ba.style.paddingTop),da=ba.getElementsByTagName("div")[1],ha=ca=!1,Z=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;ha="vertical-"==v.substring(0,9);ca="-rl"==v.substring(v.length-+3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&ca?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=L[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?da.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?+da.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,Y,v,J),L[N]=T);"1px"==ba.style.height&&("unsafe center"==Z?Y-=T.height/2:"unsafe flex-end"==Z&&(Y-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,Y,T.width,T.height+parseInt(da.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=+K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,function(X){n(ja,oa,Y,T,X);K[N]=X;V()}),F):(n(ja,oa,Y,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();L.id=I;null!=M&&L.setAttribute("name",M);m&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);n&&L.setAttribute("disabled","disabled");F&&(c.appendChild(L),m=document.createElement("label"),mxUtils.write(m,g),m.setAttribute("for",I),c.appendChild(m),x||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,g){var m=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var I=document.createElement("option");I.setAttribute("value","custom");mxUtils.write(I,mxResources.get("custom")+"...");F.appendChild(I);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==F.value){var M=new FilenameDialog(this,x,mxResources.get("ok"),function(L){null!=L?(x=L,I.setAttribute("title",L)):(F.value="blank",I.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(M.container,300,80,!0,!1);M.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));@@ -3650,70 +3650,71 @@ mxUtils.br(c);return{getLink:function(){return m.checked?"blank"===F.value?"_blaM.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(M)}mxUtils.write(c,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var F="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(M){this.pickColor(F||"none",function(L){F=L;m()});mxEvent.consume(M)}));m();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width="22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";c.appendChild(I);mxUtils.br(c);return{getColor:function(){return F},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,g,m,n,x,F){F=-null!=F?F:[];m&&(F.push("lightbox=1"),"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){var ba=this.getCurrentFile();L=this.createUrlParameters(c,g,n,x,F,L);c=!0;null!=I?m="#U"+encodeURIComponent(I):M||null==ba||""==ba.getHash()?-m="#R"+encodeURIComponent(m?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(ba.getTitle()));K&&1<m.length&&(L.push("open="+m.substring(1)),m="");aa&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ia&&L.push("transparent=1");null!=da&&L.push("dark="+da);return(n&&(null!=I||null!=-ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+m};EditorUi.prototype.createHtml=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){this.getBasenames();var ba={};""!=x&&x!=mxConstants.NONE&&(ba.highlight=x);"auto"!==n&&(ba.target=n);K||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;-m=parseInt(m);isNaN(m)||100==m||(ba.zoom=m/100);m=[];I&&(m.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),ba.resize=!0);M&&m.push("layers");L&&m.push("tags");null!=da&&(ba["dark-mode"]=da);0<m.length&&(K&&m.push("lightbox"),ba.toolbar=m.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!I);g='<div class="mxgraph" style="'+(F?"max-width:100%;":-"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ia(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};+null!=F?F:[];m&&(F.push("lightbox=1"),"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){var ba=this.getCurrentFile();L=this.createUrlParameters(c,g,n,x,F,L);c=!0;null!=I?m="#U"+encodeURIComponent(I):M||null==ba||""==ba.getHash()?+m="#R"+encodeURIComponent(m?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(ba.getTitle()));K&&1<m.length&&(L.push("open="+m.substring(1)),m="");aa&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ja&&L.push("transparent=1");null!=ca&&L.push("dark="+ca);return(n&&(null!=I||null!=+ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+m};EditorUi.prototype.createHtml=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){this.getBasenames();var ba={};""!=x&&x!=mxConstants.NONE&&(ba.highlight=x);"auto"!==n&&(ba.target=n);K||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;+m=parseInt(m);isNaN(m)||100==m||(ba.zoom=m/100);m=[];I&&(m.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),ba.resize=!0);M&&m.push("layers");L&&m.push("tags");null!=ca&&(ba["dark-mode"]=ca);0<m.length&&(K&&m.push("lightbox"),ba.toolbar=m.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!I);g='<div class="mxgraph" style="'+(F?"max-width:100%;":+"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ja(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,g,m,n){var x=document.createElement("div");x.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("html"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(F);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var M=document.createElement("input");M.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";M.setAttribute("value","url");M.setAttribute("type","radio");M.setAttribute("name","type-embedhtmldialog");F=M.cloneNode(!0);F.setAttribute("value","copy");I.appendChild(F);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));I.appendChild(L);mxUtils.br(I);I.appendChild(M);L=document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));I.appendChild(L);var K=this.getCurrentFile();null==m&&null!=K&&K.constructor==window.DriveFile&&(L=-document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,mxResources.get("share")),I.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==m&&M.setAttribute("disabled","disabled");x.appendChild(I);I=380;var aa=this.addLinkSection(x),ia=document.createElement("select");ia.style.maxWidth="260px";ia.style.marginLeft="8px";-ia.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ia.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+-":");x.appendChild(ia);mxUtils.br(x);I+=26;var da=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";x.appendChild(ba);var oa=this.addCheckbox(x,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var X=X=this.addCheckbox(x,mxResources.get("allPages"),L,!L),ca=this.addCheckbox(x,+document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,mxResources.get("share")),I.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==m&&M.setAttribute("disabled","disabled");x.appendChild(I);I=380;var aa=this.addLinkSection(x),ja=document.createElement("select");ja.style.maxWidth="260px";ja.style.marginLeft="8px";+ja.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));ja.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ja.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ja.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")++":");x.appendChild(ja);mxUtils.br(x);I+=26;var ca=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";x.appendChild(ba);var oa=this.addCheckbox(x,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var Y=Y=this.addCheckbox(x,mxResources.get("allPages"),L,!L),da=this.addCheckbox(x,mxResources.get("layers"),!0),ha=this.addCheckbox(x,mxResources.get("tags"),!0),Z=this.addCheckbox(x,mxResources.get("lightbox"),!0),k=null;if(EditorUi.enableHtmlEditOption){k=this.addEditButton(x,Z);var v=k.getEditInput();v.style.marginBottom="16px";I+=50;mxEvent.addListener(Z,"change",function(){Z.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&Z.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")})}c=-new CustomDialog(this,x,mxUtils.bind(this,function(){n(M.checked?m:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),oa.checked,X.checked,ca.checked,ha.checked,Z.checked,null!=k?k.getLink():null,null!=ia?ia.value:null)}),null,c,g);this.showDialog(c.container,340,I,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,m,n,x,F,I,M,L,K,aa){var ia=document.createElement("div");ia.style.whiteSpace="nowrap";var da=document.createElement("h3");mxUtils.write(da,c||mxResources.get("publish"));-da.style.width="100%";da.style.textAlign="center";da.style.marginTop="2px";da.style.marginBottom="20px";ia.appendChild(da);var ba=document.createElement("select");c=30;ba.className="geBtn";ba.style.marginBottom="8px";ba.style.marginLeft="0px";ba.style.width="100%";ba.style.boxSizing="border-box";if(null==M||""==M.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",da=document.createElement("option"),mxUtils.write(da,mxResources.get("makeCopy")),da.setAttribute("value","copy"),-ba.appendChild(da);da=document.createElement("option");mxUtils.write(da,mxResources.get("authorizationRequired"));da.setAttribute("value","auth");ba.appendChild(da);null!=M&&""!=M.getHash()||da.setAttribute("disabled","disabled");M=document.createElement("option");M.setAttribute("value","public");ba.appendChild(M);null!=I?(mxUtils.write(M,mxResources.get("publicDiagramUrl")),M.setAttribute("title",I),ba.value="public"):(mxUtils.write(M,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+-")"),M.setAttribute("disabled","disabled"));ia.appendChild(ba);mxUtils.br(ia);ba.focus();var oa=null,X=null;if(null!=g||null!=m)c+=30,mxUtils.write(ia,mxResources.get("width")+":"),oa=document.createElement("input"),oa.setAttribute("type","text"),oa.style.marginRight="16px",oa.style.width="50px",oa.style.marginLeft="6px",oa.style.marginRight="16px",oa.style.marginBottom="10px",oa.value="100%",ia.appendChild(oa),mxUtils.write(ia,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type",-"text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=m+"px",ia.appendChild(X),mxUtils.br(ia);var ca=this.addLinkSection(ia,n),ha=K?this.addCheckbox(ia,mxResources.get("transparentBackground"),!1):null;null!=ha&&(c+=20);var Z=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),Z=this.addCheckbox(ia,mxResources.get("selectedPage")+-": "+g));var k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));k.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));k.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected",-"selected");k.appendChild(g);aa&&(mxUtils.write(ia,mxResources.get("appearance")+":"),ia.appendChild(k),mxUtils.br(ia),c+=30);var v=this.addCheckbox(ia,mxResources.get("lightbox"),!0,null,null,!n),J=this.addEditButton(ia,v),N=J.getEditInput();n&&(N.style.marginLeft=v.style.marginLeft,v.style.display="none",c-=20);var T=this.addCheckbox(ia,mxResources.get("layers"),!0);T.style.marginLeft=N.style.marginLeft;T.style.marginTop="8px";var V=this.addCheckbox(ia,mxResources.get("tags"),!0);V.style.marginLeft=-N.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(v,"change",function(){v.checked?(T.removeAttribute("disabled"),N.removeAttribute("disabled"),V.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));N.checked&&v.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ia,mxUtils.bind(this,function(){L(ca.getTarget(),-ca.getColor(),null==Z?!1:Z.checked,v.checked,J.getLink(),T.checked,null!=oa?oa.value:null,null!=X?X.value:null,V.checked,ba.value,null!=ha?ha.checked:!1,k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=oa?(oa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?oa.select():document.execCommand("selectAll",!1,null)):null==ba.parentNode;ca.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");+new CustomDialog(this,x,mxUtils.bind(this,function(){n(M.checked?m:null,ca.checked,ba.value,aa.getTarget(),aa.getColor(),oa.checked,Y.checked,da.checked,ha.checked,Z.checked,null!=k?k.getLink():null,null!=ja?ja.value:null)}),null,c,g);this.showDialog(c.container,340,I,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,m,n,x,F,I,M,L,K,aa,ja){var ca=document.createElement("div");ca.style.whiteSpace="nowrap";var ba=document.createElement("h3");mxUtils.write(ba,c||mxResources.get("publish"));+ba.style.width="100%";ba.style.textAlign="center";ba.style.marginTop="2px";ba.style.marginBottom="20px";ca.appendChild(ba);var oa=document.createElement("select");c=30;oa.className="geBtn";oa.style.marginBottom="8px";oa.style.marginLeft="0px";oa.style.width="100%";oa.style.boxSizing="border-box";if(null==M||""==M.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ba=document.createElement("option"),mxUtils.write(ba,mxResources.get("makeCopy")),ba.setAttribute("value","copy"),+oa.appendChild(ba);ba=document.createElement("option");mxUtils.write(ba,mxResources.get("authorizationRequired"));ba.setAttribute("value","auth");oa.appendChild(ba);null!=M&&""!=M.getHash()||ba.setAttribute("disabled","disabled");M=document.createElement("option");M.setAttribute("value","public");oa.appendChild(M);null!=I?(mxUtils.write(M,mxResources.get("publicDiagramUrl")),M.setAttribute("title",I),oa.value="public"):(mxUtils.write(M,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")++")"),M.setAttribute("disabled","disabled"));ca.appendChild(oa);mxUtils.br(ca);oa.focus();var Y=null,da=null;if(null!=g||null!=m)c+=30,mxUtils.write(ca,mxResources.get("width")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.marginRight="16px",Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginRight="16px",Y.style.marginBottom="10px",Y.value="100%",ca.appendChild(Y),mxUtils.write(ca,mxResources.get("height")+":"),da=document.createElement("input"),da.setAttribute("type",+"text"),da.style.width="50px",da.style.marginLeft="6px",da.style.marginBottom="10px",da.value=m+"px",ca.appendChild(da),mxUtils.br(ca);var ha=this.addLinkSection(ca,n),Z=K?this.addCheckbox(ca,mxResources.get("transparentBackground"),!1):null;null!=Z&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");+mxUtils.write(g,mxResources.get("currentPage"));g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ja&&(mxUtils.write(ca,mxResources.get("pages")+":"),ca.appendChild(k),mxUtils.br(ca),c+=30),v=this.addCheckbox(ca,mxResources.get("selectedPage")+": "+g));var J=document.createElement("select");J.style.maxWidth=+"260px";J.style.marginLeft="8px";J.style.marginTop="16px";ja=document.createElement("option");ja.setAttribute("value","0");mxUtils.write(ja,mxResources.get("light"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","1");mxUtils.write(ja,mxResources.get("dark"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","auto");mxUtils.write(ja,mxResources.get("automatic"));ja.setAttribute("selected","selected");J.appendChild(ja);aa&&(mxUtils.write(ca,+mxResources.get("appearance")+":"),ca.appendChild(J),mxUtils.br(ca),c+=30);var N=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,N),V=T.getEditInput();n&&(V.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=V.style.marginLeft;U.style.marginTop="8px";var X=this.addCheckbox(ca,mxResources.get("tags"),!0);X.style.marginLeft=V.style.marginLeft;X.style.marginBottom="16px";+X.style.marginTop="16px";mxEvent.addListener(N,"change",function(){N.checked?(U.removeAttribute("disabled"),V.removeAttribute("disabled"),X.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));V.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ha.getTarget(),ha.getColor(),null==+v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=Y?Y.value:null,null!=da?da.value:null,X.checked,oa.value,null!=Z?Z.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=Y?(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ha.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";F.appendChild(I);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";F.appendChild(M);mxUtils.write(F,-mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ia=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),-I.background==mxConstants.NONE||null==I.background);null!=ia&&(ia.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var da=parseInt(M.value)/100||1,ba=parseInt(L.value)||0;m(!K.checked,null!=aa?aa.checked:!1,null!=ia?ia.checked:!1,da,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,I,M,L){I=null!=I?I:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace=-"nowrap";var aa=this.editor.graph,ia="jpeg"==M||"webp"==M?220:320,da=document.createElement("h3");mxUtils.write(da,c);da.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(da);mxUtils.write(K,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";K.appendChild(ba);mxUtils.write(K,-mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","text");oa.style.marginRight="16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";K.appendChild(oa);mxUtils.br(K);var X=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),ca=document.createElement("input");ca.style.marginTop="16px";ca.style.marginRight="8px";ca.style.marginLeft="24px";ca.setAttribute("disabled","disabled");ca.setAttribute("type",-"checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(da=0;da<c.length;da++)if(!aa.isSelectionEmpty()||"selectionOnly"!=c[da]){var Z=document.createElement("option");mxUtils.write(Z,mxResources.get(c[da]));Z.setAttribute("value",c[da]);ha.appendChild(Z)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ha),mxUtils.br(K),ia+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&-(X.checked=!0)})):F&&(K.appendChild(ca),mxUtils.write(K,mxResources.get("crop")),mxUtils.br(K),ia+=30,mxEvent.addListener(X,"change",function(){X.checked?ca.removeAttribute("disabled"):ca.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?L&&(X.style.display="none",X.nextSibling.style.display="none",X.nextSibling.nextSibling.style.display="none",ia-=30):(ha.value="diagram",ca.setAttribute("checked","checked"),ca.defaultChecked=!0,mxEvent.addListener(X,"change",function(){ha.value=X.checked?+mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ja=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),+I.background==mxConstants.NONE||null==I.background);null!=ja&&(ja.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ba=parseInt(L.value)||0;m(!K.checked,null!=aa?aa.checked:!1,null!=ja?ja.checked:!1,ca,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,I,M,L){I=null!=I?I:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace=+"nowrap";var aa=this.editor.graph,ja="jpeg"==M||"webp"==M?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(ca);mxUtils.write(K,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";K.appendChild(ba);mxUtils.write(K,+mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","text");oa.style.marginRight="16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";K.appendChild(oa);mxUtils.br(K);var Y=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),da=document.createElement("input");da.style.marginTop="16px";da.style.marginRight="8px";da.style.marginLeft="24px";da.setAttribute("disabled","disabled");da.setAttribute("type",+"checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!aa.isSelectionEmpty()||"selectionOnly"!=c[ca]){var Z=document.createElement("option");mxUtils.write(Z,mxResources.get(c[ca]));Z.setAttribute("value",c[ca]);ha.appendChild(Z)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ha),mxUtils.br(K),ja+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&+(Y.checked=!0)})):F&&(K.appendChild(da),mxUtils.write(K,mxResources.get("crop")),mxUtils.br(K),ja+=30,mxEvent.addListener(Y,"change",function(){Y.checked?da.removeAttribute("disabled"):da.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?L&&(Y.style.display="none",Y.nextSibling.style.display="none",Y.nextSibling.nextSibling.style.display="none",ja-=30):(ha.value="diagram",da.setAttribute("checked","checked"),da.defaultChecked=!0,mxEvent.addListener(Y,"change",function(){ha.value=Y.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=M&&"webp"!=M),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));v.appendChild(L);"svg"==M&&mxUtils.lightDarkColorSupported?-(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ia+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),-!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ia+=30;aa=null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<aa?":":""),I,null,null,"jpeg"!=M&&"webp"!=M),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="28px";"png"==M||"svg"==M?(I=function(){T.checked?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),-V.appendChild(F),F=document.createElement("option"),F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),V.appendChild(F),1<aa?(T.style.marginBottom="12px",V.style.marginBottom="16px",K.appendChild(V),mxUtils.br(K),ia+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(V.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",I),I()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";-U.setAttribute("type","checkbox");var Y=document.createElement("input");Y.style.marginBottom="16px";Y.style.marginRight="8px";Y.setAttribute("type","checkbox");g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),mxUtils.write(K,mxResources.get("embedImages")),mxUtils.br(K),Y.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(Y),mxUtils.write(K,mxResources.get("embedFonts")),mxUtils.br(K),ia+=50);var fa=document.createElement("select");fa.style.maxWidth=+(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),+!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ja+=30;aa=null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<aa?":":""),I,null,null,"jpeg"!=M&&"webp"!=M),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="28px";"png"==M||"svg"==M?(I=function(){T.checked?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),+V.appendChild(F),F=document.createElement("option"),F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),V.appendChild(F),1<aa?(T.style.marginBottom="12px",V.style.marginBottom="16px",K.appendChild(V),mxUtils.br(K),ja+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(V.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",I),I()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";+U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),mxUtils.write(K,mxResources.get("embedImages")),mxUtils.br(K),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(X),mxUtils.write(K,mxResources.get("embedFonts")),mxUtils.br(K),ja+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);I=document.createElement("option");I.setAttribute("value","blank");mxUtils.write(I,mxResources.get("openInNewWindow"));fa.appendChild(I);I=document.createElement("option");I.setAttribute("value","self");mxUtils.write(I,mxResources.get("openInThisWindow"));fa.appendChild(I);I=document.createElement("div");mxUtils.write(I,mxResources.get("LinksLost"));-I.style.margin="7px";I.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(I),mxUtils.br(K),mxUtils.br(K),ia+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=Y.checked;this.lastEmbedInclude=V.value;x(ba.value,k.checked,!X.checked,J.checked,T.checked,U.checked&&g,oa.value,ca.checked,("png"==M||"svg"==M)&&"currentPage"==V.value,-fa.value,null!=N?N.checked:null,null!=v?v.value:null,ha.value,Y.checked)}),null,m,n);this.showDialog(m.container,340,ia,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText=-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),I.shadowVisible&&n,!n),aa=this.addCheckbox(F,m),ia=this.addCheckbox(F,mxResources.get("lightbox"),!0),da=this.addEditButton(F,ia),ba=da.getEditInput(),oa=1<I.model.getChildCount(I.model.getRoot()),X=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);X.style.marginLeft=ba.style.marginLeft;X.style.marginBottom="12px";X.style.marginTop=-"8px";mxEvent.addListener(ia,"change",function(){ia.checked?(oa&&X.removeAttribute("disabled"),ba.removeAttribute("disabled")):(X.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ia.checked?da.getEditSelect().removeAttribute("disabled"):da.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,aa.checked,ia.checked,da.getLink(),X.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,-280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,I,M){function L(ba){var oa=" ",X="";n&&(oa=" 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!=aa?"&page="+aa:"")+(x?"&edit=_blank":-"")+(F?"&layers=1":"")+"');}})(this);\"",X+="cursor:pointer;");c&&(X+="max-width:100%;");var ca="";m&&(ca=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');I('<img src="'+ba+'"'+ca+(""!=X?' style="'+X+'"':"")+oa+"/>")}var K=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var oa=n?this.getFileData(!0):null;ba=this.createImageDataUri(ba,oa,"png");L(ba)}),null,null,null,mxUtils.bind(this,-function(ba){M({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ia="";m&&(ia="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var da=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ia+"&xml="+encodeURIComponent(g));da.send(mxUtils.bind(this,function(){200<=da.getStatus()&&299>=da.getStatus()?L("data:image/png;base64,"+da.getText()):+I.style.margin="7px";I.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(I),mxUtils.br(K),mxUtils.br(K),ja+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=V.value;x(ba.value,k.checked,!Y.checked,J.checked,T.checked,U.checked&&g,oa.value,da.checked,("png"==M||"svg"==M)&&"currentPage"==V.value,+fa.value,null!=N?N.checked:null,null!=v?v.value:null,ha.value,X.checked)}),null,m,n);this.showDialog(m.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText=+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),I.shadowVisible&&n,!n),aa=this.addCheckbox(F,m),ja=this.addCheckbox(F,mxResources.get("lightbox"),!0),ca=this.addEditButton(F,ja),ba=ca.getEditInput(),oa=1<I.model.getChildCount(I.model.getRoot()),Y=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);Y.style.marginLeft=ba.style.marginLeft;Y.style.marginBottom="12px";Y.style.marginTop=+"8px";mxEvent.addListener(ja,"change",function(){ja.checked?(oa&&Y.removeAttribute("disabled"),ba.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,aa.checked,ja.checked,ca.getLink(),Y.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,+280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,I,M){function L(ba){var oa=" ",Y="";n&&(oa=" 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!=aa?"&page="+aa:"")+(x?"&edit=_blank":+"")+(F?"&layers=1":"")+"');}})(this);\"",Y+="cursor:pointer;");c&&(Y+="max-width:100%;");var da="";m&&(da=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');I('<img src="'+ba+'"'+da+(""!=Y?' style="'+Y+'"':"")+oa+"/>")}var K=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var oa=n?this.getFileData(!0):null;ba=this.createImageDataUri(ba,oa,"png");L(ba)}),null,null,null,mxUtils.bind(this,+function(ba){M({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ja="";m&&(ja="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ja+"&xml="+encodeURIComponent(g));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=ca.getStatus()?L("data:image/png;base64,"+ca.getText()):M({message:mxResources.get("unknownError")})}))}else M({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,g,m,n,x,F,I){var M=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!m,"auto"),L=M.getElementsByTagName("a");if(null!=L)for(var K=0;K<L.length;K++){var aa=L[K].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==L[K].getAttribute("target")&&L[K].removeAttribute("target")}n&&M.setAttribute("content",this.getFileData(!0));-g&&this.editor.graph.addSvgShadow(M);if(m){var ia=" ",da="";n&&(ia="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",da+="cursor:pointer;");-c&&(da+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(ba){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=da?' style="'+da+'"':"")+ia+"/>")}))}else da="",n&&(g=this.getSelectedPageIndex(),M.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),da+="cursor:pointer;"),c&&(c=parseInt(M.getAttribute("width")),x=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),da+="max-width:100%;max-height:"+x+"px;",M.removeAttribute("height")),""!=da&&M.setAttribute("style",da),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),I(mxUtils.getXml(M))};EditorUi.prototype.timeSince=+g&&this.editor.graph.addSvgShadow(M);if(m){var ja=" ",ca="";n&&(ja="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");+c&&(ca+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(ba){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=ca?' style="'+ca+'"':"")+ja+"/>")}))}else ca="",n&&(g=this.getSelectedPageIndex(),M.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(M.getAttribute("width")),x=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),ca+="max-width:100%;max-height:"+x+"px;",M.removeAttribute("height")),""!=ca&&M.setAttribute("style",ca),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),I(mxUtils.getXml(M))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var g=Math.floor(c/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(c/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(c/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(c/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(c/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,g){if(null!=c){var m=null;if("diagram"==c.nodeName)m=c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){m=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(F){return"page"==F?m.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==F?1:x.apply(this,arguments)}}}null!=m&&(c=Editor.parseDiagramNode(m))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(c)}catch(F){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var g=1,m=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(m=n))}return{scale:g,border:m}};EditorUi.prototype.getEmbeddedPng=function(c,g,m,n,x){try{var F=this.editor.graph,I=null;if(null!=m&&0<m.length)F=this.createTemporaryGraph(F.getStylesheet()),document.body.appendChild(F.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0),F),I=m;else if(null!=this.pages&&this.currentPage!=this.pages[0]){F=this.createTemporaryGraph(F.getStylesheet());var M=F.getGlobalVariable;F.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&F.setBackgroundImage(L.viewState.backgroundImage);F.getGlobalVariable=function(K){return"page"==K?L.getName():"pagenumber"==K?1:M.apply(this,arguments)};document.body.appendChild(F.container);-F.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==I&&(I=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var aa=K.toDataURL("image/png");aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(I));c(aa.substring(aa.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ia){null!=g&&g(ia)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,-F,x,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){M=null!=M?M:!0;aa=null!=aa?aa:0;I=null!=L?L:g.background;I==mxConstants.NONE&&(I=null);null==I&&"none"==g.getAdaptiveColors()&&(I="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(I,K,aa,null,null,F,null,L,null,g.shadowVisible||ia,null,da,"diagram");(g.shadowVisible||ia)&&g.addSvgShadow(F,null,null,0==aa);null!=c&&F.setAttribute("content",c);null!=-m&&F.setAttribute("resource",m);var ba=mxUtils.bind(this,function(oa){oa=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(oa){M?this.editor.convertImages(oa,mxUtils.bind(this,function(X){ba(X)})):ba(oa)}));else return ba(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(c,m),g(c)}catch(n){g(c)}}))}catch(m){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(oa){Editor.addRetryToError(oa,mxUtils.bind(this,function(){this.exportImage(c,g,m,n,x,F,I,M,L,K,aa,ia,-da)}));this.handleError(oa)}))){var ba=this.editor.graph.isSelectionEmpty();m=null!=m?m:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,m,M,null,null,null,null,null,c,F):null,L,null==this.pages||0==this.pages.length,aa)}catch(X){this.handleError(X)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),-null,m,c||1,g,n,null,null,F,I,K,ia,da)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,m,n,x,F,I){g=null!=g?g:0;m=null!=m?m:0;var M=[];try{var L=this.editor.graph;if(null!=c&&0<-c.length){L.model.beginUpdate();try{var K=mxUtils.parseXml(c);c={};var aa=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var ia=aa.getElementsByTagName("diagram");if(1==ia.length&&!F){if(aa=Editor.parseDiagramNode(ia[0]),null!=this.currentPage&&(c[ia[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var da=ia[0].getAttribute("name");null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-da))}}else if(0<ia.length){F=[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ia[0].getAttribute("id")]=this.pages[0].getId(),da=ia[0].getAttribute("name"),null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],da)),aa=Editor.parseDiagramNode(ia[0]),n=!1,ba=1);for(;ba<ia.length;ba++){var oa=ia[ba].getAttribute("id");ia[ba].removeAttribute("id");var X=this.updatePageRoot(new DiagramPage(ia[ba]));c[oa]=ia[ba].getAttribute("id");var ca=this.pages.length;-null==X.getName()&&X.setName(mxResources.get("pageWithNumber",[ca+1]));L.model.execute(new ChangePage(this,X,X,ca,!0));F.push(X)}this.updatePageLinks(c,F)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){M=L.importGraphModel(aa,g,m,n);if(null!=M)for(this.addLocalPagesToMapping(c),ba=0;ba<M.length;ba++)this.updatePageLinksForCell(c,M[ba]);var ha=L.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(c,ha);var Z=new ChangePageSetup(this,+F.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==I&&(I=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var aa=K.toDataURL("image/png");aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(I));c(aa.substring(aa.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ja){null!=g&&g(ja)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,+F,x,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){M=null!=M?M:!0;aa=null!=aa?aa:0;I=null!=L?L:g.background;I==mxConstants.NONE&&(I=null);null==I&&"none"==g.getAdaptiveColors()&&(I="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(I,K,aa,null,null,F,null,L,null,g.shadowVisible||ja,null,ca,"diagram");(g.shadowVisible||ja)&&g.addSvgShadow(F,null,null,0==aa);null!=c&&F.setAttribute("content",c);null!=+m&&F.setAttribute("resource",m);var ba=mxUtils.bind(this,function(oa){oa=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(oa){M?this.editor.convertImages(oa,mxUtils.bind(this,function(Y){ba(Y)})):ba(oa)}));else return ba(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(c,m),g(c)}catch(n){g(c)}}))}catch(m){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(oa){Editor.addRetryToError(oa,mxUtils.bind(this,function(){this.exportImage(c,g,m,n,x,F,I,M,L,K,aa,ja,+ca)}));this.handleError(oa)}))){var ba=this.editor.graph.isSelectionEmpty();m=null!=m?m:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,m,M,null,null,null,null,null,c,F):null,L,null==this.pages||0==this.pages.length,aa)}catch(Y){this.handleError(Y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),+null,m,c||1,g,n,null,null,F,I,K,ja,ca)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,m,n,x,F,I){g=null!=g?g:0;m=null!=m?m:0;var M=[];try{var L=this.editor.graph;if(null!=c&&0<+c.length){L.model.beginUpdate();try{var K=mxUtils.parseXml(c);c={};var aa=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var ja=aa.getElementsByTagName("diagram");if(1==ja.length&&!F){if(aa=Editor.parseDiagramNode(ja[0]),null!=this.currentPage&&(c[ja[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ja[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,+ca))}}else if(0<ja.length){F=[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ja[0].getAttribute("id")]=this.pages[0].getId(),ca=ja[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),aa=Editor.parseDiagramNode(ja[0]),n=!1,ba=1);for(;ba<ja.length;ba++){var oa=ja[ba].getAttribute("id");ja[ba].removeAttribute("id");var Y=this.updatePageRoot(new DiagramPage(ja[ba]));c[oa]=ja[ba].getAttribute("id");var da=this.pages.length;+null==Y.getName()&&Y.setName(mxResources.get("pageWithNumber",[da+1]));L.model.execute(new ChangePage(this,Y,Y,da,!0));F.push(Y)}this.updatePageLinks(c,F)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){M=L.importGraphModel(aa,g,m,n);if(null!=M)for(this.addLocalPagesToMapping(c),ba=0;ba<M.length;ba++)this.updatePageLinksForCell(c,M[ba]);var ha=L.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(c,ha);var Z=new ChangePageSetup(this,null,ha);Z.ignoreColor=!0;L.model.execute(Z)}}I&&L.pasteCellStyles(L.includeDescendants(M),L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(k){if(x)throw k;this.handleError(k)}return M};EditorUi.prototype.updatePageLinks=function(c,g){for(var m=0;m<g.length;m++)this.updatePageLinksForCell(c,g[m].root),null!=g[m].viewState&&this.updateBackgroundPageLink(c,g[m].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var m=c[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=m&&(g.originalSrc="data:page/id,"+m)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=function(c,g){var m=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(c,x));if(n.isHtmlLabel(g)){m.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var F=m.getElementsByTagName("a"),I=!1,M=0;M<F.length;M++)x=F[M].getAttribute("href"),null!=x&&(F[M].setAttribute("href",this.updatePageLink(c,x)),I=!0);I&&n.labelChanged(g,m.innerHTML)}for(M=0;M<n.model.getChildCount(g);M++)this.updatePageLinksForCell(c,n.model.getChildAt(g,M))};EditorUi.prototype.updatePageLink=function(c,g){if(Graph.isPageLink(g)){var m=c[g.substring(g.indexOf(",")+1)];g=null!=m?"data:page/id,"+m:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var F=n.actions[x];if(null!=F.open&&Graph.isPageLink(F.open)){var I=F.open.substring(F.open.indexOf(",")+1);m=c[I];null!=m?F.open="data:page/id,"+m:null==this.getPageById(I)&&delete F.open}}g="data:action/json,"+JSON.stringify(n)}}catch(M){}return g};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,g,m,n,x){var F=mxUtils.bind(this,function(I){this.loadingExtensions=!1;null!=m?m(I):this.handleError(I)});this.createTimeout(null,mxUtils.bind(this,function(I){n=null!=n?n:c.name;var M=mxUtils.bind(this,-function(K){I.clear()&&F(K)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var aa=n.lastIndexOf(".");if(0<=aa&&aa<n.length)n.substring(aa+1).toUpperCase();else{var ia=n.lastIndexOf("/");0<=ia&&ia<n.length&&(n=n.substring(ia+1))}}catch(ba){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;-K.append("file1",c,n);var da=new XMLHttpRequest;da.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));da.responseType="blob";this.addRemoteServiceSecurityCheck(da);null!=x&&da.setRequestHeader("x-convert-custom",x);da.onreadystatechange=mxUtils.bind(this,function(){if(4==da.readyState&&I.clear())if(200<=da.status&&299>=da.status)try{var ba=da.response;if("text/xml"==ba.type){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(X){try{g(X.target.result)}catch(ca){M({message:mxResources.get("errorLoadingFile")})}});-oa.readAsText(ba)}else this.doImportVisio(ba,g,M,n)}catch(X){M(X)}else try{""==da.responseType||"text"==da.responseType?M({message:da.responseText}):(oa=new FileReader,oa.onload=function(){try{M({message:JSON.parse(oa.result).Message})}catch(X){null!=oa.result&&0<oa.result.length?M({message:oa.result}):M(X)}},oa.readAsText(da.response))}catch(X){M({})}});da.send(K)}else if(I.clear())try{this.doImportVisio(c,g,M,n)}catch(ba){M(ba)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});+function(K){I.clear()&&F(K)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var aa=n.lastIndexOf(".");if(0<=aa&&aa<n.length)n.substring(aa+1).toUpperCase();else{var ja=n.lastIndexOf("/");0<=ja&&ja<n.length&&(n=n.substring(ja+1))}}catch(ba){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;+K.append("file1",c,n);var ca=new XMLHttpRequest;ca.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=x&&ca.setRequestHeader("x-convert-custom",x);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&I.clear())if(200<=ca.status&&299>=ca.status)try{var ba=ca.response;if("text/xml"==ba.type){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(Y){try{g(Y.target.result)}catch(da){M({message:mxResources.get("errorLoadingFile")})}});+oa.readAsText(ba)}else this.doImportVisio(ba,g,M,n)}catch(Y){M(Y)}else try{""==ca.responseType||"text"==ca.responseType?M({message:ca.responseText}):(oa=new FileReader,oa.onload=function(){try{M({message:JSON.parse(oa.result).Message})}catch(Y){null!=oa.result&&0<oa.result.length?M({message:oa.result}):M(Y)}},oa.readAsText(ca.response))}catch(Y){M({})}});ca.send(K)}else if(I.clear())try{this.doImportVisio(c,g,M,n)}catch(ba){M(ba)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?L():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",L,null,null,null,M))}),F)};EditorUi.prototype.importGraphML=function(c,g,m){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=m?m(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(M){x.clear()&&n(M)}),I=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,g,n)}catch(M){F(M)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?I():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,F))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(m){this.loadingExtensions=!1;this.handleError(m)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(m){var n=mxUtils.bind(this,function(F){m.clear()&&g(F)}),x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(m.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(F){n(F)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=@@ -3722,84 +3723,84 @@ JSON.parse(c);g(LucidImporter.importState(M));try{if(null!=window.console&&"1"==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(I,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",I,null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,F))}),n)};EditorUi.prototype.createMermaidXml=function(c,g,m,n,x,F){var I=new Graph(document.createElement("div"));m=I.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+m+";");I.setAttributeForCell(m,"mermaidData",JSON.stringify({data:c,config:g},null,2));null!=F&&I.setAttributeForCell(m,"templatePrompt",F);c=(new mxCodec).encode(I.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,g,m){var n=0,x=function(){for(var I=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),M=0;M<I.length;M++)null!=I[M].parentNode&&I[M].parentNode.removeChild(I[M])},F=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(I){var M=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(K){I.clear()&&(x(),m(K))});M.send(mxUtils.bind(this,function(K){if(I.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var ia=mxUtils.trim(K.getText());this.generateMermaidImage(ia,null,mxUtils.bind(this,function(da,ba,oa){this.tryAndHandle(mxUtils.bind(this,function(){I.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ia]),x(),g(ia,da,ba,oa))}),L)}),L,mxUtils.bind(this,function(da){3>n++?I.clear()&&F():L(da)}))}),L);else{var aa={message:mxResources.get("error")+" "+K.getStatus()};try{aa=JSON.parse(K.getText()),aa=aa.error}catch(ia){}L(aa)}}),L)}),m)});F()};+function(){var ja=mxUtils.trim(K.getText());this.generateMermaidImage(ja,null,mxUtils.bind(this,function(ca,ba,oa){this.tryAndHandle(mxUtils.bind(this,function(){I.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ja]),x(),g(ja,ca,ba,oa))}),L)}),L,mxUtils.bind(this,function(ca){3>n++?I.clear()&&F():L(ca)}))}),L);else{var aa={message:mxResources.get("error")+" "+K.getStatus()};try{aa=JSON.parse(K.getText()),aa=aa.error}catch(ja){}L(aa)}}),L)}),m)});F()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var g=c.split("```");g=1<g.length?g:c.split("<pre>");g=1<g.length?g:c.split("~~~");g=1<g.length?g:c.split("%%");g=1<g.length?g:c.split("(Begins)");c=mxUtils.trim(1>=g.length?c:g[1]);g=c.split("\n");var m=1<g.length?g[1]:null;if(null!=m){var n=m.indexOf("-");0<n&&(m=m.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=m&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m))g.shift(),c=mxUtils.trim(g.join("\n")),g=c.split("\n");m=g[0].split(" ")[0].replace(/:$/,"");n=m.indexOf("-");0<n&&(m=m.substring(0,n));try{"mindmap"==m&&2<g.length&&(c=extractMermaidMindmap(g))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,g,m,n,x){var F=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=n?n(M):this.handleError(M)}),I=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=c.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var M=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,-"href").replace(/<br>/g,"<br/>");var K=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<K.length&&"error"!=K[0].getAttribute("aria-roledescription")){var aa=parseFloat(K[0].getAttribute("width")),ia=parseFloat(K[0].getAttribute("height"));if(isNaN(aa)||isNaN(ia))try{var da=K[0].getAttribute("viewBox").split(/\s+/);aa=parseFloat(da[2]);ia=parseFloat(da[3])}catch(ba){aa=aa||100,ia=ia||100}m(this.convertDataUri(Editor.createSvgDataUri(L)),aa,ia)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(ba){n(ba)}});+"href").replace(/<br>/g,"<br/>");var K=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<K.length&&"error"!=K[0].getAttribute("aria-roledescription")){var aa=parseFloat(K[0].getAttribute("width")),ja=parseFloat(K[0].getAttribute("height"));if(isNaN(aa)||isNaN(ja))try{var ca=K[0].getAttribute("viewBox").split(/\s+/);aa=parseFloat(ca[2]);ja=parseFloat(ca[3])}catch(ba){aa=aa||100,ja=ja||100}m(this.convertDataUri(Editor.createSvgDataUri(L)),aa,ja)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(ba){n(ba)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(L){M(L.svg)}).catch(function(L){null!=x?x(L):n(L)})}catch(L){n(L)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(I,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(M){this.importXml(M,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",I,null,null,null,F)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,F))};EditorUi.prototype.generatePlantUmlImage=function(c,g,m,n){function x(M,L,K){c1=M>>2;c2=(M&3)<<4|L>>4;c3=(L&15)<<2|K>>6;c4=K&63;r="";r+=F(c1&63);r+=F(c2&63);r+=F(c3&63);return r+=F(c4&63)}function F(M){if(10>M)return String.fromCharCode(48+M);M-=10;if(26>M)return String.fromCharCode(65+M);M-=26;if(26>M)return String.fromCharCode(97+M);M-=26;return 0==M?"-":1==M?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(M){r="";for(i=0;i<M.length;i+=3)r=i+2==M.length?r+x(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+x(M.charCodeAt(i),0,0):r+x(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=g&&(I.responseType="blob");I.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==g)m(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);-L.onloadend=function(K){var aa=new Image;aa.onload=function(){try{var ia=aa.width,da=aa.height;if(0==ia&&0==da){var ba=L.result,oa=ba.indexOf(","),X=decodeURIComponent(escape(atob(ba.substring(oa+1)))),ca=mxUtils.parseXml(X).getElementsByTagName("svg");0<ca.length&&(ia=parseFloat(ca[0].getAttribute("width")),da=parseFloat(ca[0].getAttribute("height")))}m(L.result,ia,da)}catch(ha){n(ha)}};aa.src=L.result};L.onerror=function(K){n(K)}}else n(M)};I.onerror=function(M){n(M)};I.send()};EditorUi.prototype.insertAsPreText=+L.onloadend=function(K){var aa=new Image;aa.onload=function(){try{var ja=aa.width,ca=aa.height;if(0==ja&&0==ca){var ba=L.result,oa=ba.indexOf(","),Y=decodeURIComponent(escape(atob(ba.substring(oa+1)))),da=mxUtils.parseXml(Y).getElementsByTagName("svg");0<da.length&&(ja=parseFloat(da[0].getAttribute("width")),ca=parseFloat(da[0].getAttribute("height")))}m(L.result,ja,ca)}catch(ha){n(ha)}};aa.src=L.result};L.onerror=function(K){n(K)}}else n(M)};I.onerror=function(M){n(M)};I.send()};EditorUi.prototype.insertAsPreText=function(c,g,m){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+c+"</pre>",g,m,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;I=null!=I?I:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):-this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(da){4==da.readyState&&200<=da.status&&299>=da.status&&this.editor.graph.setSelectionCells(this.insertTextAt(da.responseText,g,m,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,m,F,!0,M)}if(Editor.isPngDataUrl(c)&&-(K=Editor.extractGraphModelFromPng(c),null!=K&&0<K.length))return this.importXml(K,g,m,F,!0,M);if("data:image/svg+xml;"==c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var aa=this.importXml(K,g,m,F,!0,M);if(0<aa.length)return aa}catch(da){}this.loadImage(c,mxUtils.bind(this,function(da){if("data:"==c.substring(0,5))this.resizeImage(da,-c,mxUtils.bind(this,function(X,ca,ha){L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),ca,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(X)+";"))}),I,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/da.width,this.maxImageSize/da.height)),oa=Math.round(da.width*ba);da=Math.round(da.height*ba);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),oa,-da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var da=null;L.getModel().beginUpdate();try{da=L.insertVertex(L.getDefaultParent(),null,c,L.snap(g),L.snap(m),1,1,"text;"+(n?"html=1;":"")),L.updateCellSize(da),L.fireEvent(new mxEventObject("textInserted","cells",[da]))}finally{L.getModel().endUpdate()}L.setSelectionCell(da)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,-g,m,F,null,M);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(da){this.editor.graph.setSelectionCells(this.importXml(da,g,m,F,null,M))}),mxUtils.bind(this,function(da){this.handleError(da)}));else{L=this.editor.graph;x=null;L.getModel().beginUpdate();try{x=L.insertVertex(L.getDefaultParent(),null,"",L.snap(g),L.snap(m),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=L.sanitizeHtml(c));c.length>-this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;L.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ia=L.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ia.width;x.geometry.height=ia.height}Graph.isLink(x.value)&&L.setLinkForCell(x,x.value);x.geometry.width+=L.gridSize;x.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<+this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,g,m,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,m,F,!0,M)}if(Editor.isPngDataUrl(c)&&+(K=Editor.extractGraphModelFromPng(c),null!=K&&0<K.length))return this.importXml(K,g,m,F,!0,M);if("data:image/svg+xml;"==c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var aa=this.importXml(K,g,m,F,!0,M);if(0<aa.length)return aa}catch(ca){}this.loadImage(c,mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,+c,mxUtils.bind(this,function(Y,da,ha){L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),da,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Y)+";"))}),I,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),oa=Math.round(ca.width*ba);ca=Math.round(ca.height*ba);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),oa,+ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;L.getModel().beginUpdate();try{ca=L.insertVertex(L.getDefaultParent(),null,c,L.snap(g),L.snap(m),1,1,"text;"+(n?"html=1;":"")),L.updateCellSize(ca),L.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{L.getModel().endUpdate()}L.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,+g,m,F,null,M);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,g,m,F,null,M))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{L=this.editor.graph;x=null;L.getModel().beginUpdate();try{x=L.insertVertex(L.getDefaultParent(),null,"",L.snap(g),L.snap(m),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=L.sanitizeHtml(c));c.length>+this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;L.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ja=L.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ja.width;x.geometry.height=ja.height}Graph.isLink(x.value)&&L.setLinkForCell(x,x.value);x.geometry.width+=L.gridSize;x.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var g=c.indexOf(";");0<g&&(c=c.substring(0,g)+c.substring(c.indexOf(",",g+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,g){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,g){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var m=document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.importFiles(m.files,null,null,this.maxImageSize),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.importFileInputElt=m}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,M){StorageFile.listFiles(this,"F",I,M)});window.openBrowserFile=mxUtils.bind(this,function(I,M,L){StorageFile.getFileContent(this,I,M,L)});window.deleteBrowserFile=mxUtils.bind(this,function(I,M,L){StorageFile.deleteFile(this,I,M,L)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,M){null!=M&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(M)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(L){this.importXml(L,0,0,!0)}),null,M)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var x=this.dialog,F=x.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=n;F.apply(x,-arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,g,m){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))m();else{var I=0,M,L=!1;F.forEach(function(K,aa){K=aa.name.toLowerCase();"diagram/diagram.xml"==K?(L=!0,aa.async("string").then(function(ia){0==ia.indexOf("<mxfile ")?g(ia):m()})):0==K.indexOf("versions/")&&+arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,g,m){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))m();else{var I=0,M,L=!1;F.forEach(function(K,aa){K=aa.name.toLowerCase();"diagram/diagram.xml"==K?(L=!0,aa.async("string").then(function(ja){0==ja.indexOf("<mxfile ")?g(ja):m()})):0==K.indexOf("versions/")&&(K=parseInt(K.substr(9)),K>I&&(I=K,M=aa))});0<I?M.async("string").then(function(K){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(K,c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m):n.parseFileData(K,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?g(aa.responseText):m())}),c.name):m()}):L||m()}},function(F){m(F)}):m()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=-!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,m))};EditorUi.prototype.importFile=function(c,g,m,n,x,F,I,M,L,K,aa,ia){K=null!=K?K:!0;var da=!1,ba=null,oa=mxUtils.bind(this,function(X){var ca=null;null!=X&&"<mxlibrary"==X.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,X,I)),this.showSidebar()):ca=this.importXml(X,m,n,K,null,null!=ia?mxEvent.isControlDown(ia):null);null!=M&&M(ca)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(aa=aa?null:this.extractGraphModelFromPng(c),-null!=aa&&0<aa.length&&(ba=this.importXml(aa,m,n,K,null,null!=ia?mxEvent.isControlDown(ia):null),L=!0)),L||(L=this.editor.graph,aa=c.indexOf(";"),0<aa&&(c=c.substring(0,aa)+c.substring(c.indexOf(",",aa+1))),K&&L.isGridEnabled()&&(m=L.snap(m),n=L.snap(n)),aa="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(aa+="editableCssRules=.*;"),ba=[L.insertVertex(null,null,"",m,n,x,F,aa+"image="+c+";")])):/(\.*<graphml )/.test(c)?-(da=!0,this.importGraphML(c,oa)):null!=L&&null!=I&&EditorUi.isVisioFilename(I)?(da=!0,this.importVisio(L,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(da=!0,g=mxUtils.bind(this,function(X){4==X.readyState&&(200<=X.status&&299>=X.status?oa(X.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==X.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),-null!=c?this.parseFileData(c,g,I):this.parseFile(L,g,I)):0==c.indexOf("PK")&&null!=L?(da=!0,this.importZipFile(L,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(ba)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ia?mxEvent.isControlDown(ia):null));da||null==M||M(ba);return ba};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){n=null!=n?n:this.maxImageSize;-K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var X=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ca=aa||this.resampleThreshold,ha=0;ha<c.length;ha++)if("image/svg"!==c[ha].type.substring(0,9)&&"image/"===c[ha].type.substring(0,6)&&c[ha].size>ca){X=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[X],"crop",[ba],"resizeImages",[oa],"ignoreEmbeddedXml",-[ia],"evt",[da]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(Y,fa,na,la,qa,ya,wa,Ja,Aa){try{if(null!=Y&&"<mxlibrary"==Y.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Y,wa)),this.showSidebar(),null;this.isCompatibleString(Y)&&1==c.length&&null!=da&&"drop"==da.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(Y,fa,na,la,qa,ya,wa,Ja,Aa,ba,ia,da)}catch(Ba){return this.handleError(Ba),-null}});F=null!=F?F:mxUtils.bind(this,function(Y){k.setSelectionCells(Y)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],V=mxUtils.bind(this,function(Y,fa){T[Y]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(Y=0;Y<T.length;Y++){var la=T[Y]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(Y){var fa=c[Y];if(null!=fa){var na=new FileReader;-na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ja=mxUtils.parseXml(wa),Aa=Ja.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ia?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==-Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(Y,mxUtils.bind(this,function(){try{if(null!=Ja){var Ca=Ja.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Oa=Da.getAttribute("viewBox");if(null==Oa||-0==Oa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Qa=Oa.split(" ");3<Qa.length&&(va=parseFloat(Qa[2]),Na=parseFloat(Qa[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ra=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+Y*v,m+Y*v,Math.max(1,Math.round(va*Ra)),Math.max(1,Math.round(Na*Ra)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,-Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):V(Y,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+Y*v,m+Y*v,0,0,fa.name)}))}else V(Y,mxUtils.bind(this,function(){return null}))}else{ya=-!1;if("image/png"==fa.type){var Ma=ia?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var ra=new Image;ra.src=la.target.result;V(Y,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+Y*v,m+Y*v,ra.width,ra.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(Y,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Oa=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+Y*v,m+Y*v,Math.round(va*Oa),Math.round(Na*Oa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=-la.target.result,x(qa,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(Ca){V(Y,function(){return Ca})},fa)}catch(Ca){V(Y,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else V(Y,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(la){V(Y,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(X){X=[];for(ha=-0;ha<c.length;ha++)X.push(c[ha]);c=X;this.confirmImageResize(function(k){oa=k;Z()},L)}else Z()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,+!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,m))};EditorUi.prototype.importFile=function(c,g,m,n,x,F,I,M,L,K,aa,ja){K=null!=K?K:!0;var ca=!1,ba=null,oa=mxUtils.bind(this,function(Y){var da=null;null!=Y&&"<mxlibrary"==Y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,Y,I)),this.showSidebar()):da=this.importXml(Y,m,n,K,null,null!=ja?mxEvent.isControlDown(ja):null);null!=M&&M(da)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(aa=aa?null:this.extractGraphModelFromPng(c),+null!=aa&&0<aa.length&&(ba=this.importXml(aa,m,n,K,null,null!=ja?mxEvent.isControlDown(ja):null),L=!0)),L||(L=this.editor.graph,aa=c.indexOf(";"),0<aa&&(c=c.substring(0,aa)+c.substring(c.indexOf(",",aa+1))),K&&L.isGridEnabled()&&(m=L.snap(m),n=L.snap(n)),aa="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(aa+="editableCssRules=.*;"),ba=[L.insertVertex(null,null,"",m,n,x,F,aa+"image="+c+";")])):/(\.*<graphml )/.test(c)?+(ca=!0,this.importGraphML(c,oa)):null!=L&&null!=I&&EditorUi.isVisioFilename(I)?(ca=!0,this.importVisio(L,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,g=mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?oa(Y.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==Y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),+null!=c?this.parseFileData(c,g,I):this.parseFile(L,g,I)):0==c.indexOf("PK")&&null!=L?(ca=!0,this.importZipFile(L,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(ba)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ja?mxEvent.isControlDown(ja):null));ca||null==M||M(ba);return ba};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){n=null!=n?n:this.maxImageSize;+K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var Y=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var da=aa||this.resampleThreshold,ha=0;ha<c.length;ha++)if("image/svg"!==c[ha].type.substring(0,9)&&"image/"===c[ha].type.substring(0,6)&&c[ha].size>da){Y=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[Y],"crop",[ba],"resizeImages",[oa],"ignoreEmbeddedXml",+[ja],"evt",[ca]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,fa,na,la,qa,ya,wa,Ja,Aa){try{if(null!=X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(X,fa,na,la,qa,ya,wa,Ja,Aa,ba,ja,ca)}catch(Ba){return this.handleError(Ba),+null}});F=null!=F?F:mxUtils.bind(this,function(X){k.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],V=mxUtils.bind(this,function(X,fa){T[X]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var la=T[X]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(X){var fa=c[X];if(null!=fa){var na=new FileReader;+na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ja=mxUtils.parseXml(wa),Aa=Ja.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==+Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(X,mxUtils.bind(this,function(){try{if(null!=Ja){var Ca=Ja.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Oa=Da.getAttribute("viewBox");if(null==Oa||+0==Oa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Qa=Oa.split(" ");3<Qa.length&&(va=parseFloat(Qa[2]),Na=parseFloat(Qa[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ra=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+X*v,m+X*v,Math.max(1,Math.round(va*Ra)),Math.max(1,Math.round(Na*Ra)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,+Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):V(X,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+X*v,m+X*v,0,0,fa.name)}))}else V(X,mxUtils.bind(this,function(){return null}))}else{ya=+!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var ra=new Image;ra.src=la.target.result;V(X,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+X*v,m+X*v,ra.width,ra.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(X,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Oa=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+X*v,m+X*v,Math.round(va*Oa),Math.round(Na*Oa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=+la.target.result,x(qa,fa.type,g+X*v,m+X*v,240,160,fa.name,function(Ca){V(X,function(){return Ca})},fa)}catch(Ca){V(X,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else V(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+X*v,m+X*v,240,160,fa.name,function(la){V(X,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(Y){Y=[];for(ha=+0;ha<c.length;ha++)Y.push(c[ha]);c=Y;this.confirmImageResize(function(k){oa=k;Z()},L)}else Z()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,I){if(F||g)mxSettings.setResizeImages(F?I:null),mxSettings.save();m();c(I)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(c,g,m){m=null!=m?m:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,m)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,g,m){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(m)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",-action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(c,g){g=null!=g?g:this.resampleThreshold;return c>g};EditorUi.prototype.resizeImage=function(c,g,m,n,x,F,I){x=null!=x?x:this.maxImageSize;var M=Math.max(1,c.width),L=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=I?I:g.length,F))try{var aa=Math.max(M/x,L/x);if(1<aa){var ia=Math.round(M/aa),da=Math.round(L/aa),ba=document.createElement("canvas");ba.width=ia;ba.height=da;ba.getContext("2d").drawImage(c,-0,0,ia,da);var oa=ba.toDataURL();if(oa.length<g.length){var X=document.createElement("canvas");X.width=ia;X.height=da;var ca=X.toDataURL();oa!==ca&&(g=oa,M=ia,L=da)}}}catch(ha){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,I):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=+action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(c,g){g=null!=g?g:this.resampleThreshold;return c>g};EditorUi.prototype.resizeImage=function(c,g,m,n,x,F,I){x=null!=x?x:this.maxImageSize;var M=Math.max(1,c.width),L=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=I?I:g.length,F))try{var aa=Math.max(M/x,L/x);if(1<aa){var ja=Math.round(M/aa),ca=Math.round(L/aa),ba=document.createElement("canvas");ba.width=ja;ba.height=ca;ba.getContext("2d").drawImage(c,+0,0,ja,ca);var oa=ba.toDataURL();if(oa.length<g.length){var Y=document.createElement("canvas");Y.width=ja;Y.height=ca;var da=Y.toDataURL();oa!==da&&(g=oa,M=ja,L=ca)}}}catch(ha){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,I):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=m&&(n.onerror=m);n.src=c}catch(x){if(null!=m)m(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=-function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();-try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Y,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:V,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(J.container,420,300,!0,!0);J.init()};g.cellEditor.editMermaidData=function(v,-J,N){var T=JSON.parse(N);J=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,Y),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,-config:T.config},null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(J.container,420,300,!0,!0);J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,+function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==+T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=X,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:V,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};g.cellEditor.editMermaidData=+function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,X),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,config:T.config},+null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(V){c.handleError(V)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,J){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(V){c.handleError(V)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var F=g.setBackgroundImage;g.setBackgroundImage=function(v){null!=v&&null!=v.originalSrc&&(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(v,J){v=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+1),J=J.getProperty("patches"),N=0;N<J.length;N++)if(null!=J[N][EditorUi.DIFF_UPDATE]&&null!=J[N][EditorUi.DIFF_UPDATE][v]||null!=J[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var I=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J){var N=I.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=J?c.createImageForPageLink(N.originalSrc,null,null,!0):{src:N.originalSrc});return N};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==-urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(V,U,Y){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,Y)&&mxEvent.consume(V);null!=T&&T(V,U,Y)};L.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,+urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(V,U,X){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,X)&&mxEvent.consume(V);null!=T&&T(V,U,X)};L.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var aa=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(v,J,N){if(c.editor.graph.isSelectionEmpty())aa.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,J,N):this.addPopupMenuArrangeItems(v,J,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=-function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ia=g.getExportVariables;g.getExportVariables=-function(){var v=ia.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var da=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:da.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var X=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");-if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))X.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.isEnabled();if(!this.editor.chromeless||+function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ja=g.getExportVariables;g.getExportVariables=+function(){var v=ja.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var ca=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&+null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var Y=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");+if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))Y.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var da=this.actions.get("print");da.setEnabled(!mxClient.IS_IOS||!navigator.standalone);da.visible=da.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,J){null!=J&&g.isEnabled()&&!g.isEditing()&&null!=J.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,N=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),-mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,Y,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Y=0;Y<U.length;Y++)U[Y]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?-this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(U){var Y=Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,Y)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(V),Y*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&-document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ca=this.editor.graph.view;var ha=mxSettings.getUnit();ca.setUnit(ha);Editor.pageSizeUnit=ha==mxConstants.METERS?mxConstants.MILLIMETERS:ha;ca.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||-9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit);this.refresh()}if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility=-"hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility=-"visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:Z.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});-mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,Y=J.y/-V-T.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(Y=U=null),this.importFiles(N,U,Y,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(Y=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,-null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,Y,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):-(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,Y,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ja=Math.max(1,wa.width);-wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ja)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,Y,Ja*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,Y,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),-U,Y,!0))}}v.stopPropagation();v.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});+mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?+this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,X)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(V),X*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&+document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){da=this.editor.graph.view;var ha=mxSettings.getUnit();da.setUnit(ha);Editor.pageSizeUnit=ha==mxConstants.METERS?mxConstants.MILLIMETERS:ha;da.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||+9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,da.unit);this.refresh()}if("1"==urlParams.styledev){da=document.getElementById("geFooter");null!=da&&(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)})),da.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility=+"visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:Z.apply(this,arguments)}}da=document.getElementById("geInfo");null!=da&&da.parentNode.removeChild(da);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});+mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,X=J.y/+V-T.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(X=U=null),this.importFiles(N,U,X,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(X=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,+null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,X,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):+(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,X,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ja=Math.max(1,wa.width);+wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ja)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,X,Ja*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,X,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),+U,X,!0))}}v.stopPropagation();v.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,-N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ca=Editor.currentTheme,"simple"==ca||"sketch"==ca)this.doSetCurrentTheme(ca,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||-document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ca=!1;if(null!=urlParams.dark)ca=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ca="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ca&&"auto"!=mxSettings.settings.darkMode||(ca=mxSettings.settings.darkMode);"auto"==ca&&this.isAutoDarkModeSupported()&&(ca=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===-typeof ca?"1"==ca:ca);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&+N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(da=Editor.currentTheme,"simple"==da||"sketch"==da)this.doSetCurrentTheme(da,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||+document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));da=!1;if(null!=urlParams.dark)da=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)da="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||da&&"auto"!=mxSettings.settings.darkMode||(da=mxSettings.settings.darkMode);"auto"==da&&this.isAutoDarkModeSupported()&&(da=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===+typeof da?"1"==da:da);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,J){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));@@ -3872,17 +3873,17 @@ EditorUi.prototype.copyImage=function(c,g,m){try{m=null!=m?m:4,null!=navigator.cI,M,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var L=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(F.substring(F.lastIndexOf(",")+1),L,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,m,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,g){var m=this.editor.graph;if(m.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),x=mxUtils.getXml(m.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(x));g?(m.removeCells(n,!1),m.lastPasteXml=null):(m.lastPasteXml=x,m.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(c=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(c)),navigator.clipboard.writeText(g))}return c};EditorUi.prototype.pasteXml=function(c,g,m,n,x,F){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[g],"compat",[m],"evt",[n],"html",[x],"pt",[F]);x=null!=x?x:!0;var I=this.editor.graph,M=null!=F?F:Editor.pasteAtMousePointer&&I.isMouseInsertPoint()?-I.getInsertPoint():null;F=null;I.lastPasteXml==c?null==M&&I.pasteCounter++:(I.lastPasteXml=c,I.pasteCounter=0);var L=I.pasteCounter*I.gridSize;if(m||this.isCompatibleString(c)){I.model.beginUpdate();try{if(F=this.importXml(c,L,L),null!=M){var K=I.getBoundingBoxFromGeometry(F,!0);if(null!=K){var aa=Math.round(I.snap(M.x)),ia=Math.round(I.snap(M.y));I.cellsMoved(F,aa-K.x,ia-K.y)}}}finally{I.model.endUpdate()}I.setSelectionCells(F)}else if(g&&1==I.getSelectionCount()){g=I.getStartEditingCell(I.getSelectionCell(),+I.getInsertPoint():null;F=null;I.lastPasteXml==c?null==M&&I.pasteCounter++:(I.lastPasteXml=c,I.pasteCounter=0);var L=I.pasteCounter*I.gridSize;if(m||this.isCompatibleString(c)){I.model.beginUpdate();try{if(F=this.importXml(c,L,L),null!=M){var K=I.getBoundingBoxFromGeometry(F,!0);if(null!=K){var aa=Math.round(I.snap(M.x)),ja=Math.round(I.snap(M.y));I.cellsMoved(F,aa-K.x,ja-K.y)}}}finally{I.model.endUpdate()}I.setSelectionCells(F)}else if(g&&1==I.getSelectionCount()){g=I.getStartEditingCell(I.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==I.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])I.setCellStyles(mxConstants.STYLE_IMAGE,c,[g]);else{I.model.beginUpdate();try{I.labelChanged(g,c),Graph.isLink(c)&&I.setLinkForCell(g,c)}finally{I.model.endUpdate()}}I.setSelectionCell(g)}else M=null!=M?M:I.getInsertPoint(),I.isMouseInsertPoint()&&(L=0,I.lastPasteXml==c&&0<I.pasteCounter&&I.pasteCounter--),F=this.insertTextAt(c,M.x+L,M.y+L,x),I.setSelectionCells(F);I.isSelectionEmpty()||(I.scrollCellToVisible(I.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(I.view.getState(I.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,g,m,n){if(!mxEvent.isConsumed(c)){var x=c.clipboardData,F=this.editor.graph,I=!1,M=g;if(m&&null!=x&&x.getData){var L=x.getData("text/plain"),K=!1;if(null!=L&&0<L.length&&"%3CmxGraphModel%3E"==L.substring(0,18))try{var aa=decodeURIComponent(L);this.isCompatibleString(aa)&&(K=!0,L=aa)}catch(ha){}K=K?null:x.getData("text/html");null!=K&&0<K.length?(M=this.parseHtmlData(K),I="text/plain"!=M.getAttribute("data-type")):null!=L&&0<L.length&&(M=document.createElement("div"),mxUtils.setTextContent(M,K))}L=M.getElementsByTagName("span");if(null!=L&&0<L.length&&"application/vnd.lucid.chart.objects"===L[0].getAttribute("data-lucid-type"))m=L[0].getAttribute("data-lucid-content"),null!=m&&0<m.length&&(this.convertLucidChart(m,mxUtils.bind(this,function(ha){var Z=this.editor.graph;Z.lastPasteXml==ha?Z.pasteCounter++:(Z.lastPasteXml=ha,Z.pasteCounter=0);var k=Z.pasteCounter*Z.gridSize;-Z.setSelectionCells(this.importXml(ha,k,k));Z.scrollCellToVisible(Z.getSelectionCell())}),mxUtils.bind(this,function(ha){this.handleError(ha)})),mxEvent.consume(c));else{var ia=!1,da="";da=I?null!=M.textContent&&"<mxfile"==M.textContent.substring(0,7)&&"</mxfile>"==M.textContent.substring(M.textContent.length-9)||"<mxGraphModel"==M.textContent.substring(0,13)&&"</mxGraphModel>"==M.textContent.substring(M.textContent.length-15)?M.textContent.replace(/\u00a0/g," "):M.innerHTML:mxUtils.trim(null==M.innerText?-mxUtils.getTextContent(M):M.innerText);try{var ba=da.lastIndexOf("%3E");0<=ba&&ba<da.length-3&&(da=da.substring(0,ba+3))}catch(ha){}try{L=M.getElementsByTagName("span"),(aa=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(aa)||0==aa.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,da=aa)}catch(ha){}aa=null;try{if(!ia&&""==M.textContent)for(ba=0;ba<x.items.length;ba++){var oa=x.items[ba];if("file"===oa.kind){aa=-oa.getAsFile();break}}}catch(ha){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[M.outerHTML],"useEvent",m,"pasteAsLabel",n,"xml",[da],"compat",ia,"asHtml",I,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[aa]);try{if(ia||null==aa)if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),-this.pasteXml(da,n,ia,c)}catch(ha){console.log("Miro import error:",ha)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,n,ia,c,I);mxEvent.consume(c)}else m||(F.lastPasteXml=null,F.pasteCounter=0);else{var X=F.getInsertPoint();this.importFiles([aa],X.x,X.y,this.maxImageSize);mxEvent.consume(c)}}catch(ha){this.handleError(ha)}}}g.innerHTML=" "};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&+Z.setSelectionCells(this.importXml(ha,k,k));Z.scrollCellToVisible(Z.getSelectionCell())}),mxUtils.bind(this,function(ha){this.handleError(ha)})),mxEvent.consume(c));else{var ja=!1,ca="";ca=I?null!=M.textContent&&"<mxfile"==M.textContent.substring(0,7)&&"</mxfile>"==M.textContent.substring(M.textContent.length-9)||"<mxGraphModel"==M.textContent.substring(0,13)&&"</mxGraphModel>"==M.textContent.substring(M.textContent.length-15)?M.textContent.replace(/\u00a0/g," "):M.innerHTML:mxUtils.trim(null==M.innerText?+mxUtils.getTextContent(M):M.innerText);try{var ba=ca.lastIndexOf("%3E");0<=ba&&ba<ca.length-3&&(ca=ca.substring(0,ba+3))}catch(ha){}try{L=M.getElementsByTagName("span"),(aa=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):decodeURIComponent(ca))&&(this.isCompatibleString(aa)||0==aa.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ja=!0,ca=aa)}catch(ha){}aa=null;try{if(!ja&&""==M.textContent)for(ba=0;ba<x.items.length;ba++){var oa=x.items[ba];if("file"===oa.kind){aa=+oa.getAsFile();break}}}catch(ha){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[M.outerHTML],"useEvent",m,"pasteAsLabel",n,"xml",[ca],"compat",ja,"asHtml",I,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[aa]);try{if(ja||null==aa)if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var da=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),+this.pasteXml(ca,n,ja,c)}catch(ha){console.log("Miro import error:",ha)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",da):da()}else this.pasteXml(ca,n,ja,c,I);mxEvent.consume(c)}else m||(F.lastPasteXml=null,F.pasteCounter=0);else{var Y=F.getInsertPoint();this.importFiles([aa],Y.x,Y.y,this.maxImageSize);mxEvent.consume(c)}}catch(ha){this.handleError(ha)}}}g.innerHTML=" "};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(m,n,x,F,I){if(null!=m){g.getModel().beginUpdate();try{this.pasteXml(m,!0,null,null,null,c)}finally{g.getModel().endUpdate()}}else m=null!=n?n:null!=x?x:F,null!=m?(c=null!=c?c:g.getInsertPoint(),this.importFiles([m],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(m){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),c)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(g){for(var m=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,F=0;F<m.types.length;F++)if("text/"===m.types[F].substring(0,5)){n=!0;break}for(F=0;F<m.items.length;F++){var I=m.items[F];if("file"===I.kind){x=-I.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[m],"items",[m.items.length],"files",[m.files.length],"types",[JSON.stringify(m.types)],"containsText",n,"file",[x],"editing",c.isEditing());var M=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,aa,ia,da,ba,oa){c.insertImage(K,ba,oa)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var aa=0;aa<K.length;aa++)K[aa]()});+I.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[m],"items",[m.items.length],"files",[m.files.length],"types",[JSON.stringify(m.types)],"containsText",n,"file",[x],"editing",c.isEditing());var M=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,aa,ja,ca,ba,oa){c.insertImage(K,ba,oa)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var aa=0;aa<K.length;aa++)K[aa]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([x],L.x,L.y,this.maxImageSize)}mxEvent.consume(g)}}catch(K){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(L){this.readTypeFromClipboardData(L,"image/svg+xml",mxUtils.bind(this,function(K){if(null!=K){K=new Blob([K],{type:"image/svg+xml"});var aa=this.editor.graph.getInsertPoint();this.importFiles([K],aa.x,aa.y,this.maxImageSize)}else M()}),"image")}))["catch"](M);else M()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,mxUtils.bind(this,function(m,n){null!=m?c(m):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,function(x,F,I){null!=x?c(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(M){c(M,F,I,n,g)}))}))}))}catch(m){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,g){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(m){var n=null,x=null;try{var F=this.parseHtmlData(m);if(null!=F){n="text/plain"!=F.getAttribute("data-type")?F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var I=n.lastIndexOf("%3E");0<=I&&I<n.length-3&&(n=n.substring(0,I+3))}catch(K){}try{null==@@ -3893,17 +3894,17 @@ F);this.isCompatibleString(x)?g(x):g(null,n,I)}))}))};EditorUi.prototype.readTypnull!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(m=g.getElementsByTagName("img"),1==m.length&&(n=m[0].getAttribute("src"),m=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(m=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(m=x)}catch(F){}}null!=m&&(mxUtils.setTextContent(g,m),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,m){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,c,g,m)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var m=this.editor,n=m.graph,-x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,N=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var Y=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);-la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ja=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ja/(Y.height/ha.view.scale),la.width*wa/(Y.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(Y=n.getBoundingBox(n.getSelectionCells())),la.width=(Y.width+1)*wa/ha.view.scale,la.height=(Y.height++x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,N=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var X=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);+la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ja=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ja/(X.height/ha.view.scale),la.width*wa/(X.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(X=n.getBoundingBox(n.getSelectionCells())),la.width=(X.width+1)*wa/ha.view.scale,la.height=(X.height+1)*wa/ha.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==Z){Z=PrintDialog.createPrintPreview(ha,wa,null,0,fa,na,qa);Z.title=this.getBaseFilename(!0);Z.pageSelector=!1;Z.mathEnabled=!1;fa=g.border;isNaN(fa)||(Z.pageMargin=fa);g.selection&&(Z.isCellVisible=function(Ma){return ha.isCellSelected(Ma)});var Aa=Z.writeHead;Z.writeHead=function(Ma,ra){ra=null!=ra?ra:"";g.shadows||(ra+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ra+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(ra+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ha.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'+mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=Z.drawBackgroundImage;Z.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(ra){ra.setAttribute("href","javascript:void(0)")}))}}var Ga=Z.addGraphFragment;Z.addGraphFragment=function(Ma,ra,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");-if(this.graph.shadowVisible)for(var Oa=va.getElementsByTagName("svg"),Qa=0;Qa<Oa.length;Qa++)ha.addSvgShadow(Oa[Qa])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{Y=ha.background;if(null==Y||""==Y||Y==mxConstants.NONE)Y="#ffffff";Z.backgroundColor=Y;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,+if(this.graph.shadowVisible)for(var Oa=va.getElementsByTagName("svg"),Qa=0;Qa<Oa.length;Qa++)ha.addSvgShadow(Oa[Qa])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{X=ha.background;if(null==X||""==X||X==mxConstants.NONE)X="#ffffff";Z.backgroundColor=X;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.appendGraph(ha,wa,fa,na,k,!0,v,la,g.selection?ha.getSelectionCells():null);k=ha.getCustomFonts();if(null!=Z.wnd)for(la=0;la<k.length;la++)fa=k[la].name,na=k[la].url,Graph.isCssFontUrl(na)?Z.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(na)+'" charset="UTF-8" type="text/css">'):(Z.wnd.document.writeln('<style type="text/css">'),Z.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),Z.wnd.document.writeln("</style>"))}J&&(ha.useCssTransforms=J,ha.currentTranslate=N,ha.currentScale=T,ha.view.translate=V,ha.view.scale=U);return Z}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||(K=parseInt(M)-1,F=parseInt(L)-1);for(var aa=K;aa<=-F;aa++){var ia=this.pages[aa];M=ia==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var da=K=!1,ba=null,oa=null;null==ia.viewState&&null==ia.root&&this.updatePageRoot(ia);null!=ia.viewState&&(L=ia.viewState.pageVisible,K=ia.viewState.mathEnabled,da=ia.viewState.shadowVisible,ba=ia.viewState.background,oa=ia.viewState.backgroundImage,M.pageFormat=ia.viewState.pageFormat,M.gridSize=-ia.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ia));M.background=ba;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=da;var X=M.getGraphBounds;M.getGraphBounds=function(){var ha=X.apply(this,arguments),Z=this.backgroundImage;if(null!=Z&&null!=Z.width&&null!=Z.height){var k=this.view.translate,v=this.view.scale;ha=mxRectangle.fromRectangle(ha);ha.add(new mxRectangle((k.x+-Z.x)*v,(k.y+Z.y)*v,Z.width*v,Z.height*v))}return ha};var ca=M.getGlobalVariable;M.getGlobalVariable=function(ha){return"page"==ha?ia.getName():"pagenumber"==ha?aa+1:"pagecount"==ha?null!=this.pages?this.pages.length:1:ca.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ia);M.model.setRoot(ia.root)}x=I(M,x,aa!=F,ia.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=I(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):+F;aa++){var ja=this.pages[aa];M=ja==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var ca=K=!1,ba=null,oa=null;null==ja.viewState&&null==ja.root&&this.updatePageRoot(ja);null!=ja.viewState&&(L=ja.viewState.pageVisible,K=ja.viewState.mathEnabled,ca=ja.viewState.shadowVisible,ba=ja.viewState.background,oa=ja.viewState.backgroundImage,M.pageFormat=ja.viewState.pageFormat,M.gridSize=+ja.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ja));M.background=ba;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=ca;var Y=M.getGraphBounds;M.getGraphBounds=function(){var ha=Y.apply(this,arguments),Z=this.backgroundImage;if(null!=Z&&null!=Z.width&&null!=Z.height){var k=this.view.translate,v=this.view.scale;ha=mxRectangle.fromRectangle(ha);ha.add(new mxRectangle((k.x++Z.x)*v,(k.y+Z.y)*v,Z.width*v,Z.height*v))}return ha};var da=M.getGlobalVariable;M.getGlobalVariable=function(ha){return"page"==ha?ja.getName():"pagenumber"==ha?aa+1:"pagecount"==ha?null!=this.pages?this.pages.length:1:da.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ja);M.model.setRoot(ja.root)}x=I(M,x,aa!=F,ja.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=I(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(x.mathEnabled&&(I=x.wnd.document,c||(x.wnd.IMMEDIATE_PRINT=!0),I.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||c||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var g=null,m=0;m<c.length;m++)mxEvent.addListener(c[m],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(c[m],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[m],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(n);if(null==x){var F=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=F&&(10==document.documentMode||11==document.documentMode?x=F.getData("Text"):(x=null,x=0<=mxUtils.indexOf(F.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(F.types,"text/html")?F.getData("text/html"):null,null!=x&&0<x.length?(F=document.createElement("div"),@@ -3928,37 +3929,37 @@ this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(x){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(x){c||this.handleError(x)}};EditorUi.prototype.installMessageHandler=function(c){var g=null,m=!1,n=!1,x=null,F=mxUtils.bind(this,function(L,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var K=-L.data,aa=null,ia=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(Ca){}return ra});if("json"==urlParams.proto){var da=+L.data,aa=null,ja=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(Ca){}return ra});if("json"==urlParams.proto){var ca=!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(ra){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(ra){null!=ra?I.postMessage(JSON.stringify({event:"prompt",value:ra,message:K}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,-!1);ba.init();return}if("draft"==K.action){var oa=ia(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):-null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){I.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var X=1==K.enableRecent,ca=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,-!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(ra,Ca,Da,va){ra=ra||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(ra,L,ra!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,X?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):-null,ca?mxUtils.bind(this,function(ra,Ca){this.remoteInvoke("searchDiagrams",[ra,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:ra,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=+!1);ba.init();return}if("draft"==K.action){var oa=ja(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):+null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){I.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var Y=1==K.enableRecent,da=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,+!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(ra,Ca,Da,va){ra=ra||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(ra,L,ra!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):+null,da?mxUtils.bind(this,function(ra,Ca){this.remoteInvoke("searchDiagrams",[ra,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:ra,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(ra){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var V=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(ra,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(V,this.editor.graph,null,!0,function(va){U(ra,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);-this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=ra;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),Y=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==K.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(ra)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=+this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=ra;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),X=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==K.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(ra)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var ra=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Qa){return"page"==Qa?Ca.getName():"pagenumber"==Qa?1:ra.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=-v.model,Na=va.getChildCells(va.getRoot()),Oa={};for(Da=0;Da<K.layerIds.length;Da++)Oa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Oa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Qa){Y(Qa.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){Y(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),-m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):Y(null)}),mxUtils.bind(this,function(){Y(null)}))}}else if(na=mxUtils.bind(this,+v.model,Na=va.getChildCells(va.getRoot()),Oa={};for(Da=0;Da<K.layerIds.length;Da++)Oa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Oa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Qa){X(Qa.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){X(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),+m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else if(na=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();ra.xml=mxUtils.getXml(Ca);ra.data=this.getFileData(null,null,!0,null,null,null,Ca);ra.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),ra.data=this.getHtml(Ca,this.editor.graph),ra.xml=mxUtils.getXml(Ca),ra.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=K.asText?Na:Editor.createSvgDataUri(Na);I.postMessage(JSON.stringify(ra),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Oa){Da(mxUtils.getXml(Oa))})):Da(mxUtils.getXml(Na))}));return}I.postMessage(JSON.stringify(ra),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;-this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){da=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),+this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){ca=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=K.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=K.noSaveBtn);if(null!=K.rough){var qa=Editor.sketchMode;this.doSetSketchMode(K.rough);qa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=K.dark&&this.setDarkMode(K.dark);null!=K.border&&(this.embedExportBorder=K.border);null!=K.theme&&(this.embedExportTheme=K.theme);null!=K.background&&(this.embedExportBackground=K.background);null!=K.viewport&&(this.embedViewport=K.viewport);this.embedExitPoint=null;if(null!=K.rect){var ya=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,K.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,K.rect.top)+"px";this.minInlineWidth=K.minWidth;this.minInlineHeight=K.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var wa=K.maxFitScale,Ja=K.rect.width+2*ya,Aa=K.rect.height+2*ya;aa=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();Ja=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ja):Ja,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,ra.height-80);this.diagramContainer.style.width=Ja+"px";this.diagramContainer.style.height=ra+"px";var Ca=this.editor.graph;ra=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=ra;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(ra){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();-null!=Ba&&(oa=ia(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(ra){I.postMessage(JSON.stringify({event:"merge",message:K,error:ra}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),-"*");return}}catch(ra){this.handleError(ra)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(ra,Ca){m=!0;try{c(ra,Ca,null,da)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),+null!=Ba&&(oa=ja(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(ra){I.postMessage(JSON.stringify({event:"merge",message:K,error:ra}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),+"*");return}}catch(ra){this.handleError(ra)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(ra,Ca){m=!0;try{c(ra,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));x=Da}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",-g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=ra,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ia="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(ra){Ma(ra,L)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ia)):+g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=ra,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(ra){Ma(ra,L)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ja)):null!=K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ma(ra.responseText,L):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===-typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(ra){Ma(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ia(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(ra){Ma(Ga(),L)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):+typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(ra){Ma(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(ra){Ma(Ga(),L)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(F,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(L,K,aa){M.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:L,target:K,allowOpener:aa}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,m,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=m?" ("+m+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),@@ -3968,23 +3969,23 @@ function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new Textn.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=F}catch(I){this.handleError(I)}}));x.setAttribute("title","copy");x.className="geBtn";m.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(g){var m=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?m():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",m,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g)}))};EditorUi.prototype.doImportCsv=function(c,g){try{var m=c.split("\n"),n=[],x=[],F=[],I={};if(0<m.length){var M=-{},L=this.editor.graph,K=null,aa=null,ia=null,da=null,ba=null,oa=null,X=null,ca="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",N=!1,T=null,V=null,U=40,Y=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ta):(L.setSelectionCells(ta),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ja=null,Aa="auto";Z=null;for(var Ba=[],-Ga=null,Ma=null,ra=0;ra<m.length&&"#"==m[ra].charAt(0);){c=m[ra].replace(/\r$/,"");for(ra++;ra<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ra].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ra].substring(1)),ra++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ja=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?X=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==-Da?ca=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?da=va:"styles"==Da&&0<va.length&&"-"!=va?ia=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):-"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[ra])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[ra].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ja&&(Ja="%"+Da[0]++{},L=this.editor.graph,K=null,aa=null,ja=null,ca=null,ba=null,oa=null,Y=null,da="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",N=!1,T=null,V=null,U=40,X=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ta):(L.setSelectionCells(ta),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ja=null,Aa="auto";Z=null;for(var Ba=[],+Ga=null,Ma=null,ra=0;ra<m.length&&"#"==m[ra].charAt(0);){c=m[ra].replace(/\r$/,"");for(ra++;ra<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ra].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ra].substring(1)),ra++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ja=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?Y=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==+Da?da=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):+"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?X=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[ra])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[ra].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ja&&(Ja="%"+Da[0]+"%");if(null!=Ba)for(var Oa=0;Oa<Ba.length;Oa++)null==M[Ba[Oa].to]&&(M[Ba[Oa].to]={});ha=[];for(va=ra+1;va<m.length;va++){var Qa=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Qa){var Ra=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Ra+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ha.push(Qa)}L.model.beginUpdate();try{for(va=0;va<ha.length;va++){Qa=ha[va];var za=null,Ea=null!=c?k+Qa[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=-mxUtils.indexOf(n,za));var C=new mxCell(Ja,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var P=0;P<Qa.length;P++)L.setAttributeForCell(C,Da[P],Qa[P]),null==za||m||L.setAttributeForCell(za,Da[P],Qa[P]);if(null!=ba&&null!=X){var R=X[C.getAttribute(ba)];null!=R&&(L.labelChanged(C,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=da&&null!=ia){var W=ia[C.getAttribute(da)];null!=W&&(C.style=W)}L.setAttributeForCell(C,-"placeholders","1");C.style=L.replacePlaceholders(C,C.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(L.model.setStyle(za,C.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=C;if(!m)for(Oa=0;Oa<Ba.length;Oa++)M[Ba[Oa].to][za.getAttribute(Ba[Oa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ja=this.editor.graph.getPreferredSizeForCell(za);-Z=null!=Ca?L.model.getCell(k+Qa[Ca]):null;if(za.vertex){Ra=null!=Z?0:ya;ra=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ra+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ra+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ja.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):-null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ja.height+na:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+Y}m?(null==I[Ea]&&(I[Ea]=[]),I[Ea].push(za)):(n.push(za),null!=Z?(Z.style=L.replacePlaceholders(Z,ca,K),L.addCell(za,Z),x.push(Z)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ka="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?x[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ka||"auto"!=+mxUtils.indexOf(n,za));var C=new mxCell(Ja,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var P=0;P<Qa.length;P++)L.setAttributeForCell(C,Da[P],Qa[P]),null==za||m||L.setAttributeForCell(za,Da[P],Qa[P]);if(null!=ba&&null!=Y){var R=Y[C.getAttribute(ba)];null!=R&&(L.labelChanged(C,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ja){var W=ja[C.getAttribute(ca)];null!=W&&(C.style=W)}L.setAttributeForCell(C,+"placeholders","1");C.style=L.replacePlaceholders(C,C.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(L.model.setStyle(za,C.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=C;if(!m)for(Oa=0;Oa<Ba.length;Oa++)M[Ba[Oa].to][za.getAttribute(Ba[Oa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);+Z=null!=Ca?L.model.getCell(k+Qa[Ca]):null;if(za.vertex){Ra=null!=Z?0:ya;ra=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ra+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ra+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ia.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):+null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ia.height+na:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+X}m?(null==I[Ea]&&(I[Ea]=[]),I[Ea].push(za)):(n.push(za),null!=Z?(Z.style=L.replacePlaceholders(Z,da,K),L.addCell(za,Z),x.push(Z)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ka="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?x[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ka||"auto"!=J&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=F.slice(),ta=F.slice();for(Oa=0;Oa<Ba.length;Oa++){var ua=Ba[Oa];for(va=0;va<n.length;va++){za=n[va];var Ia=mxUtils.bind(this,function(kb,ob,hb){var pb=ob.getAttribute(hb.from);if(null!=pb&&""!=pb){pb=pb.split(",");for(var sb=0;sb<pb.length;sb++){var ib=M[hb.to][pb[sb]];if(null==ib&&null!=oa){ib=new mxCell(pb[sb],new mxGeometry(ya,wa,0,0),oa);ib.style=L.replacePlaceholders(ob,ib.style,K);var mb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=mb.width+na;ib.geometry.height=mb.height+na;M[hb.to][pb[sb]]=ib;ib.vertex=!0;ib.id=pb[sb];F.push(L.addCell(ib))}if(null!=ib){mb=hb.label;null!=hb.fromlabel&&(mb=(ob.getAttribute(hb.fromlabel)||"")+(mb||""));null!=hb.sourcelabel&&(mb=L.replacePlaceholders(ob,hb.sourcelabel,K)+(mb||""));null!=hb.tolabel&&(mb=(mb||"")+(ib.getAttribute(hb.tolabel)||""));null!=hb.targetlabel&&(mb=(mb||"")+L.replacePlaceholders(ib,hb.targetlabel,K));var nb="target"==hb.placeholders==!hb.invert?ib:kb;nb=null!=hb.style?L.replacePlaceholders(nb,hb.style,K):L.createCurrentEdgeStyle();mb=L.insertEdge(null,null,mb||"",hb.invert?ib:kb,hb.invert?kb:ib,nb);if(null!=hb.labels)for(nb=0;nb<hb.labels.length;nb++){var qb=hb.labels[nb],ub=new mxCell(qb.label||nb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!hb.invert?ib:kb,ub.value,K));if(null!=qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);mb.insert(ub)}if(null!=hb.data)for(var zb in hb.data)L.setAttributeForCell(mb,zb,hb.data[zb]);ta.push(mb);mxUtils.remove(hb.invert?kb:ib,xa)}}}});Ia(za,za,ua);if(null!=I[za.id])for(P=0;P<I[za.id].length;P++)Ia(za,I[za.id][P],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],P=0;P<Ma.length;P++)L.setAttributeForCell(za,mxUtils.trim(Ma[P]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=U;Va.checkOverlap=!0;var Wa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());for(var kb=0;kb<F.length;kb++){var ob=L.getCellGeometry(F[kb]);ob.x=Math.round(L.snap(ob.x));ob.y=Math.round(L.snap(ob.y));"auto"==v&&(ob.width=Math.round(L.snap(ob.width)));"auto"==J&&(ob.height=Math.round(L.snap(ob.height)))}};if("["==Aa.charAt(0)){var Ta=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Wa();Ta()});la=null}else if("circle"==Aa){var ab=new mxCircleLayout(L);ab.disableEdgeStyle=-!1;ab.resetEdges=!1;var Pa=ab.isVertexIgnored;ab.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){ab.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ta.length==2*F.length-1&&1==xa.length){L.view.validate();var Sa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Sa.levelDistance=Y;Sa.edgeRouting=!1;Sa.resetEdges=!1;Sa.sortEdges=!0;this.executeLayout(function(){Sa.execute(L.getDefaultParent(),-0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=Y;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ta);L.moveCells(ta,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,-2,fa,Y),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ta.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*Y;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());+!1;ab.resetEdges=!1;var Pa=ab.isVertexIgnored;ab.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){ab.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ta.length==2*F.length-1&&1==xa.length){L.view.validate();var Sa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Sa.levelDistance=X;Sa.edgeRouting=!1;Sa.resetEdges=!1;Sa.sortEdges=!0;this.executeLayout(function(){Sa.execute(L.getDefaultParent(),+0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=X;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ta);L.moveCells(ta,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,+2,fa,X),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ta.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*X;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());Wa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(m,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,m,n,x){c=new LinkDialog(this,c,g,m,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);@@ -3997,23 +3998,23 @@ this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").sethis.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,g,m,n,-x,F,I,M){var L=c.editor.graph;if("xml"==m)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==m)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(L.getSvg(n,x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),aa=L.getGraphBounds(),ia=Math.floor(aa.width*x/L.view.scale),da=Math.floor(aa.height*x/L.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ia*da<MAX_AREA)if(c.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!c.editor.isExportToCanvas()){var ba=-{globalVars:L.getExportVariables()};M&&(ba.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(g,m,function(oa,X){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+(X||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<I?"&dpi="+I:"")+"&bg="+(null!=n?n:"none")+"&w="+ia+"&h="+da+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==m?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,M,I):c.exportImage(x,+x,F,I,M){var L=c.editor.graph;if("xml"==m)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==m)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(L.getSvg(n,x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),aa=L.getGraphBounds(),ja=Math.floor(aa.width*x/L.view.scale),ca=Math.floor(aa.height*x/L.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ja*ca<MAX_AREA)if(c.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!c.editor.isExportToCanvas()){var ba=+{globalVars:L.getExportVariables()};M&&(ba.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(g,m,function(oa,Y){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+(Y||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<I?"&dpi="+I:"")+"&bg="+(null!=n?n:"none")+"&w="+ja+"&h="+ca+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==m?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,M,I):c.exportImage(x,!1,!0,!1,!1,F,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,g="";if(null!=this.pages)for(var m=0;m<this.pages.length;m++){var n=c;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[m]),n.model.setRoot(this.pages[m].root));g+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else g=c.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var g={},m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var F={};try{var I=mxSettings.getCustomLibraries();for(c=0;c<I.length;c++){var M=I[c];if("R"==M.substring(0,1)){var L=JSON.parse(decodeURIComponent(M.substring(1)));F[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(K){}this.remoteInvoke("getCustomLibraries",null,null,function(K){x.innerText="";if(0==K.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<-K.length;aa++){var ia=K[aa];F[ia.id]&&(g[ia.id]=ia);var da=this.addCheckbox(x,ia.title,F[ia.id]);(function(ba,oa){mxEvent.addListener(oa,"change",function(){this.checked?g[ba.id]=ba:delete g[ba.id]})})(ia,da)}},mxUtils.bind(this,function(K){x.innerText="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(aa)}));m.appendChild(x);-m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,aa;for(aa in g)null==F[aa]&&(K++,mxUtils.bind(this,function(ia){this.remoteInvoke("getFileContent",[ia.downloadUrl],null,mxUtils.bind(this,function(da){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,da,ia)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();+K.length;aa++){var ja=K[aa];F[ja.id]&&(g[ja.id]=ja);var ca=this.addCheckbox(x,ja.title,F[ja.id]);(function(ba,oa){mxEvent.addListener(oa,"change",function(){this.checked?g[ba.id]=ba:delete g[ba.id]})})(ja,ca)}},mxUtils.bind(this,function(K){x.innerText="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(aa)}));m.appendChild(x);+m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,aa;for(aa in g)null==F[aa]&&(K++,mxUtils.bind(this,function(ja){this.remoteInvoke("getFileContent",[ja.downloadUrl],null,mxUtils.bind(this,function(ca){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ja)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[aa]));for(aa in F)g[aa]||this.closeLibrary(new RemoteLibrary(this,null,F[aa]));0==K&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(m.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var g=0;g<this.remoteInvokeQueue.length;g++)c.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var g=c.msgMarkers,m=this.remoteInvokeCallbacks[g.callbackId];if(null==m)throw Error("No callback for "+(null!=g?g.callbackId:"null"));c.error?m.error&&m.error(c.error.errResp):m.callback&&m.callback.apply(this,c.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,g,m,n,x){var F=!0,I=window.setTimeout(mxUtils.bind(this,function(){F=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(I);F&&n.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(I);F&&x.apply(this,-arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:m});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var m=mxUtils.bind(this,function(K,aa){var ia={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=aa?ia.error={errResp:aa}:null!=K&&(ia.resp=K);this.remoteWin.postMessage(JSON.stringify(ia),+arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:m});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var m=mxUtils.bind(this,function(K,aa){var ja={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=aa?ja.error={errResp:aa}:null!=K&&(ja.resp=K);this.remoteWin.postMessage(JSON.stringify(ja),"*")});try{var n=c.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var F=!1,I=0;I<x.allowedDomains.length;I++)if(g=="https://"+x.allowedDomains[I]){F=!0;break}if(!F){m(null,"Invalid Call: "+n+" is not allowed.");return}}var M=c.functionArgs;Array.isArray(M)||(M=[]);if(x.isAsync)M.push(function(){m(Array.prototype.slice.apply(arguments))}),M.push(function(K){m(null,K||"Unkown Error")}),this[n].apply(this,M);else{var L=this[n].apply(this,M);m([L])}}else m(null,"Invalid Call: "+n+" is not found.")}catch(K){m(null,"Invalid Call: An error occurred, "+K.message)}};EditorUi.prototype.openDatabase=function(c,g){if(null==this.database){var m=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=m)try{var n=m.open("database",2);n.onupgradeneeded=function(x){try{var F=n.result;1>x.oldVersion&&F.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(F.createObjectStore("files",{keyPath:"title"}),F.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=g&&g(I)}};n.onsuccess=mxUtils.bind(this,function(x){try{var F=n.result;this.database=F;EditorUi.migrateStorageFiles&&(StorageFile.migrate(F),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if((!I||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var M=document.createElement("iframe");-M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var L=!0,K=!1,aa,ia=0,da=mxUtils.bind(this,function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ia++;oa()}),oa=mxUtils.bind(this,function(){try{if(ia>=aa.length)da();else{var ca=aa[ia];StorageFile.getFileContent(this,-ca,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==ca&&ha==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ca]}),"*"):ba()}),ba)}}catch(ha){console.log(ha)}}),X=mxUtils.bind(this,function(ca){try{this.setDatabaseItem(null,[{title:ca.title,size:ca.data.length,lastModified:Date.now(),type:ca.isLib?"L":"F"},{title:ca.title,data:ca.data}],ba,ba,["filesInfo","files"])}catch(ha){console.log(ha)}});I=mxUtils.bind(this,-function(ca){try{if(ca.source==M.contentWindow){var ha={};try{ha=JSON.parse(ca.data)}catch(Z){}"init"==ha.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||K||(L?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(aa=ha.resp[0],L=!1,oa()):da():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?X(ha.resp[0]):ba())}}catch(Z){console.log(Z)}});+M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var L=!0,K=!1,aa,ja=0,ca=mxUtils.bind(this,function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ja++;oa()}),oa=mxUtils.bind(this,function(){try{if(ja>=aa.length)ca();else{var da=aa[ja];StorageFile.getFileContent(this,+da,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==da&&ha==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[da]}),"*"):ba()}),ba)}}catch(ha){console.log(ha)}}),Y=mxUtils.bind(this,function(da){try{this.setDatabaseItem(null,[{title:da.title,size:da.data.length,lastModified:Date.now(),type:da.isLib?"L":"F"},{title:da.title,data:da.data}],ba,ba,["filesInfo","files"])}catch(ha){console.log(ha)}});I=mxUtils.bind(this,+function(da){try{if(da.source==M.contentWindow){var ha={};try{ha=JSON.parse(da.data)}catch(Z){}"init"==ha.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||K||(L?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(aa=ha.resp[0],L=!1,oa()):ca():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?Y(ha.resp[0]):ba())}}catch(Z){console.log(Z)}});window.addEventListener("message",I)}})));c(F);F.onversionchange=function(){F.close()}}catch(I){null!=g?g(I):null!=window.console&&console.warn(I)}});n.onerror=g;n.onblocked=function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=g&&g(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,g,m,n,x){this.openDatabase(mxUtils.bind(this,function(F){try{x=x||"objects";Array.isArray(x)||(x=[x],c=[c],g=[g]);var I=F.transaction(x,"readwrite");I.oncomplete=m;I.onerror=n;for(F=0;F<x.length;F++)I.objectStore(x[F]).put(null!=c&&null!=c[F]?{key:c[F],data:g[F]}:g[F])}catch(M){null!=n&&n(M)}}),n)};EditorUi.prototype.removeDatabaseItem=function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var F=x.transaction(n,"readwrite");F.oncomplete=g;F.onerror=m;for(x=0;x<n.length;x++)F.objectStore(n[x]).delete(c[x])}catch(I){null!=m&&m(I)}}),m)};EditorUi.prototype.getDatabaseItem=function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var F=x.transaction([n],"readonly").objectStore(n).get(c);F.onsuccess=function(){g(F.result)};F.onerror=m}catch(I){null!=m&&m(I)}}),m)};EditorUi.prototype.getDatabaseItems=function(c,g,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";var x=n.transaction([m],"readonly").objectStore(m).openCursor(IDBKeyRange.lowerBound(0)),F=[];x.onsuccess=function(I){null==I.target.result?c(F):(F.push(I.target.result.value),@@ -4022,31 +4023,31 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.protc.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,g){var m=this.getCurrentFile();return null!=m?m.newComment(c,g):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,g){var m=this.getCurrentFile();null!=m&&m.getRevisions?m.getRevisions(c,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,g,m,n,x,F,I,M){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,g,m,n,x,F,I,M)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");-return this.editor.embedCssFonts(c,g)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");+return this.editor.embedCssFonts(c,g)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,g,m,n)};EditorUi.prototype.convertImageToDataUri=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,g)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,m,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,m,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),n=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<n.length){var x="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,f,l,u,y,q){function B(){for(var X=M.getElementsByTagName("div"),ca=0,ha=0;ha<X.length;ha++)"none"!=X[ha].style.display&&X[ha].parentNode==M&&ca++;L.style.display=0==ca?"block":"none"}function H(X,ca,ha,Z){function k(){ca.removeChild(N);ca.removeChild(T);J.style.display="block";v.style.display="block"}x={div:ca,comment:X,saveCallback:ha,deleteOnCancel:Z};var v=ca.querySelector(".geCommentTxt"),J=ca.querySelector(".geCommentActionsList"),N=document.createElement("textarea");-N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=X.content;ca.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(ca.parentNode.removeChild(ca),B()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";X.content=N.value;mxUtils.write(v,X.content);k();ha(X);x=null});mxEvent.addListener(N,"keydown",-mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(V.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ca.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(X,ca){ca.innerText="";X=new Date(X.modifiedDate);var ha=b.timeSince(X);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(ca,-mxResources.get("timeAgo",[ha],"{1} ago"));ca.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString())}function E(X){var ca=document.createElement("img");ca.className="geCommentBusyImg";ca.src=IMAGE_PATH+"/spin.gif";X.appendChild(ca);X.busyImg=ca}function Q(X){X.style.border="1px solid red";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function c(X){X.style.border="";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function g(X,ca,ha,Z,k){function v(na,la,qa){var ya=document.createElement("li");-ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ja){la(Ja,X);Ja.preventDefault();mxEvent.consume(Ja)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(X);return{pdiv:qa,replies:la}}function N(na,la,qa,ya,wa){function Ja(){E(Ma);-X.addReply(Ga,function(ra){Ga.id=ra;X.replies.push(Ga);c(Ma);qa&&qa()},function(ra){Aa();Q(Ma);b.handleError(ra,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(ra){Ja()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=X.id;null==X.replies&&(X.replies=[]);var Ma=g(Ga,X.replies,Ba,Z+1);la?Aa():Ja()}if(k||!X.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",-X.id);T.style.marginLeft=20*Z+5+"px";X.isResolved&&(F.style.opacity="0.7");var V=document.createElement("div");V.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=X.user&&null!=X.user.pictureUrl?X.user.pictureUrl:Editor.userImage;V.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";V.appendChild(U);var Y=document.createElement("div");Y.className="geCommentUsername";mxUtils.write(Y,null!=X.user?X.user.displayName:-mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",X.id);S(X,Y);U.appendChild(Y);T.appendChild(V);V=document.createElement("div");V.className="geCommentTxt";mxUtils.write(V,X.content||"");T.appendChild(V);X.isLocked&&(T.style.opacity="0.5");V=document.createElement("div");V.className="geCommentActions";var fa=document.createElement("ul");fa.className="geCommentActionsList";V.appendChild(fa);m||X.isLocked||0!=-Z&&!n||v(mxResources.get("reply"),function(){N("",!0)},X.isResolved);U=b.getCurrentUser();null==U||null==X.user||U.id!=X.user.id||m||X.isLocked||(v(mxResources.get("edit"),function(){function na(){H(X,T,function(){E(T);X.editComment(X.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},X.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);X.deleteComment(function(na){if(!0===-na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=J(X).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<ca.length;na++)if(ca[na]==X){ca.splice(na,1);break}L.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(na){Q(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},-X.isResolved));m||X.isLocked||0!=Z||v(X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";X.isResolved=!X.isResolved;mxUtils.write(qa,X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=X.isResolved?"none":"",wa=J(X).replies,Ja="light-dark("+(X.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ja;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),-Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);da||(wa[Aa].style.display="none")}B()}X.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=X.replies&&ha<X.replies.length;ha++)V=X.replies[ha],V.isResolved=X.isResolved,g(V,X.replies,null,Z+1,k);null!=x&&(x.comment.id==X.id?(k=X.content,X.content=x.comment.content,H(X,T,x.saveCallback,-x.deleteOnCancel),X.content=k):null==x.comment.id&&x.comment.pCommentId==X.id&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var I=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(I)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";-mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=I;K.style.padding="3px 4px 4px 4px";I=document.createElement("a");I.className="geButton";if(!m){var aa=I.cloneNode();aa.style.backgroundImage="url("+Editor.plusImage+")";aa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(aa,"click",function(X){function ca(){H(ha,Z,function(k){E(Z);b.addComment(k,function(v){k.id=v;ba.push(k);-c(Z)},function(v){Q(Z);ca();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ha=b.newComment("",b.getCurrentUser()),Z=g(ha,ba,null,0);ca();X.preventDefault();mxEvent.consume(X)});K.appendChild(aa)}var ia=I.cloneNode();ia.style.backgroundImage="url("+Editor.checkImage+")";ia.setAttribute("title",mxResources.get("showResolved"));var da=!1;mxEvent.addListener(ia,"click",function(X){(da=!da)?ia.classList.add("geActiveItem"):ia.classList.remove("geActiveItem");-oa();X.preventDefault();mxEvent.consume(X)});K.appendChild(ia);b.commentsRefreshNeeded()&&(aa=I.cloneNode(),aa.style.backgroundImage="url("+Editor.refreshImage+")",aa.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(aa,"click",function(X){oa();X.preventDefault();mxEvent.consume(X)}),K.appendChild(aa));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=-"geButton geAdaptiveAsset",mxEvent.addListener(I,"click",function(X){q();X.preventDefault();mxEvent.consume(X)}),K.appendChild(I));F.appendChild(K);var ba=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var X=x.div.querySelector(".geCommentEditTxtArea"),ca=x.div.querySelector(".geCommentEditBtns");x.comment.content=X.value;X.parentNode.removeChild(X);ca.parentNode.removeChild(ca)}catch(ha){b.handleError(ha)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'++var CommentsWindow=function(b,f,l,u,y,q){function B(){for(var Y=M.getElementsByTagName("div"),da=0,ha=0;ha<Y.length;ha++)"none"!=Y[ha].style.display&&Y[ha].parentNode==M&&da++;L.style.display=0==da?"block":"none"}function H(Y,da,ha,Z){function k(){da.removeChild(N);da.removeChild(T);J.style.display="block";v.style.display="block"}x={div:da,comment:Y,saveCallback:ha,deleteOnCancel:Z};var v=da.querySelector(".geCommentTxt"),J=da.querySelector(".geCommentActionsList"),N=document.createElement("textarea");+N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=Y.content;da.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(da.parentNode.removeChild(da),B()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";Y.content=N.value;mxUtils.write(v,Y.content);k();ha(Y);x=null});mxEvent.addListener(N,"keydown",+mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(U.click(),mxEvent.consume(X)):27==X.keyCode&&(V.click(),mxEvent.consume(X)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);da.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(Y,da){da.innerText="";Y=new Date(Y.modifiedDate);var ha=b.timeSince(Y);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(da,+mxResources.get("timeAgo",[ha],"{1} ago"));da.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString())}function E(Y){var da=document.createElement("img");da.className="geCommentBusyImg";da.src=IMAGE_PATH+"/spin.gif";Y.appendChild(da);Y.busyImg=da}function Q(Y){Y.style.border="1px solid red";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function c(Y){Y.style.border="";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function g(Y,da,ha,Z,k){function v(na,la,qa){var ya=document.createElement("li");+ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ja){la(Ja,Y);Ja.preventDefault();mxEvent.consume(Ja)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(Y);return{pdiv:qa,replies:la}}function N(na,la,qa,ya,wa){function Ja(){E(Ma);+Y.addReply(Ga,function(ra){Ga.id=ra;Y.replies.push(Ga);c(Ma);qa&&qa()},function(ra){Aa();Q(Ma);b.handleError(ra,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(ra){Ja()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=Y.id;null==Y.replies&&(Y.replies=[]);var Ma=g(Ga,Y.replies,Ba,Z+1);la?Aa():Ja()}if(k||!Y.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",+Y.id);T.style.marginLeft=20*Z+5+"px";Y.isResolved&&(F.style.opacity="0.7");var V=document.createElement("div");V.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=Y.user&&null!=Y.user.pictureUrl?Y.user.pictureUrl:Editor.userImage;V.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";V.appendChild(U);var X=document.createElement("div");X.className="geCommentUsername";mxUtils.write(X,null!=Y.user?Y.user.displayName:+mxResources.get("unknownUser"));U.appendChild(X);X=document.createElement("div");X.className="geCommentDate";X.setAttribute("data-commentId",Y.id);S(Y,X);U.appendChild(X);T.appendChild(V);V=document.createElement("div");V.className="geCommentTxt";mxUtils.write(V,Y.content||"");T.appendChild(V);Y.isLocked&&(T.style.opacity="0.5");V=document.createElement("div");V.className="geCommentActions";var fa=document.createElement("ul");fa.className="geCommentActionsList";V.appendChild(fa);m||Y.isLocked||0!=+Z&&!n||v(mxResources.get("reply"),function(){N("",!0)},Y.isResolved);U=b.getCurrentUser();null==U||null==Y.user||U.id!=Y.user.id||m||Y.isLocked||(v(mxResources.get("edit"),function(){function na(){H(Y,T,function(){E(T);Y.editComment(Y.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},Y.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);Y.deleteComment(function(na){if(!0===+na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=J(Y).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<da.length;na++)if(da[na]==Y){da.splice(na,1);break}L.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(na){Q(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},+Y.isResolved));m||Y.isLocked||0!=Z||v(Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";Y.isResolved=!Y.isResolved;mxUtils.write(qa,Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=Y.isResolved?"none":"",wa=J(Y).replies,Ja="light-dark("+(Y.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ja;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),+Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}B()}Y.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=Y.replies&&ha<Y.replies.length;ha++)V=Y.replies[ha],V.isResolved=Y.isResolved,g(V,Y.replies,null,Z+1,k);null!=x&&(x.comment.id==Y.id?(k=Y.content,Y.content=x.comment.content,H(Y,T,x.saveCallback,+x.deleteOnCancel),Y.content=k):null==x.comment.id&&x.comment.pCommentId==Y.id&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var I=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(I)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";+mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=I;K.style.padding="3px 4px 4px 4px";I=document.createElement("a");I.className="geButton";if(!m){var aa=I.cloneNode();aa.style.backgroundImage="url("+Editor.plusImage+")";aa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(aa,"click",function(Y){function da(){H(ha,Z,function(k){E(Z);b.addComment(k,function(v){k.id=v;ba.push(k);+c(Z)},function(v){Q(Z);da();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ha=b.newComment("",b.getCurrentUser()),Z=g(ha,ba,null,0);da();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(aa)}var ja=I.cloneNode();ja.style.backgroundImage="url("+Editor.checkImage+")";ja.setAttribute("title",mxResources.get("showResolved"));var ca=!1;mxEvent.addListener(ja,"click",function(Y){(ca=!ca)?ja.classList.add("geActiveItem"):ja.classList.remove("geActiveItem");+oa();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(ja);b.commentsRefreshNeeded()&&(aa=I.cloneNode(),aa.style.backgroundImage="url("+Editor.refreshImage+")",aa.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(aa,"click",function(Y){oa();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(aa));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=+"geButton geAdaptiveAsset",mxEvent.addListener(I,"click",function(Y){q();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(I));F.appendChild(K);var ba=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var Y=x.div.querySelector(".geCommentEditTxtArea"),da=x.div.querySelector(".geCommentEditBtns");x.comment.content=Y.value;Y.parentNode.removeChild(Y);da.parentNode.removeChild(da)}catch(ha){b.handleError(ha)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ha){function Z(k){if(null!=k){k.sort(function(J,N){return new Date(J.modifiedDate)-new Date(N.modifiedDate)});for(var v=0;v<k.length;v++)Z(k[v].replies)}}ha.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";ba=ha;for(ha=0;ha<ba.length;ha++)Z(ba[ha].replies),-g(ba[ha],ba,null,0,da);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ha){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ha&&ha.message?": "+ha.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function X(v){var J=ha[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)X(v.replies[J])}-if(this.window.isVisible()){for(var ca=M.querySelectorAll(".geCommentDate"),ha={},Z=0;Z<ca.length;Z++){var k=ca[Z];ha[k.getAttribute("data-commentId")]=k}for(Z=0;Z<ba.length;Z++)X(ba[Z])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);+g(ba[ha],ba,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ha){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ha&&ha.message?": "+ha.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function Y(v){var J=ha[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)Y(v.replies[J])}+if(this.window.isVisible()){for(var da=M.querySelectorAll(".geCommentDate"),ha={},Z=0;Z<da.length;Z++){var k=da[Z];ha[k.getAttribute("data-commentId")]=k}for(Z=0;Z<ba.length;Z++)Y(ba[Z])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,B,H,S,E,Q){var c=document.createElement("div");c.style.textAlign="center";Q=null!=Q?Q:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=Q+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),g.appendChild(f),c.appendChild(g));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=H&&(q.innerHTML=H+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&E.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});E.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);c.appendChild(E);S?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop=@@ -4121,12 +4122,12 @@ EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,functiofunction(E){return this.isTreeEdge(E)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function u(Z){return x.isVertex(Z)&&q(Z)}function y(Z){var k=!1;null!=Z&&(k="1"==n.getCurrentCellStyle(Z).treeMoving);return k}function q(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),k="tree"==(null!=k?k.style:n.getCellStyle(Z)).containerType);return k}function B(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),n.view.getState(Z),k=null!=(null!=k?k.style:n.getCellStyle(Z)).childLayout);return k}function H(Z){Z=n.view.getState(Z);if(null!=Z){var k=n.getIncomingTreeEdges(Z.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==Z.y&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==Z.y+Z.height&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>Z.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Z,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=n.cloneCells([J[0],Z]);n.model.setTerminal(N[0],n.model.getTerminal(J[0],-!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?Z.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?Z.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=V.x,N[1].geometry.y-=V.y);var U=n.view.getState(Z),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=-(k?Z.geometry.height+10:-N[1].geometry.height-10)*Y;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/-Y),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ja=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ja.push(Ba);(null==Ba||Ga)&&Ja.push(Aa);return null==Ba||Ga});n.moveCells(Ja,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(N,+!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?Z.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?Z.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=V.x,N[1].geometry.y-=V.y);var U=n.view.getState(Z),X=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-N[1].geometry.width-10)*X:fa.y+=+(k?Z.geometry.height+10:-N[1].geometry.height-10)*X;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/+X),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/X))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ja=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ja.push(Ba);(null==Ba||Ga)&&Ja.push(Aa);return null==Ba||Ga});n.moveCells(Ja,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(N,v)}finally{n.model.endUpdate()}}function E(Z){n.model.beginUpdate();try{var k=H(Z),v=n.getIncomingTreeEdges(Z),J=n.cloneCells([v[0],Z]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],Z,!1);var N=n.model.getParent(Z),T=N.geometry,V=[];n.view.currentRoot!=N&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(Z,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&V.push(na);(null==na||la)&&V.push(fa);return null==na||la});var U=Z.geometry.width+40,-Y=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,Y=-Y):k==mxConstants.DIRECTION_WEST?(U=-U,Y=0):k==mxConstants.DIRECTION_EAST&&(Y=0);n.moveCells(V,U,Y);return n.addCells(J,N)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==-n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var Y=n.model.getTerminal(J[U],!1);null!=Y&&k.push(Y)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height-+X=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,X=-X):k==mxConstants.DIRECTION_WEST?(U=-U,X=0):k==mxConstants.DIRECTION_EAST&&(X=0);n.moveCells(V,U,X);return n.addCells(J,N)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==+n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var X=n.model.getTerminal(J[U],!1);null!=X&&k.push(X)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height-V.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-V.x+10,T[1].geometry.y-=T[1].geometry.height+V.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+V.x+40):T[1].geometry.x+(T[1].geometry.width-V.x+40),T[1].geometry.y=null==fa?Z.geometry.y+(Z.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-V.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}function c(Z,k,v){Z=n.getOutgoingTreeEdges(Z);v=n.view.getState(v);var J=[];if(null!=v&&null!=Z){for(var N=0;N<Z.length;N++){var T=n.view.getState(n.model.getTerminal(Z[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(V,U){return k?V.x+V.width-U.x-U.width:V.y+V.height-U.y-U.height})}return J}function g(Z,k){var v=H(Z),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)==J&&v!=k?m.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(Z),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(Z),null!=v&&0<v.length&&(J=c(n.model.getTerminal(v[0],!0),J,Z),Z=n.view.getState(Z),null!=Z&&(Z=mxUtils.indexOf(J,Z),0<=Z&&(Z+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=Z&&Z<=J.length-1&&n.setSelectionCell(J[Z].cell)))))}var m=this,n=m.editor.graph,x=n.getModel(),@@ -4134,19 +4135,19 @@ F=m.menus.createPopupMenu;m.menus.createPopupMenu=function(Z,k,v){F.apply(this,a["selectConnections"],null,v)}};m.actions.addAction("selectChildren",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();Z=mxEvent.isControlDown(Z)?null:n.getOutgoingTreeEdges(k);if(null!=Z&&0<Z.length){k=[];for(var v=0;v<Z.length;v++)k.push(n.model.getTerminal(Z[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");m.actions.addAction("selectDescendants",function(Z){var k=n.getSelectionCell();if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(Z)||n.traverse(k,!0,function(J,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(Z)&&v.push(N);(null==N||T)&&v.push(J);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(Z){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(Z=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k),null!=Z&&0<Z.length?n.setSelectionCell(n.model.getTerminal(Z[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");m.actions.addAction("selectSiblings",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k);Z=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var J=0;J<v.length;J++)Z.push(n.model.getTerminal(v[J],!1));0==Z.length&&(Z=n.model.getChildren(n.model.getParent(k)));-n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var N=Z[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(V,U){var Y=null!=U&&n.isTreeEdge(U);Y&&T.push(U);(null==U||Y)&&T.push(V);return null==U||Y});0<T.length&&(v=v.concat(T),+n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var N=Z[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(V,U){var X=null!=U&&n.isTreeEdge(U);X&&T.push(U);(null==U||X)&&T.push(V);return null==U||X});0<T.length&&(v=v.concat(T),N=n.getIncomingTreeEdges(Z[J]),Z=Z.concat(N))}else null!=N&&v.push(Z[J])}Z=v;return I.apply(this,arguments)};m.hoverIcons.getStateAt=function(Z,k,v){return u(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(Z,k){Z=null!=Z?Z:this.getSelectionCells();for(var v=Z.slice(0),J=0;J<v.length;J++){var N=n.view.getState(v[J]);if(null!=N&&u(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],Z)}}this.model.beginUpdate();-try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var Y=this.cloneCell(T[0]);this.addEdge(Y,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,N,T,V){for(var U=null,Y=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!B(Z[fa])&&this.isCellCollapsed(Z[fa])?Y=Y.concat(this.getSubtree(Z[fa])):-Y.push(Z[fa]);Z=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var na=this.getCurrentCellStyle(N);if(null!=Z&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){N=n.model.getParent(Z[fa]);break}if(null!=Y&&N!=Y&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(Y);-null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=Z&&U.length==Z.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(u(Z[fa])&&(la=n.getIncomingTreeEdges(Z[fa]),0<la.length))if(!J)u(Y)&&0>mxUtils.indexOf(Z,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==-n.getIncomingTreeEdges(U[fa]).length){na=Y;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(N.isEdge(T[V])&&null==N.getTerminal(T[V],!0)){N.setTerminal(T[V],Z,!0);var U=-n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ia={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},da=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?-aa[Z.keyCode]:mxEvent.isAltDown(Z)?ia[Z.keyCode]:null;null!=v?(v.funct(Z),mxEvent.consume(Z)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==Z.which?v=mxEvent.isShiftDown(Z)?E(k):Q(k):13==Z.which&&(v=S(k,!mxEvent.isShiftDown(Z)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(Z)):37==Z.keyCode?(g(k,mxConstants.DIRECTION_WEST),-mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||da.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,N,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var Y=H(Z),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||-k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||B(Z)||n.traverse(Z,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,+try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var X=this.cloneCell(T[0]);this.addEdge(X,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,N,T,V){for(var U=null,X=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!B(Z[fa])&&this.isCellCollapsed(Z[fa])?X=X.concat(this.getSubtree(Z[fa])):+X.push(Z[fa]);Z=mxUtils.removeDuplicates(X);this.model.beginUpdate();try{X=N;var na=this.getCurrentCellStyle(N);if(null!=Z&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){N=n.model.getParent(Z[fa]);break}if(null!=X&&N!=X&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(X);+null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=Z&&U.length==Z.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(X)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],X,!0);else if(u(Z[fa])&&(la=n.getIncomingTreeEdges(Z[fa]),0<la.length))if(!J)u(X)&&0>mxUtils.indexOf(Z,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],X,!0);else if(0==+n.getIncomingTreeEdges(U[fa]).length){na=X;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(N.isEdge(T[V])&&null==N.getTerminal(T[V],!0)){N.setTerminal(T[V],Z,!0);var U=+n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ja={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?+aa[Z.keyCode]:mxEvent.isAltDown(Z)?ja[Z.keyCode]:null;null!=v?(v.funct(Z),mxEvent.consume(Z)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==Z.which?v=mxEvent.isShiftDown(Z)?E(k):Q(k):13==Z.which&&(v=S(k,!mxEvent.isShiftDown(Z)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(Z)):37==Z.keyCode?(g(k,mxConstants.DIRECTION_WEST),+mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||ca.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,N,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var X=H(Z),fa=X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||+k==mxConstants.DIRECTION_WEST;return X==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||B(Z)||n.traverse(Z,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,arguments);(y(this.state.cell)||u(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Z){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(Z)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var X=mxVertexHandler.prototype.redrawHandles;-mxVertexHandler.prototype.redrawHandles=function(){X.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Z){ca.apply(this,arguments);null!=+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Z){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(Z)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var Y=mxVertexHandler.prototype.redrawHandles;+mxVertexHandler.prototype.redrawHandles=function(){Y.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Z){da.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=Z?"":"none")};var ha=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Z,k){ha.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var u=l.apply(this,arguments),y=this.graph,q=this;return u.concat([this.addEntry("tree container",function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);B.insert(E);B.insert(H);B.insert(S);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,@@ -4178,18 +4179,18 @@ arguments);if(E){var Q=window.innerWidth||document.documentElement.clientWidth||this.editor.graph,c=document.createElement("div");c.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";Q.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<Q.getSelectionCount()?(E.appendChild(c),c.innerHTML="Selected: "+Q.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var E=this.formatWindow.window.toggleMinimized,Q=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(Q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+Q-140+"px"):(this.div.style.width=Q+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-Q+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(J,N,T){var V=n.menus.get(J);N=I.addMenu(mxResources.get(J),mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(J));n.menus.menuCreated(V,N,"geButton");null!=T&&-(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function Q(J,N,T,V,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",+(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function Q(J,N,T,V,U,X){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=X?fa.style.backgroundImage="url("+X+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled","disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&N.appendChild(J[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>l,N=E("diagram",null,J?Editor.menuImage:null);c([N,Q(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),-n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=E("insert",!0,J?ia:null);c([N,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")+-" ("+ca.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ha.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([Z,k]),520<=l&&c([v,640<=l?Q("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?Q("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",X,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=+n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=E("insert",!0,J?ja:null);c([N,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")++" ("+da.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ha.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([Z,k]),520<=l&&c([v,640<=l?Q("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?Q("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var I=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var N=J.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",J.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),aa=n.updateTabContainer;-n.updateTabContainer=function(){aa.apply(this,arguments);n.tabContainer.appendChild(K)};var ia=Editor.addBoxImage;if(null!=n.hoverIcons){var da=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||da.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());-var oa=n.actions.get("zoomIn"),X=n.actions.get("zoomOut");m=n.actions.get("resetView");var ca=n.actions.get("undo"),ha=n.actions.get("redo"),Z=Q("",ca.funct,null,"",ca,Editor.undoImage),k=Q("",ha.funct,null,"",ha,Editor.redoImage),v=Q("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,+n.updateTabContainer=function(){aa.apply(this,arguments);n.tabContainer.appendChild(K)};var ja=Editor.addBoxImage;if(null!=n.hoverIcons){var ca=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());+var oa=n.actions.get("zoomIn"),Y=n.actions.get("zoomOut");m=n.actions.get("resetView");var da=n.actions.get("undo"),ha=n.actions.get("redo"),Z=Q("",da.funct,null,"",da,Editor.undoImage),k=Q("",ha.funct,null,"",ha,Editor.redoImage),v=Q("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();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.chatWindow&&n.menus.chatWindow.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()})}}};-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,B){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\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\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\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\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\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\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\nfindInDiagram=Find in Diagram\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\nflowAnimation=Flow Animation\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\nformatWebp=WebP\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\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">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.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\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\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\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\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\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\ndrives=Drives\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;+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,B){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\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\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\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\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\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\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\nfindInDiagram=Find in Diagram\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\nflowAnimation=Flow Animation\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\nformatWebp=WebP\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\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">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.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\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\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\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\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\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\ndrives=Drives\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"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,l){this.init(b,f,l)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";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.darkMode=null;GraphViewer.prototype.init=function(b,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};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=@@ -4233,21 +4234,21 @@ this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.damxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),B=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(B(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){B(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){B(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ba,oa){},mouseUp:function(ba,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<-S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,X,ca){ba=this.createToolbarButton(ba,oa,X,ca);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";+S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,Y,da){ba=this.createToolbarButton(ba,oa,Y,da);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";I=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",I);I()}else if("zoom"==I)this.zoomEnabled&&(Q(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),Q(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),Q(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"==I){if(this.layersEnabled){var K=Q(mxUtils.bind(this,function(ba){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 X=this.graph.getGraphBounds(),ca=this.graph.view;0>X.x||0>X.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale}):null!=this.graph.originalViewState&&0<X.x/ca.scale+this.graph.originalViewState.translate.x-ca.translate.x&&0<X.y/ca.scale+this.graph.originalViewState.translate.y--ca.translate.y&&(ca.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ba=K.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=GraphViewer.cssFontFamily;+g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var Y=this.graph.getGraphBounds(),da=this.graph.view;0>Y.x||0>Y.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:da.translate.clone(),scale:da.scale}):null!=this.graph.originalViewState&&0<Y.x/da.scale+this.graph.originalViewState.translate.x-da.translate.x&&0<Y.y/da.scale+this.graph.originalViewState.translate.y-+da.translate.y&&(da.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:da.translate.clone(),scale:da.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ba=K.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=GraphViewer.cssFontFamily;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;g.style.color="#000";mxUtils.setOpacity(g,85);var oa=mxUtils.getDocumentScrollOrigin(document);g.style.left=oa.x+ba.left-1+"px";g.style.top=oa.y+ba.bottom-2+"px";this.isDarkMode()&&(g.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,function(){K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==I){if(this.tagsEnabled){var aa=Q(mxUtils.bind(this,function(ba){null==m&&(m=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),m.div.getElementsByTagName("div")[0].style.position="",m.div.style.maxHeight="160px",m.div.style.maxWidth="120px",m.div.style.padding="2px",m.div.style.overflow="auto",m.div.style.height="auto",m.div.style.position="fixed",m.div.style.fontFamily=GraphViewer.cssFontFamily,m.div.style.fontSize="11px",m.div.style.backgroundColor="#eee",m.div.style.color="#000",m.div.style.border="1px solid #d0d0d0",m.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(m.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(m.div,85));if(null!=n)n.parentNode.removeChild(n),n=null;else{n=m.div;n.style.position="absolute";mxEvent.addListener(n,"mouseleave",function(){null!=n&&(n.parentNode.removeChild(n),n=null)});ba=aa.getBoundingClientRect();var oa=mxUtils.getDocumentScrollOrigin(document);n.style.left=oa.x+ba.left-1+"px";n.style.top=oa.y+ba.bottom-2+"px";document.body.appendChild(n);m.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){aa.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=n&&0==this.graph.getAllTags().length&&(n.parentNode.removeChild(n),n=null)}));aa.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==I?this.lightboxEnabled&&Q(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ba){alert(ba.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(I=this.graphConfig["toolbar-buttons"][I],null!=I&&(I.elem=Q(null==I.enabled||I.enabled?I.handler:function(){},I.image,I.title,I.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*E);null!=this.graphConfig.title&&-(l=b.ownerDocument.createElement("div"),l.style.display="inline-flex",l.style.position="relative",l.style.alignItems="center",l.style.padding="6px",l.style.fontFamily=GraphViewer.cssFontFamily,l.style.fontSize="12px",l.style.cursor="default",l.style.color="light-dark(#000000, #ffffff)",l.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),f.appendChild(l),this.filename=l);this.minToolbarWidth=34*E;var ia=b.style.border,-da=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ba=b.getBoundingClientRect(),oa=mxUtils.getScrollOrigin(document.body);oa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-oa.x,top:-oa.y};ba={left:ba.left-oa.left,top:ba.top-oa.top,bottom:ba.bottom-oa.top,right:ba.right-oa.left};f.style.left=-ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=ba.top+1+"px"):f.style.top=ba.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var X=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);-b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ca){for(ca=mxEvent.getSource(ca);null!=ca;){if(ca==b||ca==f||ca==g||ca==n)return;ca=ca.parentNode}X()});mxEvent.addListener(document.body,"mouseleave",function(ca){X()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&da()})).observe(b)};+(l=b.ownerDocument.createElement("div"),l.style.display="inline-flex",l.style.position="relative",l.style.alignItems="center",l.style.padding="6px",l.style.fontFamily=GraphViewer.cssFontFamily,l.style.fontSize="12px",l.style.cursor="default",l.style.color="light-dark(#000000, #ffffff)",l.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),f.appendChild(l),this.filename=l);this.minToolbarWidth=34*E;var ja=b.style.border,+ca=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ba=b.getBoundingClientRect(),oa=mxUtils.getScrollOrigin(document.body);oa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-oa.x,top:-oa.y};ba={left:ba.left-oa.left,top:ba.top-oa.top,bottom:ba.bottom-oa.top,right:ba.right-oa.left};f.style.left=+ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=ba.top+1+"px"):f.style.top=ba.top+"px";"1px solid transparent"==ja&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var Y=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);+b.style.border=ja});mxEvent.addListener(document,"mousemove",function(da){for(da=mxEvent.getSource(da);null!=da;){if(da==b||da==f||da==g||da==n)return;da=da.parentNode}Y()});mxEvent.addListener(document.body,"mouseleave",function(da){Y()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ca):ca();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&ca()})).observe(b)};GraphViewer.prototype.createToolbarButton=function(b,f,l,u){var y=document.createElement("div");y.style.borderRight="1px solid #d0d0d0";y.style.display="inline-flex";y.style.alignItems="center";y.style.padding="6px";mxEvent.addListener(y,"click",b);null!=l&&y.setAttribute("title",l);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",f);b.style.width="18px";b.className="geAdaptiveAsset";null==u||u?(mxEvent.addListener(y,"mouseenter",function(){y.style.backgroundColor="light-dark(#dddddd,#333333)"}),mxEvent.addListener(y,"mouseleave",function(){y.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),y.style.cursor="pointer"):mxUtils.setOpacity(y,30);y.appendChild(b);return y};GraphViewer.prototype.disableButton=function(b,f){var l=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=l&&(mxUtils.setOpacity(l.elem,30),mxEvent.removeListener(l.elem,"click",l.handler),mxEvent.addListener(l.elem,"mouseenter",function(){l.elem.style.backgroundColor="#eee"}),f&&l.elem.setAttribute("title",f))};@@ -4279,8 +4280,8 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,l){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var u=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;u.open("GET",b);u.onload=function(){f(null!=u.getText?u.getText():u.responseText)};u.onerror=l;u.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function B(m,n){if(!m.resizedAttached)m.resizedAttached=new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.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>';-m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],I=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var aa,ia,da,ba;n=function(){if((da=m.offsetWidth)!=aa||(ba=m.offsetHeight)!=ia)L=!0,aa=da,ia=ba;M()};var oa=-function(X,ca,ha){X.attachEvent?X.attachEvent("on"+ca,ha):X.addEventListener(ca,ha)};oa(x,"scroll",n);oa(I,"scroll",n)}var H=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,E=!1;(new ResizeObserver(function(){E||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){E=!0;H();S=null;E=!1},200))})).observe(l)}else{var Q=Object.prototype.toString.call(l),c="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===+m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],I=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var aa,ja,ca,ba;n=function(){if((ca=m.offsetWidth)!=aa||(ba=m.offsetHeight)!=ja)L=!0,aa=ca,ja=ba;M()};var oa=+function(Y,da,ha){Y.attachEvent?Y.attachEvent("on"+da,ha):Y.addEventListener(da,ha)};oa(x,"scroll",n);oa(I,"scroll",n)}var H=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,E=!1;(new ResizeObserver(function(){E||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){E=!0;H();S=null;E=!1},200))})).observe(l)}else{var Q=Object.prototype.toString.call(l),c="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){Q=0;for(var g=l.length;Q<g;Q++)B(l[Q],H)}else B(l,H);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.jsindex 4aa4854e5..1f0fbd0c1 100644--- a/src/main/webapp/js/viewer.min.js+++ b/src/main/webapp/js/viewer.min.js@@ -28,7 +28,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"28.0.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"28.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||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:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -408,9 +408,9 @@ mxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r){k=null!=k&&"verticl+"; ");null!=m&&(d+="border-width: 1px; border-style: solid; border-color: inherit; border: 1px solid "+m+"; ");""==c||g?p+=d:q+=d;e&&(k&&0<b||!k&&0<a)?(p+="white-space: normal; word-wrap: "+mxConstants.WORD_WRAP+"; ",k?v="height: "+Math.round(b)+"px; ":u="width: "+Math.round(a)+"px; ",""!=c&&"fill"!=f&&(k?y=0:t=0)):(p+="white-space: nowrap; ",""==c&&"block"!=f&&(y=0));r(y,t,n+u+v,q+c,p,c)};mxSvgCanvas2D.prototype.getTextCss=function(){var a=this.state,b=mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;b="display: inline-block; font-size: "+mxUtils.htmlEntities(a.fontSize)+"px; font-family: "+mxUtils.parseCssFontFamily(a.fontFamily,!0)+"; color: "+this.getLightDarkColor(mxUtils.htmlEntities(a.fontColor)).cssText+"; line-height: "+mxUtils.htmlEntities(b)+"; pointer-events: "+(this.pointerEvents?mxUtils.htmlEntities(this.pointerEventsValue):"none")+"; ";(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="font-weight: bold; ");(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="font-style: italic; ");var c=[];(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push("underline");(a.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push("line-through");0<c.length&&(b+="text-decoration: "+c.join(" ")+"; ");return b};-mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):"SUP"==l.nodeName||"SUB"==l.nodeName||"B"==l.nodeName||"I"==l.nodeName||"SPAN"==l.nodeName||"FONT"==l.nodeName||"STRIKE"==l.nodeName||"U"==l.nodeName?(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),-k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration","line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration",-"underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d)):e=!1;l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};+mxSvgCanvas2D.prototype.convertHtmlToSvg=function(a,b,c,d){var e=!0;if(null!=a){d=null!=d?d:1;for(var f=0,g=0;g<a.childNodes.length&&e;g++){var k=this.createElement("tspan"),l=a.childNodes[g],m=0;l.nodeType==mxConstants.NODETYPE_TEXT?mxUtils.write(k,l.nodeValue):""!=l.style.backgroundColor||"SUP"!=l.nodeName&&"SUB"!=l.nodeName&&"B"!=l.nodeName&&"I"!=l.nodeName&&"SPAN"!=l.nodeName&&"FONT"!=l.nodeName&&"STRIKE"!=l.nodeName&&"U"!=l.nodeName?e=!1:(""!=l.style.cssText&&(k.style.cssText=l.style.cssText),+""!=l.style.color&&(e=mxUtils.getLightDarkColor(l.style.color),k.setAttribute("fill",e.light),k.style.fill=e.cssText,k.style.color=""),e=k.style.fontSize||"","SUP"==l.nodeName||"SUB"==l.nodeName?(""==e&&(k.style.fontSize="smaller",d=1.2),"SUP"==l.nodeName&&0==c.y?c.y=-.25:"SUB"==l.nodeName&&(c.y=Math.max(c.y,.25)),m="SUP"==l.nodeName?-.45:.25):"I"==l.nodeName?k.setAttribute("font-style","italic"):"B"==l.nodeName?k.setAttribute("font-weight","bold"):"STRIKE"==l.nodeName?k.setAttribute("text-decoration",+"line-through"):"U"==l.nodeName&&k.setAttribute("text-decoration","underline"),"px"==e.slice(-2)&&(k.style.fontSize=parseFloat(e)*d/this.state.fontSize+"em"),e=this.convertHtmlToSvg(l,k,c,d));l=m;0==f&&0==l||k.setAttribute("dy",l-f+"em");f=l;b.appendChild(k)}}return e};mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e)if(p=null!=p?p:0,this.foEnabled&&"html"==l){var r=this.createDiv(e);if(null!=r){var t=this.createElement("text"),u=new mxPoint(0,0);this.allowConvertHtmlToSvg&&this.convertHtmlToSvg(r.firstChild.firstChild,t,u)?(0>u.y&&g==mxConstants.ALIGN_TOP?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_BOTTOM?t.style.transform="translateY("+-u.y+"em)":0<u.y&&g==mxConstants.ALIGN_TOP&&(t.style.transform="translateY("+u.y+"em)"),this.plainText(a+this.state.dx,b+this.state.dy,c,d,"",f,g,k,m,n,p,q,t)):(null!=q&&"vertical-"!=q.substring(0,9)&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))}}else this.plainText(a+this.state.dx,b+this.state.dy,c,d,e,f,g,k,m,n,p,q)};mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;e=this.createElement("clipPath");e.setAttribute("id",g);g=this.createElement("rect");g.setAttribute("x",a);g.setAttribute("y",b);g.setAttribute("width",c);g.setAttribute("height",d);e.appendChild(g);return e};@@ -1965,8 +1965,8 @@ Editor.toUnit=function(b,f){return f==mxConstants.INCHES?Math.round(100*b/mxConsEditor.fromUnit=function(b,f){return f==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):f==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):f==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};-Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?(f+=(0<f.length?"&":"?")+"lightbox=1",null!=u&&(f+="&page-id="+u)):null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});mxEvent.addListener(window,-"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};+Editor.prototype.editAsNew=function(b,f,l,u){f=null!=f?"?title="+encodeURIComponent(f):"";l?f+=(0<f.length?"&":"?")+"lightbox=1":null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null!=u&&(f+=(0<f.length?"&":"?")+"page-id="+u);if(!navigator.standalone&&"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var y=null,q=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==y&&(mxEvent.removeListener(window,"message",q),y.postMessage(b,"*"))});+mxEvent.addListener(window,"message",q);y=this.graph.openLink(this.getEditBlankUrl(f+(0<f.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,f){b=new Graph(null,f,null,null,b);b.transparentBackground=!1;var l=b.isCssTransformsSupported,u=this;b.isCssTransformsSupported=function(){return l.apply(this,arguments)&&(!u.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(y){return!this.isExternalProtocol(y)});return b};Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};@@ -2043,38 +2043,38 @@ this.scale-g+H,n)+I*B)+"px "+-Math.round(n-mxUtils.mod(this.translate.y*this.scaH){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var E=[],Q=1;Q<this.gridSteps;Q++){var c=Q*S;E.push("M 0 "+c+" L "+H+" "+c+" M "+c+" 0 L "+c+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+E.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var E=this.gridSize*this.view.scale*this.view.gridSteps;E=-Math.round(E-mxUtils.mod(this.view.translate.x*this.view.scale+B,E))+"px "+-Math.round(E-mxUtils.mod(this.view.translate.y*this.view.scale+H,E))+"px";S.style.backgroundPosition=E}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var E=this.view.scale,Q=this.view.translate,c=this.pageFormat,g=E*this.pageScale,m=this.view.getBackgroundPageBounds();-H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ia=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),-Math.round(m.y+(aa+1)*n.height)),new mxPoint(Math.round(I),Math.round(m.y+(aa+1)*n.height))]:[new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(M))];null!=L[aa]?(L[aa].points=ia,L[aa].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),L[aa]=ia)}for(aa=K;aa<L.length;aa++)null!=L[aa]&&L[aa].destroy();L.splice(K,L.length-+H=m.width;S=m.height;var n=new mxRectangle(E*Q.x,E*Q.y,c.width*g,c.height*g),x=(B=B&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(S/n.height)-1:0,F=B?Math.ceil(H/n.width)-1:0,I=m.x+H,M=m.y+S;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<F&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(L){if(null!=L){for(var K=L==this.horizontalPageBreaks?x:F,aa=0;aa<=K;aa++){var ja=L==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),+Math.round(m.y+(aa+1)*n.height)),new mxPoint(Math.round(I),Math.round(m.y+(aa+1)*n.height))]:[new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(aa+1)*n.width),Math.round(M))];null!=L[aa]?(L[aa].points=ja,L[aa].redraw()):(ja=new mxPolyline(ja,this.pageBreakColor),ja.dialect=this.dialect,ja.isDashed=this.pageBreakDashed,ja.pointerEvents=!1,ja.init(this.view.backgroundPane),ja.redraw(),L[aa]=ja)}for(aa=K;aa<L.length;aa++)null!=L[aa]&&L[aa].destroy();L.splice(K,L.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var f=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var E=0;E<H.length;E++){if(this.graph.isTableCell(H[E])||this.graph.isTableRow(H[E]))return!1;if(this.graph.getModel().isVertex(H[E])){var Q=this.graph.getCellGeometry(H[E]);if(null!=Q&&Q.relative)return!1}}return f.apply(this,arguments)};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=l.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,E=this.graph.pageFormat,Q=this.graph.pageScale,c=E.width*Q;E=E.height*Q;Q=Math.floor(Math.min(0,H)/c);var g=Math.floor(Math.min(0,S)/E);return new mxRectangle(this.scale*(this.translate.x+Q*c),this.scale*(this.translate.y+g*E),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/c)-Q)*c,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/E)-g)*E)};var u=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){u.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,E,Q,c){var g=y.apply(this,arguments);null==c||c||mxEvent.addListener(g,"mousedown",function(m){mxEvent.consume(m)});return g};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var E=this.graph.model.getParent(B);if(H){var Q=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);Q=!this.graph.model.isEdge(E)&&!this.graph.isSiblingSelected(B)&&(null!=Q&&Q.relative||!this.graph.isContainer(E)||this.graph.isPart(B))}else if(Q=q.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))Q=E,this.graph.isTable(Q)||(Q=this.graph.model.getParent(Q)),Q=!this.graph.selectionCellsHandler.isHandled(Q)||this.graph.isCellSelected(Q)&&this.graph.isToggleEvent(S.getEvent())||-this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(B);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var X=q.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var ha=this.view.translate,Z=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ha.x+ca.x)*Z,(ha.y+ca.y)*Z,ca.width*Z,ca.height*Z))}return X};y.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ca){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=-function(){return!1};y.panningHandler.isForcePanningEvent=function(X){for(var ca=X.getSource();null!=ca&&ca!=y.container;){if("foreignObject"===ca.nodeName||"text"===ca.nodeName)return!1;ca=ca.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{y.getModel().isEdge(X)?-S=y.pasteEdgeStyle=!1:H=!1;var ca=y.getCellStyle(X,!1),ha=[],Z=[],k;for(k in ca)ha.push(ca[k]),Z.push(k);y.getModel().isEdge(X)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",ha,"cells",[X],"force",!0));y.getModel().isEdge(X)?S=y.pasteEdgeStyle=!0:H=!0}catch(v){this.handleError(v)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);H=S=y.pasteEdgeStyle=-!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(X,ca){y.pasteCellStyles(y.includeDescendants(ca.getProperty("cells")))});y.addListener("textInserted",function(X,ca){y.pasteCellStyles(ca.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var E=mxUtils.bind(this,function(X){null==X&&(X=window.event);return y.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&-!this.editor.editable||(this.menubarContainer.onselectstart=E,this.menubarContainer.onmousedown=E,this.toolbarContainer.onselectstart=E,this.toolbarContainer.onmousedown=E,this.diagramContainer.onselectstart=E,this.diagramContainer.onmousedown=E,this.sidebarContainer.onselectstart=E,this.sidebarContainer.onmousedown=E,this.formatContainer.onselectstart=E,this.formatContainer.onmousedown=E,null!=this.tabContainer&&(this.tabContainer.onselectstart=E),mxClient.IS_IOS&&(f=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ca=-navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ca[1],10),parseInt(ca[2],10),parseInt(ca[3]||0,10)]}catch(ha){}}return X}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,-"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(X){if(null!=X){var ca=mxEvent.getSource(X);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return E(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&-(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var Q=y.graphHandler.start;y.graphHandler.start=function(){null!=u.hoverIcons&&u.hoverIcons.reset();Q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(X){var ca=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ca.y-this.diagramContainer.clientHeight?-this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ca){return u.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){16==X.which?this.shiftDown=!0:32!=X.which||y.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",y.isEditing()||-mxEvent.getSource(X)!=y.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(X){return g.apply(this,arguments)||u.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&-(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var m=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(X){return m.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 n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return u.isSpaceDown()||n.apply(this,arguments)};var x=mxUtils.bind(this,-function(){if(null!=this.toolbar)for(var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ca=this.toolbar.container.firstChild;null!=ca;){var ha=ca.getAttribute("data-min-width");null!=ha&&parseInt(ha)>X?ca.style.display="none":ca.style.display="";ca=ca.nextSibling}}),F=!1,I=null,M=null,L=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ca=[];null!=X;){var ha=X.nextSibling;-X.parentNode.removeChild(X);ca.push(X);X=ha}X=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var Z=0;Z<L.length;Z++)this.toolbar.container.appendChild(L[Z]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=M}F=y.cellEditor.isContentEditing();I=X;M=ha;L=ca;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",x);mxEvent.addListener(window,-"resize",x);x();var aa=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){aa.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var X=!1,ca=function(){X||(X=!0,window.setTimeout(function(){var ha=y.getSelectedEditingElement();null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=u.toolbar&&(u.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),u.toolbar.setFontSize(parseInt(ha.fontSize))));X=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",ca);mxEvent.addListener(y.cellEditor.textarea,-"touchend",ca);mxEvent.addListener(y.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(y.cellEditor.textarea,"keyup",ca);ca()}};var ia=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(X,ca){try{ia.apply(this,arguments),K()}catch(ha){u.handleError(ha)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(X){}var da=y.fireMouseEvent;y.fireMouseEvent=function(X,ca,ha){try{X==-mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(Z){u.handleError(Z)}};var ba=y.foldCells;y.foldCells=function(X,ca,ha,Z,k){try{ba.apply(this,arguments)}catch(v){u.handleError(v)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ca,ha){this.menus.createPopupMenu(X,ca,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){y.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);-this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(X,ca){var ha=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(ha.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(ha[ha.length-1]))},0));y.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ca){X=ca.getProperty("force");(this.updateDefaultStyle||X)&&y.copyCellStyles(ca.getProperty("cells"),-ca.getProperty("keys"),ca.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==y.currentEdgeStyle.edgeStyle&&"1"==y.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==y.currentEdgeStyle.edgeStyle||+this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(E);return Q};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),E=this.graph.view.getState(S),Q=this.graph.isCellSelected(B);null!=E&&(H.isVertex(S)||H.isEdge(S));){var c=this.graph.isCellSelected(S);Q=Q||c;if(c||!Q&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,f,l){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=f||document.body;var u=this,y=this.editor.graph;y.lightbox=l;var q=y.getGraphBounds;y.getGraphBounds=function(){var Y=q.apply(this,arguments),da=this.backgroundImage;if(null!=da&&null!=da.width&&null!=da.height){var ha=this.view.translate,Z=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((ha.x+da.x)*Z,(ha.y+da.y)*Z,da.width*Z,da.height*Z))}return Y};y.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(Y,da){this.clearSelectionState()});y.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);y.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);y.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);y.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){y.isEnabled=+function(){return!1};y.panningHandler.isForcePanningEvent=function(Y){for(var da=Y.getSource();null!=da&&da!=y.container;){if("foreignObject"===da.nodeName||"text"===da.nodeName)return!1;da=da.parentNode}return!mxEvent.isPopupTrigger(Y.getEvent())};var B=y.panningHandler.start;y.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!y.standalone){var H=!1,S=!1;this.setDefaultStyle=function(Y){try{y.getModel().isEdge(Y)?+S=y.pasteEdgeStyle=!1:H=!1;var da=y.getCellStyle(Y,!1),ha=[],Z=[],k;for(k in da)ha.push(da[k]),Z.push(k);y.getModel().isEdge(Y)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",ha,"cells",[Y],"force",!0));y.getModel().isEdge(Y)?S=y.pasteEdgeStyle=!0:H=!0}catch(v){this.handleError(v)}};this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);H=S=y.pasteEdgeStyle=+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};y.addListener("cellsInserted",function(Y,da){y.pasteCellStyles(y.includeDescendants(da.getProperty("cells")))});y.addListener("textInserted",function(Y,da){y.pasteCellStyles(da.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var E=mxUtils.bind(this,function(Y){null==Y&&(Y=window.event);return y.isEditing()||null!=Y&&this.isSelectionAllowed(Y)});this.container!=document.body||this.editor.chromeless&&+!this.editor.editable||(this.menubarContainer.onselectstart=E,this.menubarContainer.onmousedown=E,this.toolbarContainer.onselectstart=E,this.toolbarContainer.onmousedown=E,this.diagramContainer.onselectstart=E,this.diagramContainer.onmousedown=E,this.sidebarContainer.onselectstart=E,this.sidebarContainer.onmousedown=E,this.formatContainer.onselectstart=E,this.formatContainer.onmousedown=E,null!=this.tabContainer&&(this.tabContainer.onselectstart=E),mxClient.IS_IOS&&(f=function(){var Y=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var da=+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{Y=[parseInt(da[1],10),parseInt(da[2],10),parseInt(da[3]||0,10)]}catch(ha){}}return Y}(),null!=f&&16<=f[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(f=function(Y){if(null!=Y){var da=mxEvent.getSource(Y);if("A"==da.nodeName)for(;null!=da;){if("geHint"==da.className)return!0;da=da.parentNode}}return E(Y)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",f):this.diagramContainer.oncontextmenu=f):y.panningHandler.usePopupTrigger=!1;y.init(this.diagramContainer);mxClient.IS_SVG&&null!=y.view.getDrawPane()&&+(f=y.view.getDrawPane().ownerSVGElement,null!=f&&(f.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=y.graphHandler){var Q=y.graphHandler.start;y.graphHandler.start=function(){null!=u.hoverIcons&&u.hoverIcons.reset();Q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(Y){var da=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(Y)-da.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(Y)-da.y-this.diagramContainer.clientHeight?+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(Y,da){return u.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(Y){16==Y.which?this.shiftDown=!0:32!=Y.which||y.isEditing()?mxEvent.isConsumed(Y)||27!=Y.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),y.container.style.cursor="move",y.isEditing()||+mxEvent.getSource(Y)!=y.container||mxEvent.consume(Y))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(Y){y.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=y.panningHandler.isForcePanningEvent;y.panningHandler.isForcePanningEvent=function(Y){return g.apply(this,arguments)||u.isSpaceDown()||mxEvent.isMouseEvent(Y.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(Y.getEvent()))&&+(!mxEvent.isControlDown(Y.getEvent())&&mxEvent.isRightMouseButton(Y.getEvent())||mxEvent.isMiddleMouseButton(Y.getEvent()))};var m=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(Y){return m.apply(this,arguments)||13==Y.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y)||mxClient.IS_SF&&mxEvent.isShiftDown(Y))};var n=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return u.isSpaceDown()||n.apply(this,arguments)};var x=mxUtils.bind(this,+function(){if(null!=this.toolbar)for(var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,da=this.toolbar.container.firstChild;null!=da;){var ha=da.getAttribute("data-min-width");null!=ha&&parseInt(ha)>Y?da.style.display="none":da.style.display="";da=da.nextSibling}}),F=!1,I=null,M=null,L=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&F!=y.cellEditor.isContentEditing()){for(var Y=this.toolbar.container.firstChild,da=[];null!=Y;){var ha=Y.nextSibling;+Y.parentNode.removeChild(Y);da.push(Y);Y=ha}Y=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var Z=0;Z<L.length;Z++)this.toolbar.container.appendChild(L[Z]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=M}F=y.cellEditor.isContentEditing();I=Y;M=ha;L=da;x()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",x);mxEvent.addListener(window,+"resize",x);x();var aa=y.cellEditor.startEditing;y.cellEditor.startEditing=function(){aa.apply(this,arguments);K();if(y.cellEditor.isContentEditing()){var Y=!1,da=function(){Y||(Y=!0,window.setTimeout(function(){var ha=y.getSelectedEditingElement();null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=u.toolbar&&(u.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),u.toolbar.setFontSize(parseInt(ha.fontSize))));Y=!1},0))};mxEvent.addListener(y.cellEditor.textarea,"input",da);mxEvent.addListener(y.cellEditor.textarea,+"touchend",da);mxEvent.addListener(y.cellEditor.textarea,"mouseup",da);mxEvent.addListener(y.cellEditor.textarea,"keyup",da);da()}};var ja=y.cellEditor.stopEditing;y.cellEditor.stopEditing=function(Y,da){try{ja.apply(this,arguments),K()}catch(ha){u.handleError(ha)}};y.container.setAttribute("tabindex","0");y.container.style.cursor="default";if(window.self===window.top&&null!=y.container.parentNode)try{y.container.focus()}catch(Y){}var ca=y.fireMouseEvent;y.fireMouseEvent=function(Y,da,ha){try{Y==+mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(Z){u.handleError(Z)}};var ba=y.foldCells;y.foldCells=function(Y,da,ha,Z,k){try{ba.apply(this,arguments)}catch(v){u.handleError(v)}};y.popupMenuHandler.autoExpand=!0;null!=this.menus&&(y.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(Y,da,ha){this.menus.createPopupMenu(Y,da,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(Y){y.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);+this.getKeyHandler=function(){return keyHandler};y.connectionHandler.addListener(mxEvent.CONNECT,function(Y,da){var ha=[da.getProperty("cell")];da.getProperty("terminalInserted")&&(ha.push(da.getProperty("terminal")),window.setTimeout(function(){null!=u.hoverIcons&&u.hoverIcons.update(y.view.getState(ha[ha.length-1]))},0));y.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(Y,da){Y=da.getProperty("force");(this.updateDefaultStyle||Y)&&y.copyCellStyles(da.getProperty("cells"),+da.getProperty("keys"),da.getProperty("values"),y.currentVertexStyle,y.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(y.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(y.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==y.currentEdgeStyle.edgeStyle&&"1"==y.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==y.currentEdgeStyle.edgeStyle||"none"==y.currentEdgeStyle.edgeStyle||null==y.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==y.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==y.currentEdgeStyle.edgeStyle?"vertical"==y.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==y.currentEdgeStyle.edgeStyle?"vertical"==y.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):"filledEdge"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.filledEdgeImage.src):"pipe"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.pipeEdgeImage.src):"wire"==y.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,-Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=y.currentVertexStyle.fontFamily||"Helvetica",ca=String(y.currentVertexStyle.fontSize||"12"),ha=y.getView().getState(y.getSelectionCell());null!=ha&&(X=ha.style[mxConstants.STYLE_FONTFAMILY]||X,ca=ha.style[mxConstants.STYLE_FONTSIZE]||ca,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ca)}),-y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(X,ca){X=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&&y.getModel().isLayer(ca)&&!y.isCellVisible(ca)&&null!=X&&0<X.length&&y.getModel().setVisible(ca,!0)});Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var X=y.getLayerForCells(y.getSelectionCells());null!=X&&y.setDefaultParent(X)}});-this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});+Format.wireEdgeImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var Y=y.currentVertexStyle.fontFamily||"Helvetica",da=String(y.currentVertexStyle.fontSize||"12"),ha=y.getView().getState(y.getSelectionCell());null!=ha&&(Y=ha.style[mxConstants.STYLE_FONTFAMILY]||Y,da=ha.style[mxConstants.STYLE_FONTSIZE]||da,10<Y.length&&(Y=Y.substring(0,8)+"..."));this.toolbar.setFontName(Y);this.toolbar.setFontSize(da)}),+y.getSelectionModel().addListener(mxEvent.CHANGE,b),y.getModel().addListener(mxEvent.CHANGE,b));y.addListener(mxEvent.CELLS_ADDED,function(Y,da){Y=da.getProperty("cells");da=da.getProperty("parent");null!=da&&y.getModel().isLayer(da)&&!y.isCellVisible(da)&&null!=Y&&0<Y.length&&y.getModel().setVisible(da,!0)});Graph.selectParentLayer&&y.selectionModel.addListener(mxEvent.CHANGE,function(){if(y.isEnabled()&&!y.isSelectionEmpty()){var Y=y.getLayerForCells(y.getSelectionCells());null!=Y&&y.setDefaultParent(Y)}});+this.gestureHandler=mxUtils.bind(this,function(Y){null!=this.currentMenu&&mxEvent.getSource(Y)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var oa=null;this.resizeHandler=mxUtils.bind(this,function(){null!=oa&&window.clearTimeout(oa);oa=window.setTimeout(mxUtils.bind(this,function(){oa=null;this.windowResized()}),100)});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(){y.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){y.view.validateBackground()}));y.addListener("gridSizeChanged",mxUtils.bind(this,function(){y.isGridEnabled()&&y.view.validateBackground()}));this.editor.resetGraph()}this.init();y.standalone||this.open()};EditorUi.compactUi=!0;EditorUi.parsePng=function(b,f,l){function u(H,S){var E=q;q+=S;return H.substring(E,q)}function y(H){H=u(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var q=0;if(u(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(u(b,4),"IHDR"!=u(b,4))null!=l&&l();else{u(b,17);do{l=y(b);var B=u(b,4);if(null!=f&&f(q-8,B,l))break;value=u(b,l);u(b,4);if("IEND"==B)break}while(l)}};mxUtils.extend(EditorUi,mxEventSource);@@ -2130,44 +2130,44 @@ EditorUi.prototype.initClipboard=function(){var b=this,f=mxClipboard.cut;mxClipb0),g=0;g<E.length;g++){Q.add(c,E[g]);var m=q.view.getState(B[g]);if(null!=m){var n=q.getCellGeometry(E[g]);null!=n&&n.relative&&!Q.isEdge(B[g])&&null==S[mxObjectIdentity.get(Q.getParent(B[g]))]&&(n.offset=null,n.relative=!1,n.x=m.x/m.view.scale-m.view.translate.x,n.y=m.y/m.view.scale-m.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(H,S),E);mxClipboard.insertCount=1;mxClipboard.setCells(E)}b.updatePasteActionStates();return B};var l=mxClipboard.paste;mxClipboard.paste=function(q){var B=null;q.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=l.apply(this,arguments);b.updatePasteActionStates();return B};var u=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){u.apply(this,arguments);b.updatePasteActionStates()};var y=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(q,B){y.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;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 U=this.graph.getPageLayout(),Y=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*Y.width),this.scale*(this.translate.y+U.y*Y.height),this.scale*U.width*Y.width,-this.scale*U.height*Y.height)};b.getPreferredPageSize=function(U,Y,fa){U=this.getPageLayout();Y=this.getPageSize();return new mxRectangle(0,0,U.width*Y.width,U.height*Y.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,Y,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,-Ja=mxRectangle.fromRectangle(la);Ja.x=Ja.x/wa-ya.x;Ja.y=Ja.y/wa-ya.y;Ja.width/=wa;Ja.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(Y||1,Ga/Ja.width)):wa;Y=(Ga-U*Ja.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ja.height)/this.lightboxVerticalDivider/U;qa&&(Y=Math.max(Y,0),Ma=Math.max(Ma,-0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(Y-Ja.x),Math.floor(Ma-Ja.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+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 U=this.graph.getPageLayout(),X=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+U.x*X.width),this.scale*(this.translate.y+U.y*X.height),this.scale*U.width*X.width,+this.scale*U.height*X.height)};b.getPreferredPageSize=function(U,X,fa){U=this.getPageLayout();X=this.getPageSize();return new mxRectangle(0,0,U.width*X.width,U.height*X.height)};var f=null,l=this;if(this.editor.isChromelessView()){this.chromelessResize=f=mxUtils.bind(this,function(U,X,fa,na){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;na=null!=na?na:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),qa=mxUtils.hasScrollbars(b.container),ya=b.view.translate,wa=b.view.scale,+Ja=mxRectangle.fromRectangle(la);Ja.x=Ja.x/wa-ya.x;Ja.y=Ja.y/wa-ya.y;Ja.width/=wa;Ja.height/=wa;ya=b.container.scrollTop;var Aa=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ga=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;U=U?Math.max(.3,Math.min(X||1,Ga/Ja.width)):wa;X=(Ga-U*Ja.width)/2/U;var Ma=0==this.lightboxVerticalDivider?0:(Ba-U*Ja.height)/this.lightboxVerticalDivider/U;qa&&(X=Math.max(X,0),Ma=Math.max(Ma,+0));if(qa||la.width<Ga||la.height<Ba)b.view.scaleAndTranslate(U,Math.floor(X-Ja.x),Math.floor(Ma-Ja.y)),b.container.scrollTop=ya*U/wa,b.container.scrollLeft=Aa*U/wa;else if(0!=fa||0!=na)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+fa/wa),Math.floor(la.y+na/wa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var u=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",u);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",u)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(U){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(U){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var y=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 q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,Y,fa){B++;-var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",Y);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var H=Graph.sanitizeLink(y.backBtn.url);null!=H&&q(mxUtils.bind(this,function(U){window.location.href=+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var q=mxUtils.bind(this,function(){var U=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=U?parseInt(U["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",q);q();var B=0;q=mxUtils.bind(this,function(U,X,fa){B++;+var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",U);null!=fa&&na.setAttribute("title",fa);U=document.createElement("img");U.setAttribute("border","0");U.setAttribute("src",X);U.style.width="36px";U.style.filter="invert(100%)";na.appendChild(U);this.chromelessToolbar.appendChild(na);return na});if(null!=y.backBtn){var H=Graph.sanitizeLink(y.backBtn.url);null!=H&&q(mxUtils.bind(this,function(U){window.location.href=H;mxEvent.consume(U)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=q(mxUtils.bind(this,function(U){this.actions.get("previousPage").funct();mxEvent.consume(U)}),Editor.chevronLeftImage,mxResources.get("previousPage")),E=document.createElement("div");E.style.fontFamily=Editor.defaultHtmlFont;E.style.display="inline-block";E.style.verticalAlign="top";E.style.fontWeight="bold";E.style.marginTop="8px";E.style.fontSize="14px";E.style.cursor="default";E.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(E);var Q=q(mxUtils.bind(this,function(U){this.actions.get("nextPage").funct();mxEvent.consume(U)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){E.innerText="";var U=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(E,U+1+" / "+this.pages.length);E.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(U-1,this.pages.length)].getName());Q.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(U+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";Q.style.paddingLeft="4px";Q.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(Q.style.display="",S.style.display=-"",E.style.display="inline-block"):(Q.style.display="none",S.style.display="none",E.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(U){var Y=new mxPopupMenu(m.funct);Y.smartSeparators=!0;Y.showDisabled=!0;Y.autoExpand=!0;Y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Y,arguments);Y.destroy()});var fa=mxUtils.getOffset(E);Y.popup(fa.x,fa.y+E.offsetHeight,null,U);mxEvent.addListener(Y.div,-"mouseleave",mxUtils.bind(this,function(){Y.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?+"",E.style.display="inline-block"):(Q.style.display="none",S.style.display="none",E.style.display="none");c()});if(null!=this.menus){var m=this.menus.get("pages");null!=m&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(U){var X=new mxPopupMenu(m.funct);X.smartSeparators=!0;X.showDisabled=!0;X.autoExpand=!0;X.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(X,arguments);X.destroy()});var fa=mxUtils.getOffset(E);X.popup(fa.x,fa.y+E.offsetHeight,null,U);mxEvent.addListener(X.div,+"mouseleave",mxUtils.bind(this,function(){X.hideMenu()}))}))}this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c)}q(mxUtils.bind(this,function(U){this.actions.get("zoomOut").funct();mxEvent.consume(U)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){this.actions.get("zoomIn").funct();mxEvent.consume(U)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");q(mxUtils.bind(this,function(U){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(U)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,x=null,F=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),600)}),U||200)}),I=mxUtils.bind(this,function(U){null!=n&&(window.clearTimeout(n),n=null);null!=x&&(window.clearTimeout(x),x=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,U||30)});if("1"==urlParams.layers){this.layersDialog=null;var M=q(mxUtils.bind(this,function(U){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var Y=M.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=-Y.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));Y=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-Y.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){M.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(U)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var K=this.lightboxToolbarActions[g];K.elem=q(K.fn,K.icon,K.tooltip)}if(null!=y.refreshBtn){var aa=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);q(mxUtils.bind(this,function(U){null!=-aa?window.location.href=aa:window.location.reload();mxEvent.consume(U)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(U){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(U)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&q(mxUtils.bind(this,function(U){"1"==urlParams.close||y.closeBtn?window.close():(this.destroy(),mxEvent.consume(U))}),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(U){mxEvent.isTouchEvent(U)||-(mxEvent.isShiftDown(U)||I(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?F():I(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||I(30)}));var ia=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,Y){this.startX=Y.getGraphX();this.startY=Y.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,Y){},mouseUp:function(U,Y){mxEvent.isTouchEvent(Y.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ia&&Math.abs(this.scrollTop-b.container.scrollTop)<-ia&&Math.abs(this.startX-Y.getGraphX())<ia&&Math.abs(this.startY-Y.getGraphY())<ia&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ba=new mxPoint,oa=!1,X=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&X!=l.currentPage){X=l.currentPage;oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,-!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var Y=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(Y.x!=this.translate.x||Y.y!=this.translate.y)this.invalidate(),this.translate.x=Y.x,this.translate.y=Y.y}Y=b.getPagePadding();var fa=b.getPageSize();U=Y.x-(this.x0||0)*fa.width;Y=Y.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=Y)this.invalidate(),this.translate.x=U,this.translate.y=Y}da.apply(this,-arguments)};if(!b.isViewer()){var ca=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var Y=this.getPageLayout(),fa=this.getDefaultTranslate(Y),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=Y.x;this.view.y0=Y.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;U||(this.container.scrollLeft+=Math.round((fa.x-na)*-this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}ca.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=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)),Z.style.transformOrigin="",ha.style.transformOrigin="",mxClient.IS_SF?(Z.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){Z.style.transform="";ha.style.transform=""},0)):(Z.style.transform="",ha.style.transform=""),b.view.getDecoratorPane().style.opacity=-"",b.view.getOverlayPane().style.opacity="");var Y=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=J&&(la+=Y.x-J.x,qa+=Y.y-J.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||-0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,Y,fa,na){na=null!=na?na:this.zoomFactor;(Y=Y||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?-this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*-this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=Z.getAttribute("filter")&&(T=Z.getAttribute("filter"),Z.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=Y||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-b.container.offsetLeft;var la=Y||null==v?b.container.scrollTop+b.container.clientHeight/-2:v.y+b.container.scrollTop-b.container.offsetTop;Z.style.transformOrigin=na+"px "+la+"px";Z.style.transform="scale("+U+")";ha.style.transformOrigin=na+"px "+la+"px";ha.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(Y||null==v?b.container.clientWidth/2+b.container.scrollLeft-na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+-"px")+" "+(Y||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",U))}V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,-function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,Y,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+-(Y?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(Y?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/-20*(fa-1),na=-1),b.lazyZoom(Y,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),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)};+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var X=M.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=+X.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));X=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+X.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(U)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){M.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(q);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||q(mxUtils.bind(this,function(U){if(null!=this.editor.editButtonFunc)this.editor.editButtonFunc();+else if("_blank"==this.editor.editButtonLink){var X=null!=this.currentPage?this.currentPage.getId():null;this.editor.editAsNew(this.getEditBlankXml(),null,null,X)}else b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(U)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var K=this.lightboxToolbarActions[g];K.elem=q(K.fn,K.icon,K.tooltip)}if(null!=y.refreshBtn){var aa=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);+q(mxUtils.bind(this,function(U){null!=aa?window.location.href=aa:window.location.reload();mxEvent.consume(U)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(U){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(U)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&+("1"==urlParams.close||this.container!=document.body))&&q(mxUtils.bind(this,function(U){"1"==urlParams.close||y.closeBtn?window.close():(this.destroy(),mxEvent.consume(U))}),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(U){mxEvent.isTouchEvent(U)||(mxEvent.isShiftDown(U)||I(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(U){mxEvent.consume(U)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(U){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(U)?F():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(U){mxEvent.isShiftDown(U)?+F():I(100);mxEvent.consume(U)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(U){mxEvent.isTouchEvent(U)||I(30)}));var ja=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(U,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(U,X){},mouseUp:function(U,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-+b.container.scrollLeft)<ja&&Math.abs(this.scrollTop-b.container.scrollTop)<ja&&Math.abs(this.startX-X.getGraphX())<ja&&Math.abs(this.startY-X.getGraphY())<ja&&(0<parseFloat(l.chromelessToolbar.style.opacity||0)?F():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ca=b.view.validate,ba=new mxPoint,oa=!1,Y=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=l.currentPage&&Y!=l.currentPage){Y=l.currentPage;+oa=!0;var U=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==U&&(U=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));U=b.getPageLayout(U,ba,1);var X=b.getDefaultTranslate(U);this.x0=U.x;this.y0=U.y;if(X.x!=this.translate.x||X.y!=this.translate.y)this.invalidate(),this.translate.x=X.x,this.translate.y=X.y}X=b.getPagePadding();var fa=b.getPageSize();U=X.x-(this.x0||0)*fa.width;X=X.y-(this.y0||0)*fa.height;if(this.translate.x!=U||this.translate.y!=X)this.invalidate(),+this.translate.x=U,this.translate.y=X}ca.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){var U=oa;oa=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var X=this.getPageLayout(),fa=this.getDefaultTranslate(X),na=this.view.translate.x,la=this.view.translate.y;if(fa.x!=na||fa.y!=la){this.view.x0=X.x;this.view.y0=X.y;this.autoTranslate=!0;this.view.setTranslate(fa.x,fa.y);this.autoTranslate=!1;+U||(this.container.scrollLeft+=Math.round((fa.x-na)*this.view.scale),this.container.scrollTop+=Math.round((fa.y-la)*this.view.scale));return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),Z=b.view.getDrawPane();b.cumulativeZoomFactor=1;var k=null,v=null,J=null,N=null,T=null,V=function(U){null!=k&&window.clearTimeout(k);0<=U&&window.setTimeout(function(){if(!b.isMouseDown||N)k=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)),Z.style.transformOrigin="",ha.style.transformOrigin="",mxClient.IS_SF?(Z.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){Z.style.transform="";ha.style.transform=""},0)):(Z.style.transform=+"",ha.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var X=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),na=b.view.scale,la=0,qa=0;null!=v&&(la=b.container.offsetWidth/2-v.x+fa.x,qa=b.container.offsetHeight/2-v.y+fa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=na&&(null!=J&&(la+=X.x-J.x,qa+=X.y-J.y),null!=f&&l.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-+1),qa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==la&&0==qa||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=qa*(b.cumulativeZoomFactor-1)));null!=T&&Z.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=N=v=J=k=null}),null!=U?U:b.isFastZoomEnabled()?l.wheelZoomDelay:l.lazyZoomDelay)},0)};b.lazyZoom=function(U,X,fa,na){na=null!=na?na:this.zoomFactor;(X=X||!b.scrollbars)&&(v=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop++b.container.clientHeight/2));U?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*+100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==T&&""!=Z.getAttribute("filter")&&(T=Z.getAttribute("filter"),Z.removeAttribute("filter"));J=new mxPoint(b.container.scrollLeft,b.container.scrollTop);U=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);na=X||null==v?b.container.scrollLeft+b.container.clientWidth/2:v.x+b.container.scrollLeft-+b.container.offsetLeft;var la=X||null==v?b.container.scrollTop+b.container.clientHeight/2:v.y+b.container.scrollTop-b.container.offsetTop;Z.style.transformOrigin=na+"px "+la+"px";Z.style.transform="scale("+U+")";ha.style.transformOrigin=na+"px "+la+"px";ha.style.transform="scale("+U+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(na=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(na.style,"transform-origin",(X||null==v?b.container.clientWidth/2+b.container.scrollLeft-+na.offsetLeft+"px":v.x+b.container.scrollLeft-na.offsetLeft-b.container.offsetLeft+"px")+" "+(X||null==v?b.container.clientHeight/2+b.container.scrollTop-na.offsetTop+"px":v.y+b.container.scrollTop-na.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(na.style,"transform","scale("+U+")")):b.view.validateBackgroundStyles(U,na,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=l.hoverIcons&&l.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview",+"factor",U))}V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(U){null!=k&&window.clearTimeout(k)},null,function(U){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(U){null==k||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(U,X,fa,na,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(U))fa=b.view.getTranslate(),+na=40/b.view.scale,mxEvent.isShiftDown(U)?b.view.setTranslate(fa.x+(X?-na:na),fa.y):b.view.setTranslate(fa.x,fa.y+(X?na:-na));else if(fa||b.isZoomWheelEvent(U))for(var qa=mxEvent.getSource(U);null!=qa;){if(qa==b.container)return b.tooltipHandler.hideTooltip(),v=null!=na&&null!=la?new mxPoint(na,la):new mxPoint(mxEvent.getClientX(U),mxEvent.getClientY(U)),N=fa,fa=b.zoomFactor,na=null,U.ctrlKey&&null!=U.deltaY&&40>Math.abs(U.deltaY)&&Math.round(U.deltaY)!=U.deltaY?fa=1+Math.abs(U.deltaY)/20*(fa-1):+null!=U.movementY&&"pointermove"==U.type&&(fa=1+Math.max(1,Math.abs(U.movementY))/20*(fa-1),na=-1),b.lazyZoom(X,null,na,fa),mxEvent.consume(U),!1;qa=qa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(U){b.cumulativeZoomFactor=U.scale;b.lazyZoom(0<U.scale,!0);mxEvent.consume(U)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(f){this.actions.get("print").funct();mxEvent.consume(f)}),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;if(null!=this.format){var f=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+f+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.hsplitPosition=Math.min(this.container.clientWidth-this.hsplit.clientWidth-this.formatWidth,this.hsplitPosition);this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),1E3*f)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var f=urlParams.border,l=60;null!=f&&(l=parseInt(f));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(l,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};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};@@ -2278,13 +2278,13 @@ mxShape.prototype.getConstraints=function(b,f,l){return null};mxImageShape.protoGraph=function(b,f,l,u,y,q){mxGraph.call(this,b,f,l,u);this.themes=y||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!1;b=this.baseUrl;f=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<f&&(f=b.indexOf("/",f+2),0<f&&(this.domainUrl=b.substring(0,f)),f=b.lastIndexOf("/"),0<f&&(this.domainPathUrl=b.substring(0,f+1)));this.isHtmlLabel=function(k){k=this.getCurrentCellStyle(k);return null!=k?"1"==k.html||"wrap"==k[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,E=null,Q=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();v=this.view.scale;if(!mxEvent.isAltDown(k.getEvent())&&null!=J&&(c=this.isCellSelected(J.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(k.getEvent()))){var N=this.selectionCellsHandler.getHandler(J.cell);if(null==N||null==N.getHandleForEvent(k)){var T=new mxRectangle(k.getGraphX()-1,k.getGraphY()-1),V=mxEvent.isTouchEvent(k.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=V+2;T.grow(V);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&!this.isCellSelected(J.cell)&&!(mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()-N)&&mxUtils.contains(J,k.getGraphX()-N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+N,k.getGraphY()+N)&&mxUtils.contains(J,k.getGraphX()+-N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){V*=v;var Y=2*V;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,Y))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,Y,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,Y))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,Y,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,+N,k.getGraphY()-N))){var U=this.model.getParent(J.cell);N=this.model.getParent(U);if(!this.isCellSelected(N)){V*=v;var X=2*V;if(this.model.getChildAt(N,0)!=U&&mxUtils.intersects(T,new mxRectangle(J.x,J.y-V,J.width,X))||this.model.getChildAt(U,0)!=J.cell&&mxUtils.intersects(T,new mxRectangle(J.x-V,J.y,X,J.height))||mxUtils.intersects(T,new mxRectangle(J.x,J.y+J.height-V,J.width,X))||mxUtils.intersects(T,new mxRectangle(J.x+J.width-V,J.y,X,J.height)))U=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,k.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(V=N.getHandleForEvent(k),null!=V&&(N.start(k.getGraphX(),k.getGraphY(),V),N.blockDelayedSelection=!U,k.consume()))}}for(;!k.isConsumed()&&null!=J&&(this.isTableCell(J.cell)||this.isTableRow(J.cell)||this.isTable(J.cell));)this.isSwimlane(J.cell)&&this.isCellMovable(J.cell)&&(N=this.getActualStartSize(J.cell),(0<N.x||0<N.width)&&mxUtils.intersects(T,new mxRectangle(J.x+(N.x-N.width-1)*v+(0==N.x?J.width:0),J.y,1,J.height))||(0<N.y||0<N.height)&&mxUtils.intersects(T,new mxRectangle(J.x,J.y+(N.y-N.height-1)*v+(0==N.y?J.height:0),J.width,1)))&&(this.selectCellForEvent(J.cell,k.getEvent()),N=this.selectionCellsHandler.getHandler(J.cell),null!=N&&null!=N.customHandles&&(V=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(k.getGraphX(),k.getGraphY(),V),k.consume())),J=this.view.getState(this.model.getParent(J.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(k,v){if("mouseDown"==v.getProperty("eventName")&&this.isEnabled()){k=v.getProperty("event");var J=k.getState();mxEvent.isAltDown(k.getEvent())||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v)||c||null==J||!this.model.isEdge(J.cell)||(B=new mxPoint(k.getGraphX(),k.getGraphY()),Q=this.isCellSelected(J.cell),S=J,H=k,null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,k.getGraphX(),k.getGraphY())?E=mxEvent.LABEL_HANDLE:(v=this.selectionCellsHandler.getHandler(J.cell),null!=v&&null!=v.bends&&0<v.bends.length&&(E=v.getHandleForEvent(k))))}}));this.addMouseListener({mouseDown:function(k,v){},mouseMove:mxUtils.bind(this,function(k,v){k=this.selectionCellsHandler.handlers.map;for(var J in k)if(null!=k[J].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(v.getEvent())){var N=this.tolerance;if(null!=B&&null!=S&&null!=H){if(J=S,null!=E||Math.abs(B.x-v.getGraphX())>N||Math.abs(B.y-v.getGraphY())>N){var T=null;mxEvent.isShiftDown(v.getEvent())||(T=this.selectionCellsHandler.getHandler(J.cell));if(null!=T&&null!=-T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),Y=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=N&&(V=E,null==V&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?V=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?V=T.bends.length-1:null!=N&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&-(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,B.x,B.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!Y&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?+T.bends&&0<T.bends.length){T.redrawHandles();var V=null!=E?E:T.getHandleForEvent(H),U=this.view.getEdgeStyle(J),X=U==mxEdgeStyle.EntityRelation;N=J.absolutePoints;Q||(V=E);V!=mxEvent.LABEL_HANDLE&&null!=N&&(V=E,null==V&&(k=new mxRectangle(B.x,B.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,N[0].x,N[0].y)?V=0:mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?V=T.bends.length-1:null!=N&&(null==U&&null==V||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&+(null!=U&&(2==N.length||3==N.length&&(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?V=2:(V=mxUtils.findNearestSegment(J,B.x,B.y),V=null==U?mxEvent.VIRTUAL_HANDLE-V:V+1))),null==V&&(V=mxEvent.VIRTUAL_HANDLE));k=V==mxEvent.LABEL_HANDLE||0==V||V==T.bends.length-1;if(!X&&(null!=J.visibleSourceState||null!=J.visibleTargetState)||k)T.start(v.getGraphX(),v.getGraphX(),V),v.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?this.isCellSelected(J.cell)||(this.selectionCellsHandler.handlers.put(J.cell,T),this.selectCellForEvent(J.cell,v.getEvent())):this.isCellSelected(J.cell)||T.destroy());Q=!1;B=H=S=E=null}}else if(J=v.getState(),null!=J&&this.isCellEditable(J.cell)){k=this.model.getParent(J.cell);T=null;if(this.model.isEdge(J.cell)&&!this.isCellSelected(J.cell)&&!mxEvent.isAltDown(v.getEvent())&&!mxEvent.isShiftDown(v.getEvent())&&!this.isAncestorSelected(J.cell)&&(this.isSwimlane(k)||this.model.isLayer(k)||this.getCurrentRoot()==k)){if(k=new mxRectangle(v.getGraphX(),v.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),N=J.absolutePoints,null!=N)null!=J.text&&null!=J.text.boundingBox&&mxUtils.contains(J.text.boundingBox,v.getGraphX(),v.getGraphY())?T="move":mxUtils.contains(k,N[0].x,N[0].y)||mxUtils.contains(k,N[N.length-1].x,N[N.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(J),U==mxEdgeStyle.EntityRelation||null==J.visibleSourceState&&null==J.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&U!=mxEdgeStyle.OrthConnector))||(v=mxUtils.findNearestSegment(J,v.getGraphX(),v.getGraphY()),v<N.length-1&&0<=v&&(T=0==Math.round(N[v].x-N[v+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(v.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;k=new mxRectangle(v.getGraphX(),v.getGraphY());k.grow(N);if(this.isTableCell(J.cell)&&this.isCellMovable(J.cell)&&(v=this.model.getParent(J.cell),N=this.model.getParent(v),!this.isCellSelected(N)))if(mxUtils.intersects(k,new mxRectangle(J.x,@@ -2292,16 +2292,16 @@ J.y-2,J.width,4))&&this.model.getChildAt(N,0)!=v||mxUtils.intersects(k,new mxRecV=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(k,new mxRectangle(v.x+(N.x-N.width-1)*V+(0==N.x?v.width*V:0),v.y,1,v.height))?T="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(k,new mxRectangle(v.x,v.y+(N.y-N.height-1)*V+(0==N.y?v.height:0),v.width,1))&&(T="row-resize")),v=this.view.getState(this.model.getParent(v.cell))}null!=T&&J.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(k,v){E=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var g=document.createElement("div");this.cellRenderer.getLabelValue=function(k){var v=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);k.view.graph.isHtmlLabel(k.cell)&&("0"==mxUtils.getValue(k.style,"html","0")?v=mxUtils.htmlEntities(v,!1):(k.lastLabelValue!=v&&(k.lastLabelValue=v,k.lastSanitizedLabelValue=Graph.sanitizeHtml(v),g.innerHTML=k.lastSanitizedLabelValue,Graph.addLightDarkColors(g,null,"simple"==k.view.graph.getAdaptiveColors())&&(k.lastSanitizedLabelValue=g.innerHTML)),v=k.lastSanitizedLabelValue));return v};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(k,v){return!1};this.alternateEdgeStyle="vertical";null==u&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),Y=0;Y<U.width;Y++)v.push(new mxRectangle(((U.x+Y)*T+N.x)*V,(U.y*J+N.y)*V,T*V,J*V));for(Y=1;Y<U.height;Y++)v.push(new mxRectangle((U.x*T+N.x)*V,((U.y+Y)*J+N.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=+this.graphHandler.getGuideStates=function(){var k=m.apply(this,arguments);if(this.graph.pageVisible){var v=[],J=this.graph.pageFormat,N=this.graph.pageScale,T=J.width*N;J=J.height*N;N=this.graph.view.translate;for(var V=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)v.push(new mxRectangle(((U.x+X)*T+N.x)*V,(U.y*J+N.y)*V,T*V,J*V));for(X=1;X<U.height;X++)v.push(new mxRectangle((U.x*T+N.x)*V,((U.y+X)*J+N.y)*V,T*V,J*V));k=v.concat(k)}return k};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(k,v){return null==k.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(k){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(k){for(var v=n.apply(this,arguments),J=new mxDictionary,N=[],T=0;T<v.length;T++){var V=this.graph.isTableCell(k)&&this.graph.isTableCell(v[T])&&this.graph.isCellSelected(v[T])?this.graph.model.getParent(v[T]):this.graph.isTableRow(k)&&this.graph.isTableRow(v[T])&&this.graph.isCellSelected(v[T])?v[T]:this.graph.getCompositeParent(v[T]);null==V||J.get(V)||(J.put(V,!0),N.push(V))}return N};var x=this.graphHandler.start;this.graphHandler.start=function(k,v,J,N){var T=!1;this.graph.isTableCell(k)&&(this.graph.isCellSelected(k)?T=!0:k=this.graph.model.getParent(k));T||this.graph.isTableRow(k)&&this.graph.isCellSelected(k)||(k=this.graph.getCompositeParent(k));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(k,v){v=this.graph.getCompositeParent(v);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(k,v,J,N,T,V){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=N&&this.graph.applyNewEdgeStyle(N,[U]);return U};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),M=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var k=this.currentState;L.apply(this,arguments);k!=this.currentState?(I=(new Date).getTime(),M=0):M=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(k){return mxEvent.isShiftDown(k.getEvent())&&mxEvent.isAltDown(k.getEvent())?!1:null!=this.currentState&&k.getState()==this.currentState&&2E3<M||(null==this.currentState||-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(k){return aa.apply(this,arguments)||mxEvent.isShiftDown(k)};var ia=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ia=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=-ia)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var da=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return da.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(k){return aa.apply(this,arguments)||mxEvent.isShiftDown(k)};var ja=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ja=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=+ja)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(k){return mxEvent.isMouseEvent(k.getEvent())};var ca=this.click;this.click=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(this.getLayerForCell(k.sourceState.cell));if(this.isEnabled()&&!v||k.isConsumed())return ca.apply(this,arguments);var J=v?k.sourceState.cell:k.getCell();if(null!=J){var N=this.getClickableLinkForCell(J);null!=N?this.isCustomLink(N)?this.customLinkClicked(N,J):this.openLink(N):v&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var k=this.div.getElementsByTagName("a"),v=0;v<k.length;v++)null!=k[v].getAttribute("href")&&null==k[v].getAttribute("target")&&k[v].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(k){return k.sourceState};this.getCursorForMouseEvent=function(k){var v=null==k.state&&null!=k.sourceState&&this.isCellLocked(k.sourceState.cell);return this.getCursorForCell(v?k.sourceState.cell:k.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(k){if(!this.isEnabled()||this.isCellLocked(k)){if(null!=this.getClickableLinkForCell(k))return"pointer";if(this.isCellLocked(k))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(k,v){var J=mxEvent.isAltDown(v)?k:null;k=this.getCells(k.x,k.y,k.width,k.height,null,null,J,null,!0);if(this.isToggleEvent(v))for(J=-0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:X.apply(this,arguments)};var ca=this.updateMouseEvent;this.updateMouseEvent=function(k){k=ca.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),+0;J<k.length;J++)this.selectCellForEvent(k[J],v);else this.selectCellsForEvent(k,v);return k};var Y=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(k,v,J){return this.graph.isCellSelected(k)?!1:Y.apply(this,arguments)};var da=this.updateMouseEvent;this.updateMouseEvent=function(k){k=da.apply(this,arguments);null!=k.state&&this.isCellLocked(this.getLayerForCell(k.getCell()))&&(null==this.getLinkForCell(k.getCell())?k.state=this.view.getState(this.getCellAt(k.getGraphX(),k.getGraphY(),null,null,null,mxUtils.bind(this,function(v,J,N){return k.state==v||this.isCellLocked(this.getLayerForCell(v.cell))&&null==this.getLinkForCell(v.cell)}))):k.state=null);return k};var ha=this.isCellSelectable;this.isCellSelectable=function(k){return ha.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(k))};this.isCellLocked=function(k){for(;null!=k;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(k),"locked","0"))return!0;k=this.model.getParent(k)}return!1};var Z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){"mouseDown"==v.getProperty("eventName")&&(k=v.getProperty("event").getState(),Z=null==k||this.isSelectionEmpty()||this.isCellSelected(k.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(k,v){if(!mxEvent.isMultiTouchEvent(v)){k=v.getProperty("event");var J=v.getProperty("cell");null==J?(k=mxUtils.convertPoint(this.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),F.start(k.x,k.y)):null!=Z?this.addSelectionCells(Z):1<this.getSelectionCount()&&this.isCellSelected(J)&&this.removeSelectionCell(J);Z=null;v.consume()}}));this.connectionHandler.selectCells=function(k,v){this.graph.setSelectionCell(v||k)};this.connectionHandler.constraintHandler.isStateIgnored=function(k,v){var J=k.view.graph;return v&&(J.isCellSelected(k.cell)||J.isTableRow(k.cell)&&J.selectionCellsHandler.isHandled(J.model.getParent(k.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,@@ -2334,14 +2334,14 @@ Graph.fadeNodes=function(b,f,l,u,y){y=null!=y?y:1E3;Graph.setTransitionForNodes(Graph.exploreFromCell=function(b,f,l){pageSize=null!=l&&null!=l.pageSize?l.pageSize:8;minSize=null!=l&&null!=l.minSize?l.minSize:180;(function(u,y){function q(c){c.view.states.visit(function(g,m){null!=m.shape&&c.model.isEdge(c.model.getParent(m.cell))?m.shape.node.parentNode.appendChild(m.shape.node):null!=m.text&&c.model.isEdge(m.cell)&&m.text.node.parentNode.appendChild(m.text.node)})}function B(c,g){if(c.getModel().isVertex(g)){var m=c.container.offsetWidth/2,n=c.container.offsetHeight/2;c.rootCell=g.referenceCell||g;c.getModel().beginUpdate();try{pageSize=null!=l&&null!=l.pageSize?l.pageSize:8+Math.max(0,Math.floor(Math.min(c.container.offsetWidth-800/120,c.container.offsetHeight-600)/30));for(var x=g.referenceCell||g,F=u.model.getCell(x.sourceCellId),I=u.getEdges(F,null,!0,!0,!1,!0),M=[],L=0;L<I.length;L++)null!=I[L].getTerminal(!0)&&null!=I[L].getTerminal(!1)&&u.isCellVisible(I[L])&&!u.isEdgeIgnored(I[L])&&u.isCellVisible(I[L].getTerminal(!0))&&u.isCellVisible(I[L].getTerminal(!1))&&u.isCellVisible(u.getLayerForCell(I[L]))&&M.push(I[L]);M=I=M;if(null!=g.startIndex||0<pageSize&&I.length>pageSize){var K=g.startIndex||0;M=I.slice(Math.max(0,K),Math.min(I.length,K+pageSize))}M=u.getOpposites(M,F).concat(M);var aa=c.cloneCells(M);for(L=0;L<M.length;L++)if(aa[L].sourceCellId=M[L].id,c.model.isEdge(aa[L]))for(aa[L].geometry.x=0,aa[L].geometry.y=0,aa[L].geometry.points=null,aa[L].setStyle(aa[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),-aa[L].setTerminal(x,null==aa[L].getTerminal(!0)),F=0;F<aa[L].getChildCount();F++){var ia=aa[L].getChildAt(F);null!=ia.geometry&&ia.geometry.relative&&(ia.setStyle(ia.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ia.geometry.offset=new mxPoint(0,0),ia.geometry.y=0,ia.geometry.x=.5>ia.geometry.x?-.8:.5<ia.geometry.x?.8:0)}if(0<g.startIndex){var da=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(I.length/pageSize)+")",-0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=x;da.startIndex=Math.max(0,(g.startIndex||0)-pageSize);aa.splice(0,0,da)}if(I.length>(g.startIndex||0)+pageSize){var ba=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(I.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ba.referenceCell=x;ba.startIndex=(g.startIndex||0)+pageSize;aa.splice(0,0,ba)}for(var oa in c.getModel().cells){var X=-c.getModel().getCell(oa);X!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,X)&&c.getModel().isVertex(X)&&c.removeCells([X])}c.addCells(aa);var ca=c.getModel().getGeometry(c.rootCell);null!=ca&&(ca=ca.clone(),ca.x=m-ca.width/2,ca.y=n-ca.height/3,c.getModel().setGeometry(c.rootCell,ca));g=[];for(oa in c.getModel().cells)X=c.getModel().getCell(oa),X!=c.rootCell&&c.getModel().isVertex(X)&&c.getModel().getParent(X)==c.getDefaultParent()&&(g.push(X),ca=c.getModel().getGeometry(X),null!=ca&&(ca.x=m-ca.width/-2,ca.y=n-ca.height/2));var ha=g.length,Z=2*Math.PI/ha,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ha;m++)ca=c.getModel().getGeometry(g[m]),null!=ca&&(ca=ca.clone(),ca.x+=k*Math.sin(m*Z),ca.y+=k*Math.cos(m*Z),c.getModel().setGeometry(g[m],ca))}finally{c.getModel().endUpdate()}}}var H=document.createElement("div");H.style.position="absolute";H.style.display="block";H.style.overflow="auto";H.style.width="100%";H.style.height="100%";H.style.left=+aa[L].setTerminal(x,null==aa[L].getTerminal(!0)),F=0;F<aa[L].getChildCount();F++){var ja=aa[L].getChildAt(F);null!=ja.geometry&&ja.geometry.relative&&(ja.setStyle(ja.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ja.geometry.offset=new mxPoint(0,0),ja.geometry.y=0,ja.geometry.x=.5>ja.geometry.x?-.8:.5<ja.geometry.x?.8:0)}if(0<g.startIndex){var ca=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((g.startIndex||0)/pageSize)+"/"+Math.ceil(I.length/pageSize)+")",+0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=x;ca.startIndex=Math.max(0,(g.startIndex||0)-pageSize);aa.splice(0,0,ca)}if(I.length>(g.startIndex||0)+pageSize){var ba=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((g.startIndex||0)/pageSize)+2)+"/"+Math.ceil(I.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ba.referenceCell=x;ba.startIndex=(g.startIndex||0)+pageSize;aa.splice(0,0,ba)}for(var oa in c.getModel().cells){var Y=+c.getModel().getCell(oa);Y!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,Y)&&c.getModel().isVertex(Y)&&c.removeCells([Y])}c.addCells(aa);var da=c.getModel().getGeometry(c.rootCell);null!=da&&(da=da.clone(),da.x=m-da.width/2,da.y=n-da.height/3,c.getModel().setGeometry(c.rootCell,da));g=[];for(oa in c.getModel().cells)Y=c.getModel().getCell(oa),Y!=c.rootCell&&c.getModel().isVertex(Y)&&c.getModel().getParent(Y)==c.getDefaultParent()&&(g.push(Y),da=c.getModel().getGeometry(Y),null!=da&&(da.x=m-da.width/+2,da.y=n-da.height/2));var ha=g.length,Z=2*Math.PI/ha,k=Math.max(minSize,Math.min(c.container.offsetWidth/2-40,c.container.offsetHeight/2-80));for(m=0;m<ha;m++)da=c.getModel().getGeometry(g[m]),null!=da&&(da=da.clone(),da.x+=k*Math.sin(m*Z),da.y+=k*Math.cos(m*Z),c.getModel().setGeometry(g[m],da))}finally{c.getModel().endUpdate()}}}var H=document.createElement("div");H.style.position="absolute";H.style.display="block";H.style.overflow="auto";H.style.width="100%";H.style.height="100%";H.style.left="0px";H.style.top="0px";H.style.zIndex=2;H.style.background=u.background==mxConstants.NONE||null==u.background?"light-dark(#ffffff,"+Editor.darkColor+")":u.background;var S=document.createElement("img");S.setAttribute("src",Editor.closeBlackImage);S.style.position="absolute";S.style.cursor="pointer";S.style.right="10px";S.style.top="10px";H.appendChild(S);var E=document.createElement("div");E.style.position="absolute";E.style.cursor="pointer";E.style.right="38px";E.style.top="14px";E.style.textAlign="right";E.style.verticalAlign="top";mxUtils.write(E,mxResources.get("close"));H.appendChild(E);document.body.appendChild(H);var Q=function(c){27==c.keyCode&&S.click()};mxEvent.addListener(document,"keydown",Q);(function(c){var g=new Graph(c);g.keepEdgesInBackground=!0;g.isCellResizable=function(){return!1};g.isCellRotatable=function(){return!1};g.getCursorForCell=function(M){return this.model.isVertex(M)?"pointer":null};g.getFoldingImage=function(){return null};var m=function(){mxEvent.removeListener(document,"keydown",Q);c.parentNode.removeChild(c);u.scrollCellToVisible(y)};mxEvent.addListener(S,"click",m);mxEvent.addListener(E,"click",m);g.setEnabled(!1);var n=g.click;g.click=function(M){var L=M.getCell(),K=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&0<g.getEdges(K).length?B(g,L):n.apply(this,arguments)};m=g.container.offsetWidth/2;var x=g.container.offsetHeight/3;g.model.beginUpdate();var F=g.importCells([y])[0];F.sourceCellId=y.id;F.geometry.x=m-F.geometry.width/2;F.geometry.y=x--F.geometry.height/2;g.model.endUpdate();var I=!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){I||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,I=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var aa=K.layout;K.layout=function(ia){K.spacing=Math.min(60,Math.max(30,60-5*ia.length));aa.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();+F.geometry.height/2;g.model.endUpdate();var I=!1;g.getModel().addListener(mxEvent.CHANGE,function(M,L){I||(M=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,g.labelsVisible=!1,I=!0,mxEffects.animateChanges(g,M,function(){var K=new mxParallelEdgeLayout(g);K.spacing=60;var aa=K.layout;K.layout=function(ja){K.spacing=Math.min(60,Math.max(30,60-5*ja.length));aa.apply(this,arguments)};K.execute(g.getDefaultParent());mxText.prototype.enableBoundingBox=!0;g.labelsVisible=!0;g.tooltipHandler.hide();g.refresh();q(g);I=!1}))});B(g,F)})(H)})(b,f)};Graph.removeKeys=function(b,f){for(var l in b)f(l)&&delete b[l]};Graph.setTransitionForNodes=function(b,f){for(var l=0;l<b.length;l++)mxUtils.setPrefixedStyle(b[l].style,"transition",f)};Graph.setOpacityForNodes=function(b,f){for(var l=0;l<b.length;l++)b[l].style.opacity=f};Graph.removePasteFormatting=function(b,f){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var l=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var u=Graph.createTabNode(4);b.parentNode.replaceChild(u,b);b=u}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=l&&"P"==l.nodeName&&"p1"==l.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!f&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(u=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,u.outerHTML))}b=l}};Graph.createTabNode=function(b){var f="\t";if(null!=b)for(f="";0<b;)f+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(f));return b};Graph.sanitizeHtml=function(b,f){return Graph.domPurify(b,!1)};@@ -2370,7 +2370,7 @@ delete H[Q]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStthis.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,E){null!=B&&(E||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(Q){return 0>mxUtils.indexOf(S,Q)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,S,E,Q,c,g){var m=!1,n=!1;if(0<B.length)for(var x=0;x<B.length&&(m=this.getModel().isVertex(B[x])||m,!(n=this.getModel().isEdge(B[x])||n)||!m);x++);else n=m=!0;m=m&&!c;n=n&&!g;for(x=0;x<H.length;x++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[x]),"strokeColor"!=H[x]||null!=S[x]&&"none"!=S[x])if(0<=mxUtils.indexOf(Graph.cellStyles,H[x])||"shape"==H[x])if("shape"!=H[x]&&(m||B)&&(null==S[x]?delete E[H[x]]:E[H[x]]=S[x]),n||B)null==S[x]?delete Q[H[x]]:Q[H[x]]=S[x]};Graph.prototype.includeDescendants=function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,E,Q){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;Q=null!=Q?Q:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<B.length;c++){var g=B[c],m=this.model.getStyle(g),n=!1;null!=g.style&&(pairs=g.style.split(";"),n=n||0<=mxUtils.indexOf(pairs,"text"));if(n)var x=Graph.textStyles;else if(x=Graph.cellStyles.slice(),!E)for(var F=null!=m?m.split(";"):[],I=0;I<F.length;I++){var M=F[I],L=M.indexOf("=");if(0<=L){var K=M.substring(0,L),aa=mxUtils.indexOf(x,K);0<=aa&&x.splice(aa,-1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ia=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ia,K))for(var da=0;da<ia.length;da++){var ba=mxUtils.indexOf(x,ia[da]);0<=ba&&x.splice(ba,1)}}}}var oa=this.model.isEdge(g);n=oa?S:H;for(I=0;I<x.length;I++){K=x[I];var X=n[K];null!=X&&("edgeStyle"!=K||Q)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,X),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==X&&null==n.curved&&+1);for(n=0;n<Graph.cellStyleGroups.length;n++){var ja=Graph.cellStyleGroups[n];if(0<=mxUtils.indexOf(ja,K))for(var ca=0;ca<ja.length;ca++){var ba=mxUtils.indexOf(x,ja[ca]);0<=ba&&x.splice(ba,1)}}}}var oa=this.model.isEdge(g);n=oa?S:H;for(I=0;I<x.length;I++){K=x[I];var Y=n[K];null!=Y&&("edgeStyle"!=K||Q)&&(oa||!oa&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(m=mxUtils.setStyle(m,K,Y),"fontFamily"==K&&null==n.fontSource&&(m=mxUtils.setStyle(m,"fontSource",null)),oa&&"rounded"==K&&"1"==Y&&null==n.curved&&(m=mxUtils.setStyle(m,"curved",null)))}Editor.simpleLabels&&(m=mxUtils.setStyle(mxUtils.setStyle(m,"html",null),"whiteSpace",null));this.model.setStyle(g,m)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var E=this.getCellStyle(H[S],!1),Q=E[mxConstants.STYLE_PERIMETER],c=!1;for(m in B){var g=B[m];if(E[m]!=g){if(m==mxConstants.STYLE_SHAPE&&"umlLifeline"==E[m]&&"umlLifeline"!=g){c=!0;var m="participant"}this.setCellStyles(m,g,[H[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,Q,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,E,Q,c){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,E,Q,c){E=null!=E?E:!0;Q=null!=Q?Q:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var g=this.model.getChildCount(S)-1;0<=g;g--){var m=this.model.getChildAt(S,g),n=this.getScaledCellAt(B,H,m,E,Q,@@ -2435,9 +2435,9 @@ Graph.prototype.connectVertex=function(b,f,l,u,y,q,B,H){q=q?q:!1;if(b.geometry.rmxConstants.DIRECTION_SOUTH?(Q.x+=E.geometry.width/2,Q.y+=E.geometry.height+l):(Q.x=f==mxConstants.DIRECTION_WEST?Q.x-l:Q.x+(E.geometry.width+l),Q.y+=E.geometry.height/2);var c=this.view.getState(this.model.getParent(b));l=this.view.scale;var g=this.view.translate;E=g.x*l;g=g.y*l;null!=c&&this.model.isVertex(c.cell)&&(E=c.x,g=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(Q.x+=b.parent.geometry.x,Q.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(E+Q.x*l,g+Q.y*l)).grow(40*l);q=null!=q?this.getCells(0,0,0,0,null,null,q,null,!0):null;c=this.view.getState(b);var m=null,n=null;if(null!=q){q=q.reverse();for(var x=0;x<q.length;x++)if(!this.isCellLocked(q[x])&&!this.model.isEdge(q[x])&&q[x]!=b)if(!this.model.isAncestor(b,q[x])&&this.isContainer(q[x])&&(null==m||q[x]==this.model.getParent(b)))m=q[x];else if(null==n&&this.isCellConnectable(q[x])&&!this.model.isAncestor(q[x],b)&&!this.isSwimlane(q[x])){var F=this.view.getState(q[x]);null==c||null==F||mxUtils.intersects(c,F)||(n=q[x])}}var I=!mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||y;I&&("1"!=urlParams.sketch||y)&&(f==mxConstants.DIRECTION_NORTH?Q.y-=b.geometry.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=b.geometry.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-b.geometry.width/2:Q.x+b.geometry.width/2);var M=[],L=n;n=m;y=mxUtils.bind(this,function(K){if(null==B||null!=K||null==n&&S){this.model.beginUpdate();try{if(null==L&&I){var aa=this.getAbsoluteParent(null!=K?K:b);aa=S?b:this.getCompositeParent(aa);L=null!=K?K:this.duplicateCells([aa],-!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(L);null!=ia&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?Q.y-=ia.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=ia.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-ia.width/2:Q.x+ia.width/2),ia.x=Q.x-ia.width/2,ia.y=Q.y-ia.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):I&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(u)&&-mxEvent.isShiftDown(u)&&I||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=da&&(M.push(da),this.applyNewEdgeStyle(b,[da],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==n&&null!=L&&M.push(L);null==L&&null!=da&&da.geometry.setTerminalPoint(Q,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==B||null!=L||!I||null==n&&S)return y(L);B(E+Q.x*l,g+Q.y*l,y)};+!1)[0];null!=K&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ja=this.getCellGeometry(L);null!=ja&&(null!=K&&"1"==urlParams.sketch&&(f==mxConstants.DIRECTION_NORTH?Q.y-=ja.height/2:f==mxConstants.DIRECTION_SOUTH?Q.y+=ja.height/2:Q.x=f==mxConstants.DIRECTION_WEST?Q.x-ja.width/2:Q.x+ja.width/2),ja.x=Q.x-ja.width/2,ja.y=Q.y-ja.height/2);null!=m?(this.addCells([L],m,null,null,null,!0),n=null):I&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ca=mxEvent.isControlDown(u)&&+mxEvent.isShiftDown(u)&&I||null==n&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ca&&(M.push(ca),this.applyNewEdgeStyle(b,[ca],f),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ca,b));if(null==n&&null!=L&&null!=b.parent&&S&&f==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==n&&null!=L&&M.push(L);null==L&&null!=ca&&ca.geometry.setTerminalPoint(Q,!1);null!=ca&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[ca]))}finally{this.model.endUpdate()}}if(null!=H)H(M);else return M});if(null==B||null!=L||!I||null==n&&S)return y(L);B(E+Q.x*l,g+Q.y*l,y)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var f=document.createElement("div"),l=[],u,y=0;y<b.length;y++)if(u=b[y],this.model.isVertex(u)||this.model.isEdge(u))this.isHtmlLabel(u)?(f.innerHTML=Graph.sanitizeHtml(this.getLabel(u)),u=mxUtils.extractTextWithWhitespace([f])):u=this.getLabel(u),u=mxUtils.trim(u.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<u.length&&l.push(u);return l.join(" ")};Graph.prototype.convertValueToString=function(b){var f=this.model.getValue(b);if(null!=f&&"object"==typeof f){var l=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){f=b.getAttribute("placeholder");for(var u=b;null==l&&null!=u;)null!=u.value&&"object"==typeof u.value&&(l=u.hasAttribute(f)?null!=u.getAttribute(f)?u.getAttribute(f):"":null),u=this.model.getParent(u)}else l=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=f.getAttribute("label_"+Graph.diagramLanguage)),null==l&&(l=f.getAttribute("label")||"");return l||""}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,f){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),f||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2531,13 +2531,13 @@ arguments);null!=m&&g&&this.graph.model.isEdge(m.cell)&&null!=m.style&&1!=m.stylg)for(var m=null,n=0;n<g.length;n++)if("hidden"!=g[n].getAttribute("visibility")){if(!(null!=m&&m!=g[n].getAttribute("d")||null!=c&&0!=--c))return g[n]}else null==m&&(m=g[n].getAttribute("d"));return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var l=mxShape.prototype.paint;mxShape.prototype.paint=function(c){l.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var u=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(c){c=u.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var y=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,g){return y.apply(this,arguments)||null!=c.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,c.routedPoints)};var q=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){q.apply(this,arguments);this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var g=c.absolutePoints;if(Graph.lineJumpsEnabled){var m=null!=c.routedPoints,n=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var x=function(Z,k,v){var J=new mxPoint(k,v);J.type=Z;n.push(J);-J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=Z||J.x!=k||J.y!=v},F=.5*this.scale;m=!1;n=[];for(var I=0;I<g.length-1;I++){for(var M=g[I+1],L=g[I],K=[],aa=g[I+2];I<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,aa.x,aa.y,M.x,M.y)<1*this.scale*this.scale;)M=aa,I++,aa=g[I+2];m=x(0,L.x,L.y)||m;for(var ia=0;ia<this.validEdges.length;ia++){var da=this.validEdges[ia],ba=da.absolutePoints;if(null!=ba&&mxUtils.intersects(c,da)&&"1"!=da.style.noJump){var oa=null;for(da=0;da<ba.length--1;da++){var X=ba[da+1],ca=ba[da];for(aa=ba[da+2];da<ba.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,aa.x,aa.y,X.x,X.y)<1*this.scale*this.scale;)X=aa,da++,aa=ba[da+2];var ha=mxUtils.intersection(L.x,L.y,M.x,M.y,ca.x,ca.y,X.x,X.y);if(null!=ha&&(Math.abs(ha.x-L.x)>F||Math.abs(ha.y-L.y)>F)&&(Math.abs(ha.x-M.x)>F||Math.abs(ha.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,ca.x,ca.y)>F)&&(null==aa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,aa.x,aa.y)>F||mxUtils.ptLineDist(L.x,-L.y,M.x,M.y,X.x,X.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=ca}}}for(da=0;da<K.length;da++)m=x(1,K[da].x,K[da].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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)B.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ia=0;ia<this.state.routedPoints.length;ia++){var da=-this.state.routedPoints[ia],ba=new mxPoint(da.x/this.scale,da.y/this.scale);0==ia?ba=g[0]:ia==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var oa=!1;if(null!=M&&1==da.type){var X=this.state.routedPoints[ia+1];da=X.x/this.scale-ba.x;X=X.y/this.scale-ba.y;da=da*da+X*X;null==aa&&(aa=new mxPoint(ba.x-M.x,ba.y-M.y),L=Math.sqrt(aa.x*aa.x+aa.y*aa.y),0<L?(aa.x=aa.x*x/L,aa.y=aa.y*x/L):aa=null);da>x*x&&0<L&&(da=M.x-ba.x,X=M.y-ba.y,da=da*da+X*X,da>x*x&&(oa=new mxPoint(ba.x-aa.x,ba.y-aa.y),da=new mxPoint(ba.x+-aa.x,ba.y+aa.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,I),K=0>Math.round(aa.x)||0==Math.round(aa.x)&&0>=Math.round(aa.y)?1:-1,I=!1,"sharp"==F?(c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.lineTo(da.x-aa.y*K,da.y+aa.x*K),c.lineTo(da.x,da.y)):"line"==F?(c.moveTo(oa.x+aa.y*K,oa.y-aa.x*K),c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.moveTo(da.x-aa.y*K,da.y+aa.x*K),c.lineTo(da.x+aa.y*K,da.y-aa.x*K),c.moveTo(da.x,da.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-aa.y*K,oa.y+aa.x*K,da.x-aa.y*K,da.y+aa.x*K,da.x,da.y)):(c.moveTo(da.x,-da.y),I=!0),K=[da],oa=!0))}else aa=null;oa||(K.push(ba),M=ba)}this.addPoints(c,K,m,n,!1,null,I);c.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==+J=null!=c.routedPoints?c.routedPoints[n.length-1]:null;return null==J||J.type!=Z||J.x!=k||J.y!=v},F=.5*this.scale;m=!1;n=[];for(var I=0;I<g.length-1;I++){for(var M=g[I+1],L=g[I],K=[],aa=g[I+2];I<g.length-2&&mxUtils.ptSegDistSq(L.x,L.y,aa.x,aa.y,M.x,M.y)<1*this.scale*this.scale;)M=aa,I++,aa=g[I+2];m=x(0,L.x,L.y)||m;for(var ja=0;ja<this.validEdges.length;ja++){var ca=this.validEdges[ja],ba=ca.absolutePoints;if(null!=ba&&mxUtils.intersects(c,ca)&&"1"!=ca.style.noJump){var oa=null;for(ca=0;ca<ba.length-+1;ca++){var Y=ba[ca+1],da=ba[ca];for(aa=ba[ca+2];ca<ba.length-2&&mxUtils.ptSegDistSq(da.x,da.y,aa.x,aa.y,Y.x,Y.y)<1*this.scale*this.scale;)Y=aa,ca++,aa=ba[ca+2];var ha=mxUtils.intersection(L.x,L.y,M.x,M.y,da.x,da.y,Y.x,Y.y);if(null!=ha&&(Math.abs(ha.x-L.x)>F||Math.abs(ha.y-L.y)>F)&&(Math.abs(ha.x-M.x)>F||Math.abs(ha.y-M.y)>F)&&(null==oa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,oa.x,oa.y)>F||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,da.x,da.y)>F)&&(null==aa||mxUtils.ptLineDist(L.x,L.y,M.x,M.y,aa.x,aa.y)>F||mxUtils.ptLineDist(L.x,+L.y,M.x,M.y,Y.x,Y.y)>F)){aa=ha.x-L.x;oa=ha.y-L.y;ha={distSq:aa*aa+oa*oa,x:ha.x,y:ha.y};for(aa=0;aa<K.length;aa++)if(K[aa].distSq>ha.distSq){K.splice(aa,0,ha);ha=null;break}null==ha||0!=K.length&&K[K.length-1].x===ha.x&&K[K.length-1].y===ha.y||K.push(ha)}oa=da}}}for(ca=0;ca<K.length;ca++)m=x(1,K[ca].x,K[ca].y)||m}ha=g[g.length-1];m=x(0,ha.x,ha.y)||m}c.routedPoints=n;return m}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,g,m){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)B.apply(this,arguments);else{var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,x=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,F=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,M=null,L=null,K=[],aa=null;c.begin();for(var ja=0;ja<this.state.routedPoints.length;ja++){var ca=+this.state.routedPoints[ja],ba=new mxPoint(ca.x/this.scale,ca.y/this.scale);0==ja?ba=g[0]:ja==this.state.routedPoints.length-1&&(ba=g[g.length-1]);var oa=!1;if(null!=M&&1==ca.type){var Y=this.state.routedPoints[ja+1];ca=Y.x/this.scale-ba.x;Y=Y.y/this.scale-ba.y;ca=ca*ca+Y*Y;null==aa&&(aa=new mxPoint(ba.x-M.x,ba.y-M.y),L=Math.sqrt(aa.x*aa.x+aa.y*aa.y),0<L?(aa.x=aa.x*x/L,aa.y=aa.y*x/L):aa=null);ca>x*x&&0<L&&(ca=M.x-ba.x,Y=M.y-ba.y,ca=ca*ca+Y*Y,ca>x*x&&(oa=new mxPoint(ba.x-aa.x,ba.y-aa.y),ca=new mxPoint(ba.x++aa.x,ba.y+aa.y),K.push(oa),this.addPoints(c,K,m,n,!1,null,I),K=0>Math.round(aa.x)||0==Math.round(aa.x)&&0>=Math.round(aa.y)?1:-1,I=!1,"sharp"==F?(c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.lineTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x,ca.y)):"line"==F?(c.moveTo(oa.x+aa.y*K,oa.y-aa.x*K),c.lineTo(oa.x-aa.y*K,oa.y+aa.x*K),c.moveTo(ca.x-aa.y*K,ca.y+aa.x*K),c.lineTo(ca.x+aa.y*K,ca.y-aa.x*K),c.moveTo(ca.x,ca.y)):"arc"==F?(K*=1.3,c.curveTo(oa.x-aa.y*K,oa.y+aa.x*K,ca.x-aa.y*K,ca.y+aa.x*K,ca.x,ca.y)):(c.moveTo(ca.x,+ca.y),I=!0),K=[ca],oa=!0))}else aa=null;oa||(K.push(ba),M=ba)}this.addPoints(c,K,m,n,!1,null,I);c.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(c,g,m,n){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,g,m,n){if(null==g||null==c||"1"!=g.style.snapToPoint&&"1"!=c.style.snapToPoint)S.apply(this,arguments);else{g=this.getTerminalPort(c,g,n);var x=this.getNextPoint(c,m,n),F=this.graph.isOrthogonal(c),I=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),M=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=I){var L=Math.cos(-I),K=Math.sin(-I);x=mxUtils.getRotatedPoint(x,L,K,M)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[n?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);x=this.getPerimeterPoint(g,x,0==I&&F,L);0!=I&&(L=Math.cos(I),K=Math.sin(I),x=mxUtils.getRotatedPoint(x,L,K,M));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,g,m,n,x),n)}};mxGraphView.prototype.snapToAnchorPoint=function(c,g,m,n,x){if(null!=g&&null!=c){c=this.graph.getAllConnectionConstraints(g);n=m=null;if(null!=c)for(var F=0;F<c.length;F++){var I=this.graph.getConnectionPoint(g,c[F]);if(null!=I){var M=(I.x-x.x)*(I.x-x.x)+(I.y-x.y)*(I.y-x.y);if(null==n||M<n)m=I,n=M}}null!=m&&(x=m)}return x};var E=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,g,m){var n=E.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=m.state&&(n=m.state.view.graph.replacePlaceholders(m.state.cell,n));return n};var Q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,@@ -2555,110 +2555,110 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#005;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" 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="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(C){return!mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)};var l=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(C){return l.apply(this,arguments)||this.graph.isTableRow(C)||this.graph.isTableCell(C)};var u=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(C){return u.apply(this,arguments)||this.graph.isEdgeIgnored(C)};var y=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(C){return this.graph.isCloneEvent(C)!=y.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var C=new mxEllipse(null,this.highlightColor,this.highlightColor,0);C.opacity=mxConstants.HIGHLIGHT_OPACITY;return C};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var P in this.graph.currentEdgeStyle)C.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)C.style[P]=W[P]}catch(ja){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(C){C=this.graph.createCurrentEdgeStyle();C=this.graph.createEdge(null,null,null,null,null,C);C=new mxCellState(this.graph.view,C,this.graph.getCellStyle(C));for(var P in this.graph.currentEdgeStyle)C.style[P]=this.graph.currentEdgeStyle[P];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(P in W)C.style[P]=W[P]}catch(ia){}}C.style=this.graph.postProcessCellStyle(C.cell,C.style);return C};var q=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var C=q.apply(this,arguments);C.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return C};mxConnectionHandler.prototype.updatePreview=function(C){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var C=B.apply(this,arguments),P=C.getCell;C.getCell=mxUtils.bind(this,function(R){var W=P.apply(this,arguments);this.error=null;return W});return C};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var C="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",P="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<P.length;R++)null!=this.currentEdgeStyle[P[R]]&&(C+=P[R]+"="+this.currentEdgeStyle[P[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?C+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(C+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?C+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(C+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(C+="elbow="+this.currentEdgeStyle.elbow+";");return C=null!=this.currentEdgeStyle.html?C+("html="+this.currentEdgeStyle.html+";"):C+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var C=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,P){P=null!=P?P:{};for(var R=0;R<C.length;R++){var W=C[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ja=this.model.getChildCount(W),ka=0;ka<ja;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(C,P,R){R=null!=R?R:{};for(var W in C){var ja=P[W];null==R[ja]&&(R[ja]=C[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,-P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ja=new mxCodec(C.ownerDocument),ka=new mxGraphModel;ja.decode(C,ka);C=[];ja={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ja));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=-ka.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ja,ta,pa),this.updateCustomLinks(pa,C),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ia=this.getBoundingBoxFromGeometry(C,!0);null!=Ia&&this.moveCells(C,P-Ia.x,R-Ia.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var P={},R=this.cloneCells(C,null,P),W=-new mxDictionary,ja=0;ja<C.length;ja++)W.put(C[ja],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ja=0;ja<R.length;ja++){pa.add(xa,R[ja]);var ta=this.view.getState(C[ja]);if(null!=ta){var ua=this.getCellGeometry(R[ja]);null!=ua&&ua.relative&&!this.model.isEdge(C[ja])&&null==W.get(this.model.getParent(C[ja]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(P,+C&&(new mxCodec(C.ownerDocument)).decode(C,this.getStylesheet())};Graph.prototype.createCellLookup=function(C,P){P=null!=P?P:{};for(var R=0;R<C.length;R++){var W=C[R];P[mxObjectIdentity.get(W)]=W.getId();for(var ia=this.model.getChildCount(W),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],P)}return P};Graph.prototype.createCellMapping=function(C,P,R){R=null!=R?R:{};for(var W in C){var ia=P[W];null==R[ia]&&(R[ia]=C[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(C,+P,R,W){P=null!=P?P:0;R=null!=R?R:0;var ia=new mxCodec(C.ownerDocument),ka=new mxGraphModel;ia.decode(C,ka);C=[];ia={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],P,R,!1,this.model.getRoot())[0]),null!=ua&&(C=C.concat(ua));else{var ua=+ka.getChildren(xa[0]);null!=ua&&(C=this.moveCells(ua,P,R,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=C&&(this.createCellMapping(ia,ta,pa),this.updateCustomLinks(pa,C),W)){this.isGridEnabled()&&(P=this.snap(P),R=this.snap(R));var Ia=this.getBoundingBoxFromGeometry(C,!0);null!=Ia&&this.moveCells(C,P-Ia.x,R-Ia.y)}}finally{this.model.endUpdate()}}return C};Graph.prototype.encodeCells=function(C){for(var P={},R=this.cloneCells(C,null,P),W=+new mxDictionary,ia=0;ia<C.length;ia++)W.put(C[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<R.length;ia++){pa.add(xa,R[ia]);var ta=this.view.getState(C[ia]);if(null!=ta){var ua=this.getCellGeometry(R[ia]);null!=ua&&ua.relative&&!this.model.isEdge(C[ia])&&null==W.get(this.model.getParent(C[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(P,this.createCellLookup(C)),R);return ka.encode(pa)};Graph.prototype.isSwimlane=function(C,P){var R=null;null==C||this.model.isEdge(C)||this.model.getParent(C)==this.model.getRoot()||(R=this.getCurrentCellStyle(C,P)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(C){return null!=C&&H.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellEditable(this.model.getParent(C)):!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(C){return null!=C&&S.apply(this,arguments)?this.isTableCell(C)||this.isTableRow(C)?this.isCellMovable(this.model.getParent(C)):!0:!1};var E=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(C){var P=this.model.getParent(C);if(null!=P){var R=this.getCurrentCellStyle(P);if(null!=R.expand)return"0"!=R.expand}return E.apply(this,arguments)&&(null==P||!this.isTable(P))};var Q=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(C,P,R,W,ja,ka,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{R=Q.apply(this,[C,P,R,W,ja,ka,pa,xa]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(P=0;P<ta.length;P++){var ua=this.getCellGeometry(ta[P]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[P])}var Ia=this.getChildCells(C,!0);for(P=0;P<Ia.length;P++)ua=this.getCellGeometry(Ia[P]),+Graph.prototype.splitEdge=function(C,P,R,W,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(C),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));R=null;this.model.beginUpdate();try{R=Q.apply(this,[C,P,R,W,ia,ka,pa,xa]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(P=0;P<ta.length;P++){var ua=this.getCellGeometry(ta[P]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[P])}var Ia=this.getChildCells(C,!0);for(P=0;P<Ia.length;P++)ua=this.getCellGeometry(Ia[P]),null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Ia[P]);var Va=this.model.getTerminal(R,!1);if(null!=Va){var Wa=this.getCurrentCellStyle(Va);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(C,-P,R){if(P||R)c.apply(this,arguments);else{var W=this.getSelectionCell(),ja=null,ka=[],pa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==W)ja=ka.length-1;else if(C&&null==W&&0<ka.length||null!=ja&&C&&ka.length>ja||!C&&0<ja)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)pa(this.model.getChildAt(xa,ta))});pa(this.model.root);0<ka.length&&(ja=null!=ja?mxUtils.mod(ja+(C?1:-1),ka.length):0,this.setSelectionCell(ka[ja]))}};-Graph.prototype.swapShapes=function(C,P){if(this.model.isVertex(C)&&this.model.isVertex(P)&&2==this.getMovableCells([C,P]).length){var R=this.getCellGeometry(C),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ja=R.clone(),ka=W.clone();this.model.beginUpdate();try{ja.x=W.getCenterX()-R.width/2,ja.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(C,ja),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(C,P,R,W,ja,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ja)){for(var xa=[],ta=0;ta<C.length;ta++)this.isTable(C[ta])?xa=xa.concat(this.model.getChildCells(C[ta],!0).reverse()):xa.push(C[ta]);C=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<C.length;ta++)if(null!=ja&&this.isTableRow(C[ta])){var ua=this.model.getParent(C[ta]),Ia=this.getCellGeometry(C[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ia&&this.isTable(ua)&&this.isTable(ja)&&(W||ua!=ja)){if(!W){var Va=-this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ia.height,this.model.setGeometry(ua,Va))}Va=this.getCellGeometry(ja);null!=Va&&(Va=Va.clone(),Va.height+=Ia.height,this.model.setGeometry(ja,Va));var Wa=this.model.getChildCells(ja,!0);if(0<Wa.length){C[ta]=W?this.cloneCell(C[ta]):C[ta];var Ta=this.model.getChildCells(C[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Pa=ab.length-Ta.length;if(0<Pa)for(var Sa=0;Sa<Pa;Sa++){var gb=this.cloneCell(Ta[Ta.length-1]);null!=gb&&(gb.value="",this.model.add(C[ta],+P,R){if(P||R)c.apply(this,arguments);else{var W=this.getSelectionCell(),ia=null,ka=[],pa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==W)ia=ka.length-1;else if(C&&null==W&&0<ka.length||null!=ia&&C&&ka.length>ia||!C&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)pa(this.model.getChildAt(xa,ta))});pa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(C?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};+Graph.prototype.swapShapes=function(C,P){if(this.model.isVertex(C)&&this.model.isVertex(P)&&2==this.getMovableCells([C,P]).length){var R=this.getCellGeometry(C),W=this.getCellGeometry(P);if(null!=R&&null!=W){var ia=R.clone(),ka=W.clone();this.model.beginUpdate();try{ia.x=W.getCenterX()-R.width/2,ia.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(C,ia),this.model.setGeometry(P,ka)}finally{this.model.endUpdate()}}}};var g=Graph.prototype.moveCells;+Graph.prototype.moveCells=function(C,P,R,W,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<C.length;ta++)this.isTable(C[ta])?xa=xa.concat(this.model.getChildCells(C[ta],!0).reverse()):xa.push(C[ta]);C=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<C.length;ta++)if(null!=ia&&this.isTableRow(C[ta])){var ua=this.model.getParent(C[ta]),Ia=this.getCellGeometry(C[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Ia&&this.isTable(ua)&&this.isTable(ia)&&(W||ua!=ia)){if(!W){var Va=+this.getCellGeometry(ua);null!=Va&&(Va=Va.clone(),Va.height-=Ia.height,this.model.setGeometry(ua,Va))}Va=this.getCellGeometry(ia);null!=Va&&(Va=Va.clone(),Va.height+=Ia.height,this.model.setGeometry(ia,Va));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){C[ta]=W?this.cloneCell(C[ta]):C[ta];var Ta=this.model.getChildCells(C[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Pa=ab.length-Ta.length;if(0<Pa)for(var Sa=0;Sa<Pa;Sa++){var gb=this.cloneCell(Ta[Ta.length-1]);null!=gb&&(gb.value="",this.model.add(C[ta],gb))}else if(0>Pa)for(Sa=0;Sa>Pa;Sa--)this.model.remove(Ta[Ta.length+Sa-1]);Ta=this.model.getChildCells(C[ta],!0);for(Sa=0;Sa<ab.length;Sa++){var fb=this.getCellGeometry(ab[Sa]),cb=this.getCellGeometry(Ta[Sa]);null!=fb&&null!=cb&&(cb=cb.clone(),cb.width=fb.width,this.model.setGeometry(Ta[Sa],cb))}}}}var eb=g.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!W&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);W&&this.updateCustomLinks(this.createCellMapping(pa,-this.createCellLookup(C)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(C,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<C.length;W++)if(this.isTableCell(C[W])){var ja=this.model.getParent(C[W]),ka=this.model.getParent(ja);1==this.model.getChildCount(ja)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(C[W],"")}else{if(this.isTableRow(C[W])&&(ka=this.model.getParent(C[W]),+this.createCellLookup(C)),eb)}finally{this.model.endUpdate()}return eb};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(C,P){var R=[];this.model.beginUpdate();try{for(var W=0;W<C.length;W++)if(this.isTableCell(C[W])){var ia=this.model.getParent(C[W]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(C[W],"")}else{if(this.isTableRow(C[W])&&(ka=this.model.getParent(C[W]),0>mxUtils.indexOf(C,ka)&&0>mxUtils.indexOf(R,ka))){for(var pa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<pa.length;ta++)0<=mxUtils.indexOf(C,pa[ta])&&xa++;xa==pa.length&&R.push(ka)}R.push(C[W])}R=m.apply(this,[R,P])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(C,P,R){R=null!=R?R:new Graph;for(var W=0;W<P.length;W++)null!=P[W]&&R.updateCustomLinksForCell(C,P[W],R)};Graph.prototype.updateCustomLinksForCell=function(C,P){this.doUpdateCustomLinksForCell(C,P);for(var R=this.model.getChildCount(P),W=0;W<R;W++)this.updateCustomLinksForCell(C,this.model.getChildAt(P,W))};Graph.prototype.doUpdateCustomLinksForCell=function(C,P){};Graph.prototype.getAllConnectionConstraints=function(C,P){if(null!=C){P=mxUtils.getValue(C.style,"points",null);if(null!=P){C=[];try{var R=JSON.parse(P);for(P=0;P<R.length;P++){var W=R[P];C.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return C}if(null!=-C.shape&&null!=C.shape.bounds){W=C.shape.direction;P=C.shape.bounds;var ja=C.shape.scale;R=P.width/ja;P=P.height/ja;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=C.shape.getConstraints(C.style,R,P);if(null!=P)return P;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var P=this.getCurrentCellStyle(C);P=-mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[C])}};Graph.prototype.isValidRoot=function(C){for(var P=this.model.getChildCount(C),R=0,W=0;W<P;W++){var ja=this.model.getChildAt(C,W);this.model.isVertex(ja)&&(ja=this.getCellGeometry(ja),null==ja||ja.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,P,-R){for(var W=this.getCurrentCellStyle(C),ja=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ja=ja&&this.isTable(P[pa]),ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ka||ja))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,+C.shape&&null!=C.shape.bounds){W=C.shape.direction;P=C.shape.bounds;var ia=C.shape.scale;R=P.width/ia;P=P.height/ia;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=P,P=W;P=C.shape.getConstraints(C.style,R,P);if(null!=P)return P;if(null!=C.shape.stencil&&null!=C.shape.stencil.constraints)return C.shape.stencil.constraints;if(null!=C.shape.constraints)return C.shape.constraints}}return null};Graph.prototype.flipEdge=function(C){if(null!=C){var P=this.getCurrentCellStyle(C);P=+mxUtils.getValue(P,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,P,[C])}};Graph.prototype.isValidRoot=function(C){for(var P=this.model.getChildCount(C),R=0,W=0;W<P;W++){var ia=this.model.getChildAt(C,W);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||R++)}return 0<R||this.isContainer(C)};Graph.prototype.isValidDropTarget=function(C,P,+R){for(var W=this.getCurrentCellStyle(C),ia=!0,ka=!0,pa=0;pa<P.length&&ka;pa++)ia=ia&&this.isTable(P[pa]),ka=ka&&this.isTableRow(P[pa]);return!this.isCellLocked(C)&&(this.isTargetShape(C,P,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(C))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(C))&&!this.isTableRow(C)&&(!this.isTable(C)||ka||ia))};Graph.prototype.createGroupCell=function(){var C=mxGraph.prototype.createGroupCell.apply(this,arguments);C.setStyle("group");return C};Graph.prototype.isExtendParentsOnAdd=function(C){var P=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(P&&null!=C&&null!=this.layoutManager){var R=this.model.getParent(C);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(P=!1))}return P};Graph.prototype.getPreferredSizeForCell=function(C,P,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=-10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(C,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ja=0;ja<C.length;ja++){var ka=C[ja];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Ia=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,+10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(C,P){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ia=0;ia<C.length;ia++){var ka=C[ia];if(R.isEdge(ka)){var pa=R.getTerminal(ka,!0),xa=R.getTerminal(ka,!1);R.setTerminal(ka,xa,!0);R.setTerminal(ka,pa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Ia=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,!1);ta.setTerminalPoint(Ia,!0);R.setGeometry(ka,ta);var Va=this.view.getState(ka),Wa=this.view.getState(pa),Ta=this.view.getState(xa);if(null!=Va){var ab=null!=Wa?this.getConnectionConstraint(Va,Wa,!0):null,Pa=null!=Ta?this.getConnectionConstraint(Va,Ta,!1):null;this.setConnectionConstraint(ka,pa,!0,Pa);this.setConnectionConstraint(ka,xa,!1,ab);var Sa=mxUtils.getValue(Va.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Va.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Sa,[ka])}W.push(ka)}}else if(R.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var gb=ta.width;ta.width=ta.height;ta.height=gb;R.setGeometry(ka,ta)}var fb=this.view.getState(ka);if(null!=fb){var cb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(fb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,cb[mxUtils.mod(mxUtils.indexOf(cb,eb)+(P?-1:1),cb.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(C){if(null!=C&&null!=C.fgNode)for(C=C.fgNode.firstChild;null!=C;){if("text"==C.nodeName&&"1"==C.getAttribute("placeholders"))return!0;C=C.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(C){if(C instanceof mxGeometryChange&&(this.isTableCell(C.cell)||this.isTableRow(C.cell))&&(null==C.previous&&null!=C.geometry||null!=C.previous&&!C.previous.equals(C.geometry))){var P=C.cell;this.isTableCell(P)&&(P=this.model.getParent(P));this.isTableRow(P)&&(P=this.model.getParent(P));var R=this.view.getState(P);null!=R&&null!=R.shape&&(this.view.invalidate(P),R.shape.bounds=null)}n.apply(this,arguments);C instanceof mxValueChange&&null!=C.cell&&null!=C.cell.value&&"object"==typeof C.cell.value&&this.invalidateDescendantsWithPlaceholders(C.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(C){C=this.model.getDescendants(C);if(0<C.length)for(var P=0;P<C.length;P++){var R=this.view.getState(C[P]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(C[P]):this.isReplacePlaceholders(C[P])&&this.view.invalidate(C[P],!1,!1)}};Graph.prototype.replaceElement=function(C,P){P=C.ownerDocument.createElement(null!=P?P:"span");for(var R=Array.prototype.slice.call(C.attributes);attr=R.pop();)P.setAttribute(attr.nodeName,attr.nodeValue);P.innerHTML=C.innerHTML;C.parentNode.replaceChild(P,C)};Graph.prototype.processElements=function(C,P){if(null!=C){C=C.getElementsByTagName("*");for(var R=0;R<C.length;R++)null!=C[R]&&P(C[R])}};Graph.prototype.updateLabelElements=function(C,P,R){C=null!=C?C:this.getSelectionCells();for(var W=document.createElement("div"),-ja=0;ja<C.length;ja++){var ka=this.getCurrentCellStyle(C[ja]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(C[ja]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(C[ja],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&-null!=C.getAttribute("placeholder"))for(var W=C.getAttribute("placeholder"),ja=C;null!=ja;){if(ja==this.model.getRoot()||null!=ja.value&&"object"==typeof ja.value&&ja.hasAttribute(W)){this.setAttributeForCell(ja,W,P);break}ja=this.model.getParent(ja)}var ka=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var P=new mxDictionary,R=0;R<C.length;R++)P.put(C[R],!0);var W=[];for(R=0;R<C.length;R++){var ja=this.model.getParent(C[R]);null==ja||P.get(ja)||(P.put(ja,!0),W.push(ja))}for(R=0;R<W.length;R++)if(ja=this.view.getState(W[R]),null!=ja&&(this.model.isEdge(ja.cell)||this.model.isVertex(ja.cell))&&this.isCellDeletable(ja.cell)&&this.isTransparentState(ja)){for(var ka=!0,pa=0;pa<this.model.getChildCount(ja.cell)&&-ka;pa++)P.get(this.model.getChildAt(ja.cell,pa))||(ka=!1);ka&&C.push(ja.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var P=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&P.push(C[R]);C=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,P){this.setAttributeForCell(C,"link",P)};Graph.prototype.setTooltipForCell=function(C,+ia=0;ia<C.length;ia++){var ka=this.getCurrentCellStyle(C[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(C[ia]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var pa=W.getElementsByTagName(null!=R?R:"*"),xa=0;xa<pa.length;xa++)P(pa[xa]);W.innerHTML!=ka&&this.cellLabelChanged(C[ia],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(C,P,R){P=Graph.zapGremlins(P);this.model.beginUpdate();try{if(null!=C.value&&"object"==typeof C.value){if(this.isReplacePlaceholders(C)&&+null!=C.getAttribute("placeholder"))for(var W=C.getAttribute("placeholder"),ia=C;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(W)){this.setAttributeForCell(ia,W,P);break}ia=this.model.getParent(ia)}var ka=C.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,P):ka.setAttribute("label",P);P=ka}mxGraph.prototype.cellLabelChanged.apply(this,+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(C){if(null!=C){for(var P=new mxDictionary,R=0;R<C.length;R++)P.put(C[R],!0);var W=[];for(R=0;R<C.length;R++){var ia=this.model.getParent(C[R]);null==ia||P.get(ia)||(P.put(ia,!0),W.push(ia))}for(R=0;R<W.length;R++)if(ia=this.view.getState(W[R]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&+ka;pa++)P.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&C.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(C){for(var P=[],R=0;R<C.length;R++)this.isCellDeletable(C[R])&&this.isTransparentState(this.view.getState(C[R]))&&P.push(C[R]);C=P;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(C,P){this.setAttributeForCell(C,"link",P)};Graph.prototype.setTooltipForCell=function(C,P){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(C.value)&&C.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(C,R,P)};Graph.prototype.getAttributeForCell=function(C,P,R){C=null!=C.value&&"object"===typeof C.value?C.value.getAttribute(P):null;return null!=C?C:R};Graph.prototype.setAttributeForCell=function(C,P,R){if(null!=C.value&&"object"==typeof C.value)var W=C.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),W.setAttribute("label",C.value||"");null!=R?W.setAttribute(P,R):W.removeAttribute(P);this.model.setValue(C,W)};Graph.prototype.isTargetShape=function(C,P,R){C=mxUtils.getValue(this.getCurrentCellStyle(C),mxConstants.STYLE_SHAPE,"");for(R=0;R<P.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(P[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,C))return!0}return!1};var x=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(C,P,R,W){if(mxEvent.isAltDown(P))return null;-for(var ja=0;ja<C.length;ja++){var ka=this.model.getParent(C[ja]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(C,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ja=0;ja<C.length&&pa;ja++)pa=pa&&this.isTableRow(C[ja]);pa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};-Graph.prototype.dblClick=function(C,P){this.isEnabled()&&(P=this.insertTextForEvent(C,P),mxGraph.prototype.dblClick.call(this,C,P))};Graph.prototype.insertTextForEvent=function(C,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ja=mxEvent.getSource(C);this.firstClickState!=W||this.firstClickSource!=ja||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&-(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(C)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ja==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var C=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ja=this.getPageSize();P=Math.max(P,W.x*ja.width);R=Math.max(R,W.y*ja.height)}return new mxPoint(this.snap(P+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(){var C=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/C.scale-C.translate.x+(0==P.width?2*this.gridSize:0))));C=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/C.scale-+for(var ia=0;ia<C.length;ia++){var ka=this.model.getParent(C[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(C,ka))return null}ka=x.apply(this,arguments);var pa=!0;for(ia=0;ia<C.length&&pa;ia++)pa=pa&&this.isTableRow(C[ia]);pa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(C){mxGraph.prototype.click.call(this,C);this.firstClickState=C.getState();this.firstClickSource=C.getSource()};+Graph.prototype.dblClick=function(C,P){this.isEnabled()&&(P=this.insertTextForEvent(C,P),mxGraph.prototype.dblClick.call(this,C,P))};Graph.prototype.insertTextForEvent=function(C,P){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(C),mxEvent.getClientY(C));if(null!=C&&!this.model.isVertex(P)){var W=this.model.isEdge(P)?this.view.getState(P):null,ia=mxEvent.getSource(C);this.firstClickState!=W||this.firstClickSource!=ia||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&+(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(C)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),P=this.addText(R.x,R.y,W))}return P};Graph.prototype.getInsertPoint=function(){var C=this.getGridSize(),P=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ia=this.getPageSize();P=Math.max(P,W.x*ia.width);R=Math.max(R,W.y*ia.height)}return new mxPoint(this.snap(P+C),this.snap(R+C))};Graph.prototype.getFreeInsertPoint=function(){var C=this.view,P=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,P.x/C.scale-C.translate.x+(0==P.width?2*this.gridSize:0))));C=this.snap(Math.round(Math.max(R.y,(P.y+P.height)/C.scale-C.translate.y+2*this.gridSize)));return new mxPoint(W,C)};Graph.prototype.getCenterInsertPoint=function(C){C=null!=C?C: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-C.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-C.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-C.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-C.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(C,P){C=null!=C?C:"";null!=P&&(0<C.length&&";"!=C.charAt(C.length-1)&&(C+=";"),C+="fontSize="+P+";");return C};Graph.prototype.addText=function(C,P,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ja=this.view.getRelativePoint(R,C,P);W.geometry.x=Math.round(1E4*ja.x)/1E4;W.geometry.y=Math.round(ja.y);W.geometry.offset=new mxPoint(0,0);ja=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((C-ja.x)/ka),Math.round((P-ja.y)/ka))}else ja=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(C/this.view.scale)-ja.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ja.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(C,P,R){var W=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Ia=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Ia&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Ia),null!=P&&mxEvent.addGestureListeners(ta[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ja=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ia=this.view.getRelativePoint(R,C,P);W.geometry.x=Math.round(1E4*ia.x)/1E4;W.geometry.y=Math.round(ia.y);W.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((C-ia.x)/ka),Math.round((P-ia.y)/ka))}else ia=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(C/this.view.scale)-ia.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(P/this.view.scale)-ia.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(C,P,R){var W=mxUtils.bind(this,+function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Ia=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Ia&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Ia),null!=P&&mxEvent.addGestureListeners(ta[ua],null,null,P))}});this.model.addListener(mxEvent.CHANGE,W);W();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=C&&""!=C&&C!=mxConstants.NONE?new mxCellHighlight(pa,C,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==pa.getLinkForCell(ua.cell))ta=pa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Ia,Va,Wa){return null==pa.getLinkForCell(Ia.cell)}),ua=null==ua||pa.model.isAncestor(ta,ua.cell)?pa.view.getState(ta):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,ua){this.startX=ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(pa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ta>ka||ua>ka)&&this.clear());else{for(ta=ua.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!pa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Ia=ua.getSource();for(ta=ua.getEvent();null!=Ia&&"a"!=Ia.nodeName.toLowerCase();)Ia=Ia.parentNode;null==Ia&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Ia=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ia||null==P||P(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Ia?pa.linkTarget:"_top",pa.openLink(this.currentLink,ta),ua.consume())):null!=R&&!ua.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&R(ua.getEvent()));this.clear()},activate:function(ta){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ta.cell));null!=this.currentLink&&-(this.currentTarget=pa.getLinkTargetForCell(ta.cell),pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ja);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ta){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=-function(C,P){C=null!=C?C:this.getSelectionCells();P=null!=P?P:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var W=this.getModel(),ja=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ta=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=W.getParent(C[R]);if(null!=ua){var Ia=this.moveCells([ta[R]],ja,ja,!1)[0];ka.push(Ia);if(P)W.add(ua,ta[R]);else{var Va=ua.getIndex(C[R]);W.add(ua,ta[R],Va+-1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[R]),Ta=this.getCellGeometry(ua);null!=Wa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Wa.height,W.setGeometry(ua,Ta))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(C,P,R){if(null!=C&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ja=-[],ka=0;ka<W.length;ka++)ja.push(W[ka]);document.execCommand("insertimage",!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ja.length+1)for(ka=C.length-1;0<=ka;ka--)if(0==ka||C[ka]!=ja[ka-1]){C[ka].setAttribute("width",P);C[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=+(this.currentTarget=pa.getLinkTargetForCell(ta.cell),pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ta){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=+function(C,P){C=null!=C?C:this.getSelectionCells();P=null!=P?P:!0;for(var R=0;R<C.length;R++)this.isTableCell(C[R])&&(C[R]=this.model.getParent(C[R]));C=this.model.getTopmostCells(C);var W=this.getModel(),ia=this.gridSize,ka=[];W.beginUpdate();try{var pa={},xa=this.createCellLookup(C),ta=this.cloneCells(C,!1,pa,!0);for(R=0;R<C.length;R++){var ua=W.getParent(C[R]);if(null!=ua){var Ia=this.moveCells([ta[R]],ia,ia,!1)[0];ka.push(Ia);if(P)W.add(ua,ta[R]);else{var Va=ua.getIndex(C[R]);W.add(ua,ta[R],Va++1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[R]),Ta=this.getCellGeometry(ua);null!=Wa&&null!=Ta&&(Ta=Ta.clone(),Ta.height+=Wa.height,W.setGeometry(ua,Ta))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(C,P,R){if(null!=C&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ia=+[],ka=0;ka<W.length;ka++)ia.push(W[ka]);document.execCommand("insertimage",!1,C);C=this.cellEditor.textarea.getElementsByTagName("img");if(C.length==ia.length+1)for(ka=C.length-1;0<=ka;ka--)if(0==ka||C[ka]!=ia[ka-1]){C[ka].setAttribute("width",P);C[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(C){if(null!=this.cellEditor.textarea)if(0==C.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var P=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=0;W<P.length;W++)R.push(P[W]);document.execCommand("createlink",!1,mxUtils.trim(C));P=this.cellEditor.textarea.getElementsByTagName("a");if(P.length==R.length+1)for(W=P.length-1;0<=W;W--)if(P[W]!=R[W-1]){for(P=P[W].getElementsByTagName("a");0<P.length;){for(R=P[0].parentNode;null!=P[0].firstChild;)R.insertBefore(P[0].firstChild,P[0]);R.removeChild(P[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(C))};Graph.prototype.isCellResizable=function(C){var P=mxGraph.prototype.isCellResizable.apply(this,-arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&!this.isTableRow(C)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ja=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ta=this.view.getState(P[xa]);if(null!=ta){var ua=C?ta.getCenterX():ta.getCenterY();ja=null!=ja?Math.max(ja,-ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=C?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Pa){return C?ab.x-Pa.x:ab.y-Pa.y});R&&(pa-=C?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(C?ta.x:ta.y);ja=ja/ua-(C?ta.x:ta.y);this.getModel().beginUpdate();try{var Ia=(ja-ka-pa)/(W.length-1),Va=ka+(R?C?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Wa=this.view.getState(this.model.getParent(W[xa].cell)),+arguments),R=this.getCurrentCellStyle(C);return!this.isTableCell(C)&&!this.isTableRow(C)&&(P||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(C,P,R){null==P&&(P=this.getSelectionCells());if(null!=P&&1<P.length){for(var W=[],ia=null,ka=null,pa=0,xa=0;xa<P.length;xa++)if(this.getModel().isVertex(P[xa])){var ta=this.view.getState(P[xa]);if(null!=ta){var ua=C?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,+ua):ua;ka=null!=ka?Math.min(ka,ua):ua;R&&(pa+=C?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Pa){return C?ab.x-Pa.x:ab.y-Pa.y});R&&(pa-=C?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(C?ta.x:ta.y);ia=ia/ua-(C?ta.x:ta.y);this.getModel().beginUpdate();try{var Ia=(ia-ka-pa)/(W.length-1),Va=ka+(R?C?W[0].width/2:W[0].height/2:0);for(xa=1;xa<W.length-1;xa++){var Wa=this.view.getState(this.model.getParent(W[xa].cell)),Ta=this.getCellGeometry(W[xa].cell);Va+=Ia;null!=Ta&&null!=Wa&&(Ta=Ta.clone(),C?Ta.x=Math.round(Va-(R?0:Ta.width/2))-Wa.origin.x:Ta.y=Math.round(Va-(R?0:Ta.height/2))-Wa.origin.y,this.getModel().setGeometry(W[xa].cell,Ta));R&&(Va+=C?W[xa].width:W[xa].height)}}finally{this.getModel().endUpdate()}}}return P};Graph.prototype.isCloneEvent=function(C){return mxClient.IS_MAC&&mxEvent.isMetaDown(C)||mxEvent.isControlDown(C)};Graph.prototype.createSvgImageExport=function(C){C=new mxImageExport;C.addCellData=-function(R,W,ja){W.setAttribute("data-cell-id",R.id);if(ja)if(mxUtils.isNode(R.value))for(ja=0;ja<R.value.attributes.length;ja++){var ka=R.value.attributes[ja];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=C.visitStatesRecursive;C.visitStatesRecursive=function(R,W,ja){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,+function(R,W,ia){W.setAttribute("data-cell-id",R.id);if(ia)if(mxUtils.isNode(R.value))for(ia=0;ia<R.value.attributes.length;ia++){var ka=R.value.attributes[ia];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var P=C.visitStatesRecursive;C.visitStatesRecursive=function(R,W,ia){if(null!=R){var ka=W.root,pa=W.root.ownerDocument;W.root=this.addCellData(R.cell,null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(W.root);P.apply(this,arguments);W.root=ka}};C.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});C.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return C};Graph.prototype.parseBackgroundImage=function(C){var P=null;null!=C&&0<C.length&&(C=JSON.parse(C),P=new mxImage(C.src,-C.width,C.height));return P};Graph.prototype.getBackgroundImageObject=function(C){return C};Graph.prototype.getSvg=function(C,P,R,W,ja,ka,pa,xa,ta,ua,Ia,Va,Wa,Ta,ab,Pa){var Sa=null;if(null!=Ta)for(Sa=new mxDictionary,Ia=0;Ia<Ta.length;Ia++)Sa.put(Ta[Ia],!0);Ta=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ja=null!=ja?ja:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:+C.width,C.height));return P};Graph.prototype.getBackgroundImageObject=function(C){return C};Graph.prototype.getSvg=function(C,P,R,W,ia,ka,pa,xa,ta,ua,Ia,Va,Wa,Ta,ab,Pa){var Sa=null;if(null!=Ta)for(Sa=new mxDictionary,Ia=0;Ia<Ta.length;Ia++)Sa.put(Ta[Ia],!0);Ta=this.useCssTransforms;var gb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Ta&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{P=null!=P?P:1;R=null!=R?R:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!0;ua=null!=ua?ua:!1;var fb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Sa||W||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),cb=this.backgroundImage,eb=this.view.translate,lb=this.view.scale;"diagram"==Wa&&null!=cb&&null!=cb.width&&null!=cb.height&&(fb=mxRectangle.fromRectangle(fb),fb.add(new mxRectangle((eb.x+cb.x)*lb,(eb.y+cb.y)*lb,cb.width*lb,cb.height*lb)));if(null==fb)throw Error(mxResources.get("drawingEmpty"));W=P/lb;var kb=Math.max(1,Math.ceil(fb.width*-W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);ja=ja?-.5:0;var hb=mxUtils.getLightDarkColor(C),pb=Graph.createSvgNode(ja,ja,kb,ob,hb),sb=pb.ownerDocument;if(null!=C){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,+W)+2*R)+(ua&&0==R?5:0),ob=Math.max(1,Math.ceil(fb.height*W)+2*R)+(ua&&0==R?5:0);ia=ia?-.5:0;var hb=mxUtils.getLightDarkColor(C),pb=Graph.createSvgNode(ia,ia,kb,ob,hb),sb=pb.ownerDocument;if(null!=C){var ib=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"rect");ib.setAttribute("fill",hb.light);ib.style.fill=hb.cssText;ib.setAttribute("width","100%");ib.setAttribute("height","100%");ib.setAttribute("x","0");ib.setAttribute("y","0");pb.appendChild(ib)}var mb=mxUtils.createElementNs(sb,mxConstants.NS_SVG,"g");pb.appendChild(mb);var nb=this.createSvgCanvas(mb);nb.translate(Math.floor(R/P-fb.x/lb),Math.floor(R/P-fb.y/lb));nb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=nb.getAlternateText;nb.getAlternateText=function(bb,yb,tb,xb,vb,rb,Db,Fb,d,p,A,t,z){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var D=Math.ceil(2*xb/this.state.fontSize),G=[],ea=0,O=0;(0==D||ea<D)&&O<-rb.length;){var sa=rb.charCodeAt(O);if(10==sa||13==sa){if(0<ea)break}else G.push(rb.charAt(O)),255>sa&&ea++;O++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(C=lb/P,ja=new mxRectangle((cb.x+eb.x)*C,(cb.y+eb.y)*C,cb.width*C,cb.height*C),mxUtils.intersects(fb,ja)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);+rb.length;){var sa=rb.charCodeAt(O);if(10==sa||13==sa){if(0<ea)break}else G.push(rb.charAt(O)),255>sa&&ea++;O++}G.length<rb.length&&1<rb.length-G.length&&(rb=mxUtils.trim(G.join(""))+"...");return rb}catch(ma){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=cb&&null!=cb.width&&null!=cb.height&&(C=lb/P,ia=new mxRectangle((cb.x+eb.x)*C,(cb.y+eb.y)*C,cb.width*C,cb.height*C),mxUtils.intersects(fb,ia)&&nb.image(cb.x+eb.x,cb.y+eb.y,cb.width,cb.height,cb.src,!0));nb.scale(W);nb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var zb=xa.getLinkForCellState;xa.getLinkForCellState=function(bb,yb){var tb=bb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==tb||bb.view.graph.isCustomLink(tb)?null:tb};xa.getLinkTargetForCellState=function(bb,yb){return bb.view.graph.getLinkTargetForCell(bb.cell)};var Cb=xa.drawCellState,Ab=null,Bb=mxUtils.bind(this,function(){if(null==Ab){Ab="ge-flow-animation-"+Editor.guid();var bb=null!=sb.createElementNS?sb.createElementNS(mxConstants.NS_SVG,"style"):sb.createElement("style");bb.innerHTML=this.createFlowAnimationCss(Ab);sb.getElementsByTagName("defs")[0].appendChild(bb)}return Ab});xa.drawCellState=function(bb,yb){for(var tb=bb.view.graph,xb=null!=Sa?Sa.get(bb.cell):tb.isCellSelected(bb.cell),vb=tb.model.getParent(bb.cell);!(ka&&null==Sa||xb)&&null!=vb;)xb=null!=Sa?Sa.get(vb):tb.isCellSelected(vb),vb=tb.model.getParent(vb);if(null!=bb.shape)try{var rb=bb.shape.isFlowAnimationEnabled,Db=bb.shape.addFlowAnimationToShape;bb.shape.isFlowAnimationEnabled=function(){return gb&&tb.model.isEdge(bb.cell)&&"1"==mxUtils.getValue(bb.style,"flowAnimation","0")};bb.shape.addFlowAnimationToShape=function(){tb.addFlowAnimationToNode(this.getFlowAnimationPath(),bb.style,P,Bb())};if(ka&&null==Sa||xb)tb.view.redrawEnumerationState(bb),Cb.apply(this,arguments),this.doDrawShape(bb.secondLabel,yb)}finally{bb.shape.isFlowAnimationEnabled=rb,bb.shape.addFlowAnimationToShape=Db}};var wb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(wb),-nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ta,!0);return pb}finally{this.enableFlowAnimation=gb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),W=C.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ja=-C.createElement("a");ja.setAttribute("transform","translate(0,-5)");null==ja.setAttributeNS||P.ownerDocument!=document&&null==document.documentMode?(ja.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ja.setAttribute("target","_blank")):(ja.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ja.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x",-"50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(W);ja.appendChild(C);R.appendChild(ja);P.appendChild(R)}};Graph.prototype.disableSvgLinks=function(C,P){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var W=C[R].getAttribute("href");null==W&&(W=C[R].getAttribute("xlink:href"));null!=W&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));P&&P(C[R])}};Graph.prototype.updateSvgLinks=function(C,P,R){C=C.getElementsByTagName("a");for(var W=-0;W<C.length;W++)if(null==C[W].getAttribute("target")){var ja=C[W].getAttribute("href");null==ja&&(ja=C[W].getAttribute("xlink:href"));null!=ja&&(null!=P&&/^https?:\/\//.test(ja)?C[W].setAttribute("target",P):R&&this.isCustomLink(ja)&&C[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=+nb);this.addForeignObjectWarning(nb,pb);Pa?this.disableSvgLinks(pb):this.updateSvgLinks(pb,ta,!0);return pb}finally{this.enableFlowAnimation=gb,Ta&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(C,P){if("0"!=urlParams["svg-warning"]&&0<P.getElementsByTagName("foreignObject").length){var R=C.createElement("switch"),W=C.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=+C.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||P.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));C=C.createElement("text");C.setAttribute("text-anchor","middle");C.setAttribute("font-size","10px");C.setAttribute("x",+"50%");C.setAttribute("y","100%");mxUtils.write(C,Graph.foreignObjectWarningText);R.appendChild(W);ia.appendChild(C);R.appendChild(ia);P.appendChild(R)}};Graph.prototype.disableSvgLinks=function(C,P){C=C.getElementsByTagName("a");for(var R=0;R<C.length;R++){var W=C[R].getAttribute("href");null==W&&(W=C[R].getAttribute("xlink:href"));null!=W&&(C[R].style.pointerEvents="none",C[R].setAttribute("href",""));P&&P(C[R])}};Graph.prototype.updateSvgLinks=function(C,P,R){C=C.getElementsByTagName("a");for(var W=+0;W<C.length;W++)if(null==C[W].getAttribute("target")){var ia=C[W].getAttribute("href");null==ia&&(ia=C[W].getAttribute("xlink:href"));null!=ia&&(null!=P&&/^https?:\/\//.test(ia)?C[W].setAttribute("target",P):R&&this.isCustomLink(ia)&&C[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(C){C=new mxSvgCanvas2D(C);C.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;C.adaptiveColors=this.getAdaptiveColors();C.pointerEvents=!0;return C};Graph.prototype.getSelectedElement=function(){var C=null;if(window.getSelection){var P=window.getSelection();P.getRangeAt&&P.rangeCount&&(C=P.getRangeAt(0).commonAncestorContainer)}else document.selection&&(C=document.selection.createRange().parentElement());return C};Graph.prototype.getSelectedEditingElement=function(){var C=null;if(null!=this.cellEditor.textarea)for(C=this.getSelectedElement();null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.parentNode;return C};Graph.prototype.getParentByName=function(C,P,R){for(;null!=C&&C.nodeName!=P;){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.getParentByNames=function(C,P,R){for(;null!=C&&!(0<=mxUtils.indexOf(P,C.nodeName));){if(C==R)return null;C=C.parentNode}return C};Graph.prototype.selectNode=function(C){var P=null;if(window.getSelection){if(P=window.getSelection(),P.getRangeAt&&P.rangeCount){var R=document.createRange();R.selectNode(C);P.removeAllRanges();P.addRange(R)}}else(P=document.selection)&&"Control"!=P.type&&(C=P.createRange(),C.collapse(!0),R=P.createRange(),-R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,P,R){var W=this.getCellGeometry(C);if(null!=W){W=W.clone();if(null!=W.points)for(var ja=0;ja<W.points.length;ja++)P?W.points[ja].x=R+(R-W.points[ja].x):W.points[ja].y=R+(R-W.points[ja].y);ja=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ja(W.getTerminalPoint(!0));ja(W.getTerminalPoint(!1));this.model.setGeometry(C,W)}};Graph.prototype.flipChildren=function(C,P,R){this.model.beginUpdate();try{for(var W=-this.model.getChildCount(C),ja=0;ja<W;ja++){var ka=this.model.getChildAt(C,ja);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,P){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],W=0;W<C.length;W++)if(this.model.isEdge(C[W])){var ja=this.view.getState(C[W]);-null!=ja&&this.flipEdgePoints(C[W],P,(P?ja.getCenterX():ja.getCenterY())/this.view.scale-(P?ja.origin.x:ja.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(C[W]);null!=ka&&this.flipChildren(C[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(C[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,P){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();-try{for(var W=0;W<C.length;W++){var ja=this.model.getParent(C[W]);if(this.isTable(ja)){var ka=this.getCellGeometry(C[W]),pa=this.getCellGeometry(ja);null!=ka&&null!=pa&&(pa=pa.clone(),pa.height-=ka.height,this.model.setGeometry(ja,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(C):null;this.removeCells(C,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};-Graph.prototype.insertTableColumn=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ja=0;if(this.isTableCell(C)){var ka=R.getParent(C);W=R.getParent(ka);ja=mxUtils.indexOf(R.getChildCells(ka,!0),C)}else this.isTableRow(C)?W=R.getParent(C):C=R.getChildCells(W,!0)[0],P||(ja=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ta=R.getChildCells(pa[C],!0)[ja],ua=R.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Ia=-this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ia){null!=Ia.alternateBounds&&(Ia.width=Ia.alternateBounds.width,Ia.height=Ia.alternateBounds.height,Ia.alternateBounds=null);xa=Ia.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ia.height=Va.height)}R.add(pa[C],ua,ja+(P?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=xa,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=-function(C){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:P.getParent(C);var W=P.getChildCells(R,!0);0==W.length?P.remove(R):(R==C&&(C=W[W.length-1]),P.remove(C))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){W=C;var ja=R.getChildCells(W,!0);C=ja[P?0:ja.length-1]}else W=R.getParent(C);var ka=W.getIndex(C);-C=R.cloneCell(C,!1);C.value=null;R.add(W,C,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ja=C;if(this.isTableCell(C))ja=R.getParent(C),W=R.getParent(ja);else if(this.isTableRow(C))W=R.getParent(C);else{var ka=R.getChildCells(W,!0);ja=ka[P?0:ka.length-1]}var pa=R.getChildCells(ja,!0),xa=W.getIndex(ja);ja=R.cloneCell(ja,!1);ja.value=null;var ta=this.getCellGeometry(ja);if(null!=ta){for(ka=0;ka<pa.length;ka++){C=R.cloneCell(pa[ka],-!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ja.insert(C)}R.add(W,ja,xa+(P?0:1));var Ia=this.getCellGeometry(W);null!=Ia&&(Ia=Ia.clone(),Ia.height+=ta.height,R.setGeometry(W,Ia))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var P=this.getModel();-P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(W=P.getParent(C));this.isTableRow(W)&&(R=P.getParent(W));var ja=P.getChildCells(R,!0);if(0==ja.length)P.remove(R);else{this.isTableRow(W)||(W=ja[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ka,C));for(W=C=0;W<ja.length;W++){var xa=P.getChildCells(ja[W],!0)[pa];P.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(C=Math.max(C,ta.width))}var ua=this.getCellGeometry(R);-null!=ua&&(ua=ua.clone(),ua.width-=C,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var P=this.getModel();P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(C=W=P.getParent(C));this.isTableRow(C)&&(R=P.getParent(W));var ja=P.getChildCells(R,!0);if(1>=ja.length)P.remove(R);else{this.isTableRow(W)||(W=ja[ja.length-1]);P.remove(W);C=0;var ka=this.getCellGeometry(W);null!=ka&&(C=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=-C,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(C,P){for(var R=C.tBodies[0],W=R.rows[0].cells,ja=C=0;ja<W.length;ja++){var ka=W[ja].getAttribute("colspan");C+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ja=0;ja<C;ja++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(C,P){C.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(C,P){var R=C.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ja=document.createElement("th");-R.rows[W].appendChild(ja);mxUtils.br(ja)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)W=C.rows[R].insertCell(P),mxUtils.br(W);return C.rows[0].cells[0<=P?P:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(C,P){if(0<=P){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>P&&C[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");-R.innerHTML=C;C=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=C.appendChild(W);P.insertNode(C)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(C)};Graph.prototype.createLinkForHint=function(C,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}C=null!=C?C:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(C)?this.getLinkTitle(C):C;var ja=document.createElement("a");-ja.setAttribute("rel",this.linkRelation);ja.setAttribute("href",this.getAbsoluteUrl(C));ja.setAttribute("title",W(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&ja.setAttribute("target",this.linkTarget);mxUtils.write(ja,W(P,40));this.isCustomLink(C)&&mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(C,R);mxEvent.consume(ka)}));return ja};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=+R.setEndPoint("StartToStart",C),R.select())};Graph.prototype.flipEdgePoints=function(C,P,R){var W=this.getCellGeometry(C);if(null!=W){W=W.clone();if(null!=W.points)for(var ia=0;ia<W.points.length;ia++)P?W.points[ia].x=R+(R-W.points[ia].x):W.points[ia].y=R+(R-W.points[ia].y);ia=function(ka){null!=ka&&(P?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ia(W.getTerminalPoint(!0));ia(W.getTerminalPoint(!1));this.model.setGeometry(C,W)}};Graph.prototype.flipChildren=function(C,P,R){this.model.beginUpdate();try{for(var W=+this.model.getChildCount(C),ia=0;ia<W;ia++){var ka=this.model.getChildAt(C,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,P,R);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),P?pa.x=R+(R-pa.x-pa.width):pa.y=R+(R-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(C,P){this.model.beginUpdate();try{C=this.model.getTopmostCells(C);for(var R=[],W=0;W<C.length;W++)if(this.model.isEdge(C[W])){var ia=this.view.getState(C[W]);+null!=ia&&this.flipEdgePoints(C[W],P,(P?ia.getCenterX():ia.getCenterY())/this.view.scale-(P?ia.origin.x:ia.origin.y)-(P?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(C[W]);null!=ka&&this.flipChildren(C[W],P,P?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(C[W])}this.toggleCellStyles(P?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(C,P){var R=null;if(null!=C&&0<C.length){this.model.beginUpdate();+try{for(var W=0;W<C.length;W++){var ia=this.model.getParent(C[W]);if(this.isTable(ia)){var ka=this.getCellGeometry(C[W]),pa=this.getCellGeometry(ia);null!=ka&&null!=pa&&(pa=pa.clone(),pa.height-=ka.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(C):null;this.removeCells(C,P)}finally{this.model.endUpdate()}if(null!=xa)for(R=[],W=0;W<xa.length;W++)this.model.contains(xa[W])&&(this.model.isVertex(xa[W])||this.model.isEdge(xa[W]))&&R.push(xa[W])}return R};+Graph.prototype.insertTableColumn=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=0;if(this.isTableCell(C)){var ka=R.getParent(C);W=R.getParent(ka);ia=mxUtils.indexOf(R.getChildCells(ka,!0),C)}else this.isTableRow(C)?W=R.getParent(C):C=R.getChildCells(W,!0)[0],P||(ia=R.getChildCells(C,!0).length-1);var pa=R.getChildCells(W,!0),xa=Graph.minTableColumnWidth;for(C=0;C<pa.length;C++){var ta=R.getChildCells(pa[C],!0)[ia],ua=R.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Ia=+this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Ia){null!=Ia.alternateBounds&&(Ia.width=Ia.alternateBounds.width,Ia.height=Ia.alternateBounds.height,Ia.alternateBounds=null);xa=Ia.width;var Va=this.getCellGeometry(pa[C]);null!=Va&&(Ia.height=Va.height)}R.add(pa[C],ua,ia+(P?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=xa,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=+function(C){var P=this.getModel();P.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(C).childLayout?C:P.getParent(C);var W=P.getChildCells(R,!0);0==W.length?P.remove(R):(R==C&&(C=W[W.length-1]),P.remove(C))}finally{P.endUpdate()}};Graph.prototype.insertLane=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(C).childLayout){W=C;var ia=R.getChildCells(W,!0);C=ia[P?0:ia.length-1]}else W=R.getParent(C);var ka=W.getIndex(C);+C=R.cloneCell(C,!1);C.value=null;R.add(W,C,ka+(P?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(C,P){var R=this.getModel();R.beginUpdate();try{var W=C,ia=C;if(this.isTableCell(C))ia=R.getParent(C),W=R.getParent(ia);else if(this.isTableRow(C))W=R.getParent(C);else{var ka=R.getChildCells(W,!0);ia=ka[P?0:ka.length-1]}var pa=R.getChildCells(ia,!0),xa=W.getIndex(ia);ia=R.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);if(null!=ta){for(ka=0;ka<pa.length;ka++){C=R.cloneCell(pa[ka],+!1);C.value=null;C.style=mxUtils.setStyle(mxUtils.setStyle(C.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(C);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(C)}R.add(W,ia,xa+(P?0:1));var Ia=this.getCellGeometry(W);null!=Ia&&(Ia=Ia.clone(),Ia.height+=ta.height,R.setGeometry(W,Ia))}}finally{R.endUpdate()}};Graph.prototype.deleteTableColumn=function(C){var P=this.getModel();+P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(W=P.getParent(C));this.isTableRow(W)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(0==ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[0]);var ka=P.getChildCells(W,!0);if(1>=ka.length)P.remove(R);else{var pa=ka.length-1;this.isTableCell(C)&&(pa=mxUtils.indexOf(ka,C));for(W=C=0;W<ia.length;W++){var xa=P.getChildCells(ia[W],!0)[pa];P.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(C=Math.max(C,ta.width))}var ua=this.getCellGeometry(R);+null!=ua&&(ua=ua.clone(),ua.width-=C,P.setGeometry(R,ua))}}}finally{P.endUpdate()}};Graph.prototype.deleteTableRow=function(C){var P=this.getModel();P.beginUpdate();try{var R=C,W=C;this.isTableCell(C)&&(C=W=P.getParent(C));this.isTableRow(C)&&(R=P.getParent(W));var ia=P.getChildCells(R,!0);if(1>=ia.length)P.remove(R);else{this.isTableRow(W)||(W=ia[ia.length-1]);P.remove(W);C=0;var ka=this.getCellGeometry(W);null!=ka&&(C=ka.height);var pa=this.getCellGeometry(R);null!=pa&&(pa=pa.clone(),pa.height-=+C,P.setGeometry(R,pa))}}finally{P.endUpdate()}};Graph.prototype.insertRow=function(C,P){for(var R=C.tBodies[0],W=R.rows[0].cells,ia=C=0;ia<W.length;ia++){var ka=W[ia].getAttribute("colspan");C+=null!=ka?parseInt(ka):1}P=R.insertRow(P);for(ia=0;ia<C;ia++)mxUtils.br(P.insertCell(-1));return P.cells[0]};Graph.prototype.deleteRow=function(C,P){C.tBodies[0].deleteRow(P)};Graph.prototype.insertColumn=function(C,P){var R=C.tHead;if(null!=R)for(var W=0;W<R.rows.length;W++){var ia=document.createElement("th");+R.rows[W].appendChild(ia);mxUtils.br(ia)}C=C.tBodies[0];for(R=0;R<C.rows.length;R++)W=C.rows[R].insertCell(P),mxUtils.br(W);return C.rows[0].cells[0<=P?P:C.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(C,P){if(0<=P){C=C.tBodies[0].rows;for(var R=0;R<C.length;R++)C[R].cells.length>P&&C[R].deleteCell(P)}};Graph.prototype.pasteHtmlAtCaret=function(C){if(window.getSelection){var P=window.getSelection();if(P.getRangeAt&&P.rangeCount){P=P.getRangeAt(0);P.deleteContents();var R=document.createElement("div");+R.innerHTML=C;C=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=C.appendChild(W);P.insertNode(C)}}else(P=document.selection)&&"Control"!=P.type&&P.createRange().pasteHTML(C)};Graph.prototype.createLinkForHint=function(C,P,R){function W(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}C=null!=C?C:"javascript:void(0);";if(null==P||0==P.length)P=this.isCustomLink(C)?this.getLinkTitle(C):C;var ia=document.createElement("a");+ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(C));ia.setAttribute("title",W(this.isCustomLink(C)?this.getLinkTitle(C):C,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,W(P,40));this.isCustomLink(C)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(C,R);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,pa){this.popupMenuHandler.hideMenu()});var C=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=C.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var pa=this.getCellAt(ka.graphX,ka.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(pa),null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=-ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var P=!1,R=!1,W=!1,ja=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=this.popupMenuHandler.isMenuShowing());ja.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ka,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=+ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var P=!1,R=!1,W=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),P=this.isCellSelected(pa.getCell()),R=this.isSelectionEmpty(),W=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ka,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||!W&&!xa&&(R&&null==pa.getCell()&&this.isSelectionEmpty()||P&&this.isCellSelected(pa.getCell())));xa=!P||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ua=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(pa.getX()+ua.x+1,pa.getY()+ua.y+1,ta,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var C=this.graph.view.getState(this.editingCell);return null!=C&&1==C.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var C="";window.getSelection?C=window.getSelection():document.getSelection?C=document.getSelection():document.selection&&(C=document.selection.createRange().text);return""!=C};mxCellEditor.prototype.insertTab=function(C){var P=this.textarea.ownerDocument.defaultView.getSelection(),R=P.getRangeAt(0);C=Graph.createTabNode(C);R.insertNode(C);R.setStartAfter(C);R.setEndAfter(C);P.removeAllRanges();P.addRange(R)};mxCellEditor.prototype.alignText=function(C,P){var R=this.graph.getView().getState(this.editingCell);if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,-mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ja=null!=P&&mxEvent.isShiftDown(P);if(ja||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ja||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(C)}W||document.execCommand("justify"+C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=+mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ia=null!=P&&mxEvent.isShiftDown(P);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||W||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(C)}W||document.execCommand("justify"+C.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var C=window.getSelection();if(C.getRangeAt&&C.rangeCount){for(var P=[],R=0,W=C.rangeCount;R<W;++R)P.push(C.getRangeAt(R));return P}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(C){try{if(C)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var P=0,R=C.length;P<R;++P)sel.addRange(C[P])}else document.selection&&C.select&&C.select()}catch(W){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(C){null!=C.text&&(C.text.replaceLinefeeds="0"!=mxUtils.getValue(C.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(C,P){this.isKeepFocusEvent(C)||!mxEvent.isAltDown(C.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(C){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var M=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(C,P){C=this.graph.getStartEditingCell(C,P);M.apply(this,arguments);var R=this.graph.view.getState(C);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(C)};mxCellEditor.prototype.toggleViewMode=function(){var C=this.graph.view.getState(this.editingCell);if(null!=C){var P=null!=C&&"0"!=mxUtils.getValue(C.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=Graph.sanitizeHtml(P?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className=-"mxCellEditor geContentEditable";ta=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);P=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ja=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,+"mxCellEditor geContentEditable";ta=mxUtils.getValue(C.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);P=mxUtils.getValue(C.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(C.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&pa.push("underline");(mxUtils.getValue(C.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.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=-pa.join(" ");this.textarea.style.fontWeight=ja?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=P;this.textarea.style.textAlign=W;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));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());+pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=P;this.textarea.style.textAlign=W;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));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(P?xa.replace(/\n/g,"").replace(/<br\s*.?>/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=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(C,P){if(null!=this.textarea)if(C=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=C){var R=C.view.scale;this.bounds=mxRectangle.fromRectangle(C);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=@@ -2671,36 +2671,36 @@ function(C){if("0"==mxUtils.getValue(C.style,"html","0"))return mxCellEditorGetCthis.graph.isTransparentState(C)&&this.graph.removeCells([C.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getBorderColor=function(C){C=mxUtils.getValue(C.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);C==mxConstants.NONE&&(C=null);return C};mxCellEditor.prototype.getMinimumSize=function(C){var P=this.graph.getView().scale;return new mxRectangle(0,0,null==C.text?30:C.text.size*P+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(C,P){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(P.getEvent)};mxGraphView.prototype.formatUnitText=function(C){return C?f(C,this.unit):C};mxGraphHandler.prototype.updateHint=function(C){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var P=this.graph.view.translate,R=this.graph.view.scale;C=this.roundLength((this.bounds.x+this.currentDx)/R-P.x);P=this.roundLength((this.bounds.y+this.currentDy)/R-P.y);R=this.graph.view.unit;this.hint.innerHTML=f(C,R)+", "+f(P,R);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ia=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,P){ia.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var W=this.graph.model.getParent(C),ja=null!=W?this.graph.getCellGeometry(W):null;if(null!=ja&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));-R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);ja=ja.clone();R?ja.height=P.height+pa.y+pa.height+2*ka:ja.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ja)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ja.push(xa))}for(var P=da.apply(this,arguments),R=new mxDictionary,W=this.graph.model,ja=[],ka=0;ka<P.length;ka++){var pa=-P[ka];this.graph.isTableCell(pa)?C(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&C(W.getParent(pa));C(pa)}return ja};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&-!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var P=X.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var ca=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(C){var P=ca.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=+function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ja=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(C,P){ja.apply(this,arguments);var R=this.graph.getCellStyle(C);if(null==R.childLayout){var W=this.graph.model.getParent(C),ia=null!=W?this.graph.getCellGeometry(W):null;if(null!=ia&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));+R="1"==mxUtils.getValue(R,"horizontalStack","1");var pa=this.graph.getActualStartSize(W);ia=ia.clone();R?ia.height=P.height+pa.y+pa.height+2*ka:ia.width=P.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(W,ia)}}};var ca=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function C(xa){R.get(xa)||(R.put(xa,!0),ia.push(xa))}for(var P=ca.apply(this,arguments),R=new mxDictionary,W=this.graph.model,ia=[],ka=0;ka<P.length;ka++){var pa=+P[ka];this.graph.isTableCell(pa)?C(W.getParent(W.getParent(pa))):this.graph.isTableRow(pa)&&C(W.getParent(pa));C(pa)}return ia};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(C){return ba.apply(this,arguments)&&!mxEvent.isControlDown(C.getEvent())&&!mxEvent.isShiftDown(C.getEvent())};var oa=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return oa.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&+!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(C){var P=Y.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};var da=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(C){var P=da.apply(this,arguments);P.stroke="#C0C0C0";P.strokewidth=1;return P};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var C=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+C.x/2,this.bounds.y+this.rotationHandleVSpacing-C.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(C,P){return this.graph.isRecursiveVertexResize(C)&&!mxEvent.isAltDown(P.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(C,P){return mxEvent.isControlDown(P.getEvent())||mxEvent.isMetaDown(P.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Z=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Z.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var k=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(C){return C.tableHandle||k.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var C=0;this.graph.isTableRow(this.state.cell)?C=1:this.graph.isTableCell(this.state.cell)&&(C=2);return C};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return v.apply(this,arguments).grow(-this.getSelectionBorderInset())};var J=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==J&&(J=mxCellRenderer.defaultShapes.tableLine);var C=N.apply(this,arguments);-if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(ab,Pa,Sa){for(var gb=[],fb=0;fb<ab.length;fb++){var cb=ab[fb];gb.push(null==cb?null:new mxPoint((ta+cb.x+Pa)*ka,(ua+cb.y+Sa)*ka))}return gb},R=this,W=this.graph,ja=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,ua=this.state.origin.y+W.view.translate.y;null==C&&(C=[]);var Ia=W.view.getCellStates(ja.getChildCells(this.state.cell,!0));if(0<Ia.length){var Va=-ja.getChildCells(Ia[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Ta=W.getTableLines(this.state.cell,!0,!1);for(ja=0;ja<Ia.length;ja++)mxUtils.bind(this,function(ab){var Pa=Ia[ab],Sa=null;if(W.isCellMovable(Pa.cell)){Sa=ab<Ia.length-1?Ia[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa.cell):null;var gb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Ta[ab]?new J(Ta[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;+if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var P=function(ab,Pa,Sa){for(var gb=[],fb=0;fb<ab.length;fb++){var cb=ab[fb];gb.push(null==cb?null:new mxPoint((ta+cb.x+Pa)*ka,(ua+cb.y+Sa)*ka))}return gb},R=this,W=this.graph,ia=W.model,ka=W.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,ua=this.state.origin.y+W.view.translate.y;null==C&&(C=[]);var Ia=W.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Ia.length){var Va=+ia.getChildCells(Ia[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Ta=W.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Ia.length;ia++)mxUtils.bind(this,function(ab){var Pa=Ia[ab],Sa=null;if(W.isCellMovable(Pa.cell)){Sa=ab<Ia.length-1?Ia[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa.cell):null;var gb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Ta[ab]?new J(Ta[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Sa=new mxHandle(Pa,"row-resize",null,Sa);Sa.tableHandle=!0;var fb=0;Sa.shape.node.parentNode.insertBefore(Sa.shape.node,Sa.shape.node.parentNode.firstChild);Sa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==fb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Ta[ab],0,fb),this.shape.updateBoundsFromLine();else{var eb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+fb*ka;this.shape.bounds.x=pa.x+(ab==Ia.length-1?0:eb.x*ka);this.shape.bounds.width=pa.width-(ab==Ia.length-1?0:eb.width+eb.x+ka)}this.shape.redraw()}};var cb=!1;Sa.setPosition=function(eb,lb,kb){fb=Math.max(Graph.minTableRowHeight-eb.height,lb.y-eb.y-eb.height);cb=mxEvent.isShiftDown(kb.getEvent());null!=gb&&cb&&(fb=Math.min(fb,gb.height-Graph.minTableRowHeight))};Sa.execute=function(eb){if(0!=fb)W.setTableRowHeight(this.state.cell,fb,!cb);else if(!R.blockDelayedSelection){var lb=W.getCellAt(eb.getGraphX(),eb.getGraphY())||pa.cell;-W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Sa.reset=function(){fb=0}}C.push(Sa)})(ja);for(ja=0;ja<Va.length;ja++)mxUtils.bind(this,function(ab){var Pa=W.view.getState(Va[ab]),Sa=W.getCellGeometry(Va[ab]),gb=null!=Sa.alternateBounds?Sa.alternateBounds:Sa;null==Pa&&(Pa=new mxCellState(W.view,Va[ab],W.getCellStyle(Va[ab])),Pa.x=pa.x+Sa.x*ka,Pa.y=pa.y+Sa.y*ka,Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Sa=ab<Va.length-1?Va[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa):null;+W.graphHandler.selectCellForEvent(lb,eb)}fb=0};Sa.reset=function(){fb=0}}C.push(Sa)})(ia);for(ia=0;ia<Va.length;ia++)mxUtils.bind(this,function(ab){var Pa=W.view.getState(Va[ab]),Sa=W.getCellGeometry(Va[ab]),gb=null!=Sa.alternateBounds?Sa.alternateBounds:Sa;null==Pa&&(Pa=new mxCellState(W.view,Va[ab],W.getCellStyle(Va[ab])),Pa.x=pa.x+Sa.x*ka,Pa.y=pa.y+Sa.y*ka,Pa.width=gb.width*ka,Pa.height=gb.height*ka,Pa.updateCachedBounds());Sa=ab<Va.length-1?Va[ab+1]:null;Sa=null!=Sa?W.getCellGeometry(Sa):null;var fb=null!=Sa&&null!=Sa.alternateBounds?Sa.alternateBounds:Sa;Sa=null!=Wa[ab]?new J(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Sa.isDashed=xa.isDashed;Sa.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Sa);Pa.tableHandle=!0;var cb=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==J)this.shape.line=P(Wa[ab],cb,0),this.shape.updateBoundsFromLine();else{var lb=W.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(gb.width+cb)*ka;this.shape.bounds.y=pa.y+(ab==Va.length-1?0:lb.y*ka);this.shape.bounds.height=pa.height-(ab==Va.length-1?0:(lb.height+lb.y)*ka)}this.shape.redraw()}};var eb=!1;Pa.setPosition=function(lb,kb,ob){cb=Math.max(Graph.minTableColumnWidth-gb.width,kb.x-lb.x-gb.width);eb=mxEvent.isShiftDown(ob.getEvent());null==fb||eb||(cb=Math.min(cb,fb.width--Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};C.push(Pa)})(ja)}}return null!=C?C.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=+Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=cb)W.setTableColumnWidth(this.state.cell,cb,eb);else if(!R.blockDelayedSelection){var kb=W.getCellAt(lb.getGraphX(),lb.getGraphY())||pa.cell;W.graphHandler.selectCellForEvent(kb,lb)}cb=0};Pa.positionChanged=function(){};Pa.reset=function(){cb=0};C.push(Pa)})(ia)}}return null!=C?C.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){T.apply(this,arguments);if(null!=this.moveHandles)for(var P=0;P<this.moveHandles.length;P++)null!=this.moveHandles[P]&&(this.moveHandles[P].node.style.visibility=C?"":"hidden");if(null!=this.cornerHandles)for(P=0;P<this.cornerHandles.length;P++)this.cornerHandles[P].node.style.visibility=C?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var C=this.isMoveHandlesVisible();C&&null==this.moveHandles?-this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=this.graph,P=C.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ja){if(null!=ja&&P.isVertex(ja.cell)&&C.isCellMovable(ja.cell)){var ka=-new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ja;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ja.cell)||-this.graph.selectCellForEvent(ja.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ja.cell,pa),mxEvent.consume(pa))}));+this.moveHandles=this.createMoveHandles():C||null==this.moveHandles||this.destroyMoveHandles();if(C&&null==this.moveHandles){for(C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].parentNode.removeChild(this.moveHandles[C]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var C=this.graph,P=C.model,R=[],W=0;W<P.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ia){if(null!=ia&&P.isVertex(ia.cell)&&C.isCellMovable(ia.cell)){var ka=+new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||+this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(P.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&this.moveHandles[C].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var C=0;C<this.cornerHandles.length;C++)null!=this.cornerHandles[C]&&null!=this.cornerHandles[C].node&&null!=this.cornerHandles[C].node.parentNode&&this.cornerHandles[C].node.parentNode.removeChild(this.cornerHandles[C].node);this.cornerHandles=null}};var V=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){V.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var C=0;4>C;C++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();C=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var U=-mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ja=-this.customHandles[W].shape.bounds,ka=ja.getCenterX(),pa=ja.getCenterY();if(Math.abs(this.state.x-ka)<ja.width/2||Math.abs(this.state.y-pa)<ja.height/2||Math.abs(this.state.x+this.state.width-ka)<ja.width/2||Math.abs(this.state.y+this.state.height-pa)<ja.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),C.x=this.sizers[0].bounds.width+P,C.y=this.sizers[0].bounds.height+P):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=+mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var C=new mxPoint(0,0),P=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ia=+this.customHandles[W].shape.bounds,ka=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(P/=2,this.graph.isTable(this.state.cell)&&(P+=7),C.x=this.sizers[0].bounds.width+P,C.y=this.sizers[0].bounds.height+P):C=U.apply(this,arguments);return C};mxVertexHandler.prototype.updateHint=function(C){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+"°";else{C=this.state.view.scale;var P=this.state.view.unit;this.hint.innerHTML=f(this.roundLength(this.bounds.width/C),P)+" x "+f(this.roundLength(this.bounds.height/C),P)}C=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||-"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=C.y+C.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Y=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){Y.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),+"0");null==C&&(C=this.bounds);this.hint.style.left=C.x+Math.round((C.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=C.y+C.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var X=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){X.apply(this,arguments);var C=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);this.updateLinkHint(C,P)};var fa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(C,P){fa.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 na=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(C,P){na.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&-1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(C,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ja=this.graph.view.scale,ka=this.roundLength(P.x/ja-W.x);W=this.roundLength(P.y/ja-W.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==-mxConstants.POINTS?Math.round(R.length/ja):f(R.length/ja,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=+1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(C,P,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(P.x/ia-W.x);W=this.roundLength(P.y/ia-W.y);var pa=this.graph.view.unit;this.hint.innerHTML=f(ka,pa)+", "+f(W,pa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(pa==+mxConstants.POINTS?Math.round(R.length/ia):f(R.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(C.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(C.getGraphY(),P.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"/>');@@ -2714,9 +2714,9 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.protfunction(C){return!mxEvent.isShiftDown(C.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(C){return!mxEvent.isShiftDown(C.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(C){return mxEvent.isMouseEvent(C.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(P)||mxEvent.isPopupTrigger(P)&&(null==C.getState()||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P))}}else mxPanningHandler.prototype.isPanningTrigger=function(C){var P=C.getEvent();return mxEvent.isLeftMouseButton(P)&&(this.useLeftButtonForPanning&&null==C.getState()||mxEvent.isControlDown(P)&&!mxEvent.isShiftDown(P))||this.usePopupTrigger&&mxEvent.isPopupTrigger(P)};mxRubberband.prototype.isSpaceEvent=function(C){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(C.getEvent())||mxEvent.isMetaDown(C.getEvent()))&&mxEvent.isShiftDown(C.getEvent())&&mxEvent.isAltDown(C.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(C,P){if(this.cancelled)this.cancelled=!1,P.consume();else{var R=-null!=this.div&&"none"!=this.div.style.display,W=null,ja=null,ka=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ja=this.first.y,C=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ja)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(C=this.graph.snap(C),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();-try{var pa=this.graph.getCellsBeyond(W,ja,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ta=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(C,ka),this.graph.model.setGeometry(pa[R],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(C,-P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-C,ja=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ja)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(P)?(C=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||+null!=this.div&&"none"!=this.div.style.display,W=null,ia=null,ka=C=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ia=this.first.y,C=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(C=this.graph.snap(C),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(C)<this.graph.tolerance&&(C=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(P)){this.graph.model.beginUpdate();+try{var pa=this.graph.getCellsBeyond(W,ia,this.graph.getDefaultParent(),!0,!0);for(R=0;R<pa.length;R++)if(this.graph.isCellMovable(pa[R])){var xa=this.graph.view.getState(pa[R]),ta=this.graph.getCellGeometry(pa[R]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(C,ka),this.graph.model.setGeometry(pa[R],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,P.getEvent());P.consume()}}};mxRubberband.prototype.mouseMove=function(C,+P){if(!P.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);C=mxUtils.getOffset(this.graph.container);R.x-=C.x;R.y-=C.y;C=P.getX()+R.x;R=P.getY()+R.y;var W=this.first.x-C,ia=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(C,R),this.isSpaceEvent(P)?(C=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(P.getEvent())||(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=C-this.width),this.y<this.first.y&&(this.y=R-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)),P.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var qa=(new Date).getTime(),ya=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=@@ -2725,16 +2725,16 @@ function(C,P,R,W){wa.apply(this,arguments);R!=this.currentTerminalState?(qa=(newnull!=C&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(C,P,R,W){W=P==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:P==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(C){if(null!=C&&1==C.length){var P=this.graph.getModel(),R=P.getParent(C[0]),W=this.graph.getCellGeometry(C[0]);if(P.isEdge(R)&&null!=W&&W.relative&&(P=this.graph.view.getState(C[0]),null!=P&&2>P.width&&2>P.height&&null!=P.text&&null!=P.text.boundingBox))return mxRectangle.fromRectangle(P.text.boundingBox)}return Ba.apply(this,arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var C=Ga.apply(this,arguments),P=[],R=0;R<C.length;R++)"1"!=mxUtils.getValue(C[R].style,"part","0")&&P.push(C[R]);return P};var Ma=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(C){var P=this.graph.getModel(),R=P.getParent(C.cell),W=this.graph.getCellGeometry(C.cell);return P.isEdge(R)&&null!=W&&W.relative&&2>C.width&&2>C.height&&null!=-C.text&&null!=C.text.boundingBox?(P=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var ra=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ja=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ja||!ja.relative||null==this.state||+C.text&&null!=C.text.boundingBox?(P=C.text.unrotatedBoundingBox||C.text.boundingBox,new mxRectangle(Math.round(P.x),Math.round(P.y),Math.round(P.width),Math.round(P.height))):Ma.apply(this,arguments)};var ra=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(C,P){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(P)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ia||!ia.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ra.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var C=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),P=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&C==mxConstants.NONE&&P==mxConstants.NONE?(C=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,C,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(C,P){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 Da=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(C,P){Da.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&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(C,P){try{if(null==C&&(null==P||0==P.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=C||null!=P&&0<P.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-W.style.paddingLeft="4px";W.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),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!=C){var ja=document.createElement("div");-ja.style.display="flex";ja.style.alignItems="center";ja.appendChild(this.graph.createLinkForHint(C,null,this.state.cell));this.linkHint.appendChild(ja);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=R.cloneNode(!0);ja.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=W.cloneNode(!0);ja.appendChild(pa);mxEvent.addListener(pa,-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=P)for(ja=0;ja<P.length;ja++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=C||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ia=R.cloneNode(!0);ua.appendChild(Ia);var Va=mxUtils.bind(this,function(Wa){var Ta=+W.style.paddingLeft="4px";W.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),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!=C){var ia=document.createElement("div");+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(C,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=R.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=W.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=P)for(ia=0;ia<P.length;ia++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=C||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Ia=R.cloneNode(!0);ua.appendChild(Ia);var Va=mxUtils.bind(this,function(Wa){var Ta=document.createElement("div");Ta.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Ta.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Ta.innerHTML)}});mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Va);mxEvent.consume(Wa)}));Ia=W.cloneNode(!0);ua.appendChild(Ia);mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){Va();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(P[ja],ja)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,+"",mxResources.get("ok"),Va);mxEvent.consume(Wa)}));Ia=W.cloneNode(!0);ua.appendChild(Ia);mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(Wa){Va();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(P[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var va=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var C=va.apply(this,arguments);C.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return C};var Na=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Na.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var C=0;C<this.moveHandles.length;C++)null!=this.moveHandles[C]&&(this.moveHandles[C].bounds.x=Math.round(this.moveHandles[C].rowState.x+this.moveHandles[C].rowState.width-this.moveHandles[C].bounds.width/2),this.moveHandles[C].bounds.y=Math.round(this.moveHandles[C].rowState.y+(this.moveHandles[C].rowState.height-this.moveHandles[C].bounds.height)/2),this.moveHandles[C].redraw());if(null!=this.cornerHandles){C=this.getSelectionBorderInset();var P=this.cornerHandles,R=P[0].bounds.height/2;P[0].bounds.x=this.state.x-P[0].bounds.width/2+C;P[0].bounds.y=this.state.y-R+C;P[0].redraw();P[1].bounds.x=P[0].bounds.x+this.state.width-2*C;P[1].bounds.y=P[0].bounds.y;P[1].redraw();P[2].bounds.x=P[0].bounds.x;P[2].bounds.y=this.state.y+this.state.height-2*C;P[2].redraw();P[3].bounds.x=P[1].bounds.x;P[3].bounds.y=P[2].bounds.y;P[3].redraw();for(C=0;C<this.cornerHandles.length;C++)this.cornerHandles[C].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",@@ -2743,11 +2743,11 @@ this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,P=null!=this.statethis.destroyMoveHandles();this.destroyCornerHandles();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 Ra=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ra.apply(this),null!=this.state&&null!=this.linkHint)){var C=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(C=new mxRectangle(C.x,C.y,C.width,C.height),C.add(this.state.text.bounds));this.linkHint.style.left=C.x+C.width/2+"px";this.linkHint.style.top=Math.round(C.y+C.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.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(d,p,A){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=A?A:1;this.updateBoundsFromLine()}function f(){mxSwimlane.call(this)}function l(){mxSwimlane.call(this)}function u(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function E(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function c(){mxShape.call(this)}-function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function I(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function aa(){mxActor.call(this)}function ia(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");+function g(){mxShape.call(this)}function m(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1}function n(){mxActor.call(this)}function x(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function I(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}-function U(){mxShape.call(this)}function Y(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Oa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ja(){mxEllipse.call(this)}+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function Y(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function N(){mxShape.call(this)}function T(){mxShape.call(this)}function V(){mxEllipse.call(this)}+function U(){mxShape.call(this)}function X(){mxShape.call(this)}function fa(){mxRectangleShape.call(this)}function na(){mxShape.call(this)}function la(){mxShape.call(this)}function qa(){mxShape.call(this)}function ya(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function Ma(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Da(){mxActor.call(this)}function va(){mxRectangleShape.call(this)}function Na(){mxActor.call(this)}function Oa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function za(){mxActor.call(this)}function Ea(){mxActor.call(this)}function C(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Va(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function ab(){mxActor.call(this)}function Pa(d,p,A,t){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=A;this.strokewidth=null!=t?t:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Sa(){mxConnector.call(this)}function gb(){mxConnector.call(this)}function fb(d,p,A,t,z,D,G,ea,O,sa){G+=O;var ma=t.clone();t.x-=z*(2*G+O);t.y-=D*(2*G+O);z*=G+O;D*=G+O;return function(){d.ellipse(ma.x-z-G,ma.y-D-G,2*G,2*G);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var A=this.line[p];null!=A&&(A=new mxRectangle(A.x,A.y,this.strokewidth,this.strokewidth),null==d?d=A:d.add(A))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,A,t,z){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,A,t){if(null!=p){var z=null;d.begin();for(var D=0;D<p.length;D++){var G=p[D];null!=G&&(null==z?d.moveTo(G.x+A,G.y+t):null!=z&&d.lineTo(G.x+A,G.y+t));z=G}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=@@ -2785,8 +2785,8 @@ this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};x.prototymxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};Q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t,0),new mxPoint(t-p,z)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(p,0),new mxPoint(t-p,0),-new mxPoint(t,z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",aa);mxUtils.extend(ia,mxActor);ia.prototype.size=.5;ia.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,-z)],this.isRounded,A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ia);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};+new mxPoint(t,z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("trapezoid",aa);mxUtils.extend(ja,mxActor);ja.prototype.size=.5;ja.prototype.redrawPath=function(d,p,A,t,z){d.setFillColor(null);p=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(t,0),new mxPoint(p,0),new mxPoint(p,z/2),new mxPoint(0,z/2),new mxPoint(p,z/2),new mxPoint(p,z),new mxPoint(t,+z)],this.isRounded,A,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ja);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(d,p,A,t,z){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=t/5;d.rect(0,0,p,z);d.fillAndStroke();d.rect(2*p,0,p,z);d.fillAndStroke();d.rect(4*p,0,p,z);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ca);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.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)};ba.prototype.quadTo=function(d,p,A,t){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=t};ba.prototype.curveTo=function(d,p,A,t,z,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=D};ba.prototype.arcTo=function(d,p,A,t,z,D,G){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=G};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var A=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},t=Math.abs(d-this.lastX),z=Math.abs(p-this.lastY),D=Math.sqrt(t*t+z*z);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var G=Math.round(D/10),ea=this.defaultVariation;5>G&&(G=5,ea/=3);var O=A(d-this.lastX)*t/G;A=A(p-this.lastY)*z/G;t/=D;z/=D;for(D=0;D<G;D++){var sa=(Math.random()-.5)*ea;this.originalLineTo.call(this.canvas,O*D+this.lastX-sa*z,A*D+this.lastY-sa*t)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var kb=mxShape.prototype.beforePaint;@@ -2796,10 +2796,10 @@ d.handJiggle.constructor!=ba)pb.apply(this,arguments);else{var D=!0;null!=this.smxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(t*D,z*D)),d.moveTo(p+D,A),d.lineTo(p+t-D,A),d.quadTo(p+t,A,p+t,A+D),d.lineTo(p+t,A+z-D),d.quadTo(p+t,A+z,p+t-D,A+z),d.lineTo(p+D,A+z),d.quadTo(p,A+z,p,A+z-D),d.lineTo(p,A+D),d.quadTo(p,A,p+D,A)):(d.moveTo(p,A),d.lineTo(p+t,A),d.lineTo(p+t,A+z),d.lineTo(p,A+z),d.lineTo(p,A)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,A=d.height;d=new mxRectangle(d.x,d.y,p,A);var t=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;t=Math.max(t,Math.min(p*z,A*z))}d.x+=Math.round(t);d.width-=Math.round(2*t);return d}return d};oa.prototype.paintForeground=function(d,p,A,t,z){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),G=parseFloat(mxUtils.getValue(this.style,"size",this.size));G=D?Math.max(0,Math.min(t,G)):t*Math.max(0,Math.min(1,G));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,G=Math.max(G,-Math.min(t*D,z*D)));G=Math.round(G);d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.moveTo(p+t-G,A);d.lineTo(p+t-G,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(X,mxRectangleShape);X.prototype.paintBackground=function(d,p,A,t,z){d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};X.prototype.paintForeground=function(d,p,A,t,z){};mxCellRenderer.registerShape("transparent",-X);mxUtils.extend(ca,mxHexagon);ca.prototype.size=30;ca.prototype.position=.5;ca.prototype.position2=.5;ca.prototype.base=20;ca.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(d,p,A,t,z){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,+Math.min(t*D,z*D)));G=Math.round(G);d.begin();d.moveTo(p+G,A);d.lineTo(p+G,A+z);d.moveTo(p+t-G,A);d.lineTo(p+t-G,A+z);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(Y,mxRectangleShape);Y.prototype.paintBackground=function(d,p,A,t,z){d.setFillColor(mxConstants.NONE);d.rect(p,A,t,z);d.fill()};Y.prototype.paintForeground=function(d,p,A,t,z){};mxCellRenderer.registerShape("transparent",+Y);mxUtils.extend(da,mxHexagon);da.prototype.size=30;da.prototype.position=.5;da.prototype.position2=.5;da.prototype.base=20;da.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(d,p,A,t,z){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;A=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),G=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-A),new mxPoint(Math.min(t,D+ea),z-A),new mxPoint(G,z),new mxPoint(Math.max(0,D),z-A),new mxPoint(0,z-A)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",-ca);mxUtils.extend(ha,mxActor);ha.prototype.size=.2;ha.prototype.fixedSize=20;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,+da);mxUtils.extend(ha,mxActor);ha.prototype.size=.2;ha.prototype.fixedSize=20;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t-p,0),new mxPoint(t,z/2),new mxPoint(t-p,z),new mxPoint(0,z),new mxPoint(p,z/2)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("step",ha);mxUtils.extend(Z,mxHexagon);Z.prototype.size=.25;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.5*z),new mxPoint(t-p,z),new mxPoint(p,z),new mxPoint(0,.5*z)],this.isRounded,A,!0)};mxCellRenderer.registerShape("hexagon",Z);mxUtils.extend(k,mxRectangleShape);k.prototype.isHtmlAllowed=function(){return!1};k.prototype.paintForeground=function(d,p,A,t,z){var D=Math.min(t/5,z/5)+1;d.begin();d.moveTo(p+t/2,A+D);d.lineTo(p+t/2,A+z-D);d.moveTo(p+D,A+z/2);d.lineTo(p+t-D,A+z/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",k);var sb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=@@ -2809,8 +2809,8 @@ O=this.style["symbol"+D+"VerticalAlign"],sa=this.style["symbol"+D+"Width"],ma=thFa+jb;d.save();ea=new G;ea.style=this.style;G.prototype.paintVertexShape.call(ea,d,db,Fa,sa,ma);d.restore()}D++}while(null!=G)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",v);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(d,p,A,t,z,D){D?(d.moveTo(0,0),d.lineTo(t/2,z/2),d.lineTo(t,0),d.end()):(d.moveTo(0,0),d.lineTo(t,0),d.lineTo(t,z),d.lineTo(0,z),d.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.ellipse(t/4,0,t/2,z/4);d.fillAndStroke();d.begin();d.moveTo(t/2,z/4);d.lineTo(t/2,2*z/3);d.moveTo(t/2,z/3);d.lineTo(0,z/3);d.moveTo(t/2,z/3);d.lineTo(t,z/3);d.moveTo(t/2,2*z/3);d.lineTo(0,z);d.moveTo(t/2,2*z/3);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",N);mxUtils.extend(T,mxShape);T.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};T.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(0,z/4);d.lineTo(0,3*z/4);d.end();d.stroke();d.begin();d.moveTo(0,z/2);d.lineTo(t/6,z/2);d.end();d.stroke();d.ellipse(t/6,0,5*t/6,z);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",T);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+t/8,A+z);d.lineTo(p+7*t/8,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",V);mxUtils.extend(U,mxShape);U.prototype.paintVertexShape=-function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(Y,mxShape);Y.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};Y.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};Y.prototype.paintForeground=-function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,+function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(t,0);d.lineTo(0,z);d.moveTo(0,0);d.lineTo(t,z);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",U);mxUtils.extend(X,mxShape);X.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};X.prototype.paintBackground=function(d,p,A,t,z){d.translate(p,A);d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,0);d.end();d.stroke();d.ellipse(0,z/8,t,7*z/8);d.fillAndStroke()};X.prototype.paintForeground=+function(d,p,A,t,z){d.begin();d.moveTo(3*t/8,z/8*1.1);d.lineTo(5*t/8,z/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",X);mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=40;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};fa.prototype.paintBackground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),G=mxUtils.getValue(this.style,"participant");null==G||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,A,t,D):(G=this.state.view.graph.cellRenderer.getShape(G),null!=G&&G!=fa&&(G=new G,G.apply(this.state),d.save(),G.paintVertexShape(d,p,A,t,D),d.restore()));D<z&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+t/2,A+D),d.lineTo(p+t/2,A+z),d.end(),d.stroke())};fa.prototype.paintForeground=function(d,p,A,t,z){var D=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,A,t,Math.min(z,D))};mxCellRenderer.registerShape("umlLifeline",fa);mxUtils.extend(na,mxShape);na.prototype.width=60;na.prototype.height=30;na.prototype.corner=10;na.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};na.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};na.prototype.paintBackground=function(d,p,A,t,z){var D=this.corner,G=Math.min(t,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",@@ -2818,7 +2818,7 @@ this.width)))),ea=Math.min(z,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.styd.begin();d.moveTo(p,A);d.lineTo(p+G,A);d.lineTo(p+G,A+Math.max(0,ea-1.5*D));d.lineTo(p+Math.max(0,G-D),A+ea);d.lineTo(p,A+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+G,A);d.lineTo(p+t,A);d.lineTo(p+t,A+z);d.lineTo(p,A+z);d.lineTo(p,A+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",na);mxPerimeter.CenterPerimeter=function(d,p,A,t){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,p,A,t){t=fa.prototype.size;null!=p&&(t=mxUtils.getValue(p.style,"size",t)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;A.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+t,A.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,A,t){t=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,A,t){t=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(t+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return A.x<d.getCenterX()&&(t=-1*(t+1)),new mxPoint(d.getCenterX()+t,Math.min(d.y+d.height,Math.max(d.y,A.y)));A.y<d.getCenterY()&&-(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ca.prototype.size))*p.view.scale))),p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);+(t=-1*(t+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,A.x)),d.getCenterY()+t)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,A,t){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",da.prototype.size))*p.view.scale))),p.style),p,A,t)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?K.prototype.fixedSize:K.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(z=z?Math.max(0,Math.min(sa,D)):sa*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G,ea),new mxPoint(G+O,ea+z),new mxPoint(G+O,ea+sa),new mxPoint(G,ea+sa-z),new mxPoint(G,ea)]):(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O,ea),new mxPoint(G+O-z,ea+sa),new mxPoint(G,ea+sa),new mxPoint(G+z,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);t&&(A.x<G||A.x>G+O?d.y=A.y:d.x=A.x);return mxUtils.getPerimeterPoint(ea,d,A)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,A,t){var z="0"!=mxUtils.getValue(p.style,"fixedSize","0"),D=z?aa.prototype.fixedSize:aa.prototype.size;null!=p&&(D=mxUtils.getValue(p.style,"size",D));z&&(D*=p.view.scale);var G=d.x,ea=d.y,O=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(z=z?Math.max(0,Math.min(.5*O,D)):O*Math.max(0,Math.min(1,D)),ea=[new mxPoint(G+z,ea),new mxPoint(G+O-z,ea),new mxPoint(G+O,ea+sa),@@ -2849,8 +2849,8 @@ A=(z-D)/2;D=A+D;var G=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxCoza);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,p,A,t,z){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(t,0);d.quadTo(t-2*p,z/2,t,z);d.lineTo(p,z);d.quadTo(p-2*p,z/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ea);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.close();d.end()};mxCellRenderer.registerShape("or",C);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(d,p,A,t,z){d.moveTo(0,0);d.quadTo(t,0,t,z/2);d.quadTo(t,z,0,z);d.quadTo(t/2,z/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",P);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,p,A,t,z){p=Math.min(t/2,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(t-p,0),new mxPoint(t,.8*p),new mxPoint(t,z),new mxPoint(0,z),new mxPoint(0,.8*p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(d,-p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);-d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ja);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=+p,A,t,z){p=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(t,0),new mxPoint(t,z-p),new mxPoint(t/2,z),new mxPoint(0,z-p)],this.isRounded,A,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);+d.begin();d.moveTo(p+t/2,A+z);d.lineTo(p+t,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke();d.begin();d.moveTo(p+t/2,A);d.lineTo(p+t/2,A+z);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,p,A,t,z){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*t,A+.145*z);d.lineTo(p+.855*t,A+.855*z);d.end();d.stroke();d.begin();d.moveTo(p+.855*t,A+.145*z);d.lineTo(p+.145*t,A+.855*z);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,p,A,t,z){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,A+z/2);d.lineTo(p+t,A+z/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,p,A,t,z){d.begin();d.moveTo(p,A);d.lineTo(p+t,A);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,A+z);d.lineTo(p+t,A+z);d.lineTo(p+t/2,A+z/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,p,A,t,z){var D=d.state.strokeWidth/2,G=10+2*D,ea=A+z-G/2;d.begin();d.moveTo(p,A);d.lineTo(p,A+z);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea-G/2);d.moveTo(p+D,ea);d.lineTo(p+D+G,ea+G/2);d.moveTo(p+D,ea);d.lineTo(p+t-D,ea);d.moveTo(p+t,A);d.lineTo(p+t,A+z);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea-G/2);d.moveTo(p+t-D,ea);d.lineTo(p+t-G-D,ea+G/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Ia,mxEllipse);Ia.prototype.drawHidden=!0;Ia.prototype.paintVertexShape=function(d,p,A,t,z){this.outline||d.setStrokeColor(null);if(null!=@@ -2945,10 +2945,10 @@ A.height/4)},function(A,t){A="0"!=mxUtils.getValue(this.state.style,"fixedSize",A)},function(p,A){var t=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-A.y)/t*2,Math.max(0,p.getCenterX()-A.x)/t*2)))})]},note:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},note2:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size)))));return new mxPoint(p.x+p.width-A,p.y+A)},function(p,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-A.x),Math.min(p.height,A.y-p.y))))})]},manualInput:function(d){var p=[bb(d,["size"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(A.x+A.width/4,A.y+3*t/4)},function(A,t){this.state.style.size=Math.round(Math.max(0,Math.min(A.height,4*(t.y-A.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},dataStorage:function(d){return[bb(d,["size"],function(p){var A="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",A?Ea.prototype.fixedSize:Ea.prototype.size));return new mxPoint(p.x+p.width-t*(A?1:-p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[bb(d,["size","position"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));mxUtils.getValue(this.state.style,-"base",ca.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",ca.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ca.prototype.position2)));return new mxPoint(A.x+t*A.width,A.y+A.height)},-function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position))),D=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",ca.prototype.base)));return new mxPoint(A.x+Math.min(A.width,z*A.width+D),A.y+A.height-t)},function(A,t){var z=-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[bb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"dy",va.prototype.dy)));+p.width),p.getCenterY())},function(p,A){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-A.x)):Math.max(0,Math.min(1,(p.x+p.width-A.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[bb(d,["size","position"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));mxUtils.getValue(this.state.style,+"base",da.prototype.base);return new mxPoint(A.x+z*A.width,A.y+A.height-t)},function(A,t){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(A.height,A.y+A.height-t.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["position2"],function(A){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(A.x+t*A.width,A.y+A.height)},+function(A,t){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(t.x-A.x)/A.width)))/100},!1),bb(d,["base"],function(A){var t=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))),D=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(A.x+Math.min(A.width,z*A.width+D),A.y+A.height-t)},function(A,t){var z=+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(A.width,t.x-A.x-z*A.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},internalStorage:function(d){var p=[bb(d,["dx","dy"],function(A){var t=Math.max(0,Math.min(A.width,mxUtils.getValue(this.state.style,"dx",va.prototype.dx))),z=Math.max(0,Math.min(A.height,mxUtils.getValue(this.state.style,"dy",va.prototype.dy)));return new mxPoint(A.x+t,A.y+z)},function(A,t){this.state.style.dx=Math.round(Math.max(0,Math.min(A.width,t.x-A.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(A.height,t.y-A.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(wb(d));return p},module:function(d){return[bb(d,["jettyWidth","jettyHeight"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ja.prototype.jettyWidth))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ja.prototype.jettyHeight)));return new mxPoint(p.x+A/2,p.y+2*t)},function(p,A){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,A.y-p.y))/2)})]},corner:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(p.x+A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,A.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,A.y-p.y)))},!1)]},tee:function(d){return[bb(d,["dx","dy"],function(p){var A=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Qa.prototype.dx))),t=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Qa.prototype.dy)));return new mxPoint(p.x+(p.width+A)/2,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,@@ -2958,14 +2958,14 @@ A,p.y+t)},function(p,A){this.state.style.dx=Math.round(Math.max(0,Math.min(p.widMath.max(0,Math.min(1,(A.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[bb(d,["isoAngle"],function(p){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(A),.5*p.height))},function(p,A){this.state.style.isoAngle=Math.max(0,50*(A.y-p.y)/p.height)},!0)]},cylinder2:ub(g.prototype.size),cylinder3:ub(m.prototype.size),offPageConnector:function(d){return[bb(d,["size"],function(p){var A=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-A)*p.height)},function(p,A){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-A.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(A){var t=Math.max(0,Math.min(A.width/2,A.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(A.x+t,A.y+t)},function(A,t){this.state.style.size=Math.round(100*Math.max(0,Math.min(A.height/2,A.width/2,t.x-A.x)))/100})];d=Graph.createHandle(d,["indent"],function(A){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(A.x+.75*A.width,A.y+t*A.height/200)},function(A,t){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(t.y-A.y)/A.height)))/100});p.push(d);return p},step:Cb(ha.prototype.size,!0,null,!0,ha.prototype.fixedSize),hexagon:Cb(Z.prototype.size,!0,.5,!0,Z.prototype.fixedSize),-curlyBracket:Cb(ia.prototype.size,!1),display:Cb(ab.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=+curlyBracket:Cb(ja.prototype.size,!1),display:Cb(ab.prototype.size,!1),cube:zb(1,u.prototype.size,!1),card:zb(.5,I.prototype.size,!0),loopLimit:zb(.5,R.prototype.size,!0),trapezoid:Ab(.5,aa.prototype.size,aa.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=bb;Graph.handleFactory=yb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=yb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=yb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=yb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),vb=new mxPoint(1,0),rb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));var Db=mxUtils.toRadians(-150);vb=mxUtils.getRotatedPoint(vb,Math.cos(Db),Math.sin(Db));mxEdgeStyle.IsometricConnector=function(d,p,A,t,z){var D=d.view;t=null!=t&&0<t.length?t[0]:null;var G=d.absolutePoints,ea=G[0];G=G[G.length-1];null!=t&&(t=D.transformControlPoint(d,t));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==G&&null!=A&&(G=new mxPoint(A.getCenterX(),A.getCenterY()));var O=xb.x,sa=xb.y,ma=vb.x,$a=vb.y,jb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=G&&null!=ea){d=function(Fa,La,Ka){Fa-=db.x;var Ha=La-db.y;La=($a*Fa-ma*Ha)/(O*$a-sa*ma);Fa=(sa*Fa-O*Ha)/(sa*ma-O*$a);jb?(Ka&&(db=new mxPoint(db.x+O*La,db.y+sa*La),z.push(db)),db=new mxPoint(db.x+ma*Fa,db.y+$a*Fa)):(Ka&&(db=new mxPoint(db.x+ma*Fa,db.y+$a*Fa),z.push(db)),db=new mxPoint(db.x+O*La,db.y+sa*La));z.push(db)};var db=ea;null==t&&(t=new mxPoint(ea.x+(G.x-ea.x)/2,ea.y+(G.y-ea.y)/2));d(t.x,t.y,!0);d(G.x,G.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var A=new mxElbowEdgeHandler(d);A.snapToTerminals=!1;return A}return Fb.apply(this,arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,p,A){d=[];var t=Math.tan(mxUtils.toRadians(30)),z=(.5-t)/2;t=Math.min(p,A/(.5+t));p=(p-t)/2;A=(A-t)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+t*z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.25*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+t,A+.75*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*t,A+(1-z)*t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A+.75*t));return d};c.prototype.getConstraints=function(d,p,A){d=[];var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;t=Math.min(p*Math.tan(t),.5*A);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,t));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};ca.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,+0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));return d};da.prototype.getConstraints=function(d,p,A){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var t=Math.max(0,Math.min(A,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var z=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-t)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A-t));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-t)));p>=2*t&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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,@@ -2982,7 +2982,7 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnect0),!1,null,.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+t),z))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,z)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-t),z)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(A-z)+z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,A));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return d};va.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=-mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,+mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Va.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,p,A){d=[];var t=Math.min(p,A/2),z=Math.min(p-t,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-t,A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(z+p-t),A));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,z,A));return d};Ja.prototype.getConstraints=function(d,p,A){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ja.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ja.prototype.jettyHeight));var t=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(A-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(A-@@ -3070,8 +3070,8 @@ this.addAction("clearWaypoints",function(){var E=q.getSelectionCells();if(null!=document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var E=q.getCurrentCellStyle(q.getSelectionCell());E=mxUtils.getValue(E,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,E-1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var E=q.getCurrentCellStyle(q.getSelectionCell());E=mxUtils.getValue(E,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,E+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+" - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var E=mxResources.get("image")+" ("+mxResources.get("url")+"):",Q=q.getView().getState(q.getSelectionCell()),c="",g=null;null!=Q&&(c=Q.style[mxConstants.STYLE_IMAGE]||c,g=Q.style[mxConstants.STYLE_CLIP_PATH]||g);var m=q.cellEditor.saveSelection();u.showImageDialog(E,c,function(n,x,F,I,M,L){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(m),q.insertImage(n,x,F);else{var K=q.getSelectionCells();if(null!=n&&(0<n.length||0<K.length)){var aa=null;-q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ia=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ia.x;K[0].geometry.y=ia.y;null!=I&&l(K[0],I,M,L,q);aa=K;q.fireEvent(new mxEventObject("cellsInserted","cells",aa))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var da=q.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&-"label"!=da[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var oa=q.getModel().getGeometry(ba);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(ba,oa))}null!=I&&l(ba,I,M,L,q)}}finally{q.getModel().endUpdate()}null!=aa&&(q.setSelectionCells(aa),+q.getModel().beginUpdate();try{if(0==K.length){K=[q.insertVertex(q.getDefaultParent(),null,"",0,0,x,F,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ja=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ja.x;K[0].geometry.y=ja.y;null!=I&&l(K[0],I,M,L,q);aa=K;q.fireEvent(new mxEventObject("cellsInserted","cells",aa))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<n.length?n:null,K);var ca=q.getCurrentCellStyle(K[0]);"image"!=ca[mxConstants.STYLE_SHAPE]&&+"label"!=ca[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==n.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=x&&null!=F)for(n=0;n<K.length;n++){var ba=K[n];if("0"!=q.getCurrentCellStyle(ba).expand){var oa=q.getModel().getGeometry(ba);null!=oa&&(oa=oa.clone(),oa.width=x,oa.height=F,q.getModel().setGeometry(ba,oa))}null!=I&&l(ba,I,M,L,q)}}finally{q.getModel().endUpdate()}null!=aa&&(q.setSelectionCells(aa),q.scrollCellToVisible(aa[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,g)}}).isEnabled=B;this.addAction("crop...",function(){var E=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&null!=E){var Q=q.getCurrentCellStyle(E),c=Q[mxConstants.STYLE_IMAGE],g=Q[mxConstants.STYLE_SHAPE];c&&"image"==g&&(Q=new CropImageDialog(u,c,Q[mxConstants.STYLE_CLIP_PATH],function(m,n,x){l(E,m,n,x,q)}),u.showDialog(Q.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(u,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){u.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){u.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),u.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){u.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+"+Editor.shiftKey+"+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return u.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?@@ -3254,33 +3254,33 @@ Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # forEditor.canvasSupported=!1;(function(){try{var k=document.createElement("canvas");Editor.canvasSupported=!(!k.getContext||!k.getContext("2d"))}catch(v){}})();Editor.useCanvasForExport=!1;(function(){try{var k=document.createElement("canvas"),v=new Image;v.onload=function(){try{k.getContext("2d").drawImage(v,0,0);var J=k.toDataURL("image/png");Editor.useCanvasForExport=null!=J&&6<J.length}catch(N){}};v.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(J){}})();Editor.jpgSupported=!1;Editor.webpSupported=!1;(function(){try{var k=document.createElement("canvas");k.width=k.height=1;var v=k.toDataURL("image/jpeg");Editor.jpgSupported=null!==v.match("image/jpeg");v=k.toDataURL("image/webp");Editor.webpSupported=null!==v.match("image/webp")}catch(J){}})();Editor.loadCompatibleCss=function(k){mxUtils.lightDarkColorSupported||mxUtils.get(k||"styles/grapheditor.css",mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var J=document.createElement("style");J.type="text/css";var N=J.appendChild,T=document,V=T.createTextNode;v=v.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1");try{CSS.supports("selector(:has(*))")||(v=v.replace(/:has\(/g,":not(")+"\n.geFormatTitleContainer { overflow: hidden !important; }\n.geRuler+.geRuler { margin-top: 14px !important; }\n.geDiagramContainer { margin: 0 !important; }")}catch(U){}N.call(J,V.call(T,v));document.head.appendChild(J)}}))};Editor.createRoughCanvas=function(k){var v=-rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var V=N[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,N,T){var V=k.state.strokeColor,U=k.state.strokeWidth,Y=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);-k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(Y)};v._drawToContext=function(J,N,T){J.begin();for(var V=0;V<N.ops.length;V++){var U=N.ops[V],Y=U.data;switch(U.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,-U,Y){this.canvas=V;this.rc=U;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;+rough.canvas({getContext:function(){return k}});v.draw=function(J){var N=J.sets||[];J=J.options||this.getDefaultOptions();for(var T=0;T<N.length;T++){var V=N[T];switch(V.type){case "path":null!=J.stroke&&this._drawToContext(k,V,J);break;case "fillPath":this._drawToContext(k,V,J);break;case "fillSketch":this.fillSketch(k,V,J)}}};v.fillSketch=function(J,N,T){var V=k.state.strokeColor,U=k.state.strokeWidth,X=k.state.strokeAlpha,fa=k.state.dashed,na=T.fillWeight;0>na&&(na=T.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);+k.setStrokeColor(T.fill||"");k.setStrokeWidth(na);k.setDashed(!1);this._drawToContext(J,N,T);k.setDashed(fa);k.setStrokeWidth(U);k.setStrokeColor(V);k.setStrokeAlpha(X)};v._drawToContext=function(J,N,T){J.begin();for(var V=0;V<N.ops.length;V++){var U=N.ops[V],X=U.data;switch(U.op){case "move":J.moveTo(X[0],X[1]);break;case "bcurveTo":J.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":J.lineTo(X[0],X[1])}}J.end();"fillPath"===N.type&&T.filled?J.fill():J.stroke()};return v};(function(){function k(V,+U,X){this.canvas=V;this.rc=U;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp=-"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(V,U){var Y=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var na=0;na<fa.length;na++)Y=(Y<<5)-Y+fa.charCodeAt(na)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};fa=this.rc.getDefaultOptions();Y.stroke=V?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;V=null;(Y.filled=U)?(Y.fill=-this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,V=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);Y.simplification=mxUtils.getValue(this.shape.style,-"simplification",fa.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==U?-1:U;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);Y.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",U);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",-U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=Y.fill&&(null!=V||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(Y.fill)))?"solid":fa.fillStyle);Y.fillStyle=U;return Y};k.prototype.begin=+"L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(V,U){var X=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var na=0;na<fa.length;na++)X=(X<<5)-X+fa.charCodeAt(na)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};fa=this.rc.getDefaultOptions();X.stroke=V?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;V=null;(X.filled=U)?(X.fill=+this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,V=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);X.simplification=mxUtils.getValue(this.shape.style,+"simplification",fa.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==U?-1:U;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);X.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",U);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",+U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=X.fill&&(null!=V||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(X.fill)))?"solid":fa.fillStyle);X.fillStyle=U;return X};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var V=2;V<arguments.length;V+=2)this.lastX=arguments[V-1],this.lastY=arguments[V],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(V,U){this.passThrough?-this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,V,U),this.lastX=V,this.lastY=U)};k.prototype.moveTo=function(V,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,V,U),this.lastX=V,this.lastY=U,this.firstX=V,this.firstY=U)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(V,U,Y,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,-arguments):(this.addOp(this.quadOp,V,U,Y,fa),this.lastX=Y,this.lastY=fa)};k.prototype.curveTo=function(V,U,Y,fa,na,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,V,U,Y,fa,na,la),this.lastX=na,this.lastY=la)};k.prototype.arcTo=function(V,U,Y,fa,na,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,V,U,Y,fa,na,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],-ya[wa+1],ya[wa+2],ya[wa+3],ya[wa+4],ya[wa+5]);this.lastX=la;this.lastY=qa}};k.prototype.rect=function(V,U,Y,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(V,U,Y,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(V,U,Y,fa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(V+Y/2,U+fa/2,Y,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(V,-U,Y,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(V+na,U),this.lineTo(V+Y-na,U),this.quadTo(V+Y,U,V+Y,U+la),this.lineTo(V+Y,U+fa-la),this.quadTo(V+Y,U+fa,V+Y-na,U+fa),this.lineTo(V+na,U+fa),this.quadTo(V,U+fa,V,U+fa-la),this.lineTo(V,U+la),this.quadTo(V,U,V+na,U))};k.prototype.drawPath=function(V){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),V)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in V)this.nextShape.options[U]=+this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,V,U),this.lastX=V,this.lastY=U)};k.prototype.moveTo=function(V,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,V,U),this.lastX=V,this.lastY=U,this.firstX=V,this.firstY=U)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(V,U,X,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,+arguments):(this.addOp(this.quadOp,V,U,X,fa),this.lastX=X,this.lastY=fa)};k.prototype.curveTo=function(V,U,X,fa,na,la){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,V,U,X,fa,na,la),this.lastX=na,this.lastY=la)};k.prototype.arcTo=function(V,U,X,fa,na,la,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ya=mxUtils.arcToCurves(this.lastX,this.lastY,V,U,X,fa,na,la,qa);if(null!=ya)for(var wa=0;wa<ya.length;wa+=6)this.curveTo(ya[wa],+ya[wa+1],ya[wa+2],ya[wa+3],ya[wa+4],ya[wa+5]);this.lastX=la;this.lastY=qa}};k.prototype.rect=function(V,U,X,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(V,U,X,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(V,U,X,fa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(V+X/2,U+fa/2,X,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(V,+U,X,fa,na,la){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(V+na,U),this.lineTo(V+X-na,U),this.quadTo(V+X,U,V+X,U+la),this.lineTo(V+X,U+fa-la),this.quadTo(V+X,U+fa,V+X-na,U+fa),this.lineTo(V+na,U+fa),this.quadTo(V,U+fa,V,U+fa-la),this.lineTo(V,U+la),this.quadTo(V,U,V+na,U))};k.prototype.drawPath=function(V){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),V)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in V)this.nextShape.options[U]=V[U];V.stroke!=mxConstants.NONE&&null!=V.stroke||delete this.nextShape.options.stroke;V.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;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(V){return new k(V,Editor.createRoughCanvas(V),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(V){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,Y,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();-var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};Y||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;N.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();Y&&null!=fa&&(V.addTolerance=function(){})}N.apply(this,arguments);-V.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,U,Y,fa,na,la){null!=V.handJiggle&&V.handJiggle.constructor==k?(V.handJiggle.passThrough=!0,T.apply(this,arguments),V.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?+"sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,U,X,fa,na){null!=V.handJiggle&&V.handJiggle.passThrough||J.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var U=V.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==k&&!this.outline){V.save();+var fa=this.fill,na=this.stroke;this.stroke=this.fill=null;var la=this.configurePointerEvents,qa=V.setStrokeColor;V.setStrokeColor=function(){};var ya=V.setFillColor;V.setFillColor=function(){};X||null==fa||(this.configurePointerEvents=function(){});V.handJiggle.passThrough=!0;N.apply(this,arguments);V.handJiggle.passThrough=!1;V.setFillColor=ya;V.setStrokeColor=qa;this.configurePointerEvents=la;this.stroke=na;this.fill=fa;V.restore();X&&null!=fa&&(V.addTolerance=function(){})}N.apply(this,arguments);+V.addTolerance=U};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,U,X,fa,na,la){null!=V.handJiggle&&V.handJiggle.constructor==k?(V.handJiggle.passThrough=!0,T.apply(this,arguments),V.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,v,J){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),T=[];if(null!=N&&0<N.length)for(var V=0;V<N.length;V++)if("mxgraph"==N[V].getAttribute("class")){T.push(N[V]);break}0<T.length&&(N=T[0].getAttribute("data-mxgraph"),null!=N?(T=JSON.parse(N),null!=T&&null!=T.xml&&(k=mxUtils.parseXml(T.xml),k=k.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&(N=mxUtils.getTextContent(T[0]),N=Graph.decompress(N,null,J),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(T=null,"diagram"==k.nodeName?T=k:"mxfile"==k.nodeName&&(N=k.getElementsByTagName("diagram"),0<N.length&&(T=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=T&&(k=Editor.parseDiagramNode(T,J)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,J){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),T=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(T=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(T=k[0],J&&(T=Editor.parseDiagramNode(T,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(T,!0)),T=v.documentElement));return T};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),J=null;0<v.length?J=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=new mxCodec,J=new mxGraphModel;k.appendChild(v.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var N=k.indexOf("stream",J)+9;if(0<k.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile")){var T=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"})}}for(J=-k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var V=[],U=null;T<k.length;){var Y=k.charCodeAt(T);T+=-1;10!=Y&&(J+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==Y&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=+k.indexOf("/ObjStm");0<J;){N=k.indexOf("stream",J)+9;T=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,T)),{to:"string"});T=N.indexOf("/Subject <");if(0<T){J=N.substring(T+14,N.indexOf(">",T));if(null!=J){v=J;J=[];for(N=0;N<v.length;N+=2)T=v.substr(N,2),"00"!=T&&J.push(String.fromCharCode(parseInt(T,16)));v=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){J="";T=N=0;for(var V=[],U=null;T<k.length;){var X=k.charCodeAt(T);T+=+1;10!=X&&(J+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var fa=k.indexOf("%3C%2Fmxfile%3E",T)+15;T-=9;if(fa>T){v=k.substring(T,fa);break}}10==X&&("endobj"==J?U=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(U=[],V[J.split(" ")[0]]=U):null!=U&&U.push(J),J="")}}null==v&&null!=V&&(v=Editor.extractGraphModelFromXref(V));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,J=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,v){var J=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(J=mxUtils.getTextContent(v[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");if(null!=k.customCss){var v=document.createElement("style");v.type="text/css";v.appendChild(document.createTextNode(k.customCss));document.head.appendChild(v)}null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=@@ -3308,35 +3308,35 @@ this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.ba"^"+T.url}),J.setAttribute("extFonts",N.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var J=mxUtils.parseXml(v).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=function(k,v,J){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var u=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){u.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var J=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=-function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(Y){MathJax.typesetClear([U]),null!=Y.retry?(N=U,Y.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+Y.toString())}};window.MathJax=null!=+function(U){try{null==N?(MathJax.typesetClear([U]),MathJax.typeset([U]),J()):N!=U&&Editor.mathJaxQueue.push(U)}catch(X){MathJax.typesetClear([U]),null!=X.retry?(N=U,X.retry.then(function(){MathJax.typesetPromise([U]).then(J)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());J()})})["catch"](function(fa){console.log("Error in MathJax.retry: "+fa.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+X.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};-var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(Y,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",k);v[0].parentNode.appendChild(V)}}};+var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(X,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",k);v[0].parentNode.appendChild(V)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",J=[""],N=0,T=!0,V;k=$jscomp.makeIterator(k);for(V=k.next();!V.done;V=k.next())V=V.value,'"'===V?(T&&V===v&&(J[N]+=V),T=!T):","===V&&T?V=J[++N]="":J[N]+=V,v=V;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var J="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,J=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+-"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),Y=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||-299<na.getStatus()?Y():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&Y()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=-J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<V.length?V.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(Y,fa){Y=k.getElementsByTagName(Y);for(var na=0;na<Y.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,-function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(Y[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,V,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,J,N,T){try{var V=!0,U=window.setTimeout(mxUtils.bind(this,function(){V=!1;v(k)}),this.timeout),X=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,J,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&!T)mxUtils.get(k,mxUtils.bind(this,function(na){window.clearTimeout(U);V&&(200>na.getStatus()||+299<na.getStatus()?X():v(Editor.createSvgDataUri(na.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);V&&X()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(U);if(V)try{N=null!=N&&T?N:1;var na=document.createElement("canvas"),la=na.getContext("2d");la.scale(N,N);na.height=fa.height*N;na.width=fa.width*N;la.drawImage(fa,0,0);v(na.toDataURL())}catch(qa){v(k)}};fa.onerror=function(){window.clearTimeout(U);V&&(null!=+J?J():v(k))};fa.src=k}}catch(na){null!=J?J():v(k)}};Editor.prototype.convertImages=function(k,v,J,N){function T(){0<V.length?V.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var V=[],U=J||{};J=mxUtils.bind(this,function(X,fa){X=k.getElementsByTagName(X);for(var na=0;na<X.length;na++)mxUtils.bind(this,function(la){V.push(mxUtils.bind(this,function(){try{if(null!=la){var qa=N.convert(la.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var ya=U[qa];null==ya?this.convertImageToDataUri(qa,+function(wa){null!=wa&&(U[qa]=wa,la.setAttribute(fa,wa));T()},null,Editor.svgRasterScale):(la.setAttribute(fa,ya),T())}else null!=qa&&la.setAttribute(fa,qa),T()}}catch(wa){T()}}))})(X[na])});J("image","xlink:href");J("img","src");T()};Editor.base64Encode=function(k){for(var v="",J=0,N=k.length,T,V,U;J<N;){T=k.charCodeAt(J++)&255;if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4);v+="==";break}V=k.charCodeAt(J++);if(J==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2);v+="=";break}U=k.charCodeAt(J++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&-3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,V,U,Y){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&-299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(V=null!=V?V:"data:image/png;base64,",la=V+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:na})},Y)});na()}catch(la){null!=+3)<<4|(V&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((V&15)<<2|(U&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return v};Editor.prototype.loadUrl=function(k,v,J,N,T,V,U,X){try{var fa=!U&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));T=null!=T?T:!0;var na=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(la){200<=la.getStatus()&&+299>=la.getStatus()?null!=v&&(la=la.getText(),fa&&(V=null!=V?V:"data:image/png;base64,",la=V+Editor.base64Encode(la)),v(la)):null!=J&&(0==la.getStatus()?J({message:mxResources.get("accessDenied")},la):404==la.getStatus()?J({message:mxResources.get("fileNotFound"),code:la.getStatus()},la):J({message:this.getErrorMessage(la)},la))}),function(la){null!=J&&J({message:mxResources.get("error")+" "+la.getStatus()})},fa,this.timeout,function(){T&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:na})},X)});na()}catch(la){null!=J&&J(la)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),N=JSON.parse(J);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(T){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var J=k.split("url(");if(0<J.length){v=[J[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var T=null;null!=N&&0<N.length&&(T=N[0].getAttribute("href"));for(var V=1;V<J.length;V++)if(N=J[V].indexOf(")"),0<N){var U=Editor.trimCssUrl(J[V].substring(0,N));this.graph.isRelativeUrl(U)&&(U=null!=T?T+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":k)+U);v.push('url("'+U+'"'+J[V].substring(N))}else v.push(J[V])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,J){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));-J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,Y=J[k].indexOf("format(",V);0<Y&&(U=Editor.trimCssUrl(J[k].substring(Y+-7,J[k].indexOf(")",Y))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na=+J(k,v)};Editor.prototype.embedCssFonts=function(k,v){var J=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==N){for(var fa=[J[0]],na=1;na<J.length;na++){var la=J[na].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(J[na].substring(0,la))]);fa.push('"'+J[na].substring(la))}v(fa.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var V=J[k].indexOf(")"),U=null,X=J[k].indexOf("format(",V);0<X&&(U=Editor.trimCssUrl(J[k].substring(X++7,J[k].indexOf(")",X))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;N++;var na="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(fa))na="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(fa))na="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(fa))na="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(fa))na="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(fa))na="application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(fa))na="application/font-sfnt";this.mapFontUrl(na,fa,mxUtils.bind(this,function(la,qa){this.loadUrl(qa,mxUtils.bind(this,function(ya){this.cachedFonts[fa]=ya;N--;T()}),mxUtils.bind(this,function(ya){N--;T()}),!0,null,"data:"+la+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,V)),U)}T()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var J=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(J.join(""),k)}),-V=0;V<v.length;V++)mxUtils.bind(this,function(U,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(Y),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[Y]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+Y+");\n");T()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+Y+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");+V=0;V<v.length;V++)mxUtils.bind(this,function(U,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(X),mxUtils.bind(this,function(fa){this.cachedGoogleFonts[X]=fa;J.push(fa+"\n");N--;T()}),mxUtils.bind(this,function(fa){N--;J.push("@import url("+X+");\n");T()}))):J.push(this.cachedGoogleFonts[X]+"\n"):J.push('@font-face {font-family: "'+U+'";src: url("'+X+'")}\n')})(v[V].name,v[V].url);T()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),J=0;J<v.length;J++){var N=mxUtils.getTextContent(v[J]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var J=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var T=[],V=0;V<N.length;V++)"@import"==N[V].substring(0,7)?v.push(N[V]):T.push(N[V]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),J.appendChild(k));0<T.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,T.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||Editor.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,J){var N=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=-function(k,v,J,N,T,V,U,Y,fa,na,la,qa,ya,wa,Ja,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(ra){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ra.drawImage(Ca,-0,0);k(Na,ra)},0):(Ra.drawImage(Ca,0,0),k(Na,ra))},Na=document.createElement("canvas"),Oa=parseInt(ra.getAttribute("width")),Qa=parseInt(ra.getAttribute("height"));Y=null!=Y?Y:1;null!=v&&(Y=V?Math.min(1,Math.min(3*v/(4*Qa),v/Oa)):v/Oa);Y=this.getMaxCanvasScale(Oa,Qa,Y);Oa=Math.ceil(Y*Oa);Qa=Math.ceil(Y*Qa);Na.setAttribute("width",Oa);Na.setAttribute("height",Qa);var Ra=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ra.beginPath();Ra.rect(0,0,Oa,Qa);Ra.fillStyle="dark"==Aa&&-"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ra.fill()}1!=Y&&Ra.scale(Y,Y);if(Ja){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*Y,W=qa.getGraphBounds(),ja=Ea.translate.x*C,ka=Ea.translate.y*C,pa=ja+(W.x-ja)/C-ya,xa=ka+(W.y-ka)/C-ya,ta=new Image;ta.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ja-pa)*Y,R)),Ia=-Math.round(R-mxUtils.mod((ka-xa)*Y,-R));ua<Oa;ua+=R)for(var Va=Ia;Va<Qa;Va+=R)Ra.drawImage(ta,ua/Y,Va/Y);va()}catch(Wa){null!=T&&T(Wa)}};ta.onerror=function(ua){null!=T&&T(ua)};ta.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(ra);this.graph.mathEnabled&&this.addMathCss(ra);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ra,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ra))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,+function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa,Ba,Ga){try{V=null!=V?V:!0;U=null!=U?U:!0;qa=null!=qa?qa:this.graph;ya=null!=ya?ya:0;var Ma=fa?null:qa.background;Ma==mxConstants.NONE&&(Ma=null);null==Ma&&(Ma=N);null==Ma&&0==fa&&(Ma="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,ya,wa,null,U,null,null,null,na,null,Aa,Ba,Ga),mxUtils.bind(this,function(ra){try{var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){Ra.drawImage(Ca,+0,0);k(Na,ra)},0):(Ra.drawImage(Ca,0,0),k(Na,ra))},Na=document.createElement("canvas"),Oa=parseInt(ra.getAttribute("width")),Qa=parseInt(ra.getAttribute("height"));X=null!=X?X:1;null!=v&&(X=V?Math.min(1,Math.min(3*v/(4*Qa),v/Oa)):v/Oa);X=this.getMaxCanvasScale(Oa,Qa,X);Oa=Math.ceil(X*Oa);Qa=Math.ceil(X*Qa);Na.setAttribute("width",Oa);Na.setAttribute("height",Qa);var Ra=Na.getContext("2d");if(null!=Ma){var za=mxUtils.getLightDarkColor(Ma);Ra.beginPath();Ra.rect(0,0,Oa,Qa);Ra.fillStyle="dark"==Aa&&+"none"!=qa.getAdaptiveColors()?za.dark:za.light;Ra.fill()}1!=X&&Ra.scale(X,X);if(Ja){var Ea=qa.view,C=Ea.scale;Ea.scale=1;var P=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));Ea.scale=C;P="data:image/svg+xml;base64,"+P;var R=qa.gridSize*Ea.gridSteps*X,W=qa.getGraphBounds(),ia=Ea.translate.x*C,ka=Ea.translate.y*C,pa=ia+(W.x-ia)/C-ya,xa=ka+(W.y-ka)/C-ya,ta=new Image;ta.onload=function(){try{for(var ua=-Math.round(R-mxUtils.mod((ia-pa)*X,R)),Ia=-Math.round(R-mxUtils.mod((ka-xa)*X,+R));ua<Oa;ua+=R)for(var Va=Ia;Va<Qa;Va+=R)Ra.drawImage(ta,ua/X,Va/X);va()}catch(Wa){null!=T&&T(Wa)}};ta.onerror=function(ua){null!=T&&T(ua)};ta.src=P}else va()}catch(ua){null!=T&&T(ua)}});Ca.onerror=function(va){null!=T&&T(va)};na&&this.graph.addSvgShadow(ra);this.graph.mathEnabled&&this.addMathCss(ra);var Da=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ra,this.resolvedFontCss),Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ra))}catch(va){null!=T&&T(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(ra,va),this.loadFonts(Da)}catch(Na){null!=T&&T(Na)}}))}catch(va){null!=T&&T(va)}}),J,la)}catch(ra){null!=T&&T(ra)}};Editor.crcTable=[];for(var y=0;256>y;y++)for(var q=y,B=0;8>B;B++)q=1==(q&1)?3988292384^q>>>1:q>>>1,Editor.crcTable[y]=q;Editor.updateCRC=function(k,v,J,N){for(var T=0;T<N;T++)k=Editor.crcTable[(k^v.charCodeAt(J+T))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,J=0;J<k.length;J++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(J))&255];-return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function Y(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,-4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=Y(J)+Y(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=Y(J.length)+v+J+Y(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?+return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,J,N,T){function V(la,qa){var ya=fa;fa+=qa;return la.substring(ya,fa)}function U(la){la=V(la,4);return la.charCodeAt(3)+(la.charCodeAt(2)<<8)+(la.charCodeAt(1)<<16)+(la.charCodeAt(0)<<24)}function X(la){return String.fromCharCode(la>>24&255,la>>16&255,la>>8&255,la&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(V(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(V(k,+4),"IHDR"!=V(k,4))null!=T&&T();else{V(k,17);T=k.substring(0,fa);do{var na=U(k);if("IDAT"==V(k,4)){T=k.substring(0,fa-8);"pHYs"==v&&"dpi"==J?(J=Math.round(N/.0254),J=X(J)+X(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,J,0,J.length);T+=X(J.length)+v+J+X(N^4294967295);T+=k.substring(fa-8,k.length);break}T+=k.substring(fa-8,fa-4+na);V(k,na);V(k,4)}while(na);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var J=null;null!=k.editor.graph.getModel().getParent(v)?J=v.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var E=Format.prototype.init;Format.prototype.init=function(){E.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var Q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?Q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,J=v.editor.graph;if(J.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},@@ -3366,28 +3366,28 @@ stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"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;var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=-this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,N){function T(Ra,za,Ea,C,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ja=Ea.parentRow.nextSibling;ja&&ja.getAttribute("data-pName")==-Ra;)W.push(ja.getAttribute("data-pValue")),ja=ja.nextSibling;Ea.index<W.length?null!=C?W.splice(C,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ra,za,ya.getSelectionCells());P.push(Ra);R.push(za);if(null!=Ea.dependentProps)for(Ra=0;Ra<Ea.dependentProps.length;Ra++){var ka=Ea.dependentPropsDefVal[Ra],+this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);m.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,J,N){function T(Ra,za,Ea,C,P){if(null!=Ea.valueChanged)Ea.valueChanged(za,P,J,qa);else{ya.getModel().beginUpdate();try{P=[];var R=[];if(null!=Ea.index){for(var W=[],ia=Ea.parentRow.nextSibling;ia&&ia.getAttribute("data-pName")==+Ra;)W.push(ia.getAttribute("data-pValue")),ia=ia.nextSibling;Ea.index<W.length?null!=C?W.splice(C,1):W[Ea.index]=za:W.push(za);null!=Ea.size&&W.length>Ea.size&&(W=W.slice(0,Ea.size));za=W.join(",");null!=Ea.countProperty&&(ya.setCellStyles(Ea.countProperty,W.length,ya.getSelectionCells()),P.push(Ea.countProperty),R.push(W.length))}ya.setCellStyles(Ra,za,ya.getSelectionCells());P.push(Ra);R.push(za);if(null!=Ea.dependentProps)for(Ra=0;Ra<Ea.dependentProps.length;Ra++){var ka=Ea.dependentPropsDefVal[Ra],pa=Ea.dependentPropsVals[Ra];if(pa.length>za)pa=pa.slice(0,za);else for(var xa=pa.length;xa<za;xa++)pa.push(ka);pa=pa.join(",");ya.setCellStyles(Ea.dependentProps[Ra],pa,ya.getSelectionCells());P.push(Ea.dependentProps[Ra]);R.push(pa)}if("function"==typeof Ea.onChange)Ea.onChange(ya,za);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",P,"values",R,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}}function V(Ra,za){za.style.left="0px";za.style.top="0px";za.style.position="relative";za.style.right="0px";za.style.bottom="0px";za.style.width="100%";za.style.maxWidth="100%";za.style.maxHeight="100%";za.style.textAlign="left"}function U(Ra,za,Ea){function C(R){if(null==R||R==mxConstants.NONE)P.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==R)P.style.background="";else{var W=mxUtils.getLightDarkColor(R);mxUtils.isLightDarkColor(R)&&W.light!=W.dark?P.style.background="linear-gradient(to right bottom, "+W.cssText+" 50%, "+mxUtils.invertLightDarkColor(W).cssText+-" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ra,W,Ea);C(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function Y(Ra,za,Ea,C,P,-R,W){null!=za&&(za=za.split(","),wa.push({name:Ra,values:za,type:Ea,defVal:C,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ja){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ra)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:P};pa=la(Ra,"",xa,0==pa%2,W);T(Ra,C,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ja)}));btn.style.height=-"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ra,za,Ea,C,P,R,W){if(0<P){var ja=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ja[ka]=null!=za[ka]?za[ka]:null!=C?C:"";wa.push({name:Ra,values:ja,type:Ea,defVal:C,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ra,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Ra,C.checked?"1":"0",Ea,null,C)});return C}-function la(Ra,za,Ea,C,P){var R=Ea.dispName,W=Ea.type,ja=document.createElement("tr");ja.className="gePropRow"+(P?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ja.setAttribute("data-pName",Ra);ja.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ja.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);C&&(ka.style.textAlign="right");ja.appendChild(ka);-ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ja,document.activeElement)&&mxUtils.isAncestorNode(ja.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ra,+" 50.3%)":P.style.background=R}}var P=document.createElement("div");P.style.width="32px";P.style.height="8px";P.style.margin="2px";P.style.borderStyle="solid";P.style.borderWidth="1px";C(za);btn=mxUtils.button("",mxUtils.bind(qa,function(R){this.editorUi.pickColor(za,function(W){T(Ra,W,Ea);C(W)});mxEvent.consume(R)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(P);return btn}function X(Ra,za,Ea,C,P,+R,W){null!=za&&(za=za.split(","),wa.push({name:Ra,values:za,type:Ea,defVal:C,countProperty:P,parentRow:R,isDeletable:!0,flipBkg:W}));btn=mxUtils.button("+",mxUtils.bind(qa,function(ia){for(var ka=R,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==Ra)ka=ka.nextSibling,pa++;else break;var xa={type:Ea,parentRow:R,index:pa,isDeletable:!0,defVal:C,countProperty:P};pa=la(Ra,"",xa,0==pa%2,W);T(Ra,C,xa);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(ia)}));btn.style.height=+"16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ra,za,Ea,C,P,R,W){if(0<P){var ia=Array(P);za=null!=za?za.split(","):[];for(var ka=0;ka<P;ka++)ia[ka]=null!=za[ka]?za[ka]:null!=C?C:"";wa.push({name:Ra,values:ia,type:Ea,defVal:C,parentRow:R,flipBkg:W,size:P})}return document.createElement("div")}function na(Ra,za,Ea){var C=document.createElement("input");C.type="checkbox";C.checked="1"==za;mxEvent.addListener(C,"change",function(){T(Ra,C.checked?"1":"0",Ea,null,C)});return C}+function la(Ra,za,Ea,C,P){var R=Ea.dispName,W=Ea.type,ia=document.createElement("tr");ia.className="gePropRow"+(P?"Dark":"")+(C?"Alt":"")+" gePropNonHeaderRow";ia.setAttribute("data-pName",Ra);ia.setAttribute("data-pValue",za);C=!1;null!=Ea.index&&(ia.setAttribute("data-index",Ea.index),R=(null!=R?R:"")+"["+Ea.index+"]",C=!0);var ka=document.createElement("td");ka.className="gePropRowCell";R=mxResources.get(R,null,R);mxUtils.write(ka,R);ka.setAttribute("title",R);C&&(ka.style.textAlign="right");ia.appendChild(ka);+ka=document.createElement("td");ka.className="gePropRowCell";ka.setAttribute("title",null!=za?decodeURIComponent(za):mxResources.get("none"));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){console.log("click on property2");!mxUtils.isAncestorNode(ia,document.activeElement)&&mxUtils.isAncestorNode(ia.parentNode,document.activeElement)&&null!=document.activeElement&&null!=document.activeElement.blur&&(document.activeElement.blur(),mxEvent.consume(ua))}));if("color"==W)ka.appendChild(U(Ra,za,Ea));else if("bool"==W||"boolean"==W)ka.appendChild(na(Ra,za,Ea));else if("enum"==W){var pa=Ea.enumList;ka.innerHTML="";var xa=document.createElement("div");xa.className="gePropValue";ka.appendChild(xa);for(P=0;P<pa.length;P++)if(R=pa[P],R.val==za){mxUtils.write(xa,mxResources.get(R.dispName,null,R.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){var Ia=mxEvent.getSource(ua);if(!(Ia!=ka&&Ia!=xa||mxEvent.isConsumed(ua))){xa.innerHTML="";var Va=document.createElement("select"),Wa=null;V(ka,Va);for(ua=0;ua<pa.length;ua++){Ia=pa[ua];var Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Ia.val);mxUtils.write(Ta,mxResources.get(Ia.dispName,null,Ia.dispName));Va.appendChild(Ta);null==Ia.val&&(Ta.value="null",Wa=Ta)}Va.value=null==za&&null!=Wa?"null":za;xa.appendChild(Va);mxEvent.addListener(Va,"change",function(){var ab=mxUtils.htmlEntities(Va.value);if(Va[Va.selectedIndex]==Wa||"null"==ab.value)ab=null;T(Ra,ab,Ea)});Va.focus();mxEvent.addListener(Va,"blur",-function(){xa.innerHTML="";for(var ab=0;ab<pa.length;ab++){var Pa=pa[ab];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(Y(Ra,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ja,P));else if("staticArr"==W)ka.appendChild(fa(Ra,za,Ea.subType,Ea.subDefVal,Ea.size,ja,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ra?(ja.firstChild.innerHTML=-"",ja.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ja.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ta=document.createElement("div");ta.className="gePropValue";ka.appendChild(ta);ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));+function(){xa.innerHTML="";for(var ab=0;ab<pa.length;ab++){var Pa=pa[ab];if(Pa.val==Va.value){mxUtils.write(xa,mxResources.get(Pa.dispName,null,Pa.dispName));break}}})}}))}else if("dynamicArr"==W)ka.appendChild(X(Ra,za,Ea.subType,Ea.subDefVal,Ea.countProperty,ia,P));else if("staticArr"==W)ka.appendChild(fa(Ra,za,Ea.subType,Ea.subDefVal,Ea.size,ia,P));else if("readOnly"==W)P=document.createElement("input"),P.setAttribute("readonly",""),P.value=za,P.style.borderWidth="0px","id"==Ra?(ia.firstChild.innerHTML=+"",ia.firstChild.setAttribute("colspan","2"),P.style.flexGrow="1",P.style.marginLeft="4px",P.style.textAlign="center",P.setAttribute("title",za),R=document.createElement("div"),mxUtils.write(R,mxResources.get("id")),R.style.display="inline-flex",R.style.alignItems="center",R.style.width="100%",R.appendChild(P),ia.firstChild.appendChild(R)):(P.style.width="96px",ka.appendChild(P));else{ka.innerHTML="";var ta=document.createElement("div");ta.className="gePropValue";ka.appendChild(ta);ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za));mxEvent.addListener(ka,"click",mxUtils.bind(qa,function(ua){function Ia(){var Ta=Wa.value;Ta=0==Ta.length&&"string"!=W&&"numbers"!=W?0:Ta;Ea.allowAuto&&(null!=Ta.trim&&"auto"==Ta.trim().toLowerCase()?(Ta="auto",W="string"):(Ta=parseFloat(Ta),Ta=isNaN(Ta)?0:Ta));null!=Ea.min&&Ta<Ea.min?Ta=Ea.min:null!=Ea.max&&Ta>Ea.max&&(Ta=Ea.max);var ab=null;try{ab="numbers"==W?Ta.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==W?parseInt(Ta):Ta)+"")}catch(Pa){}T(Ra,ab,Ea,null,Wa)}var Va=mxEvent.getSource(ua);if(!(Va!=ka&&Va!=ta||mxEvent.isConsumed(ua))){ta.innerHTML="";var Wa=document.createElement("input");V(ta,Wa);Wa.value=decodeURIComponent(za);Wa.className="gePropEditor";"int"!=W&&"float"!=W||Ea.allowAuto||(Wa.type="number",Wa.step="int"==W?"1":"any",null!=Ea.min&&(Wa.min=parseFloat(Ea.min)),null!=Ea.max&&(Wa.max=parseFloat(Ea.max)));ta.appendChild(Wa);mxEvent.addListener(Wa,"keypress",function(Ta){13==Ta.keyCode&&Ia()});Wa.focus();mxEvent.addListener(Wa,"blur",function(){Ia()})}}))}Ea.isDeletable&&-(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ra,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ja.appendChild(ka);return ja}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ja=document.createElement("table");Ja.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft=+(P=mxUtils.button("-",mxUtils.bind(qa,function(ua){T(Ra,"",Ea,Ea.index);mxEvent.consume(ua)})),P.style.height="16px",P.style.width="25px",P.style.float="right",P.className="geColorBtn",ka.appendChild(P));ia.appendChild(ka);return ia}var qa=this,ya=this.editorUi.editor.graph,wa=[],Ja=document.createElement("table");Ja.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.style.paddingLeft="16px";Ba.style.backgroundRepeat="no-repeat";Ba.style.backgroundPosition="-2px 50%";Ba.style.backgroundSize="20px";mxUtils.write(Ba,mxResources.get("property"));Aa.style.cursor="pointer";var Ga=function(){var Ra=Ja.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ba.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var za="none";for(var Ea=k.childNodes.length-1;0<=Ea;Ea--)try{var C=k.childNodes[Ea],P=C.nodeName.toUpperCase();"INPUT"!=P&&"SELECT"!=P||k.removeChild(C)}catch(R){}}else Ba.style.backgroundImage="url('"+Editor.arrowDownImage+"')",za="";for(Ea=0;Ea<Ra.length;Ea++)Ra[Ea].style.display=za};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Ga()});Aa.appendChild(Ba);var Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.style.paddingLeft="4px";mxUtils.write(Ma,mxResources.get("value"));Aa.appendChild(Ma);Ja.appendChild(Aa);var ra=Ma=!1;Aa=null;1==J.vertices.length&&0==J.edges.length?Aa=J.vertices[0].id:0==J.vertices.length&&1==J.edges.length&&(Aa=J.edges[0].id);null==Aa||N||Ja.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var Ca in v)if(N=v[Ca],!N.primary&&("function"!=typeof N.isVisible||N.isVisible(J,this))){var Da=null!=N.getValue?N.getValue(J,this):null!=J.style[Ca]?mxUtils.htmlEntities(J.style[Ca]+""):null!=N.getDefaultValue?N.getDefaultValue(J,this):N.defVal;if("separator"==N.type)ra=!ra;else{if("staticArr"==N.type)N.size=parseInt(J.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,Na=[],Oa=[];for(Aa=0;Aa<va.length;Aa++){var Qa=J.style[va[Aa]];Oa.push(v[va[Aa]].subDefVal);Na.push(null!=Qa?Qa.split(","):[])}N.dependentPropsDefVal=Oa;N.dependentPropsVals=Na}Ja.appendChild(la(Ca,Da,N,Ma,ra));Ma=!Ma}}for(Aa=0;Aa<wa.length;Aa++)for(N=wa[Aa],v=N.parentRow,Ca=0;Ca<N.values.length;Ca++)Ma=la(N.name,N.values[Ca],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:Ca,defVal:N.defVal,countProperty:N.countProperty,-size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ja);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var Y=document.createElement("div");-Y.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);V.push(Y);T.appendChild(Y)}var fa=mxUtils.bind(this,function(ya){null!=V[ya]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,na(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,+size:N.size},0==Ca%2,N.flipBkg),v.parentNode.insertBefore(Ma,v.nextSibling),v=Ma;k.appendChild(Ja);Ga();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,J=v.editor.graph,N=document.createElement("div");N.style.padding="6px 20px 0 24px";k.appendChild(N);var T=document.createElement("div");T.className="geSwitcher";T.style.padding="4px 18px 6px 0px";for(var V=[],U=0;U<this.defaultColorSchemes.length;U++){var X=document.createElement("div");+X.className="geSwitcherDot";mxUtils.bind(this,function(ya){mxEvent.addListener(X,"click",mxUtils.bind(this,function(){fa(ya)}))})(U);V.push(X);T.appendChild(X)}var fa=mxUtils.bind(this,function(ya){null!=V[ya]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,na(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),na=mxUtils.bind(this,function(ya){var wa=mxUtils.clone(J.defaultVertexStyle);wa[mxConstants.STYLE_STROKECOLOR]=null!=wa[mxConstants.STYLE_STROKECOLOR]?wa[mxConstants.STYLE_STROKECOLOR]:"default";wa[mxConstants.STYLE_FILLCOLOR]=null!=wa[mxConstants.STYLE_FILLCOLOR]?wa[mxConstants.STYLE_FILLCOLOR]:"default";wa[mxConstants.STYLE_FONTCOLOR]=null!=wa[mxConstants.STYLE_FONTCOLOR]?wa[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,wa);var Ja=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Ca){J.getModel().beginUpdate();try{for(var Da=v.getSelectionState().cells,va=0;va<Da.length;va++){var Na=J.getModel().getStyle(Da[va]);null!=Ba?(mxEvent.isShiftDown(Ca)||(Na=""==Ba.fill||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,Ba.fill),Na=""==Ba.gradient||null==Ba.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient),mxEvent.isControlDown(Ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ca)||!J.getModel().isVertex(Da[va])||(Na=""==Ba.font||null==Ba.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,Ba.font))),mxEvent.isAltDown(Ca)||(Na=""==Ba.stroke||null==Ba.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,Ba.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,@@ -3405,44 +3405,44 @@ null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElemGraph.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.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function k(T){v=T}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(T){v=null});this.isMouseInsertPoint=function(){return null!=v};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):J.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var V=this.graph.getCellStyle(T);if(null!=V&&"rack"==V.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=V.rackUnitSize?parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=V.marginLeft||0;U.marginRight=V.marginRight||0;U.marginTop=V.marginTop||0;U.marginBottom=V.marginBottom||0;U.allowGaps=V.allowGaps||0;U.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return N.apply(this,-arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,V,U,Y,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&-Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=Y.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)Y.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);Y.setSelectionCells(Ba)}function V(Aa){Y.setHiddenTags(Aa?[]:fa.slice());T();Y.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";-var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var ra=0;ra<Aa.length;ra++)(function(Ca){function Da(){var za=Y.getCellsForTags([Ca],null,null,!0);Y.isEnabled()?Y.setSelectionCells(za):Y.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(Y.hiddenTags,Ca),Na=document.createElement("tr"),Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";var Qa=document.createElement("img");Qa.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Qa.setAttribute("title",-mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";Oa.appendChild(Qa);mxEvent.addListener(Qa,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(Y.hiddenTags,Ca)):(Y.toggleHiddenTag(Ca),T(),Y.refresh());mxEvent.consume(za)});Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.align="center";+arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,J,N,T,V,U,X,fa,na,la,qa){F.apply(this,arguments);Graph.processFontAttributes(qa)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&+Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,J,N){function T(){for(var Aa=X.getSelectionCells(),Ba=[],Ga=0;Ga<Aa.length;Ga++)X.isCellVisible(Aa[Ga])&&Ba.push(Aa[Ga]);X.setSelectionCells(Ba)}function V(Aa){X.setHiddenTags(Aa?[]:fa.slice());T();X.refresh()}function U(Aa,Ba){la.innerText="";if(0<Aa.length){var Ga=document.createElement("table");Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";+var Ma=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var ra=0;ra<Aa.length;ra++)(function(Ca){function Da(){var za=X.getCellsForTags([Ca],null,null,!0);X.isEnabled()?X.setSelectionCells(za):X.highlightCells(za,null,null,70)}var va=0>mxUtils.indexOf(X.hiddenTags,Ca),Na=document.createElement("tr"),Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";var Qa=document.createElement("img");Qa.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Qa.setAttribute("title",+mxResources.get(va?"hideIt":"show",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";Oa.appendChild(Qa);mxEvent.addListener(Qa,"click",function(za){mxEvent.isShiftDown(za)?V(0<=mxUtils.indexOf(X.hiddenTags,Ca)):(X.toggleHiddenTag(Ca),T(),X.refresh());mxEvent.consume(za)});Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.selectImage);Qa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor="pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){V(!0);Da();mxEvent.consume(za)});Oa.appendChild(Qa);Na.appendChild(Oa);Oa=document.createElement("td");Oa.style.overflow=-"hidden";Oa.style.whiteSpace="nowrap";Oa.style.textOverflow="ellipsis";Oa.style.verticalAlign="middle";Oa.style.cursor="pointer";Oa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Oa.appendChild(a);mxEvent.addListener(Oa,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<Y.hiddenTags.length)V(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);-Y.setHiddenTags(Ea);T();Y.refresh()}mxEvent.consume(za)});Na.appendChild(Oa);if(Y.isEnabled()){Oa=document.createElement("td");Oa.style.verticalAlign="middle";Oa.style.textAlign="center";Oa.style.width="18px";if(null==Ba){Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.trashImage);Qa.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor=-"pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);Y.removeTagsForCells(Y.model.getDescendants(Y.model.getRoot()),[Ca]);Y.refresh();mxEvent.consume(za)});Oa.appendChild(Qa)}else{var Ra=document.createElement("input");Ra.setAttribute("type","checkbox");Ra.style.margin="0px";Ra.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ra.checked=Ra.defaultChecked;Ra.style.background=-"transparent";Ra.setAttribute("title",mxResources.get(Ra.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ra,"change",function(za){Ra.checked?Y.addTagsForCells(Y.getSelectionCells(),[Ca]):Y.removeTagsForCells(Y.getSelectionCells(),[Ca]);mxEvent.consume(za)});Oa.appendChild(Ra)}Na.appendChild(Oa)}Ma.appendChild(Na)})(Aa[ra]);Ga.appendChild(Ma);la.appendChild(Ga)}}var Y=this,fa=Y.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding=-"10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);Y.addListener(mxEvent.ROOT,function(){fa=Y.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=Y.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);-fa.sort();Y.isSelectionEmpty()?U(fa):U(fa,Y.getCommonTagsForCells(Y.getSelectionCells()))}});Y.selectionModel.addListener(mxEvent.CHANGE,qa);Y.model.addListener(mxEvent.CHANGE,qa);Y.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";-ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(Y.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ja=wa.cloneNode(!1);Ja.style.backgroundImage="url("+Editor.visibleImage+")";Ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ja,"click",function(Aa){Y.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=Y.hiddenTags.slice());T();Y.refresh();mxEvent.consume(Aa)});ya.appendChild(Ja);null!=+"hidden";Oa.style.whiteSpace="nowrap";Oa.style.textOverflow="ellipsis";Oa.style.verticalAlign="middle";Oa.style.cursor="pointer";Oa.setAttribute("title",Ca);a=document.createElement("a");mxUtils.write(a,Ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);Oa.appendChild(a);mxEvent.addListener(Oa,"click",function(za){if(mxEvent.isShiftDown(za))V(!0),Da();else if(va&&0<X.hiddenTags.length)V(!0);else{var Ea=fa.slice(),C=mxUtils.indexOf(Ea,Ca);Ea.splice(C,1);+X.setHiddenTags(Ea);T();X.refresh()}mxEvent.consume(za)});Na.appendChild(Oa);if(X.isEnabled()){Oa=document.createElement("td");Oa.style.verticalAlign="middle";Oa.style.textAlign="center";Oa.style.width="18px";if(null==Ba){Oa.style.align="center";Oa.style.width="16px";Qa=document.createElement("img");Qa.setAttribute("src",Editor.trashImage);Qa.setAttribute("title",mxResources.get("removeIt",[Ca]));mxUtils.setOpacity(Qa,va?75:25);Qa.className="geAdaptiveAsset";Qa.style.verticalAlign="middle";Qa.style.cursor=+"pointer";Qa.style.width="16px";if(v||Editor.isDarkMode())Qa.style.filter="invert(100%)";mxEvent.addListener(Qa,"click",function(za){var Ea=mxUtils.indexOf(fa,Ca);0<=Ea&&fa.splice(Ea,1);X.removeTagsForCells(X.model.getDescendants(X.model.getRoot()),[Ca]);X.refresh();mxEvent.consume(za)});Oa.appendChild(Qa)}else{var Ra=document.createElement("input");Ra.setAttribute("type","checkbox");Ra.style.margin="0px";Ra.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,Ca);Ra.checked=Ra.defaultChecked;Ra.style.background=+"transparent";Ra.setAttribute("title",mxResources.get(Ra.defaultChecked?"removeIt":"add",[Ca]));mxEvent.addListener(Ra,"change",function(za){Ra.checked?X.addTagsForCells(X.getSelectionCells(),[Ca]):X.removeTagsForCells(X.getSelectionCells(),[Ca]);mxEvent.consume(za)});Oa.appendChild(Ra)}Na.appendChild(Oa)}Ma.appendChild(Na)})(Aa[ra]);Ga.appendChild(Ma);la.appendChild(Ga)}}var X=this,fa=X.hiddenTags.slice(),na=document.createElement("div");na.style.userSelect="none";na.style.overflow="hidden";na.style.padding=+"10px";na.style.height="100%";var la=document.createElement("div");la.style.position="absolute";la.style.boxSizing="border-box";la.style.userSelect="none";la.style.overflow="auto";la.style.padding="3px";la.style.left="0px";la.style.right="0px";la.style.top="0px";la.style.bottom="0px";na.appendChild(la);X.addListener(mxEvent.ROOT,function(){fa=X.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ba){if(k()){Aa=X.getAllTags();for(Ba=0;Ba<Aa.length;Ba++)0>mxUtils.indexOf(fa,Aa[Ba])&&fa.push(Aa[Ba]);+fa.sort();X.isSelectionEmpty()?U(fa):U(fa,X.getCommonTagsForCells(X.getSelectionCells()))}});X.selectionModel.addListener(mxEvent.CHANGE,qa);X.model.addListener(mxEvent.CHANGE,qa);X.addListener(mxEvent.REFRESH,qa);var ya=document.createElement("div");ya.className="geToolbarContainer geDialogToolbar";ya.style.position="absolute";ya.style.display="flex";ya.style.bottom="0px";ya.style.left="0px";ya.style.right="0px";ya.style.height="32px";ya.style.overflow="hidden";ya.style.padding="3px 4px 4px 4px";+ya.style.borderWidth="1px 0px 0px 0px";ya.style.borderStyle="solid";ya.style.whiteSpace="nowrap";if(X.isEnabled()){la.style.bottom="32px";var wa=document.createElement("a");wa.className="geButton";var Ja=wa.cloneNode(!1);Ja.style.backgroundImage="url("+Editor.visibleImage+")";Ja.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ja,"click",function(Aa){X.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(fa=X.hiddenTags.slice());T();X.refresh();mxEvent.consume(Aa)});ya.appendChild(Ja);null!=J&&(wa=wa.cloneNode(!1),wa.style.backgroundImage="url("+Editor.plusImage+")",wa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(wa,"click",function(Aa){J(fa,function(Ba){fa=Ba;qa()});mxEvent.consume(Aa)}),ya.appendChild(wa));na.appendChild(ya)}null!=N&&ya.appendChild(N);return{div:na,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var J=Graph.customFontElements[v];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var J=Editor.guid();document.execCommand("fontname",!1,J);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),T=!1,V=0;V<N.length;V++)N[V].getAttribute("face")==J&&(T=!0,N[V].setAttribute("face",k),null!=v?N[V].setAttribute("data-font-src",v):N[V].removeAttribute("data-font-src"));T||document.execCommand("fontname",!1,k)};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=L.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=-function(k,v,J,N,T,V,U,Y,fa,na,la,qa,ya,wa,Ja,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var ra=Ba.ownerDocument;Ga=null!=ra.createElementNS?ra.createElementNS(mxConstants.NS_SVG,"style"):ra.createElement("style");null!=ra.setAttributeNS?+function(k,v,J,N,T,V,U,X,fa,na,la,qa,ya,wa,Ja,Aa){var Ba=K.apply(this,arguments);if(null!=qa){var Ga=Ba.getAttribute("style");null==Ga&&(Ga="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ba.setAttribute("style",Ga+(" color-scheme: "+qa+";"))}var Ma=this.getCustomFonts();if(la&&0<Ma.length){var ra=Ba.ownerDocument;Ga=null!=ra.createElementNS?ra.createElementNS(mxConstants.NS_SVG,"style"):ra.createElement("style");null!=ra.setAttributeNS?Ga.setAttributeNS("type","text/css"):Ga.setAttribute("type","text/css");for(var Ca="",Da="",va=0;va<Ma.length;va++){var Na=Ma[va].name,Oa=Ma[va].url;Graph.isCssFontUrl(Oa)?Ca+="@import url("+Graph.rewriteGoogleFontUrl(Oa)+");\n":Da+='@font-face {\nfont-family: "'+Na+'";\nsrc: url("'+Oa+'");\n}\n'}Ga.appendChild(ra.createTextNode(Ca+Da));Ba.getElementsByTagName("defs")[0].appendChild(Ga)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ba);this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba),Ga=Ba.ownerDocument.getElementById("MJX-SVG-styles"),null!=Ga&&Ba.getElementsByTagName("defs")[0].appendChild(Ga.cloneNode(!0)));return Ba};var aa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){aa.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,-k.control]};var ia=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ia.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'++k.control]};var ja=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ja.apply(this,arguments);this.enumerationState=0};var ca=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ca.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var J=k.view.scale,N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==J||(v.bounds=k,v.value=N,v.scale=J,v.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,J){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 N=!1,T=0,V=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),Y=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=-this.stoppingCustomActions,qa=k[V++],ya=[];if(null!=qa.open)if(Y(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),Y());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,+!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,T=0,V=0,U=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),X=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<T&&T--;0==T&&na()}),na=mxUtils.bind(this,function(){if(V<k.length){var la=+this.stoppingCustomActions,qa=k[V++],ya=[];if(null!=qa.open)if(X(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,J))return}else this.openLink(qa.open);null==qa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),X());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,la?0:qa.fadeIn.delay));null!=qa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,la?0:qa.fadeOut.delay));null!=qa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(U(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){U();var wa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(wa),1);this.setCellsVisible(wa,!0)}null!=qa.hide&&(U(),wa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(wa),0),this.setCellsVisible(wa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(U(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(U(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));wa=[];null!=qa.select&&this.isEnabled()&&(wa=this.getCellsForAction(qa.select),this.setSelectionCells(wa));null!=qa.highlight&&(wa=this.getCellsForAction(qa.highlight),this.highlightCells(wa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(wa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<wa.length&&this.scrollCellToVisible(wa[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var Ja=qa.tags.toggle;0==Ja.length&&(Ja=this.getAllTags());for(wa=0;wa<Ja.length;wa++)this.toggleHiddenTag(Ja[wa])}Ja=null;null!=qa.tags.hidden&&(null==Ja&&(Ja=[]),Ja=Ja.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==Ja&&(Ja=[]);var Aa=this.getAllTags();for(wa=0;wa<Aa.length;wa++)0>mxUtils.indexOf(qa.tags.visible,-Aa[wa])&&0>mxUtils.indexOf(Ja,Aa[wa])&&Ja.push(Aa[wa])}null!=Ja&&this.setHiddenTags(Ja);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():Y()}else this.stoppingCustomActions=this.executingCustomActions=!1,Y(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");+Aa[wa])&&0>mxUtils.indexOf(Ja,Aa[wa])&&Ja.push(Aa[wa])}null!=Ja&&this.setHiddenTags(Ja);this.refresh()}0<ya.length&&(T++,this.executeAnimations(ya,fa,la?1:qa.steps,la?0:qa.delay));0==T?na():X()}else this.stoppingCustomActions=this.executingCustomActions=!1,X(),null!=v&&v()});na()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var J=this.getLinkForCell(v);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,J));if(this.isHtmlLabel(v)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var T=N.getElementsByTagName("a"),V=!1,U=0;U<T.length;U++)J=T[U].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(T[U].setAttribute("href",this.updateCustomLink(k,J)),V=!0);V&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var J=JSON.parse(v.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),v="data:action/json,"+JSON.stringify(J))}catch(N){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var J=0;J<v.length;J++){var N=v[J],T;for(T in N)this.updateCustomLinkAction(k,N[T],"cells"),this.updateCustomLinkAction(k,N[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,J){if(null!=v&&null!=v[J]){for(var N=[],T=0;T<v[J].length;T++)if("*"==v[J][T])N.push(v[J][T]);else{var V=k[v[J][T]];null!=V?""!=V&&N.push(V):N.push(v[J][T])}v[J]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var X=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return X.apply(this,arguments)&&+null,v));if(null!=k.excludeCells){for(var J=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&J.push(v[N]);v=J}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(V){return V!=N},N))}else{var T=this.model.getCell(k[J]);null!=T&&v.push(T)}return v};var Y=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return Y.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;-for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},Y=0;Y<k.length;Y++)0<k[Y].length&&(U[k[Y]]=!0,V++);for(Y=0;Y<v.length;Y++)if(J&&this.model.getParent(v[Y])==this.model.root||this.model.isVertex(v[Y])||this.model.isEdge(v[Y])){var fa=this.getTagsForCell(v[Y]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=-na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=N||this.isCellVisible(v[Y]))&&T.push(v[Y])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};+for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,J,N){var T=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var V=0,U={},X=0;X<k.length;X++)0<k[X].length&&(U[k[X]]=!0,V++);for(X=0;X<v.length;X++)if(J&&this.model.getParent(v[X])==this.model.root||this.model.isVertex(v[X])||this.model.isEdge(v[X])){var fa=this.getTagsForCell(v[X]),na=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=k.length)){for(var la=+na=0;la<fa.length&&na<V;la++)null!=U[fa[la]]&&na++;na=na==V}na&&(1!=N||this.isCellVisible(v[X]))&&T.push(v[X])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,J=[],N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);J=[];if(0<T.length){T=T.split(" ");for(var V={},U=0;U<T.length;U++)if(null==v||null!=v[T[U]])V[T[U]]=!0,J.push(T[U]);v=V}else return[]}return J};Graph.prototype.getTagsForCells=function(k){for(var v=[],J={},N=0;N<k.length;N++){var T=this.getTagsForCell(k[N]);if(0<T.length){T=T.split(" ");for(var V=0;V<T.length;V++)null==J[T[V]]&&(J[T[V]]=!0,v.push(T[V]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var N=this.getTagsForCell(k[J]),T=N.split(" "),V=!1,U=0;U<-v.length;U++){var Y=mxUtils.trim(v[U]);""!=Y&&0>mxUtils.indexOf(T,Y)&&(N=0<N.length?N+" "+Y:Y,V=!0)}V&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),V=!1,U=0;U<v.length;U++){var Y=mxUtils.indexOf(T,v[U]);0<=Y&&(T.splice(Y,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",+v.length;U++){var X=mxUtils.trim(v[U]);""!=X&&0>mxUtils.indexOf(T,X)&&(N=0<N.length?N+" "+X:X,V=!0)}V&&this.setAttributeForCell(k[J],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var N=this.getTagsForCell(k[J]);if(0<N.length){for(var T=N.split(" "),V=!1,U=0;U<v.length;U++){var X=mxUtils.indexOf(T,v[U]);0<=X&&(T.splice(X,1),V=!0)}V&&this.setAttributeForCell(k[J],"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,J,N){for(var T=0;T<k.length;T++)this.highlightCell(k[T],v,J,N)};Graph.prototype.highlightCell=function(k,v,J,N,T){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var V=null;null!=k&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+T),V=new mxCellHighlight(this,v,T,!1),null!=N&&(V.opacity=N),V.highlight(k),window.setTimeout(function(){null!=V.shape&&(mxUtils.setPrefixedStyle(V.shape.node.style,"transition","all 1200ms ease-in-out"),V.shape.node.style.opacity=0);window.setTimeout(function(){V.destroy()},1200)},J));return V};Graph.prototype.addSvgShadow=function(k,v,J,N){N=null!=N?N:!0;var T=Math.ceil(this.svgShadowSize*this.svgShadowBlur);null!=J&&J||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(this.updateShadowFilter(v,!0),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+T),k.setAttribute("height",parseInt(k.getAttribute("height"))+T),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+T,@@ -3460,32 +3460,32 @@ mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.x[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=-function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var ca=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,V,U,Y,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return ca.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,V){"1"==mxUtils.getValue(v.style,"lineShape",+function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var da=mxMarker.createMarker;mxMarker.createMarker=function(k,v,J,N,T,V,U,X,fa,na){if(null!=J&&null==mxMarker.markers[J]){var la=this.getPackageForType(J);null!=la&&mxStencilRegistry.getStencil(la)}return da.apply(this,arguments)};var ha=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,J,N,T,V){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ha.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,J,N){function T(){Ja.value=Math.max(1,Math.min(la,Math.max(parseInt(Ja.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(la,Math.min(parseInt(Ja.value),parseInt(wa.value))))}function V(ua){k.lastPrintPagesRadioChecked=ya.checked;k.lastPrintSelectionOnlyChecked=Ba.checked;k.lastPrintCropRadioChecked=Ma.checked;k.lastPrintFitRadioChecked=ra.checked;ya.checked&&wa.value<Ja.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ja.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);R.value=Math.max(1,Math.min(1600,parseInt(R.value)))+"%";k.lastPrintZoom=R.value;k.lastPrintBorder=P.value;k.lastPrintGrid=W.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=pa.checked;k.lastPrintSheetsAcross=Ea.value;k.lastPrintSheetsDown=C.value;var Ia={};Ia.border=parseInt(P.value);Ia.scale=parseInt(R.value)/100;-Ia.grid=W.checked;Ia.shadows=ja.checked;Ia.transparent=ka.checked;Ia.includeCopy=pa.checked;Ia.sheetsAcross=parseInt(Ea.value);Ia.sheetsDown=parseInt(C.value);Ia.pagesFrom=parseInt(wa.value);Ia.pagesTo=parseInt(Ja.value);Ia.allPages=qa.checked;Ia.selection=Ba.checked;Ia.pageView=Ga.checked;Ia.crop=Ma.checked;Ia.fit=ra.checked;return null!=J?J(!ua,Ia):k.print(!ua,Ia)}var U=k.editor.graph,Y=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";-fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));Y.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);+Ia.grid=W.checked;Ia.shadows=ia.checked;Ia.transparent=ka.checked;Ia.includeCopy=pa.checked;Ia.sheetsAcross=parseInt(Ea.value);Ia.sheetsDown=parseInt(C.value);Ia.pagesFrom=parseInt(wa.value);Ia.pagesTo=parseInt(Ja.value);Ia.allPages=qa.checked;Ia.selection=Ba.checked;Ia.pageView=Ga.checked;Ia.crop=Ma.checked;Ia.fit=ra.checked;return null!=J?J(!ua,Ia):k.print(!ua,Ia)}var U=k.editor.graph,X=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";+fa.style.marginTop="0px";mxUtils.write(fa,v||mxResources.get("print"));X.appendChild(fa);var na=1,la=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");fa.appendChild(qa);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){qa.checked=!0});fa.appendChild(v);mxUtils.br(fa);var ya=qa.cloneNode(!0);fa.appendChild(ya);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");fa.appendChild(v);mxEvent.addListener(v,"click",function(){ya.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type","number");wa.setAttribute("min","1");wa.style.width="40px";fa.appendChild(wa);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));fa.appendChild(v);var Ja=wa.cloneNode(!0);fa.appendChild(Ja);mxEvent.addListener(wa,"focus",function(){ya.checked=!0});mxEvent.addListener(Ja,"focus",function(){ya.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ja,"change",T);if(null!=k.pages&&(la=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<la;Aa++)if(k.currentPage==k.pages[Aa]){na=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(la,Math.max(1,k.lastPrintPagesFromInput)),Ja.value=Math.min(la,Math.max(1,-k.lastPrintPagesToInput))):(wa.value=na,Ja.value=na);wa.setAttribute("max",la);Ja.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ja.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&Y.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=-"1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&Y.appendChild(fa);+k.lastPrintPagesToInput))):(wa.value=na,Ja.value=na);wa.setAttribute("max",la);Ja.setAttribute("max",la);Aa=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=na;Ja.value=na;ya.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";fa.appendChild(Aa);1<la&&X.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom=+"1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var Ba=document.createElement("input");Ba.setAttribute("name","pages-printdialog");Ba.setAttribute("type",1==la?"checkbox":"radio");Ba.style.marginRight="8px";U.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");U.isEnabled()&&(fa.appendChild(Ba),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),fa.appendChild(v));(U.isEnabled()||1<la)&&X.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ya.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ba.checked=!0:qa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){Ba.checked=!Ba.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var Ga=document.createElement("input");Ga.style.marginBottom="8px";Ga.style.marginRight="8px";Ga.setAttribute("type","radio");Ga.setAttribute("name","printSize");U.appendChild(Ga);v=document.createElement("span");-mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=-!0});Y.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom="8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ra);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");+mxUtils.write(v,mxResources.get("pageView"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ga.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ma=document.createElement("input");Ma.style.marginBottom="8px";Ma.style.marginRight="8px";Ma.setAttribute("type","radio");Ma.setAttribute("name","printSize");U.appendChild(Ma);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));U.appendChild(v);mxEvent.addListener(U,"click",function(){Ma.checked=+!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom="8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ra);U.appendChild(v);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Aa=document.createElement("tbody");var Ca=document.createElement("tr"),Da=Ca.cloneNode(!0),va=document.createElement("td"),Na=va.cloneNode(!0),Oa=va.cloneNode(!0),Qa=va.cloneNode(!0),Ra=va.cloneNode(!0),za=va.cloneNode(!0);va.style.textAlign="right";Qa.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=ra&&(ra.checked=!ra.checked)});var Ea=document.createElement("input");Ea.style.margin="0 2px";Ea.style.boxSizing="border-box";Ea.setAttribute("value",k.lastPrintSheetsAcross||"1");Ea.setAttribute("min","1");Ea.setAttribute("type","number");Ea.style.width="40px";Na.appendChild(Ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Oa.appendChild(v);mxUtils.write(Qa,mxResources.get("fitToBy"));var C=Ea.cloneNode(!0);C.setAttribute("value",k.lastPrintSheetsDown||"1");Ra.appendChild(C);mxEvent.addListener(Ea,"click",function(ua){ra.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(C,"click",function(ua){ra.checked=-!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?ra.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Oa);Da.appendChild(Qa);Da.appendChild(Ra);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);Y.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";+!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?Ma.checked=!0:k.lastPrintFitRadioChecked?ra.checked=!0:Ga.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));za.appendChild(v);Ca.appendChild(va);Ca.appendChild(Na);Ca.appendChild(Oa);Da.appendChild(Qa);Da.appendChild(Ra);Da.appendChild(za);Aa.appendChild(Ca);Aa.appendChild(Da);fa.appendChild(Aa);U.appendChild(fa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.style.width="40px";P.style.marginLeft="4px";P.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;U.appendChild(P);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");U.appendChild(v);var R=document.createElement("input");R.style.width="60px";R.style.marginLeft="4px";R.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(R);mxUtils.br(U);var W=document.createElement("input");W.setAttribute("type","checkbox");W.style.marginTop="12px";W.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(W);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));U.appendChild(v);mxEvent.addListener(v,-"click",function(ua){W.checked=!0;mxEvent.consume(ua)});var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="12px";ja.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ja);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,-"click",function(ua){ja.checked=!0;mxEvent.consume(ua)});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ja.style.display="none",v.style.display="none");var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ka),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),U.appendChild(v),mxEvent.addListener(v,+"click",function(ua){W.checked=!0;mxEvent.consume(ua)});var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintShadow?k.lastPrintShadow:!1;U.appendChild(ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("shadows"));U.appendChild(v);k.isOffline()&&!mxClient.IS_CHROMEAPP||v.appendChild(k.createHelpIcon("https://github.com/jgraph/drawio/discussions/5136"));mxEvent.addListener(v,+"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});Editor.enableShadowOption?null!=J&&mxUtils.br(U):(ia.style.display="none",v.style.display="none");var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(U.appendChild(ka),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),U.appendChild(v),mxEvent.addListener(v,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(pa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(v),mxEvent.addListener(v,"click",-function(ua){pa.checked=!0;mxEvent.consume(ua)}));Y.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&(fa=mxUtils.button(mxResources.get("preview"),-function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);Y.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(Y.classList.add("geDarkMode"),Y.style.colorScheme=-"dark"):(Y.classList.remove("geDarkMode"),Y.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Ia){ua=Ia.getProperty("dialog");Y.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=Y};var Z=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||+function(ua){pa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);v=document.createElement("div");v.style.marginTop="30px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()&&!mxClient.IS_CHROMEAPP||null!=J||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&v.appendChild(U);PrintDialog.previewEnabled&&null==J&&(fa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),V(!1)}catch(ua){k.handleError(ua)}}),fa.className="geBtn",v.appendChild(fa));N=null!=N?N:null!=J?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),V(!0)}catch(ua){k.handleError(ua)}});N.className="geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(U);X.appendChild(v);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme=+"dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Ia){ua=Ia.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Z=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Z.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),-this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.3";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+this.shadowVisible=!this.shadowVisible)}})();(function(){EditorUi.VERSION="28.0.4";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.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||"1"==urlParams.dev;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.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -3503,10 +3503,10 @@ EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,g){localStorage.removeItem(c);g()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var g=this.editor.graph;g.mathEnabled=c;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=-function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,I=x.spin,M=null,L=null,K=mxUtils.bind(this,function(da){null!=da&&da()}),aa=this;x.spin=function(da,ba,oa,X){X=null!=X?X:F;var ca=!1;if(!this.active){var ha=-Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},X));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);da==document.body&&"1"==urlParams.embedInline&&(da=aa.diagramContainer,c=da.scrollLeft+da.clientWidth/2,g=da.scrollTop+da.clientHeight/2);I.call(this,da);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=da.scrollTop+"px",-x.el.style.marginLeft=da.scrollLeft+"px");this.active=!0;null!=ba&&(ca=document.createElement("div"),ca.className="geSpinnerStatus",ca.setAttribute("title",ba),da==document.body?(ca.style.left=Math.max(0,c)+"px",ca.style.top=Math.max(0,g+66)+"px"):(ca.style.left="50%",ca.style.top="50%",ca.style.marginTop="70px"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-1)&&(ba+="..."),ca.innerText=ba,da.appendChild(ca),x.status=ca);this.pause=mxUtils.bind(this,function(){var Z=K;this.active&&-(X=Math.max(0,X-(Date.now()-ha)),Z=mxUtils.bind(this,function(k){this.spin(da,ba,oa,X);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(da,ba,oa,X);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return Z});ca=!0}return ca};var ia=x.stop;x.stop=function(){ia.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};+function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,g,m){var n=null==c||null==g;m=null!=m?m:24;var x=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),F=this.timeout,I=x.spin,M=null,L=null,K=mxUtils.bind(this,function(ca){null!=ca&&ca()}),aa=this;x.spin=function(ca,ba,oa,Y){Y=null!=Y?Y:F;var da=!1;if(!this.active){var ha=+Date.now();null!=oa&&(M=window.setTimeout(function(){x.stop();M=null;oa({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},Y));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ca==document.body&&"1"==urlParams.embedInline&&(ca=aa.diagramContainer,c=ca.scrollLeft+ca.clientWidth/2,g=ca.scrollTop+ca.clientHeight/2);I.call(this,ca);"1"==urlParams.embedInline&&null!=x.el&&(x.el.style.marginTop=ca.scrollTop+"px",+x.el.style.marginLeft=ca.scrollLeft+"px");this.active=!0;null!=ba&&(da=document.createElement("div"),da.className="geSpinnerStatus",da.setAttribute("title",ba),ca==document.body?(da.style.left=Math.max(0,c)+"px",da.style.top=Math.max(0,g+66)+"px"):(da.style.left="50%",da.style.top="50%",da.style.marginTop="70px"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-1)&&(ba+="..."),da.innerText=ba,ca.appendChild(da),x.status=da);this.pause=mxUtils.bind(this,function(){var Z=K;this.active&&+(Y=Math.max(0,Y-(Date.now()-ha)),Z=mxUtils.bind(this,function(k){this.spin(ca,ba,oa,Y);if(null!=k)try{k(),L=mxUtils.bind(this,function(){this.spin(ca,ba,oa,Y);try{k()}catch(v){null!=oa&&oa(v)}})}catch(v){null!=oa&&oa(v)}}));this.stop();return Z});da=!0}return da};var ja=x.stop;x.stop=function(){ja.call(this);this.active&&(this.active=!1,null!=M&&(window.clearTimeout(M),M=null),null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status),x.status=null)};x.pause=function(){return K};return x};EditorUi.prototype.isCompatibleString=function(c){try{if(c=mxUtils.trim(c),"<"==c.charAt(0)){var g=mxUtils.parseXml(c),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}}catch(n){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=g.getFunction,n=this.editor.graph,x=this;g.getFunction=function(F){if(n.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var I=x.getSelectedPageIndex();if(mxEvent.isShiftDown(F)){if(37==F.keyCode)return function(){0<@@ -3515,11 +3515,11 @@ if(40==F.keyCode)return function(){I<x.pages.length-1&&x.selectPage(x.pages[x.pac.lastIndexOf("</mxfile>");n>m&&(g=c.substring(m,n+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var x=mxUtils.parseXml(c),F=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=F?mxUtils.getXml(F):""}}catch(I){}return g};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var g=c.indexOf('<meta charset="utf-8">');0<=g&&(c=c.slice(0,g)+'<meta charset="utf-8"/>'+c.slice(g+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",g);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var m=null!=c?this.editor.extractGraphModel(c,!0):null;null!=m&&(c=m);if(null!=c){m=this.editor.graph;m.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,x=c.getElementsByTagName("diagram");if(1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var F=x.length-1;0<=F;F--){var I=this.updatePageRoot(new DiagramPage(x[F]));null==I.getName()&&I.setName(mxResources.get("pageWithNumber",[F+1]));m.model.execute(new ChangePage(this,I,0==F?I:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",-[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)m.model.execute(new ChangePage(this,n[F],null));var M=this.getCurrentFile();null!=M&&M.fileReplaced(g)}finally{m.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){g=-null!=g?g:this.editor.graph;x=null!=x?x:!1;L=null!=L?L:!0;aa=null!=aa?aa:!Editor.defaultCompressed;var ba=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var oa="_blank";else ba=oa=n;if(null==c)return"";var X=c;if("mxfile"!=X.nodeName.toLowerCase()){if(aa){var ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());ca.appendChild(c)}else{ca=Graph.zapGremlins(mxUtils.getXml(c));X=Graph.compress(ca);-if(Graph.decompress(X)!=ca)return ca;ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());mxUtils.setTextContent(ca,X)}X=c.ownerDocument.createElement("mxfile");X.appendChild(ca)}K?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):-(X.removeAttribute("userAgent"),X.removeAttribute("modified"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),X.removeAttribute("etag"),mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),1<X.getElementsByTagName("diagram").length&&-null!=this.pages&&X.setAttribute("pages",this.pages.length));null!=ia&&(X=X.cloneNode(!0),X.setAttribute("scale",ia));null!=da&&(X=X.cloneNode(!0),X.setAttribute("border",da));c=aa?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!F&&!x&&(I||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(X),g,null!=m?m.getTitle():null,oa,ba);else if(F||!x&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(X),+[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(F=0;F<n.length;F++)m.model.execute(new ChangePage(this,n[F],null));var M=this.getCurrentFile();null!=M&&M.fileReplaced(g)}finally{m.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){g=+null!=g?g:this.editor.graph;x=null!=x?x:!1;L=null!=L?L:!0;aa=null!=aa?aa:!Editor.defaultCompressed;var ba=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var oa="_blank";else ba=oa=n;if(null==c)return"";var Y=c;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var da=c.ownerDocument.createElement("diagram");da.setAttribute("name",mxResources.get("pageWithNumber",[1]));da.setAttribute("id",Editor.guid());da.appendChild(c)}else{da=Graph.zapGremlins(mxUtils.getXml(c));Y=Graph.compress(da);+if(Graph.decompress(Y)!=da)return da;da=c.ownerDocument.createElement("diagram");da.setAttribute("name",mxResources.get("pageWithNumber",[1]));da.setAttribute("id",Editor.guid());mxUtils.setTextContent(da,Y)}Y=c.ownerDocument.createElement("mxfile");Y.appendChild(da)}K?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):+(Y.removeAttribute("userAgent"),Y.removeAttribute("modified"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),Y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),1<Y.getElementsByTagName("diagram").length&&+null!=this.pages&&Y.setAttribute("pages",this.pages.length));null!=ja&&(Y=Y.cloneNode(!0),Y.setAttribute("scale",ja));null!=ca&&(Y=Y.cloneNode(!0),Y.setAttribute("border",ca));c=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!F&&!x&&(I||null!=m&&/(\.html)$/i.test(m.getTitle())))c=this.getHtml2(mxUtils.getXml(Y),g,null!=m?m.getTitle():null,oa,ba);else if(F||!x&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(n=null),m=this.getSvgFileProperties(Y),c=this.getEmbeddedSvg(c,g,n,null,M,L,ba,null,null,m.scale,m.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,g,m,n){c=null!=c?c:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var x=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var K=L.getElementsByTagName("mxGraphModel"),aa=0<K.length?K[0]:null;K=L;null==aa&&m?(aa=mxUtils.getNodeValue(L),0<aa.length&&(aa=Graph.decompress(aa),null!=aa&&0<aa.length&&(K=L.cloneNode(!1),K.appendChild(mxUtils.parseXml(aa).documentElement)))):null==aa||m?K=L.cloneNode(!0):(K=L.cloneNode(!1),mxUtils.setTextContent(K,Graph.compressNode(aa)));x.appendChild(K)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(x),x=this.fileNode.cloneNode(!1),g)c(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var F=this.pages[g],I=F.node;if(F!=this.currentPage)if(F.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(F.root));this.editor.graph.saveViewState(F.viewState,M,null,n);EditorUi.removeChildNodes(I);I.appendChild(M);delete F.needsUpdate}else n&&(this.updatePageRoot(F),null!=F.viewState.backgroundImage&&(null!=F.viewState.backgroundImage.originalSrc?F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.originalSrc,F):Graph.isPageLink(F.viewState.backgroundImage.src)&&(F.viewState.backgroundImage=this.createImageForPageLink(F.viewState.backgroundImage.src,F))),null!=F.viewState.backgroundImage&&@@ -3529,9 +3529,9 @@ mxUtils.getXml(m)}catch(F){c[EditorUi.DIFF_INSERT][g].data=F.message}if(null!=c[delete I[M];mxUtils.isEmptyObject(I)&&delete x.cells[F]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,g){if(null!=c.attributes)for(var m=0;m<c.attributes.length;m++)"as"!=c.attributes[m].name&&c.setAttribute(c.attributes[m].name,this.anonymizeString(c.attributes[m].value,g));if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)this.anonymizeAttributes(c.childNodes[m],g)};EditorUi.prototype.anonymizeNode=function(c,g){g=c.getElementsByTagName("mxCell");for(var m=0;m<g.length;m++)null!=g[m].getAttribute("value")&&g[m].setAttribute("value","["+g[m].getAttribute("value").length+"]"),null!=g[m].getAttribute("xmlValue")&&g[m].setAttribute("xmlValue","["+g[m].getAttribute("xmlValue").length+"]"),null!=g[m].getAttribute("style")&&g[m].setAttribute("style","["+g[m].getAttribute("style").length+"]"),null!=g[m].parentNode&&"root"!=g[m].parentNode.nodeName&&null!=g[m].parentNode.parentNode&&(g[m].setAttribute("id",g[m].parentNode.getAttribute("id")),g[m].parentNode.parentNode.replaceChild(g[m],g[m].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;-var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var X=null!=this.pages?this.pages[0]:null;null==X||this.currentPage==X?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=X.viewState&&null!=X.viewState&&ba.setBackgroundImage(X.viewState.backgroundImage);-ba.getGlobalVariable=function(ca){return"page"==ca&&null!=X?X.getName():"pagenumber"==ca?1:oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=X&&ba.model.setRoot(X.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,c,g,m,n,x,M,K,ia,da);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost++(g.clearAutosave(),this.clearStatus(),c?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){x=null!=x?x:!0;F=null!=F?F:!1;K=null!=K?K:!Editor.defaultCompressed;+var ba=this.editor.graph;if((g||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var oa=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var Y=null!=this.pages?this.pages[0]:null;null==Y||this.currentPage==Y?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=Y.viewState&&null!=Y.viewState&&ba.setBackgroundImage(Y.viewState.backgroundImage);+ba.getGlobalVariable=function(da){return"page"==da&&null!=Y?Y.getName():"pagenumber"==da?1:oa.apply(this,arguments)};document.body.appendChild(ba.container);null!=Y&&ba.model.setRoot(Y.root)}I=null!=I?I:this.getXmlFileData(x,F,K,aa);L=null!=L?L:this.getCurrentFile();c=this.createFileData(I,ba,L,window.location.href,c,g,m,n,x,M,K,ja,ca);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,g,m,n,x,F){F=null!=F?F:!0;var I=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){I=F?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var L=g.view.scale;F=Math.floor(I.x/L-g.view.translate.x);L=Math.floor(I.y/L-g.view.translate.y);I=g.background;null==x&&(g=this.getBasenames().join(";"),0<g.length&&(M=EditorUi.drawHost+"/embed.js?s="+g));c.setAttribute("x0",F);c.setAttribute("y0",L)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=x&&(x=x.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+@@ -3542,21 +3542,21 @@ EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};Editif(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)x=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=x?x:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var I=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(F=0;F<I.length;F++)g[I[F]]=!0;var M=this.editor.graph.getModel(),L=M.getChildren(M.root);for(F=0;F<L.length;F++){var K=L[F];M.setVisible(K,g[K.id]||!1)}}catch(aa){}};EditorUi.prototype.getBaseFilename=function(c){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=-function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X,ca){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,K,aa,ia,void 0,void 0,!F,da,ba,oa,X,ca)}catch(Y){this.handleError(Y)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;+function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename(!x),Z=ha+("xml"==c||"pdf"==c&&aa?".drawio":"")+"."+c;if("xml"==c){var k=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,x,null,null,null,g);this.saveData(Z,c,k,"text/xml")}else if("html"==c)k=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(Z,c,k,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Z=ha+".png":"jpeg"==c&&(Z=ha+".jpg"),this.saveRequest(Z,c,mxUtils.bind(this,function(V,U){try{return this.createDownloadRequest(V,c,n,U,I,x,M,L,K,aa,ja,void 0,void 0,!F,ca,ba,oa,Y,da)}catch(X){this.handleError(X)}}));else{var v=null,J=mxUtils.bind(this,function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==c){var N=this.editor.graph.background;if(I||N==mxConstants.NONE)N=null;var T=this.editor.graph.getSvg(N,null,null,null,null,n);m&&this.editor.graph.addSvgShadow(T);this.editor.convertImages(T,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else Z=ha+".svg",v=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();J(V)}),n)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,g,m,n,x,F,I,M,L,-K,aa,ia,da,ba,oa,X,ca,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X,ca,ha,Z);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X,ca,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&+K,aa,ja,ca,ba,oa,Y,da,ha,Z){c=this.downloadRequestBuilder(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z);g="";for(var k in c)m=c[k],null!=m&&(g+=k+"="+encodeURIComponent(m)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y,da,ha,Z){var k=this.editor.graph,v=k.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==F?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var J=null,N=null,T=null;if(!EditorUi.isElectronApp&&(v.width*v.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};K=K?"1":"0";"pdf"==g&&(null!=aa?(J=aa.from,N=aa.to):0==F&&(T="1"));"xmlpng"==g&&(K="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(F=0;F<this.pages.length;F++)if(this.pages[F]==this.currentPage){J=F;break}F=k.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!x?x||null!=F&&F!=mxConstants.NONE||(F="#ffffff"):F=mxConstants.NONE;x={globalVars:k.getExportVariables()};null!=-aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ia&&isFinite(ia)?ia:null,h:da&&isFinite(da)?da:null,crop:null!=-ba&&ba?"1":"0",fit:null!=X&&X?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:ca,sheetsDown:ha}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m++aa&&null!=aa.from&&(x.globalVars.pagenumber=aa.from+1);L&&(x.grid={size:k.gridSize,steps:k.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:k.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:g,from:J,to:N,allPages:T,bg:null!=F?F:mxConstants.NONE,base64:n,embedXml:K,xml:m,filename:null!=c?c:"",extras:JSON.stringify(x),scale:I,border:M,pageMargin:oa,w:ja&&isFinite(ja)?ja:null,h:ca&&isFinite(ca)?ca:null,crop:null!=+ba&&ba?"1":"0",fit:null!=Y&&Y?"1":"0",shadows:null!=Z&&Z?"1":"0",sheetsAcross:da,sheetsDown:ha}};EditorUi.prototype.setMode=function(c,g){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var g=c.indexOf("#");0<=g&&(c=c.substring(0,g))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,g={};if(null!=c&&0<c.length){var m=c.lastIndexOf("#");if(0<m){c=decodeURIComponent(c.substring(m+1));try{g=JSON.parse(c)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==c||mxUtils.isEmptyObject(c)||(g=g+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(c,g,m){var n=window.location.hash,x=mxUtils.bind(this,function(I){var M=null!=c.data?c.data:"";null!=I&&0<I.length&&(0<M.length&&(M+="\n"),M+=I);I=new LocalFile(this,"csv"!=c.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return n};-this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),-ia()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ia=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ia();aa()}));ia();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};+this.fileLoaded(I);"csv"==c.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,K=null,aa=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),+ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(K);K=window.setTimeout(aa,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();aa()}));ja();aa()}null!=g&&g()});if(null!=c.url&&0<c.url.length){var F=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(F,mxUtils.bind(this,function(I){x(I)}),mxUtils.bind(this,function(I){null!=m&&m(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(c){function g(k){var v=new mxCellOverlay(k.image||x.warningImage,k.tooltip,k.align,k.valign,k.offset);v.addListener(mxEvent.CLICK,function(J,N){n.alert(k.tooltip)});return v}var m=null,n=this;if(null!=c&&0<c.length&&(m=mxUtils.parseXml(c),c=null!=m?m.documentElement:null,null!=c&&"updates"==c.nodeName)){var x=this.editor.graph,F=x.getModel();F.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var M=F.getCell(c.getAttribute("id"));-if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ia=0;ia<aa.length;ia++)x.setAttributeForCell(M,aa[ia].nodeName,0<aa[ia].nodeValue.length?aa[ia].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var da=c.getAttribute("style");null!=da&&x.model.setStyle(M,da)}catch(k){null!=window.console&&console.log("Error in style for "+-M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var X=c.getAttribute("geometry");if(null!=X){X=JSON.parse(X);var ca=x.getCellGeometry(M);if(null!=ca){ca=ca.clone();for(key in X){var ha=parseFloat(X[key]);"dx"==key?ca.x+=ha:"dy"==key?ca.y+=ha:"dw"==key?ca.width+=ha:"dh"==key?ca.height+=ha:-ca[key]=parseFloat(X[key])}x.model.setGeometry(M,ca)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}else if("model"==c.nodeName){for(var Z=c.firstChild;null!=Z&&Z.nodeType!=mxConstants.NODETYPE_ELEMENT;)Z=Z.nextSibling;null!=Z&&(new mxCodec(c.firstChild)).decode(Z,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||+if(null!=M){try{var L=c.getAttribute("value");if(null!=L){var K=mxUtils.parseXml(L).documentElement;if(null!=K)if("1"==K.getAttribute("replace-value"))F.setValue(M,K);else for(var aa=K.attributes,ja=0;ja<aa.length;ja++)x.setAttributeForCell(M,aa[ja].nodeName,0<aa[ja].nodeValue.length?aa[ja].nodeValue:null)}}catch(k){null!=window.console&&console.log("Error in value for "+M.id+": "+k)}try{var ca=c.getAttribute("style");null!=ca&&x.model.setStyle(M,ca)}catch(k){null!=window.console&&console.log("Error in style for "++M.id+": "+k)}try{var ba=c.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(M);null!=oa&&x.addCellOverlay(M,g(oa))}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}try{var Y=c.getAttribute("geometry");if(null!=Y){Y=JSON.parse(Y);var da=x.getCellGeometry(M);if(null!=da){da=da.clone();for(key in Y){var ha=parseFloat(Y[key]);"dx"==key?da.x+=ha:"dy"==key?da.y+=ha:"dw"==key?da.width+=ha:"dh"==key?da.height+=ha:+da[key]=parseFloat(Y[key])}x.model.setGeometry(M,da)}}}catch(k){null!=window.console&&console.log("Error in icon for "+M.id+": "+k)}}}else if("model"==c.nodeName){for(var Z=c.firstChild;null!=Z&&Z.nodeType!=mxConstants.NODETYPE_ELEMENT;)Z=Z.nextSibling;null!=Z&&(new mxCodec(c.firstChild)).decode(Z,F)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(x.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(I=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{F.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return m};EditorUi.prototype.getCopyFilename=function(c,g){var m=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=m.lastIndexOf(".");0<=n&&(c=m.substring(n),m=m.substring(0,n));if(g){g=m;var x=new Date;m=x.getFullYear();n=x.getMonth()+1;var F=x.getDate(),I=x.getHours(),M=x.getMinutes();x=x.getSeconds();m=g+(" "+(m+"-"+n+"-"+F+"-"+I+"-"+M+"-"+x))}return m=mxResources.get("copyOf",[m])+c};EditorUi.prototype.logIfModified=function(c,g){try{null!=c&&g&&EditorUi.debug("File.closed",[c])}catch(m){}};EditorUi.prototype.fileLoaded=function(c,g,m){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var F=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=n&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():@@ -3566,7 +3566,7 @@ this.chromelessResize&&this.chromelessResize();null!=m&&m();this.editor.fireEven[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=c)try{c.close()}catch(L){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||F():F()});g?c():(null!=M.fallbackFileData&&(M.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,M.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(M,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else F();return x};EditorUi.prototype.getHashValueForPages=function(c,g){var m=0,n=new mxGraphModel,x=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var F=0;F<c.length;F++){this.updatePageRoot(c[F]);var I=c[F].node.cloneNode(!1);I.removeAttribute("name");n.root=c[F].root;var M=x.encode(n);this.editor.graph.saveViewState(c[F].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");I.appendChild(M);null!=g&&(g.eltCount+=I.getElementsByTagName("*").length,g.nodeCount+=I.getElementsByTagName("mxCell").length);m=(m<<5)-m+-this.hashValue(I,function(L,K,aa,ia){return!ia||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ia&&"mxCell"==L.nodeName&&"previous"==K?null:aa:Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=c.attributes.length);+this.hashValue(I,function(L,K,aa,ja){return!ja||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=K&&"y"!=K&&"width"!=K&&"height"!=K?ja&&"mxCell"==L.nodeName&&"previous"==K?null:aa:Math.round(aa)},g)<<0}return m};EditorUi.prototype.hashValue=function(c,g,m){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,g,m));if(null!=c.attributes){null!=m&&(m.attrCount+=c.attributes.length);for(var x=0;x<c.attributes.length;x++){var F=c.attributes[x].name,I=null!=g?g(c,F,c.attributes[x].value,!0):c.attributes[x].value;null!=I&&(n^=this.hashValue(F,g,m)+this.hashValue(I,g,m))}}if(null!=c.childNodes)for(x=0;x<c.childNodes.length;x++)n=(n<<5)-n+this.hashValue(c.childNodes[x],g,m)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);g=0;null!=m&&(m.byteCount+=c.length);for(x=0;x<c.length;x++)g=(g<<5)-g+c.charCodeAt(x)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,g,m,n,x,F,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var g=0;g<c.length;g++)null!=c[g].xml&&"<"!=c[g].xml.charAt(0)&&(c[g].xml=mxUtils.trim(Graph.decompress(c[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(c,null,2));g.appendChild(m);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),@@ -3576,47 +3576,47 @@ function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):thifunction(){this.fireEvent(new mxEventObject(m))});this[n].window.setVisible(!0)}else null==g&&this[n].window.setVisible(!this[n].window.isVisible());null!=g&&(this[n].doSearch(g),this[n].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,g,m,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var x=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var F=0;F<this.openLibraries.length;F++)if(this.openLibraries[F].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[F],this.openLibraries);break}x={file:c,images:g,title:m,expand:n};this.openLibraries.push(x)}else this.scratchpad=c;F=this.sidebar.palettes[c.getHash()];F=null!=F?F[F.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,M=mxUtils.bind(this,function(ha,Z){0==ha.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(ha,Z)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==m&&(m=c.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),m,null!=n?n:!0,mxUtils.bind(this,function(ha){M(g,ha)}));null!=x&&(x.div=L);this.repositionLibrary(F,"L.scratchpad"!=c.getHash());n=L.parentNode.previousSibling;m=n.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var K=document.createElement("div");-K.style.backgroundColor="inherit";n.style.position="relative";var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ia=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=-ia?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var da=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),-ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ia&&(ia=aa.cloneNode(!1),ia.setAttribute("src",Editor.saveImage),ia.setAttribute("title",mxResources.get("save")),K.insertBefore(ia,K.firstChild),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),-g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ia||c.isModified()||(ia.parentNode.removeChild(ia),ia=null)});mxEvent.consume(Z)})))}),X=mxUtils.bind(this,function(ha,Z,k,v){ha=da.cloneCells(mxUtils.sortCells(da.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var N=da.getCellGeometry(ha[J]);null!=N&&N.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&-(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),ca=mxUtils.bind(this,function(ha){if(da.isSelectionEmpty())da.getRubberband().isActive()?(da.getRubberband().execute(ha),da.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=da.getSelectionCells(),k=da.view.getBounds(Z);if(null!=k&&0<k.width&&-0<k.height){var v=da.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=da.view.translate.x;k.y-=da.view.translate.y;X(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler.first&&(da.graphHandler.suspend(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor=-"light-dark(#fefefe, #000000)",L.style.cursor="copy",da.panningManager.stop(),da.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){da.isMouseDown&&null!=da.panningManager&&null!=da.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,da.panningManager.stop(),da.graphHandler.reset(),da.isMouseDown=!1,da.autoScroll=!0,ca(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){da.isMouseDown&&null!=da.graphHandler.first&&-(da.graphHandler.resume(),null!=da.graphHandler.hint&&(da.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",da.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor=-"";L.style.backgroundColor="";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,N,T,V,U,Y){if(null!=Z&&"image/"==k.substring(0,6))Z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Z),Z=[new mxCell("",new mxGeometry(0,0,N,T),Z)],Z[0].vertex=!0,X(Z,new mxRectangle(0,0,N,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=+K.style.backgroundColor="inherit";n.style.position="relative";var aa=document.createElement("img");aa.className="geLibraryButton";aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));var ja=null;if(".scratchpad"!=c.title||this.closableScratchpad)K.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ha){if(!mxEvent.isConsumed(ha)){var Z=mxUtils.bind(this,function(){null!=x&&mxUtils.remove(x,this.openLibraries);this.closeLibrary(c)});null!=+ja?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(ha)}}));if(c.isEditable()){var ca=this.editor.graph,ba=null;m=mxUtils.bind(this,function(ha){this.showLibraryDialog(c.getTitle(),L,g,c,c.getMode());mxEvent.consume(ha)});var oa=mxUtils.bind(this,function(ha){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=aa.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),+ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",K.insertBefore(ba,K.firstChild),this.saveLibrary(c.getTitle(),g,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):null==ja&&(ja=aa.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),K.insertBefore(ja,K.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),+g,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ja||c.isModified()||(ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(Z)})))}),Y=mxUtils.bind(this,function(ha,Z,k,v){ha=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(ha)));for(var J=0;J<ha.length;J++){var N=ca.getCellGeometry(ha[J]);null!=N&&N.translate(-Z.x,-Z.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ha,Z.width,Z.height,v||"",!0,null,!1));ha=mxUtils.getXml(this.editor.graph.encodeCells(ha));Editor.defaultCompressed&&+(ha=Graph.compress(ha));Z={xml:ha,w:Z.width,h:Z.height};null!=v&&(Z.title=v);g.push(Z);oa(k);null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)}),da=mxUtils.bind(this,function(ha){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(ha),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Z=ca.getSelectionCells(),k=ca.view.getBounds(Z);if(null!=k&&0<k.width&&+0<k.height){var v=ca.view.scale;k.x/=v;k.y/=v;k.width/=v;k.height/=v;k.x-=ca.view.translate.x;k.y-=ca.view.translate.y;Y(Z,k)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ha)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor=+"light-dark(#fefefe, #000000)",L.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(ha))}),mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,da(ha),mxEvent.consume(ha))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ha){ca.isMouseDown&&null!=ca.graphHandler.first&&+(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ha){L.style.backgroundColor="light-dark(#fefefe, #000000)";ha.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ha){L.style.cursor=+"";L.style.backgroundColor="";0<ha.dataTransfer.files.length&&this.importFiles(ha.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,k,v,J,N,T,V,U,X){if(null!=Z&&"image/"==k.substring(0,6))Z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Z),Z=[new mxCell("",new mxGeometry(0,0,N,T),Z)],Z[0].vertex=!0,Y(Z,new mxRectangle(0,0,N,T),ha,mxEvent.isAltDown(ha)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null);else{var fa=!1,na=mxUtils.bind(this,function(la,qa){null!=la&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(la),null!=qa&&0<qa.length&&(la=qa));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ya=JSON.parse(mxUtils.getTextContent(la.documentElement));M(ya,L);g=g.concat(ya);oa(ha);this.spinner.stop();fa=!0}catch(Ba){}else if("mxfile"==la.documentElement.nodeName)try{var wa=la.documentElement.getElementsByTagName("diagram");-for(ya=0;ya<wa.length;ya++){var Ja=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ja);null!=Aa&&X(Ja,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=Y&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(Y,-function(la){na(la,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,V)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):+for(ya=0;ya<wa.length;ya++){var Ja=this.stringToCells(Editor.getDiagramNodeXml(wa[ya])),Aa=this.editor.graph.getBoundingBoxFromGeometry(Ja);null!=Aa&&Y(Ja,new mxRectangle(0,0,Aa.width,Aa.height),ha)}fa=!0}catch(Ba){null!=window.console&&console.log("error in drop handler:",Ba)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=I&&null!=I.parentNode&&0<g.length&&(I.parentNode.removeChild(I),I=null)});null!=X&&null!=V&&EditorUi.isVisioFilename(V)?this.importVisio(X,+function(la){na(la,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?na(la.responseText,"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Z,k)}}));ha.stopPropagation();ha.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ha){L.style.cursor="";L.style.backgroundColor="";ha.stopPropagation();ha.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));K.insertBefore(aa,K.firstChild);mxEvent.addListener(aa,"click",m);m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));K.insertBefore(m,K.firstChild);-mxEvent.addListener(m,"click",ca);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ca);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,+mxEvent.addListener(m,"click",da);".scratchpad"==c.title&&(this.addSelectionToScratchpad=da);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),m.className="geLibraryButton",K.insertBefore(m,K.firstChild))}n.appendChild(K);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,g){for(var m=0;m<c.length;m++)try{var n=c[m],x=n.data;if(null!=x){x="data:"==x.substring(0,5)?this.convertDataUri(x):x;var F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(F+="aspect=fixed;");F=F+"image="+x+";";null!=n.style&&(F+=n.style);g.appendChild(this.sidebar.createVertexTemplate(F,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var I=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),M=0==I.length?mxResources.get("drawingEmpty"):null!=n.title?n.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(I,n.w,n.h,M,!0,null,!0))}}catch(L){M=null!=L.message?mxResources.get("error")+": "+L.message:String(L),F=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,M,!0,null,!0),g.appendChild(F)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,g,m,n,x,F,I){c=new ImageDialog(this,c,g,m,n,x,F,I);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,g,m,n,x,F){var I=localStorage.getItem(g);c=new TextareaDialog(this,c,null!=I?JSON.stringify(JSON.parse(I),null,2):"",mxUtils.bind(this,function(M){if(null!=M)try{if(null!=F&&F(M),M==I)this.hideDialog();else{if(0<M.length){var L=JSON.parse(M);localStorage.setItem(g,JSON.stringify(L))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(K){this.handleError(K)}}),null,mxResources.get("close"),null,null,null,!0,null,null,x,m,n);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,g,m,n){c=null!=c?c:mxUtils.bind(this,function(x,F,I,M){F||(x=new ChangePageSetup(this,n?I:null,x),x.ignoreColor=!n,null!=M&&n&&(x.shadowVisible=M),this.editor.graph.model.execute(x))});c=new BackgroundImageDialog(this,c,g,m,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,g,m,n,x){c=new LibraryDialog(this,c,g,m,n,x);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(F){F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var g=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(m){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(c,g,m,n,x,F,I){var M=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{I||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,-c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!I||null==window.console||console.error("EditorUi.handleError:",c)}catch(da){}if(null!=L||null!=g){I=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),aa=null;g=null!=g?g:mxResources.get("error");if(null!=L){null!=L.retry&&(K=mxResources.get("cancel"),aa=function(){M();L.retry()});if(404==L.code||404==L.status||403==L.code){I=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),-!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ia=null!=x?null:null!=F?F:window.location.hash;if(null!=ia&&("#G"==ia.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ia.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||-404==L.code||404==L.status)){ia="#U"==ia.substring(0,2)?ia.substring(45,ia.lastIndexOf("%26ex")):ia.substring(2);this.showError(g,I,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ia);null!=n&&n()}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function da(){ca.innerText="";for(var ha=0;ha<ba.length;ha++){var Z=document.createElement("option");mxUtils.write(Z,ba[ha].displayName);Z.value=ha;ca.appendChild(Z);-Z=document.createElement("option");Z.innerHTML=" ";mxUtils.write(Z,"<"+ba[ha].email+">");Z.setAttribute("disabled","disabled");ca.appendChild(Z)}Z=document.createElement("option");mxUtils.write(Z,mxResources.get("addAccount"));Z.value=ba.length;ca.appendChild(Z)}var ba=this.drive.getUsersList(),oa=document.createElement("div"),X=document.createElement("div");X.style.marginBottom="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");oa.appendChild(X);var ca=document.createElement("select");-ca.style.width="100%";da();mxEvent.addListener(ca,"change",mxUtils.bind(this,function(){var ha=ca.value,Z=ba.length!=ha;Z&&this.drive.setUser(ba[ha]);this.drive.authorize(Z,mxUtils.bind(this,function(){Z||(ba=this.drive.getUsersList(),da())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));oa.appendChild(ca);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"),+c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!I||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=L||null!=g){I=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var K=mxResources.get("ok"),aa=null;g=null!=g?g:mxResources.get("error");if(null!=L){null!=L.retry&&(K=mxResources.get("cancel"),aa=function(){M();L.retry()});if(404==L.code||404==L.status||403==L.code){I=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+!1):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ja=null!=x?null:null!=F?F:window.location.hash;if(null!=ja&&("#G"==ja.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ja.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||+404==L.code||404==L.status)){ja="#U"==ja.substring(0,2)?ja.substring(45,ja.lastIndexOf("%26ex")):ja.substring(2);this.showError(g,I,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ja);null!=n&&n()}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){da.innerText="";for(var ha=0;ha<ba.length;ha++){var Z=document.createElement("option");mxUtils.write(Z,ba[ha].displayName);Z.value=ha;da.appendChild(Z);+Z=document.createElement("option");Z.innerHTML=" ";mxUtils.write(Z,"<"+ba[ha].email+">");Z.setAttribute("disabled","disabled");da.appendChild(Z)}Z=document.createElement("option");mxUtils.write(Z,mxResources.get("addAccount"));Z.value=ba.length;da.appendChild(Z)}var ba=this.drive.getUsersList(),oa=document.createElement("div"),Y=document.createElement("div");Y.style.marginBottom="6px";mxUtils.write(Y,mxResources.get("changeUser")+": ");oa.appendChild(Y);var da=document.createElement("select");+da.style.width="100%";ca();mxEvent.addListener(da,"change",mxUtils.bind(this,function(){var ha=da.value,Z=ba.length!=ha;Z&&this.drive.setUser(ba[ha]);this.drive.authorize(Z,mxUtils.bind(this,function(){Z||(ba=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}));oa.appendChild(da);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!=m&&m()}),520,150);return}}null!=L.message?I=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?I=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&(L.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout"),!1):L.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof L&&0<L.length&&(I=mxUtils.htmlEntities(L,!1)))}x=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),x=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,x=L.alternateAction.funct);this.showError(g,I,K,m,aa,null,null,c,x,null,null,null,n?m:null)}else null!=m&&m()};EditorUi.prototype.alert=function(c,g,m){c=new ErrorDialog(this,null,c,mxResources.get("ok"),g);this.showDialog(c.container,m||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,g,m,n,x,F){c=null!=c?c:"";var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){I();null!=g&&g()},function(){I();null!=m&&m()},n,x,null,null,null,null,M);this.showDialog(c.container,340,46+M,!0,F);c.init()};EditorUi.prototype.showBanner=function(c,g,m,n,x,F,I,M,L){F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){I=null!=I?I:"translate(-50%,120%)";M=null!=M?M:"translate(-50%,0%)";var K=document.createElement("div");K.className="geBtn gePrimaryBtn geBanner"+(x?" geSmallBanner":"");K.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(K.style,"transform",I);mxUtils.setPrefixedStyle(K.style,"transition","all 1000ms ease");null!=L&&mxUtils.setPrefixedStyle(K.style,"transform-origin",L);L=L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));L.setAttribute("border","0");x||(F=document.createElement("img"),F.setAttribute("src",IMAGE_PATH+"/logo.png"),F.setAttribute("border","0"),F.setAttribute("align","absmiddle"),F.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;",K.appendChild(F),L.style.cssText=(x?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",K.appendChild(L));mxUtils.write(K,g);document.body.appendChild(K);this.bannerShowing=!0;x&&(L.className="geLibraryButton",K.appendChild(L));g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var aa=document.createElement("input");-aa.setAttribute("type","checkbox");aa.setAttribute("id","geDoNotShowAgainCheckbox");aa.style.marginRight="6px";if(!n){g.appendChild(aa);var ia=document.createElement("label");ia.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ia,mxResources.get("doNotShowAgain"));g.appendChild(ia);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var da=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,aa.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&-null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=L&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(oa){mxEvent.consume(oa);da()}));var ba=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",I);window.setTimeout(mxUtils.bind(this,function(){da()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(oa){var X=mxEvent.getSource(oa);X!=aa&&X!=ia?(null!=m&&m(),da(),mxEvent.consume(oa)):ba()}));window.setTimeout(mxUtils.bind(this,+aa.setAttribute("type","checkbox");aa.setAttribute("id","geDoNotShowAgainCheckbox");aa.style.marginRight="6px";if(!n){g.appendChild(aa);var ja=document.createElement("label");ja.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ja,mxResources.get("doNotShowAgain"));g.appendChild(ja);K.style.paddingBottom=x?"16px":"30px";K.appendChild(g)}var ca=mxUtils.bind(this,function(){null!=K.parentNode&&(K.parentNode.removeChild(K),this.bannerShowing=!1,aa.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&+null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=L&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(oa){mxEvent.consume(oa);ca()}));var ba=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",I);window.setTimeout(mxUtils.bind(this,function(){ca()}),1E3)});mxEvent.addListener(K,"click",mxUtils.bind(this,function(oa){var Y=mxEvent.getSource(oa);Y!=aa&&Y!=ja?(null!=m&&m(),ca(),mxEvent.consume(oa)):ba()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(K.style,"transform",M)}),500);window.setTimeout(ba,x?5E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.createImageDataUri=function(c,g,m,n){c=c.toDataURL("image/"+m);if(null!=c&&6<c.length)null!=g&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(g))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,g,m,n,x){var F="jpeg"==m?"jpg":m;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+F;c=this.createImageDataUri(c,g,m,x);this.saveData(n,F,c.substring(c.lastIndexOf(",")+1),"image/"+m,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,g){c=new TextareaDialog(this,c,g,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,g,m,n,x,F){"text/xml"!=m||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=F?F:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,m):new Blob([c],{type:m}),navigator.msSaveOrOpenBlob(c,g);else if(mxClient.IS_IE)m=window.open("about:blank","_blank"),null==m?mxUtils.popup(c,!0):(m.document.write(c),m.document.close(),m.document.execCommand("SaveAs",!0,g),m.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==m||"image/"!=m.substring(0,6)?this.showTextDialog(g+":",c):this.openInNewWindow(c,m,n);else{var I=document.createElement("a");F=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var M=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);F=65==(M?parseInt(M[2],10):!1)?!1:F}if(F||this.isOffline()){I.href=URL.createObjectURL(n?this.base64ToBlob(c,m):new Blob([c],{type:m}));F?I.download=g:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(L){}}else this.createEchoRequest(c,g,m,n,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,g,m,n,x,F){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=m?"&mime="+m:"")+(null!=x?"&format="+x:"")+(null!=F?"&base64="+F:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,g,m,n,x,F,I,M,L){F=null!=F?F:!1;I=null!=I?I:"vsdx"!=x&&(!mxClient.IS_IOS||!navigator.standalone);-var K=mxUtils.bind(this,function(ia,da,ba,oa){try{if("_blank"==da)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(c,m,n);else if(null!=m&&"text/html"==m.substring(0,9)){var X=new EmbedDialog(this,c);this.showDialog(X.container,450,240,!0,!0);X.init()}else{var ca=window.open("about:blank");null==ca?mxUtils.popup(c,!0):(ca.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ca.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ia,m,n,null,M);else if(null!=-ia&&0<ia.length){var ha=mxUtils.bind(this,function(Z){try{this.exportFile(c,ia,m,n,da,Z)}catch(k){this.handleError(k)}});null!=oa?ha(oa):this.pickFolder(da,ha)}}catch(Z){this.handleError(Z)}});x=[];F||x.push(App.MODE_BROWSER);I||x.push("_blank");var aa=new SaveDialog(this,g,mxUtils.bind(this,function(ia,da,ba){K(ia.value,da,ia,ba);this.hideDialog(null,null,aa.container)}),x,c,m,n,L);this.showDialog(aa.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));aa.init()};EditorUi.prototype.openInNewWindow=+var K=mxUtils.bind(this,function(ja,ca,ba,oa){try{if("_blank"==ca)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(c,m,n);else if(null!=m&&"text/html"==m.substring(0,9)){var Y=new EmbedDialog(this,c);this.showDialog(Y.container,450,240,!0,!0);Y.init()}else{var da=window.open("about:blank");null==da?mxUtils.popup(c,!0):(da.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),da.document.close())}else if(ca==App.MODE_DEVICE||"download"==ca)this.doSaveLocalFile(c,ja,m,n,null,M);else if(null!=+ja&&0<ja.length){var ha=mxUtils.bind(this,function(Z){try{this.exportFile(c,ja,m,n,ca,Z)}catch(k){this.handleError(k)}});null!=oa?ha(oa):this.pickFolder(ca,ha)}}catch(Z){this.handleError(Z)}});x=[];F||x.push(App.MODE_BROWSER);I||x.push("_blank");var aa=new SaveDialog(this,g,mxUtils.bind(this,function(ja,ca,ba){K(ja.value,ca,ja,ba);this.hideDialog(null,null,aa.container)}),x,c,m,n,L);this.showDialog(aa.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));aa.init()};EditorUi.prototype.openInNewWindow=function(c,g,m){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var x="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var F=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=F&&(x="background: "+F+";")}x='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+x+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||m?(F=m?c:btoa(unescape(encodeURIComponent(c))),n.document.write(x+'<img style="max-width:100%;" src="data:'+g+";base64,"+F+'"/></body></html>')):n.document.write(x+c+"</body></html>"):n.document.write(x+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var u=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=c(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",@@ -3630,19 +3630,19 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});I.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",x);this.editor.exportToCanvas(mxUtils.bind(this,function(M){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(M,null,"png");M=document.createElement("img");M.style.maxWidth="140px";M.style.maxHeight="140px";M.style.cursor="pointer";M.style.backgroundColor="white";M.setAttribute("title",mxResources.get("openInNewWindow"));M.setAttribute("border","0");M.setAttribute("src",L);this.exportDialog.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(M){I.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(M)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,g,m,n,x,F){this.isLocalFileSave()?this.saveLocalFile(m,c,n,x,g,F):this.saveRequest(c,g,mxUtils.bind(this,function(I,M){return this.createEchoRequest(m,I,n,x,g,M)}),m,x,n)};EditorUi.prototype.saveRequest=function(c,g,m,n,x,F,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var M=mxUtils.bind(this,-function(K,aa,ia,da){if("_blank"==aa||null!=K&&0<K.length){var ba=m("_blank"==aa?null:K,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=ba&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?ba.simulate(document,"_blank"):(ia=mxUtils.bind(this,function(oa){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,aa,oa)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,-function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,aa,oa)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(X){this.spinner.stop();this.handleError(X)}))}),null!=da?ia(da):this.pickFolder(aa,ia)))}});x=[App.MODE_BROWSER];I||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,aa,ia){M(K.value,aa,K,ia);this.hideDialog(null,null,L.container)}),+function(K,aa,ja,ca){if("_blank"==aa||null!=K&&0<K.length){var ba=m("_blank"==aa?null:K,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=ba&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?ba.simulate(document,"_blank"):(ja=mxUtils.bind(this,function(oa){F=null!=F?F:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,K,F,!0,aa,oa)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,+function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),K,F,!0,aa,oa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(Y){this.spinner.stop();this.handleError(Y)}))}),null!=ca?ja(ca):this.pickFolder(aa,ja)))}});x=[App.MODE_BROWSER];I||x.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(K,aa,ja){M(K.value,aa,K,ja);this.hideDialog(null,null,L.container)}),x,null,"application/pdf");this.showDialog(L.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,g,m,n,x,F){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,g,m){g(null)};-EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var X=g?null:this.editor.graph.background;X==mxConstants.NONE&&(X=null);null==X&&0==g&&(X=this.editor.graph.shapeBackgroundColor);var ca=this.editor.graph.addForeignObjectWarning;+EditorUi.prototype.exportSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba)}));this.handleError(la)})))try{var oa=this.editor.graph.isSelectionEmpty();m=null!=m?m:oa;var Y=g?null:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);null==Y&&0==g&&(Y=this.editor.graph.shapeBackgroundColor);var da=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ha=mxUtils.lightDarkColorSupported,Z=mxUtils.preferDarkColor;if("light"==aa||"dark"==aa)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==aa;var k=Graph.addFont,v={};Graph.addFont=function(la,qa,ya,wa){k.call(this,la,qa,ya,v)};var J=this.editor.graph.createSvgImageExport(x),N=J.drawCellState;J.drawCellState=function(la,qa){null!=la&&Graph.processFontStyle(la.style);N.apply(this,arguments)};var T=-this.editor.graph.getSvg(X,c,I,M,null,m,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!da,aa,ia);mxUtils.lightDarkColorSupported=ha;mxUtils.preferDarkColor=Z;this.editor.graph.addForeignObjectWarning=ca;n&&this.editor.graph.addSvgShadow(T);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,I));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var Y=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&-da?this.replaceAlternateContent(la,aa,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,Y,this.thumbImageCache)):Y(la)});da?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ia,-da,ba,oa,X){var ca=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ca.setAttribute("x",da);ca.setAttribute("y",ba+.5);ca.setAttribute("width",oa.width);ca.setAttribute("height",oa.height);null==ca.setAttributeNS?ca.setAttribute("xlink:href",X):ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",X);ia.replaceChild(ca,ia.lastChild);M()}function x(){if(I<aa.length)aa[I++](x)}var F="";g=c.getElementsByTagName("style");for(var I=0;I<g.length;I++)F+=g[I].innerHTML;g=c.getElementsByTagName("switch");-counter=g.length;var M=mxUtils.bind(this,function(){counter--;0==counter&&m(c)}),L={},K={},aa=[];for(I=0;I<g.length;I++)mxUtils.bind(this,function(ia){var da=ia.getElementsByTagName("div");if(0<da.length)try{var ba=da[0].cloneNode(!0),oa=parseInt(ba.style.marginLeft),X=parseInt(ba.style.paddingTop),ca=ba.getElementsByTagName("div")[1],ha=da=!1,Z=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;ha="vertical-"==v.substring(0,9);da="-rl"==v.substring(v.length--3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&da?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=L[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?ca.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?-ca.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,X,v,J),L[N]=T);"1px"==ba.style.height&&("unsafe center"==Z?X-=T.height/2:"unsafe flex-end"==Z&&(X-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!da&&"unsafe flex-end"==Z||da&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,X,T.width,T.height+parseInt(ca.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=-K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,function(Y){n(ia,oa,X,T,Y);K[N]=Y;V()}),F):(n(ia,oa,X,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"++this.editor.graph.getSvg(Y,c,I,M,null,m,null,J,"blank"==K?"_blank":"self"==K?"_top":null,null,!ca,aa,ja);mxUtils.lightDarkColorSupported=ha;mxUtils.preferDarkColor=Z;this.editor.graph.addForeignObjectWarning=da;n&&this.editor.graph.addSvgShadow(T);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var U=mxUtils.bind(this,function(la){this.spinner.stop();x&&la.setAttribute("content",this.getFileData(!0,null,null,null,m,L,null,null,null,null,null,c,I));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(T);var X=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&F&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&+ca?this.replaceAlternateContent(la,aa,U):U(la)}),fa=Graph.customFontElements;Graph.customFontElements=v;var na=mxUtils.bind(this,function(la){Graph.customFontElements=fa;Graph.addFont=k;F&&!this.isOffline()&&Editor.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(la,X,this.thumbImageCache)):X(la)});ca?this.embedFonts(T,na):(this.editor.addFontCss(T),na(T))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,g,m){function n(ja,+ca,ba,oa,Y){var da=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");da.setAttribute("x",ca);da.setAttribute("y",ba+.5);da.setAttribute("width",oa.width);da.setAttribute("height",oa.height);null==da.setAttributeNS?da.setAttribute("xlink:href",Y):da.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Y);ja.replaceChild(da,ja.lastChild);M()}function x(){if(I<aa.length)aa[I++](x)}var F="";g=c.getElementsByTagName("style");for(var I=0;I<g.length;I++)F+=g[I].innerHTML;g=c.getElementsByTagName("switch");+counter=g.length;var M=mxUtils.bind(this,function(){counter--;0==counter&&m(c)}),L={},K={},aa=[];for(I=0;I<g.length;I++)mxUtils.bind(this,function(ja){var ca=ja.getElementsByTagName("div");if(0<ca.length)try{var ba=ca[0].cloneNode(!0),oa=parseInt(ba.style.marginLeft),Y=parseInt(ba.style.paddingTop),da=ba.getElementsByTagName("div")[1],ha=ca=!1,Z=ba.style.alignItems,k=ba.style.justifyContent;if(null!=ba.style.writingMode){var v=ba.style.writingMode;ha="vertical-"==v.substring(0,9);ca="-rl"==v.substring(v.length-+3)}var J=!ha&&"1px"==ba.style.width||ha&&"1px"==ba.style.height;if(!ha&&"1px"==ba.style.height||ha&&"1px"==ba.style.width)ba.style.alignItems=ha&&ca?"unsafe flex-end":"unsafe flex-start";J&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var N=ba.outerHTML,T=L[N];null==T&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),v=1,v="1px"==ba.style.width?da.offsetWidth:parseInt(ba.style.width),J=1,J="1px"==ba.style.height?+da.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),T=new mxRectangle(oa,Y,v,J),L[N]=T);"1px"==ba.style.height&&("unsafe center"==Z?Y-=T.height/2:"unsafe flex-end"==Z&&(Y-=T.height));if("1px"==ba.style.width)if(!ha&&"unsafe center"==k||ha&&"unsafe center"==Z)oa-=T.width/2;else if(!ha&&"unsafe flex-end"==k||ha&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))oa-=T.width;T=new mxRectangle(oa,Y,T.width,T.height+parseInt(da.style.fontSize)/4);aa.push(mxUtils.bind(this,function(V){var U=+K[N];null==U?Graph.htmlToPng(N,T.width,T.height,mxUtils.bind(this,function(X){n(ja,oa,Y,T,X);K[N]=X;V()}),F):(n(ja,oa,Y,T,U),V())}))}catch(V){M()}else M()})(g[I]);0==counter&&m(c);I=0;x()};EditorUi.prototype.addRadiobox=function(c,g,m,n,x,F,I){return this.addCheckbox(c,m,n,x,F,I,!0,g)};EditorUi.prototype.addCheckbox=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();L.id=I;null!=M&&L.setAttribute("name",M);m&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);n&&L.setAttribute("disabled","disabled");F&&(c.appendChild(L),m=document.createElement("label"),mxUtils.write(m,g),m.setAttribute("for",I),c.appendChild(m),x||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,g){var m=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var n=this.getCurrentFile(),x="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var F=document.createElement("select");F.style.maxWidth="200px";F.style.width="auto";F.style.marginLeft="8px";F.style.marginRight="10px";F.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));F.appendChild(n);var I=document.createElement("option");I.setAttribute("value","custom");mxUtils.write(I,mxResources.get("custom")+"...");F.appendChild(I);c.appendChild(F);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){if("custom"==F.value){var M=new FilenameDialog(this,x,mxResources.get("ok"),function(L){null!=L?(x=L,I.setAttribute("title",L)):(F.value="blank",I.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){F.value="blank"});this.showDialog(M.container,300,80,!0,!1);M.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));@@ -3650,70 +3650,71 @@ mxUtils.br(c);return{getLink:function(){return m.checked?"blank"===F.value?"_blaM.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(M)}mxUtils.write(c,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));n.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));n.appendChild(x);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var F="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(M){this.pickColor(F||"none",function(L){F=L;m()});mxEvent.consume(M)}));m();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width="22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";c.appendChild(I);mxUtils.br(c);return{getColor:function(){return F},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,g,m,n,x,F){F=-null!=F?F:[];m&&(F.push("lightbox=1"),"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){var ba=this.getCurrentFile();L=this.createUrlParameters(c,g,n,x,F,L);c=!0;null!=I?m="#U"+encodeURIComponent(I):M||null==ba||""==ba.getHash()?-m="#R"+encodeURIComponent(m?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(ba.getTitle()));K&&1<m.length&&(L.push("open="+m.substring(1)),m="");aa&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ia&&L.push("transparent=1");null!=da&&L.push("dark="+da);return(n&&(null!=I||null!=-ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+m};EditorUi.prototype.createHtml=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){this.getBasenames();var ba={};""!=x&&x!=mxConstants.NONE&&(ba.highlight=x);"auto"!==n&&(ba.target=n);K||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;-m=parseInt(m);isNaN(m)||100==m||(ba.zoom=m/100);m=[];I&&(m.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),ba.resize=!0);M&&m.push("layers");L&&m.push("tags");null!=da&&(ba["dark-mode"]=da);0<m.length&&(K&&m.push("lightbox"),ba.toolbar=m.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!I);g='<div class="mxgraph" style="'+(F?"max-width:100%;":-"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ia(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};+null!=F?F:[];m&&(F.push("lightbox=1"),"auto"!=c&&F.push("target="+c),null!=g&&g!=mxConstants.NONE&&F.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&F.push("edit="+encodeURIComponent(n)),x&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));return F};EditorUi.prototype.createLink=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){var ba=this.getCurrentFile();L=this.createUrlParameters(c,g,n,x,F,L);c=!0;null!=I?m="#U"+encodeURIComponent(I):M||null==ba||""==ba.getHash()?+m="#R"+encodeURIComponent(m?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(ba.getTitle()));K&&1<m.length&&(L.push("open="+m.substring(1)),m="");aa&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ja&&L.push("transparent=1");null!=ca&&L.push("dark="+ca);return(n&&(null!=I||null!=+ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+m};EditorUi.prototype.createHtml=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){this.getBasenames();var ba={};""!=x&&x!=mxConstants.NONE&&(ba.highlight=x);"auto"!==n&&(ba.target=n);K||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;+m=parseInt(m);isNaN(m)||100==m||(ba.zoom=m/100);m=[];I&&(m.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),ba.resize=!0);M&&m.push("layers");L&&m.push("tags");null!=ca&&(ba["dark-mode"]=ca);0<m.length&&(K&&m.push("lightbox"),ba.toolbar=m.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!I);g='<div class="mxgraph" style="'+(F?"max-width:100%;":+"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ja(g,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,g,m,n){var x=document.createElement("div");x.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("html"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(F);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var M=document.createElement("input");M.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";M.setAttribute("value","url");M.setAttribute("type","radio");M.setAttribute("name","type-embedhtmldialog");F=M.cloneNode(!0);F.setAttribute("value","copy");I.appendChild(F);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));I.appendChild(L);mxUtils.br(I);I.appendChild(M);L=document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));I.appendChild(L);var K=this.getCurrentFile();null==m&&null!=K&&K.constructor==window.DriveFile&&(L=-document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,mxResources.get("share")),I.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==m&&M.setAttribute("disabled","disabled");x.appendChild(I);I=380;var aa=this.addLinkSection(x),ia=document.createElement("select");ia.style.maxWidth="260px";ia.style.marginLeft="8px";-ia.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ia.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")+-":");x.appendChild(ia);mxUtils.br(x);I+=26;var da=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";x.appendChild(ba);var oa=this.addCheckbox(x,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var X=X=this.addCheckbox(x,mxResources.get("allPages"),L,!L),ca=this.addCheckbox(x,+document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,mxResources.get("share")),I.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(K.getId(),K)})));F.setAttribute("checked","checked");null==m&&M.setAttribute("disabled","disabled");x.appendChild(I);I=380;var aa=this.addLinkSection(x),ja=document.createElement("select");ja.style.maxWidth="260px";ja.style.marginLeft="8px";+ja.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));ja.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ja.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ja.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(x,mxResources.get("appearance")++":");x.appendChild(ja);mxUtils.br(x);I+=26;var ca=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";x.appendChild(ba);var oa=this.addCheckbox(x,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var Y=Y=this.addCheckbox(x,mxResources.get("allPages"),L,!L),da=this.addCheckbox(x,mxResources.get("layers"),!0),ha=this.addCheckbox(x,mxResources.get("tags"),!0),Z=this.addCheckbox(x,mxResources.get("lightbox"),!0),k=null;if(EditorUi.enableHtmlEditOption){k=this.addEditButton(x,Z);var v=k.getEditInput();v.style.marginBottom="16px";I+=50;mxEvent.addListener(Z,"change",function(){Z.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&Z.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")})}c=-new CustomDialog(this,x,mxUtils.bind(this,function(){n(M.checked?m:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),oa.checked,X.checked,ca.checked,ha.checked,Z.checked,null!=k?k.getLink():null,null!=ia?ia.value:null)}),null,c,g);this.showDialog(c.container,340,I,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,m,n,x,F,I,M,L,K,aa){var ia=document.createElement("div");ia.style.whiteSpace="nowrap";var da=document.createElement("h3");mxUtils.write(da,c||mxResources.get("publish"));-da.style.width="100%";da.style.textAlign="center";da.style.marginTop="2px";da.style.marginBottom="20px";ia.appendChild(da);var ba=document.createElement("select");c=30;ba.className="geBtn";ba.style.marginBottom="8px";ba.style.marginLeft="0px";ba.style.width="100%";ba.style.boxSizing="border-box";if(null==M||""==M.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",da=document.createElement("option"),mxUtils.write(da,mxResources.get("makeCopy")),da.setAttribute("value","copy"),-ba.appendChild(da);da=document.createElement("option");mxUtils.write(da,mxResources.get("authorizationRequired"));da.setAttribute("value","auth");ba.appendChild(da);null!=M&&""!=M.getHash()||da.setAttribute("disabled","disabled");M=document.createElement("option");M.setAttribute("value","public");ba.appendChild(M);null!=I?(mxUtils.write(M,mxResources.get("publicDiagramUrl")),M.setAttribute("title",I),ba.value="public"):(mxUtils.write(M,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+-")"),M.setAttribute("disabled","disabled"));ia.appendChild(ba);mxUtils.br(ia);ba.focus();var oa=null,X=null;if(null!=g||null!=m)c+=30,mxUtils.write(ia,mxResources.get("width")+":"),oa=document.createElement("input"),oa.setAttribute("type","text"),oa.style.marginRight="16px",oa.style.width="50px",oa.style.marginLeft="6px",oa.style.marginRight="16px",oa.style.marginBottom="10px",oa.value="100%",ia.appendChild(oa),mxUtils.write(ia,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type",-"text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=m+"px",ia.appendChild(X),mxUtils.br(ia);var ca=this.addLinkSection(ia,n),ha=K?this.addCheckbox(ia,mxResources.get("transparentBackground"),!1):null;null!=ha&&(c+=20);var Z=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),Z=this.addCheckbox(ia,mxResources.get("selectedPage")+-": "+g));var k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));k.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));k.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected",-"selected");k.appendChild(g);aa&&(mxUtils.write(ia,mxResources.get("appearance")+":"),ia.appendChild(k),mxUtils.br(ia),c+=30);var v=this.addCheckbox(ia,mxResources.get("lightbox"),!0,null,null,!n),J=this.addEditButton(ia,v),N=J.getEditInput();n&&(N.style.marginLeft=v.style.marginLeft,v.style.display="none",c-=20);var T=this.addCheckbox(ia,mxResources.get("layers"),!0);T.style.marginLeft=N.style.marginLeft;T.style.marginTop="8px";var V=this.addCheckbox(ia,mxResources.get("tags"),!0);V.style.marginLeft=-N.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(v,"change",function(){v.checked?(T.removeAttribute("disabled"),N.removeAttribute("disabled"),V.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));N.checked&&v.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ia,mxUtils.bind(this,function(){L(ca.getTarget(),-ca.getColor(),null==Z?!1:Z.checked,v.checked,J.getLink(),T.checked,null!=oa?oa.value:null,null!=X?X.value:null,V.checked,ba.value,null!=ha?ha.checked:!1,k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=oa?(oa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?oa.select():document.execCommand("selectAll",!1,null)):null==ba.parentNode;ca.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");+new CustomDialog(this,x,mxUtils.bind(this,function(){n(M.checked?m:null,ca.checked,ba.value,aa.getTarget(),aa.getColor(),oa.checked,Y.checked,da.checked,ha.checked,Z.checked,null!=k?k.getLink():null,null!=ja?ja.value:null)}),null,c,g);this.showDialog(c.container,340,I,!0,!0);F.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,g,m,n,x,F,I,M,L,K,aa,ja){var ca=document.createElement("div");ca.style.whiteSpace="nowrap";var ba=document.createElement("h3");mxUtils.write(ba,c||mxResources.get("publish"));+ba.style.width="100%";ba.style.textAlign="center";ba.style.marginTop="2px";ba.style.marginBottom="20px";ca.appendChild(ba);var oa=document.createElement("select");c=30;oa.className="geBtn";oa.style.marginBottom="8px";oa.style.marginLeft="0px";oa.style.width="100%";oa.style.boxSizing="border-box";if(null==M||""==M.getHash())x=null!=x?x:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ba=document.createElement("option"),mxUtils.write(ba,mxResources.get("makeCopy")),ba.setAttribute("value","copy"),+oa.appendChild(ba);ba=document.createElement("option");mxUtils.write(ba,mxResources.get("authorizationRequired"));ba.setAttribute("value","auth");oa.appendChild(ba);null!=M&&""!=M.getHash()||ba.setAttribute("disabled","disabled");M=document.createElement("option");M.setAttribute("value","public");oa.appendChild(M);null!=I?(mxUtils.write(M,mxResources.get("publicDiagramUrl")),M.setAttribute("title",I),oa.value="public"):(mxUtils.write(M,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")++")"),M.setAttribute("disabled","disabled"));ca.appendChild(oa);mxUtils.br(ca);oa.focus();var Y=null,da=null;if(null!=g||null!=m)c+=30,mxUtils.write(ca,mxResources.get("width")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.marginRight="16px",Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginRight="16px",Y.style.marginBottom="10px",Y.value="100%",ca.appendChild(Y),mxUtils.write(ca,mxResources.get("height")+":"),da=document.createElement("input"),da.setAttribute("type",+"text"),da.style.width="50px",da.style.marginLeft="6px",da.style.marginBottom="10px",da.value=m+"px",ca.appendChild(da),mxUtils.br(ca);var ha=this.addLinkSection(ca,n),Z=K?this.addCheckbox(ca,mxResources.get("transparentBackground"),!1):null;null!=Z&&(c+=20);var k=document.createElement("select");k.className="geBtn";k.style.marginTop="8px";g=document.createElement("option");mxUtils.write(g,mxResources.get("allPages"));g.setAttribute("value","allPages");k.appendChild(g);g=document.createElement("option");+mxUtils.write(g,mxResources.get("currentPage"));g.setAttribute("value","currentPage");k.appendChild(g);var v=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),ja&&(mxUtils.write(ca,mxResources.get("pages")+":"),ca.appendChild(k),mxUtils.br(ca),c+=30),v=this.addCheckbox(ca,mxResources.get("selectedPage")+": "+g));var J=document.createElement("select");J.style.maxWidth=+"260px";J.style.marginLeft="8px";J.style.marginTop="16px";ja=document.createElement("option");ja.setAttribute("value","0");mxUtils.write(ja,mxResources.get("light"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","1");mxUtils.write(ja,mxResources.get("dark"));J.appendChild(ja);ja=document.createElement("option");ja.setAttribute("value","auto");mxUtils.write(ja,mxResources.get("automatic"));ja.setAttribute("selected","selected");J.appendChild(ja);aa&&(mxUtils.write(ca,+mxResources.get("appearance")+":"),ca.appendChild(J),mxUtils.br(ca),c+=30);var N=this.addCheckbox(ca,mxResources.get("lightbox"),!0,null,null,!n),T=this.addEditButton(ca,N),V=T.getEditInput();n&&(V.style.marginLeft=N.style.marginLeft,N.style.display="none",c-=20);var U=this.addCheckbox(ca,mxResources.get("layers"),!0);U.style.marginLeft=V.style.marginLeft;U.style.marginTop="8px";var X=this.addCheckbox(ca,mxResources.get("tags"),!0);X.style.marginLeft=V.style.marginLeft;X.style.marginBottom="16px";+X.style.marginTop="16px";mxEvent.addListener(N,"change",function(){N.checked?(U.removeAttribute("disabled"),V.removeAttribute("disabled"),X.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));V.checked&&N.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,ca,mxUtils.bind(this,function(){L(ha.getTarget(),ha.getColor(),null==+v?!1:v.checked,N.checked,T.getLink(),U.checked,null!=Y?Y.value:null,null!=da?da.value:null,X.checked,oa.value,null!=Z?Z.checked:!1,J.value,"allPages"==k.value)}),null,mxResources.get("create"),x,F);this.showDialog(n.container,340,296+c,!0,!0);null!=Y?(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):null==oa.parentNode;ha.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";F.appendChild(I);if(x){mxUtils.write(F,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";F.appendChild(M);mxUtils.write(F,-mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ia=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),-I.background==mxConstants.NONE||null==I.background);null!=ia&&(ia.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var da=parseInt(M.value)/100||1,ba=parseInt(L.value)||0;m(!K.checked,null!=aa?aa.checked:!1,null!=ia?ia.checked:!1,da,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,I,M,L){I=null!=I?I:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace=-"nowrap";var aa=this.editor.graph,ia="jpeg"==M||"webp"==M?220:320,da=document.createElement("h3");mxUtils.write(da,c);da.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(da);mxUtils.write(K,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";K.appendChild(ba);mxUtils.write(K,-mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","text");oa.style.marginRight="16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";K.appendChild(oa);mxUtils.br(K);var X=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),ca=document.createElement("input");ca.style.marginTop="16px";ca.style.marginRight="8px";ca.style.marginLeft="24px";ca.setAttribute("disabled","disabled");ca.setAttribute("type",-"checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(da=0;da<c.length;da++)if(!aa.isSelectionEmpty()||"selectionOnly"!=c[da]){var Z=document.createElement("option");mxUtils.write(Z,mxResources.get(c[da]));Z.setAttribute("value",c[da]);ha.appendChild(Z)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ha),mxUtils.br(K),ia+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&-(X.checked=!0)})):F&&(K.appendChild(ca),mxUtils.write(K,mxResources.get("crop")),mxUtils.br(K),ia+=30,mxEvent.addListener(X,"change",function(){X.checked?ca.removeAttribute("disabled"):ca.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?L&&(X.style.display="none",X.nextSibling.style.display="none",X.nextSibling.nextSibling.style.display="none",ia-=30):(ha.value="diagram",ca.setAttribute("checked","checked"),ca.defaultChecked=!0,mxEvent.addListener(X,"change",function(){ha.value=X.checked?+mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";F.appendChild(L);mxUtils.br(F)}var K=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=n?null:this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ja=n?null:this.addCheckbox(F,mxResources.get("transparentBackground"),+I.background==mxConstants.NONE||null==I.background);null!=ja&&(ja.style.marginBottom="16px");c=new CustomDialog(this,F,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ba=parseInt(L.value)||0;m(!K.checked,null!=aa?aa.checked:!1,null!=ja?ja.checked:!1,ca,ba)}),null,c,g);this.showDialog(c.container,300,(x?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,g,m,n,x,F,I,M,L){I=null!=I?I:Editor.defaultIncludeDiagram;var K=document.createElement("div");K.style.whiteSpace=+"nowrap";var aa=this.editor.graph,ja="jpeg"==M||"webp"==M?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";K.appendChild(ca);mxUtils.write(K,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";K.appendChild(ba);mxUtils.write(K,+mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","text");oa.style.marginRight="16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";K.appendChild(oa);mxUtils.br(K);var Y=this.addCheckbox(K,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),da=document.createElement("input");da.style.marginTop="16px";da.style.marginRight="8px";da.style.marginLeft="24px";da.setAttribute("disabled","disabled");da.setAttribute("type",+"checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!aa.isSelectionEmpty()||"selectionOnly"!=c[ca]){var Z=document.createElement("option");mxUtils.write(Z,mxResources.get(c[ca]));Z.setAttribute("value",c[ca]);ha.appendChild(Z)}L?(mxUtils.write(K,mxResources.get("size")+":"),K.appendChild(ha),mxUtils.br(K),ja+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&+(Y.checked=!0)})):F&&(K.appendChild(da),mxUtils.write(K,mxResources.get("crop")),mxUtils.br(K),ja+=30,mxEvent.addListener(Y,"change",function(){Y.checked?da.removeAttribute("disabled"):da.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?L&&(Y.style.display="none",Y.nextSibling.style.display="none",Y.nextSibling.nextSibling.style.display="none",ja-=30):(ha.value="diagram",da.setAttribute("checked","checked"),da.defaultChecked=!0,mxEvent.addListener(Y,"change",function(){ha.value=Y.checked?"selectionOnly":"diagram"}));var k=this.addCheckbox(K,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=M&&"webp"!=M),v=document.createElement("select");v.style.maxWidth="260px";v.style.marginLeft="8px";v.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));v.appendChild(F);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));v.appendChild(L);"svg"==M&&mxUtils.lightDarkColorSupported?-(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ia+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),-!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ia+=30;aa=null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<aa?":":""),I,null,null,"jpeg"!=M&&"webp"!=M),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="28px";"png"==M||"svg"==M?(I=function(){T.checked?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),-V.appendChild(F),F=document.createElement("option"),F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),V.appendChild(F),1<aa?(T.style.marginBottom="12px",V.style.marginBottom="16px",K.appendChild(V),mxUtils.br(K),ia+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(V.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",I),I()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";-U.setAttribute("type","checkbox");var Y=document.createElement("input");Y.style.marginBottom="16px";Y.style.marginRight="8px";Y.setAttribute("type","checkbox");g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),mxUtils.write(K,mxResources.get("embedImages")),mxUtils.br(K),Y.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(Y),mxUtils.write(K,mxResources.get("embedFonts")),mxUtils.br(K),ia+=50);var fa=document.createElement("select");fa.style.maxWidth=+(F=document.createElement("option"),F.setAttribute("value","auto"),mxUtils.write(F,mxResources.get("automatic")),F.setAttribute("selected","selected"),v.appendChild(F)):Editor.isDarkMode()?L.setAttribute("selected","selected"):F.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("appearance")+":");K.appendChild(v);mxUtils.br(K);ja+=26;var J=this.addCheckbox(K,mxResources.get("shadow"),aa.shadowVisible),N=null;if("png"==M||"jpeg"==M||"webp"==M)N=this.addCheckbox(K,mxResources.get("grid"),+!1,this.isOffline()||!Editor.canvasSupported,!1,!0),ja+=30;aa=null!=this.pages?this.pages.length:1;var T=this.addCheckbox(K,mxResources.get("includeCopyOfMyDiagram")+(1<aa?":":""),I,null,null,"jpeg"!=M&&"webp"!=M),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="28px";"png"==M||"svg"==M?(I=function(){T.checked?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},F=document.createElement("option"),F.setAttribute("value","allPages"),mxUtils.write(F,mxResources.get("allPages")),+V.appendChild(F),F=document.createElement("option"),F.setAttribute("value","currentPage"),mxUtils.write(F,mxResources.get("currentPage")),V.appendChild(F),1<aa?(T.style.marginBottom="12px",V.style.marginBottom="16px",K.appendChild(V),mxUtils.br(K),ja+=20):T.style.marginBottom="16px",null!=this.lastEmbedInclude&&(V.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",I),I()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";+U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");g&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,K.appendChild(U),mxUtils.write(K,mxResources.get("embedImages")),mxUtils.br(K),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,K.appendChild(X),mxUtils.write(K,mxResources.get("embedFonts")),mxUtils.br(K),ja+=50);var fa=document.createElement("select");fa.style.maxWidth="260px";fa.style.marginLeft="8px";F=document.createElement("option");F.setAttribute("value","auto");mxUtils.write(F,mxResources.get("automatic"));fa.appendChild(F);I=document.createElement("option");I.setAttribute("value","blank");mxUtils.write(I,mxResources.get("openInNewWindow"));fa.appendChild(I);I=document.createElement("option");I.setAttribute("value","self");mxUtils.write(I,mxResources.get("openInThisWindow"));fa.appendChild(I);I=document.createElement("div");mxUtils.write(I,mxResources.get("LinksLost"));-I.style.margin="7px";I.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(I),mxUtils.br(K),mxUtils.br(K),ia+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=Y.checked;this.lastEmbedInclude=V.value;x(ba.value,k.checked,!X.checked,J.checked,T.checked,U.checked&&g,oa.value,ca.checked,("png"==M||"svg"==M)&&"currentPage"==V.value,-fa.value,null!=N?N.checked:null,null!=v?v.value:null,ha.value,Y.checked)}),null,m,n);this.showDialog(m.container,340,ia,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText=-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),I.shadowVisible&&n,!n),aa=this.addCheckbox(F,m),ia=this.addCheckbox(F,mxResources.get("lightbox"),!0),da=this.addEditButton(F,ia),ba=da.getEditInput(),oa=1<I.model.getChildCount(I.model.getRoot()),X=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);X.style.marginLeft=ba.style.marginLeft;X.style.marginBottom="12px";X.style.marginTop=-"8px";mxEvent.addListener(ia,"change",function(){ia.checked?(oa&&X.removeAttribute("disabled"),ba.removeAttribute("disabled")):(X.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ia.checked?da.getEditSelect().removeAttribute("disabled"):da.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,aa.checked,ia.checked,da.getLink(),X.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,-280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,I,M){function L(ba){var oa=" ",X="";n&&(oa=" 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!=aa?"&page="+aa:"")+(x?"&edit=_blank":-"")+(F?"&layers=1":"")+"');}})(this);\"",X+="cursor:pointer;");c&&(X+="max-width:100%;");var ca="";m&&(ca=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');I('<img src="'+ba+'"'+ca+(""!=X?' style="'+X+'"':"")+oa+"/>")}var K=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var oa=n?this.getFileData(!0):null;ba=this.createImageDataUri(ba,oa,"png");L(ba)}),null,null,null,mxUtils.bind(this,-function(ba){M({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ia="";m&&(ia="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var da=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ia+"&xml="+encodeURIComponent(g));da.send(mxUtils.bind(this,function(){200<=da.getStatus()&&299>=da.getStatus()?L("data:image/png;base64,"+da.getText()):+I.style.margin="7px";I.style.display="none";"svg"==M&&(mxUtils.write(K,mxResources.get("links")+":"),K.appendChild(fa),K.appendChild(I),mxUtils.br(K),mxUtils.br(K),ja+=50);m=new CustomDialog(this,K,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=V.value;x(ba.value,k.checked,!Y.checked,J.checked,T.checked,U.checked&&g,oa.value,da.checked,("png"==M||"svg"==M)&&"currentPage"==V.value,+fa.value,null!=N?N.checked:null,null!=v?v.value:null,ha.value,X.checked)}),null,m,n);this.showDialog(m.container,340,ja,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,g,m,n,x){var F=document.createElement("div");F.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=g){var M=document.createElement("h3");mxUtils.write(M,g);M.style.cssText=+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";F.appendChild(M)}var L=this.addCheckbox(F,mxResources.get("fit"),!0),K=this.addCheckbox(F,mxResources.get("shadow"),I.shadowVisible&&n,!n),aa=this.addCheckbox(F,m),ja=this.addCheckbox(F,mxResources.get("lightbox"),!0),ca=this.addEditButton(F,ja),ba=ca.getEditInput(),oa=1<I.model.getChildCount(I.model.getRoot()),Y=this.addCheckbox(F,mxResources.get("layers"),oa,!oa);Y.style.marginLeft=ba.style.marginLeft;Y.style.marginBottom="12px";Y.style.marginTop=+"8px";mxEvent.addListener(ja,"change",function(){ja.checked?(oa&&Y.removeAttribute("disabled"),ba.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,F,mxUtils.bind(this,function(){c(L.checked,K.checked,aa.checked,ja.checked,ca.getLink(),Y.checked)}),null,mxResources.get("embed"),x);this.showDialog(g.container,+280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,g,m,n,x,F,I,M){function L(ba){var oa=" ",Y="";n&&(oa=" 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!=aa?"&page="+aa:"")+(x?"&edit=_blank":+"")+(F?"&layers=1":"")+"');}})(this);\"",Y+="cursor:pointer;");c&&(Y+="max-width:100%;");var da="";m&&(da=' width="'+Math.round(K.width)+'" height="'+Math.round(K.height)+'"');I('<img src="'+ba+'"'+da+(""!=Y?' style="'+Y+'"':"")+oa+"/>")}var K=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.editor.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var oa=n?this.getFileData(!0):null;ba=this.createImageDataUri(ba,oa,"png");L(ba)}),null,null,null,mxUtils.bind(this,+function(ba){M({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),K.width*K.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var ja="";m&&(ja="&w="+Math.round(2*K.width)+"&h="+Math.round(2*K.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+ja+"&xml="+encodeURIComponent(g));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=ca.getStatus()?L("data:image/png;base64,"+ca.getText()):M({message:mxResources.get("unknownError")})}))}else M({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,g,m,n,x,F,I){var M=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!m,"auto"),L=M.getElementsByTagName("a");if(null!=L)for(var K=0;K<L.length;K++){var aa=L[K].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==L[K].getAttribute("target")&&L[K].removeAttribute("target")}n&&M.setAttribute("content",this.getFileData(!0));-g&&this.editor.graph.addSvgShadow(M);if(m){var ia=" ",da="";n&&(ia="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",da+="cursor:pointer;");-c&&(da+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(ba){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=da?' style="'+da+'"':"")+ia+"/>")}))}else da="",n&&(g=this.getSelectedPageIndex(),M.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),da+="cursor:pointer;"),c&&(c=parseInt(M.getAttribute("width")),x=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),da+="max-width:100%;max-height:"+x+"px;",M.removeAttribute("height")),""!=da&&M.setAttribute("style",da),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),I(mxUtils.getXml(M))};EditorUi.prototype.timeSince=+g&&this.editor.graph.addSvgShadow(M);if(m){var ja=" ",ca="";n&&(ja="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");+c&&(ca+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(ba){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=ca?' style="'+ca+'"':"")+ja+"/>")}))}else ca="",n&&(g=this.getSelectedPageIndex(),M.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(x?"&edit=_blank":"")+(F?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(M.getAttribute("width")),x=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+c+" "+x),ca+="max-width:100%;max-height:"+x+"px;",M.removeAttribute("height")),""!=ca&&M.setAttribute("style",ca),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),I(mxUtils.getXml(M))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var g=Math.floor(c/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(c/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(c/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(c/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(c/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,g){if(null!=c){var m=null;if("diagram"==c.nodeName)m=c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){m=n[0];var x=g.getGlobalVariable;g.getGlobalVariable=function(F){return"page"==F?m.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==F?1:x.apply(this,arguments)}}}null!=m&&(c=Editor.parseDiagramNode(m))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(c)}catch(F){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var g=1,m=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(m=n))}return{scale:g,border:m}};EditorUi.prototype.getEmbeddedPng=function(c,g,m,n,x){try{var F=this.editor.graph,I=null;if(null!=m&&0<m.length)F=this.createTemporaryGraph(F.getStylesheet()),document.body.appendChild(F.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0),F),I=m;else if(null!=this.pages&&this.currentPage!=this.pages[0]){F=this.createTemporaryGraph(F.getStylesheet());var M=F.getGlobalVariable;F.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?F.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&F.setBackgroundImage(L.viewState.backgroundImage);F.getGlobalVariable=function(K){return"page"==K?L.getName():"pagenumber"==K?1:M.apply(this,arguments)};document.body.appendChild(F.container);-F.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==I&&(I=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var aa=K.toDataURL("image/png");aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(I));c(aa.substring(aa.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ia){null!=g&&g(ia)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,-F,x,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){M=null!=M?M:!0;aa=null!=aa?aa:0;I=null!=L?L:g.background;I==mxConstants.NONE&&(I=null);null==I&&"none"==g.getAdaptiveColors()&&(I="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(I,K,aa,null,null,F,null,L,null,g.shadowVisible||ia,null,da,"diagram");(g.shadowVisible||ia)&&g.addSvgShadow(F,null,null,0==aa);null!=c&&F.setAttribute("content",c);null!=-m&&F.setAttribute("resource",m);var ba=mxUtils.bind(this,function(oa){oa=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(oa){M?this.editor.convertImages(oa,mxUtils.bind(this,function(X){ba(X)})):ba(oa)}));else return ba(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(c,m),g(c)}catch(n){g(c)}}))}catch(m){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(oa){Editor.addRetryToError(oa,mxUtils.bind(this,function(){this.exportImage(c,g,m,n,x,F,I,M,L,K,aa,ia,-da)}));this.handleError(oa)}))){var ba=this.editor.graph.isSelectionEmpty();m=null!=m?m:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,m,M,null,null,null,null,null,c,F):null,L,null==this.pages||0==this.pages.length,aa)}catch(X){this.handleError(X)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),-null,m,c||1,g,n,null,null,F,I,K,ia,da)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,m,n,x,F,I){g=null!=g?g:0;m=null!=m?m:0;var M=[];try{var L=this.editor.graph;if(null!=c&&0<-c.length){L.model.beginUpdate();try{var K=mxUtils.parseXml(c);c={};var aa=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var ia=aa.getElementsByTagName("diagram");if(1==ia.length&&!F){if(aa=Editor.parseDiagramNode(ia[0]),null!=this.currentPage&&(c[ia[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var da=ia[0].getAttribute("name");null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-da))}}else if(0<ia.length){F=[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ia[0].getAttribute("id")]=this.pages[0].getId(),da=ia[0].getAttribute("name"),null!=da&&""!=da&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],da)),aa=Editor.parseDiagramNode(ia[0]),n=!1,ba=1);for(;ba<ia.length;ba++){var oa=ia[ba].getAttribute("id");ia[ba].removeAttribute("id");var X=this.updatePageRoot(new DiagramPage(ia[ba]));c[oa]=ia[ba].getAttribute("id");var ca=this.pages.length;-null==X.getName()&&X.setName(mxResources.get("pageWithNumber",[ca+1]));L.model.execute(new ChangePage(this,X,X,ca,!0));F.push(X)}this.updatePageLinks(c,F)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){M=L.importGraphModel(aa,g,m,n);if(null!=M)for(this.addLocalPagesToMapping(c),ba=0;ba<M.length;ba++)this.updatePageLinksForCell(c,M[ba]);var ha=L.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(c,ha);var Z=new ChangePageSetup(this,+F.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==I&&(I=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var aa=K.toDataURL("image/png");aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(I));c(aa.substring(aa.lastIndexOf(",")+1));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container)}catch(ja){null!=g&&g(ja)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&g(K)}),null,null,n,null,F.shadowVisible,null,+F,x,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){M=null!=M?M:!0;aa=null!=aa?aa:0;I=null!=L?L:g.background;I==mxConstants.NONE&&(I=null);null==I&&"none"==g.getAdaptiveColors()&&(I="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);F=g.getSvg(I,K,aa,null,null,F,null,L,null,g.shadowVisible||ja,null,ca,"diagram");(g.shadowVisible||ja)&&g.addSvgShadow(F,null,null,0==aa);null!=c&&F.setAttribute("content",c);null!=+m&&F.setAttribute("resource",m);var ba=mxUtils.bind(this,function(oa){oa=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});g.mathEnabled&&this.editor.addMathCss(F);if(null!=x)this.embedFonts(F,mxUtils.bind(this,function(oa){M?this.editor.convertImages(oa,mxUtils.bind(this,function(Y){ba(Y)})):ba(oa)}));else return ba(F)};EditorUi.prototype.embedFonts=function(c,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(c,m),g(c)}catch(n){g(c)}}))}catch(m){g(c)}}))};EditorUi.prototype.exportImage=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(oa){Editor.addRetryToError(oa,mxUtils.bind(this,function(){this.exportImage(c,g,m,n,x,F,I,M,L,K,aa,ja,+ca)}));this.handleError(oa)}))){var ba=this.editor.graph.isSelectionEmpty();m=null!=m?m:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,m,M,null,null,null,null,null,c,F):null,L,null==this.pages||0==this.pages.length,aa)}catch(Y){this.handleError(Y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),+null,m,c||1,g,n,null,null,F,I,K,ja,ca)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)c[this.pages[g].getId()]=this.pages[g].getId();return c};EditorUi.prototype.importXml=function(c,g,m,n,x,F,I){g=null!=g?g:0;m=null!=m?m:0;var M=[];try{var L=this.editor.graph;if(null!=c&&0<+c.length){L.model.beginUpdate();try{var K=mxUtils.parseXml(c);c={};var aa=this.editor.extractGraphModel(K.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var ja=aa.getElementsByTagName("diagram");if(1==ja.length&&!F){if(aa=Editor.parseDiagramNode(ja[0]),null!=this.currentPage&&(c[ja[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ja[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,+ca))}}else if(0<ja.length){F=[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ja[0].getAttribute("id")]=this.pages[0].getId(),ca=ja[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),aa=Editor.parseDiagramNode(ja[0]),n=!1,ba=1);for(;ba<ja.length;ba++){var oa=ja[ba].getAttribute("id");ja[ba].removeAttribute("id");var Y=this.updatePageRoot(new DiagramPage(ja[ba]));c[oa]=ja[ba].getAttribute("id");var da=this.pages.length;+null==Y.getName()&&Y.setName(mxResources.get("pageWithNumber",[da+1]));L.model.execute(new ChangePage(this,Y,Y,da,!0));F.push(Y)}this.updatePageLinks(c,F)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){M=L.importGraphModel(aa,g,m,n);if(null!=M)for(this.addLocalPagesToMapping(c),ba=0;ba<M.length;ba++)this.updatePageLinksForCell(c,M[ba]);var ha=L.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(c,ha);var Z=new ChangePageSetup(this,null,ha);Z.ignoreColor=!0;L.model.execute(Z)}}I&&L.pasteCellStyles(L.includeDescendants(M),L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(k){if(x)throw k;this.handleError(k)}return M};EditorUi.prototype.updatePageLinks=function(c,g){for(var m=0;m<g.length;m++)this.updatePageLinksForCell(c,g[m].root),null!=g[m].viewState&&this.updateBackgroundPageLink(c,g[m].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var m=c[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=m&&(g.originalSrc="data:page/id,"+m)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=function(c,g){var m=document.createElement("div"),n=this.editor.graph,x=n.getLinkForCell(g);null!=x&&n.setLinkForCell(g,this.updatePageLink(c,x));if(n.isHtmlLabel(g)){m.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var F=m.getElementsByTagName("a"),I=!1,M=0;M<F.length;M++)x=F[M].getAttribute("href"),null!=x&&(F[M].setAttribute("href",this.updatePageLink(c,x)),I=!0);I&&n.labelChanged(g,m.innerHTML)}for(M=0;M<n.model.getChildCount(g);M++)this.updatePageLinksForCell(c,n.model.getChildAt(g,M))};EditorUi.prototype.updatePageLink=function(c,g){if(Graph.isPageLink(g)){var m=c[g.substring(g.indexOf(",")+1)];g=null!=m?"data:page/id,"+m:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var x=0;x<n.actions.length;x++){var F=n.actions[x];if(null!=F.open&&Graph.isPageLink(F.open)){var I=F.open.substring(F.open.indexOf(",")+1);m=c[I];null!=m?F.open="data:page/id,"+m:null==this.getPageById(I)&&delete F.open}}g="data:action/json,"+JSON.stringify(n)}}catch(M){}return g};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,g,m,n,x){var F=mxUtils.bind(this,function(I){this.loadingExtensions=!1;null!=m?m(I):this.handleError(I)});this.createTimeout(null,mxUtils.bind(this,function(I){n=null!=n?n:c.name;var M=mxUtils.bind(this,-function(K){I.clear()&&F(K)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var aa=n.lastIndexOf(".");if(0<=aa&&aa<n.length)n.substring(aa+1).toUpperCase();else{var ia=n.lastIndexOf("/");0<=ia&&ia<n.length&&(n=n.substring(ia+1))}}catch(ba){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;-K.append("file1",c,n);var da=new XMLHttpRequest;da.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));da.responseType="blob";this.addRemoteServiceSecurityCheck(da);null!=x&&da.setRequestHeader("x-convert-custom",x);da.onreadystatechange=mxUtils.bind(this,function(){if(4==da.readyState&&I.clear())if(200<=da.status&&299>=da.status)try{var ba=da.response;if("text/xml"==ba.type){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(X){try{g(X.target.result)}catch(ca){M({message:mxResources.get("errorLoadingFile")})}});-oa.readAsText(ba)}else this.doImportVisio(ba,g,M,n)}catch(X){M(X)}else try{""==da.responseType||"text"==da.responseType?M({message:da.responseText}):(oa=new FileReader,oa.onload=function(){try{M({message:JSON.parse(oa.result).Message})}catch(X){null!=oa.result&&0<oa.result.length?M({message:oa.result}):M(X)}},oa.readAsText(da.response))}catch(X){M({})}});da.send(K)}else if(I.clear())try{this.doImportVisio(c,g,M,n)}catch(ba){M(ba)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});+function(K){I.clear()&&F(K)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var K=this.isRemoteVisioFormat(n);try{var aa=n.lastIndexOf(".");if(0<=aa&&aa<n.length)n.substring(aa+1).toUpperCase();else{var ja=n.lastIndexOf("/");0<=ja&&ja<n.length&&(n=n.substring(ja+1))}}catch(ba){}if(K)if(null==VSS_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{K=new FormData;+K.append("file1",c,n);var ca=new XMLHttpRequest;ca.open("POST",VSS_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=x&&ca.setRequestHeader("x-convert-custom",x);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&I.clear())if(200<=ca.status&&299>=ca.status)try{var ba=ca.response;if("text/xml"==ba.type){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(Y){try{g(Y.target.result)}catch(da){M({message:mxResources.get("errorLoadingFile")})}});+oa.readAsText(ba)}else this.doImportVisio(ba,g,M,n)}catch(Y){M(Y)}else try{""==ca.responseType||"text"==ca.responseType?M({message:ca.responseText}):(oa=new FileReader,oa.onload=function(){try{M({message:JSON.parse(oa.result).Message})}catch(Y){null!=oa.result&&0<oa.result.length?M({message:oa.result}):M(Y)}},oa.readAsText(ca.response))}catch(Y){M({})}});ca.send(K)}else if(I.clear())try{this.doImportVisio(c,g,M,n)}catch(ba){M(ba)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?L():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",L,null,null,null,M))}),F)};EditorUi.prototype.importGraphML=function(c,g,m){var n=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=m?m(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){var F=mxUtils.bind(this,function(M){x.clear()&&n(M)}),I=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(x.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,g,n)}catch(M){F(M)}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?I():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,F))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(m){this.loadingExtensions=!1;this.handleError(m)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(m){var n=mxUtils.bind(this,function(F){m.clear()&&g(F)}),x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(m.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(F){n(F)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=@@ -3722,84 +3723,84 @@ JSON.parse(c);g(LucidImporter.importState(M));try{if(null!=window.console&&"1"==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(I,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",I,null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F)},null,null,null,F):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,F))}),n)};EditorUi.prototype.createMermaidXml=function(c,g,m,n,x,F){var I=new Graph(document.createElement("div"));m=I.insertVertex(null,null,null,0,0,n,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+m+";");I.setAttributeForCell(m,"mermaidData",JSON.stringify({data:c,config:g},null,2));null!=F&&I.setAttributeForCell(m,"templatePrompt",F);c=(new mxCodec).encode(I.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,g,m){var n=0,x=function(){for(var I=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),M=0;M<I.length;M++)null!=I[M].parentNode&&I[M].parentNode.removeChild(I[M])},F=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(I){var M=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(K){I.clear()&&(x(),m(K))});M.send(mxUtils.bind(this,function(K){if(I.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var ia=mxUtils.trim(K.getText());this.generateMermaidImage(ia,null,mxUtils.bind(this,function(da,ba,oa){this.tryAndHandle(mxUtils.bind(this,function(){I.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ia]),x(),g(ia,da,ba,oa))}),L)}),L,mxUtils.bind(this,function(da){3>n++?I.clear()&&F():L(da)}))}),L);else{var aa={message:mxResources.get("error")+" "+K.getStatus()};try{aa=JSON.parse(K.getText()),aa=aa.error}catch(ia){}L(aa)}}),L)}),m)});F()};+function(){var ja=mxUtils.trim(K.getText());this.generateMermaidImage(ja,null,mxUtils.bind(this,function(ca,ba,oa){this.tryAndHandle(mxUtils.bind(this,function(){I.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ja]),x(),g(ja,ca,ba,oa))}),L)}),L,mxUtils.bind(this,function(ca){3>n++?I.clear()&&F():L(ca)}))}),L);else{var aa={message:mxResources.get("error")+" "+K.getStatus()};try{aa=JSON.parse(K.getText()),aa=aa.error}catch(ja){}L(aa)}}),L)}),m)});F()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var g=c.split("```");g=1<g.length?g:c.split("<pre>");g=1<g.length?g:c.split("~~~");g=1<g.length?g:c.split("%%");g=1<g.length?g:c.split("(Begins)");c=mxUtils.trim(1>=g.length?c:g[1]);g=c.split("\n");var m=1<g.length?g[1]:null;if(null!=m){var n=m.indexOf("-");0<n&&(m=m.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=m&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m))g.shift(),c=mxUtils.trim(g.join("\n")),g=c.split("\n");m=g[0].split(" ")[0].replace(/:$/,"");n=m.indexOf("-");0<n&&(m=m.substring(0,n));try{"mindmap"==m&&2<g.length&&(c=extractMermaidMindmap(g))}catch(x){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,g,m,n,x){var F=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=n?n(M):this.handleError(M)}),I=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=c.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var M=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,-"href").replace(/<br>/g,"<br/>");var K=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<K.length&&"error"!=K[0].getAttribute("aria-roledescription")){var aa=parseFloat(K[0].getAttribute("width")),ia=parseFloat(K[0].getAttribute("height"));if(isNaN(aa)||isNaN(ia))try{var da=K[0].getAttribute("viewBox").split(/\s+/);aa=parseFloat(da[2]);ia=parseFloat(da[3])}catch(ba){aa=aa||100,ia=ia||100}m(this.convertDataUri(Editor.createSvgDataUri(L)),aa,ia)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(ba){n(ba)}});+"href").replace(/<br>/g,"<br/>");var K=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<K.length&&"error"!=K[0].getAttribute("aria-roledescription")){var aa=parseFloat(K[0].getAttribute("width")),ja=parseFloat(K[0].getAttribute("height"));if(isNaN(aa)||isNaN(ja))try{var ca=K[0].getAttribute("viewBox").split(/\s+/);aa=parseFloat(ca[2]);ja=parseFloat(ca[3])}catch(ba){aa=aa||100,ja=ja||100}m(this.convertDataUri(Editor.createSvgDataUri(L)),aa,ja)}else null!=x?x():n({message:mxResources.get("invalidInput")})}catch(ba){n(ba)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(L){M(L.svg)}).catch(function(L){null!=x?x(L):n(L)})}catch(L){n(L)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(I,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(M){this.importXml(M,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",I,null,null,null,F)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,F))};EditorUi.prototype.generatePlantUmlImage=function(c,g,m,n){function x(M,L,K){c1=M>>2;c2=(M&3)<<4|L>>4;c3=(L&15)<<2|K>>6;c4=K&63;r="";r+=F(c1&63);r+=F(c2&63);r+=F(c3&63);return r+=F(c4&63)}function F(M){if(10>M)return String.fromCharCode(48+M);M-=10;if(26>M)return String.fromCharCode(65+M);M-=26;if(26>M)return String.fromCharCode(97+M);M-=26;return 0==M?"-":1==M?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(M){r="";for(i=0;i<M.length;i+=3)r=i+2==M.length?r+x(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+x(M.charCodeAt(i),0,0):r+x(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=g&&(I.responseType="blob");I.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==g)m(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);-L.onloadend=function(K){var aa=new Image;aa.onload=function(){try{var ia=aa.width,da=aa.height;if(0==ia&&0==da){var ba=L.result,oa=ba.indexOf(","),X=decodeURIComponent(escape(atob(ba.substring(oa+1)))),ca=mxUtils.parseXml(X).getElementsByTagName("svg");0<ca.length&&(ia=parseFloat(ca[0].getAttribute("width")),da=parseFloat(ca[0].getAttribute("height")))}m(L.result,ia,da)}catch(ha){n(ha)}};aa.src=L.result};L.onerror=function(K){n(K)}}else n(M)};I.onerror=function(M){n(M)};I.send()};EditorUi.prototype.insertAsPreText=+L.onloadend=function(K){var aa=new Image;aa.onload=function(){try{var ja=aa.width,ca=aa.height;if(0==ja&&0==ca){var ba=L.result,oa=ba.indexOf(","),Y=decodeURIComponent(escape(atob(ba.substring(oa+1)))),da=mxUtils.parseXml(Y).getElementsByTagName("svg");0<da.length&&(ja=parseFloat(da[0].getAttribute("width")),ca=parseFloat(da[0].getAttribute("height")))}m(L.result,ja,ca)}catch(ha){n(ha)}};aa.src=L.result};L.onerror=function(K){n(K)}}else n(M)};I.onerror=function(M){n(M)};I.send()};EditorUi.prototype.insertAsPreText=function(c,g,m){var n=this.editor.graph,x=null;n.getModel().beginUpdate();try{x=n.insertVertex(null,null,"<pre>"+c+"</pre>",g,m,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(x,!0)}finally{n.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(c,g,m,n,x,F,I,M){F=null!=F?F:!0;I=null!=I?I:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):-this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(da){4==da.readyState&&200<=da.status&&299>=da.status&&this.editor.graph.setSelectionCells(this.insertTextAt(da.responseText,g,m,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,m,F,!0,M)}if(Editor.isPngDataUrl(c)&&-(K=Editor.extractGraphModelFromPng(c),null!=K&&0<K.length))return this.importXml(K,g,m,F,!0,M);if("data:image/svg+xml;"==c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var aa=this.importXml(K,g,m,F,!0,M);if(0<aa.length)return aa}catch(da){}this.loadImage(c,mxUtils.bind(this,function(da){if("data:"==c.substring(0,5))this.resizeImage(da,-c,mxUtils.bind(this,function(X,ca,ha){L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),ca,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(X)+";"))}),I,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/da.width,this.maxImageSize/da.height)),oa=Math.round(da.width*ba);da=Math.round(da.height*ba);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),oa,-da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var da=null;L.getModel().beginUpdate();try{da=L.insertVertex(L.getDefaultParent(),null,c,L.snap(g),L.snap(m),1,1,"text;"+(n?"html=1;":"")),L.updateCellSize(da),L.fireEvent(new mxEventObject("textInserted","cells",[da]))}finally{L.getModel().endUpdate()}L.setSelectionCell(da)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,-g,m,F,null,M);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(da){this.editor.graph.setSelectionCells(this.importXml(da,g,m,F,null,M))}),mxUtils.bind(this,function(da){this.handleError(da)}));else{L=this.editor.graph;x=null;L.getModel().beginUpdate();try{x=L.insertVertex(L.getDefaultParent(),null,"",L.snap(g),L.snap(m),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=L.sanitizeHtml(c));c.length>-this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;L.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ia=L.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ia.width;x.geometry.height=ia.height}Graph.isLink(x.value)&&L.setLinkForCell(x,x.value);x.geometry.width+=L.gridSize;x.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<+this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,g,m,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var K=Editor.extractGraphModelFromPdf(c);if(null!=K&&0<K.length)return this.importXml(K,g,m,F,!0,M)}if(Editor.isPngDataUrl(c)&&+(K=Editor.extractGraphModelFromPng(c),null!=K&&0<K.length))return this.importXml(K,g,m,F,!0,M);if("data:image/svg+xml;"==c.substring(0,19))try{K=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(K=c.substring(c.indexOf(",")+1),K=window.atob&&!mxClient.IS_SF?atob(K):Base64.decode(K,!0)):K=decodeURIComponent(c.substring(c.indexOf(",")+1));var aa=this.importXml(K,g,m,F,!0,M);if(0<aa.length)return aa}catch(ca){}this.loadImage(c,mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,+c,mxUtils.bind(this,function(Y,da,ha){L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),da,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Y)+";"))}),I,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),oa=Math.round(ca.width*ba);ca=Math.round(ca.height*ba);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(g),L.snap(m),oa,+ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;L.getModel().beginUpdate();try{ca=L.insertVertex(L.getDefaultParent(),null,c,L.snap(g),L.snap(m),1,1,"text;"+(n?"html=1;":"")),L.updateCellSize(ca),L.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{L.getModel().endUpdate()}L.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,+g,m,F,null,M);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,g,m,F,null,M))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{L=this.editor.graph;x=null;L.getModel().beginUpdate();try{x=L.insertVertex(L.getDefaultParent(),null,"",L.snap(g),L.snap(m),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[x]));n&&(c=L.sanitizeHtml(c));c.length>+this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");x.value=c;L.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ja=L.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ja.width;x.geometry.height=ja.height}Graph.isLink(x.value)&&L.setLinkForCell(x,x.value);x.geometry.width+=L.gridSize;x.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(c){var g=-1;do c/=1024,g++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var g=c.indexOf(";");0<g&&(c=c.substring(0,g)+c.substring(c.indexOf(",",g+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,g){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,g){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var m=document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.importFiles(m.files,null,null,this.maxImageSize),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.importFileInputElt=m}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,M){StorageFile.listFiles(this,"F",I,M)});window.openBrowserFile=mxUtils.bind(this,function(I,M,L){StorageFile.getFileContent(this,I,M,L)});window.deleteBrowserFile=mxUtils.bind(this,function(I,M,L){StorageFile.deleteFile(this,I,M,L)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,M){null!=M&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(M)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(L){this.importXml(L,0,0,!0)}),null,M)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var x=this.dialog,F=x.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=n;F.apply(x,-arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,g,m){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))m();else{var I=0,M,L=!1;F.forEach(function(K,aa){K=aa.name.toLowerCase();"diagram/diagram.xml"==K?(L=!0,aa.async("string").then(function(ia){0==ia.indexOf("<mxfile ")?g(ia):m()})):0==K.indexOf("versions/")&&+arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,g,m){var n=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(F){if(mxUtils.isEmptyObject(F.files))m();else{var I=0,M,L=!1;F.forEach(function(K,aa){K=aa.name.toLowerCase();"diagram/diagram.xml"==K?(L=!0,aa.async("string").then(function(ja){0==ja.indexOf("<mxfile ")?g(ja):m()})):0==K.indexOf("versions/")&&(K=parseInt(K.substr(9)),K>I&&(I=K,M=aa))});0<I?M.async("string").then(function(K){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(K,c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m):n.parseFileData(K,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?g(aa.responseText):m())}),c.name):m()}):L||m()}},function(F){m(F)}):m()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=-!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,m))};EditorUi.prototype.importFile=function(c,g,m,n,x,F,I,M,L,K,aa,ia){K=null!=K?K:!0;var da=!1,ba=null,oa=mxUtils.bind(this,function(X){var ca=null;null!=X&&"<mxlibrary"==X.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,X,I)),this.showSidebar()):ca=this.importXml(X,m,n,K,null,null!=ia?mxEvent.isControlDown(ia):null);null!=M&&M(ca)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(aa=aa?null:this.extractGraphModelFromPng(c),-null!=aa&&0<aa.length&&(ba=this.importXml(aa,m,n,K,null,null!=ia?mxEvent.isControlDown(ia):null),L=!0)),L||(L=this.editor.graph,aa=c.indexOf(";"),0<aa&&(c=c.substring(0,aa)+c.substring(c.indexOf(",",aa+1))),K&&L.isGridEnabled()&&(m=L.snap(m),n=L.snap(n)),aa="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(aa+="editableCssRules=.*;"),ba=[L.insertVertex(null,null,"",m,n,x,F,aa+"image="+c+";")])):/(\.*<graphml )/.test(c)?-(da=!0,this.importGraphML(c,oa)):null!=L&&null!=I&&EditorUi.isVisioFilename(I)?(da=!0,this.importVisio(L,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(da=!0,g=mxUtils.bind(this,function(X){4==X.readyState&&(200<=X.status&&299>=X.status?oa(X.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==X.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),-null!=c?this.parseFileData(c,g,I):this.parseFile(L,g,I)):0==c.indexOf("PK")&&null!=L?(da=!0,this.importZipFile(L,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(ba)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ia?mxEvent.isControlDown(ia):null));da||null==M||M(ba);return ba};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da){n=null!=n?n:this.maxImageSize;-K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var X=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ca=aa||this.resampleThreshold,ha=0;ha<c.length;ha++)if("image/svg"!==c[ha].type.substring(0,9)&&"image/"===c[ha].type.substring(0,6)&&c[ha].size>ca){X=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[X],"crop",[ba],"resizeImages",[oa],"ignoreEmbeddedXml",-[ia],"evt",[da]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(Y,fa,na,la,qa,ya,wa,Ja,Aa){try{if(null!=Y&&"<mxlibrary"==Y.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Y,wa)),this.showSidebar(),null;this.isCompatibleString(Y)&&1==c.length&&null!=da&&"drop"==da.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(Y,fa,na,la,qa,ya,wa,Ja,Aa,ba,ia,da)}catch(Ba){return this.handleError(Ba),-null}});F=null!=F?F:mxUtils.bind(this,function(Y){k.setSelectionCells(Y)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],V=mxUtils.bind(this,function(Y,fa){T[Y]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(Y=0;Y<T.length;Y++){var la=T[Y]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(Y){var fa=c[Y];if(null!=fa){var na=new FileReader;-na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ja=mxUtils.parseXml(wa),Aa=Ja.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ia?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==-Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(Y,mxUtils.bind(this,function(){try{if(null!=Ja){var Ca=Ja.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Oa=Da.getAttribute("viewBox");if(null==Oa||-0==Oa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Qa=Oa.split(" ");3<Qa.length&&(va=parseFloat(Qa[2]),Na=parseFloat(Qa[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ra=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+Y*v,m+Y*v,Math.max(1,Math.round(va*Ra)),Math.max(1,Math.round(Na*Ra)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,-Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):V(Y,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+Y*v,m+Y*v,0,0,fa.name)}))}else V(Y,mxUtils.bind(this,function(){return null}))}else{ya=-!1;if("image/png"==fa.type){var Ma=ia?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var ra=new Image;ra.src=la.target.result;V(Y,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+Y*v,m+Y*v,ra.width,ra.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(Y,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Oa=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+Y*v,m+Y*v,Math.round(va*Oa),Math.round(Na*Oa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=-la.target.result,x(qa,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(Ca){V(Y,function(){return Ca})},fa)}catch(Ca){V(Y,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else V(Y,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+Y*v,m+Y*v,240,160,fa.name,function(la){V(Y,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(X){X=[];for(ha=-0;ha<c.length;ha++)X.push(c[ha]);c=X;this.confirmImageResize(function(k){oa=k;Z()},L)}else Z()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,+!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",x,null,null,null,m))};EditorUi.prototype.importFile=function(c,g,m,n,x,F,I,M,L,K,aa,ja){K=null!=K?K:!0;var ca=!1,ba=null,oa=mxUtils.bind(this,function(Y){var da=null;null!=Y&&"<mxlibrary"==Y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,Y,I)),this.showSidebar()):da=this.importXml(Y,m,n,K,null,null!=ja?mxEvent.isControlDown(ja):null);null!=M&&M(da)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(aa=aa?null:this.extractGraphModelFromPng(c),+null!=aa&&0<aa.length&&(ba=this.importXml(aa,m,n,K,null,null!=ja?mxEvent.isControlDown(ja):null),L=!0)),L||(L=this.editor.graph,aa=c.indexOf(";"),0<aa&&(c=c.substring(0,aa)+c.substring(c.indexOf(",",aa+1))),K&&L.isGridEnabled()&&(m=L.snap(m),n=L.snap(n)),aa="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(aa+="editableCssRules=.*;"),ba=[L.insertVertex(null,null,"",m,n,x,F,aa+"image="+c+";")])):/(\.*<graphml )/.test(c)?+(ca=!0,this.importGraphML(c,oa)):null!=L&&null!=I&&EditorUi.isVisioFilename(I)?(ca=!0,this.importVisio(L,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,g=mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?oa(Y.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==Y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),+null!=c?this.parseFileData(c,g,I):this.parseFile(L,g,I)):0==c.indexOf("PK")&&null!=L?(ca=!0,this.importZipFile(L,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K);M(ba)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ba=this.insertTextAt(this.validateFileData(c),m,n,!0,null,K,null,null!=ja?mxEvent.isControlDown(ja):null));ca||null==M||M(ba);return ba};EditorUi.prototype.importFiles=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca){n=null!=n?n:this.maxImageSize;+K=null!=K?K:this.maxImageBytes;var ba=null!=g&&null!=m,oa=!0;g=null!=g?g:0;m=null!=m?m:0;var Y=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var da=aa||this.resampleThreshold,ha=0;ha<c.length;ha++)if("image/svg"!==c[ha].type.substring(0,9)&&"image/"===c[ha].type.substring(0,6)&&c[ha].size>da){Y=!0;break}EditorUi.debug("EditorUi.importFiles",[this],"files",[c],"x",[g],"y",[m],"maxSize",[n],"maxBytes",[K],"resampleThreshold",[this.resampleThreshold],"largeImages",[Y],"crop",[ba],"resizeImages",[oa],"ignoreEmbeddedXml",+[ja],"evt",[ca]);var Z=mxUtils.bind(this,function(){var k=this.editor.graph,v=k.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,fa,na,la,qa,ya,wa,Ja,Aa){try{if(null!=X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=na=0);return this.importFile(X,fa,na,la,qa,ya,wa,Ja,Aa,ba,ja,ca)}catch(Ba){return this.handleError(Ba),+null}});F=null!=F?F:mxUtils.bind(this,function(X){k.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,N=J,T=[],V=mxUtils.bind(this,function(X,fa){T[X]=fa;if(0==--N){this.spinner.stop();if(null!=M)M(T);else{var na=[];k.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var la=T[X]();null!=la&&(na=na.concat(la))}}finally{k.getModel().endUpdate()}}F(na)}}),U=0;U<J;U++)mxUtils.bind(this,function(X){var fa=c[X];if(null!=fa){var na=new FileReader;+na.onload=mxUtils.bind(this,function(la){if(null==I||I(fa))try{if("image/"==fa.type.substring(0,6))if("image/svg"==fa.type.substring(0,9)){var qa=Graph.clipSvgDataUri(la.target.result),ya=qa.indexOf(","),wa=decodeURIComponent(escape(atob(qa.substring(ya+1)))),Ja=mxUtils.parseXml(wa),Aa=Ja.getElementsByTagName("svg");if(0<Aa.length){var Ba=Aa[0],Ga=ja?null:Ba.getAttribute("content");null!=Ga&&"<"!=Ga.charAt(0)&&"%"!=Ga.charAt(0)&&(Ga=unescape(window.atob?atob(Ga):Base64.decode(Ga,!0)));null!=Ga&&"%"==+Ga.charAt(0)&&(Ga=decodeURIComponent(Ga));null==Ga||"<mxfile "!==Ga.substring(0,8)&&"<mxGraphModel>"!==Ga.substring(0,14)&&"<mxGraphModel "!==Ga.substring(0,14)?V(X,mxUtils.bind(this,function(){try{if(null!=Ja){var Ca=Ja.getElementsByTagName("svg");if(0<Ca.length){var Da=Ca[0],va=Da.getAttribute("width"),Na=Da.getAttribute("height");va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Oa=Da.getAttribute("viewBox");if(null==Oa||+0==Oa.length)Da.setAttribute("viewBox","0 0 "+va+" "+Na);else if(isNaN(va)||isNaN(Na)){var Qa=Oa.split(" ");3<Qa.length&&(va=parseFloat(Qa[2]),Na=parseFloat(Qa[3]))}qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var Ra=Math.min(1,Math.min(n/Math.max(1,va)),n/Math.max(1,Na)),za=x(qa,fa.type,g+X*v,m+X*v,Math.max(1,Math.round(va*Ra)),Math.max(1,Math.round(Na*Ra)),fa.name);if(null!=za&&(isNaN(va)||isNaN(Na))){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){va=Math.max(1,Ea.width);Na=Math.max(1,+Ea.height);za[0].geometry.width=va;za[0].geometry.height=Na;Da.setAttribute("viewBox","0 0 "+va+" "+Na);qa=Editor.createSvgDataUri(mxUtils.getXml(Da));var C=qa.indexOf(";");0<C&&(qa=qa.substring(0,C)+qa.substring(qa.indexOf(",",C+1)));k.setCellStyles("image",qa,[za[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Da))}return za}}}catch(C){}return null})):V(X,mxUtils.bind(this,function(){return x(Ga,"text/xml",g+X*v,m+X*v,0,0,fa.name)}))}else V(X,mxUtils.bind(this,function(){return null}))}else{ya=+!1;if("image/png"==fa.type){var Ma=ja?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ma&&0<Ma.length){var ra=new Image;ra.src=la.target.result;V(X,mxUtils.bind(this,function(){return x(Ma,"text/xml",g+X*v,m+X*v,ra.width,ra.height,fa.name)}));ya=!0}}ya||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(Da,va,Na){V(X,mxUtils.bind(this,function(){if(null!=Da&&Da.length<K){var Oa=oa&&this.isResampleImageSize(fa.size,aa)?Math.min(1,Math.min(n/va,n/Na)):1;return x(Da,fa.type,g+X*v,m+X*v,Math.round(va*Oa),Math.round(Na*Oa),fa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,n,aa,fa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else qa=+la.target.result,x(qa,fa.type,g+X*v,m+X*v,240,160,fa.name,function(Ca){V(X,function(){return Ca})},fa)}catch(Ca){V(X,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,fa)}else V(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(fa.name)?x(null,fa.type,g+X*v,m+X*v,240,160,fa.name,function(la){V(X,function(){return la})},fa):"image"==fa.type.substring(0,5)||"application/pdf"==fa.type?na.readAsDataURL(fa):na.readAsText(fa)}})(U)});if(Y){Y=[];for(ha=+0;ha<c.length;ha++)Y.push(c[ha]);c=Y;this.confirmImageResize(function(k){oa=k;Z()},L)}else Z()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(F,I){if(F||g)mxSettings.setResizeImages(F?I:null),mxSettings.save();m();c(I)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(F){x(F,!0)},function(F){x(F,!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?226:200,!0,!0):x(!1,n)};EditorUi.prototype.parseFile=function(c,g,m){m=null!=m?m:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,m)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,g,m){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(m)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",-action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(c,g){g=null!=g?g:this.resampleThreshold;return c>g};EditorUi.prototype.resizeImage=function(c,g,m,n,x,F,I){x=null!=x?x:this.maxImageSize;var M=Math.max(1,c.width),L=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=I?I:g.length,F))try{var aa=Math.max(M/x,L/x);if(1<aa){var ia=Math.round(M/aa),da=Math.round(L/aa),ba=document.createElement("canvas");ba.width=ia;ba.height=da;ba.getContext("2d").drawImage(c,-0,0,ia,da);var oa=ba.toDataURL();if(oa.length<g.length){var X=document.createElement("canvas");X.width=ia;X.height=da;var ca=X.toDataURL();oa!==ca&&(g=oa,M=ia,L=da)}}}catch(ha){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,I):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=+action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(c,g){g=null!=g?g:this.resampleThreshold;return c>g};EditorUi.prototype.resizeImage=function(c,g,m,n,x,F,I){x=null!=x?x:this.maxImageSize;var M=Math.max(1,c.width),L=Math.max(1,c.height),K=g;if(n&&this.isResampleImageSize(null!=I?I:g.length,F))try{var aa=Math.max(M/x,L/x);if(1<aa){var ja=Math.round(M/aa),ca=Math.round(L/aa),ba=document.createElement("canvas");ba.width=ja;ba.height=ca;ba.getContext("2d").drawImage(c,+0,0,ja,ca);var oa=ba.toDataURL();if(oa.length<g.length){var Y=document.createElement("canvas");Y.width=ja;Y.height=ca;var da=Y.toDataURL();oa!==da&&(g=oa,M=ja,L=ca)}}}catch(ha){}n&&K!=g&&x>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(c,g,m,n,x/1.5,F,I):m(g,M,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,g,m){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=m&&(n.onerror=m);n.src=c}catch(x){if(null!=m)m(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var y=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());y.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=-function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();-try{if("txt"==T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Y,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:V,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(J.container,420,300,!0,!0);J.init()};g.cellEditor.editMermaidData=function(v,-J,N){var T=JSON.parse(N);J=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,Y,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,Y),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,-config:T.config},null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(J.container,420,300,!0,!0);J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,+function(v){var J=v.getEvent();return null==v.getState()&&!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==v.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,T.format,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{if("txt"==+T.format)g.labelChanged(v,"<pre>"+U+"</pre>"),g.updateCellSize(v,!0);else{g.setCellStyles("image",c.convertDataUri(U),[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=X,na.height=fa,g.cellsResized([v],[na],!1))}g.setAttributeForCell(v,"plantUmlData",JSON.stringify({data:V,format:T.format}))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};g.cellEditor.editMermaidData=+function(v,J,N){var T=JSON.parse(N);J=new SimpleTextareaDialog(c,T.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,T.config,function(U,X,fa){c.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[v]);var na=g.model.getGeometry(v);null!=na&&(na=na.clone(),na.width=Math.max(na.width,X),na.height=Math.max(na.height,fa),g.cellsResized([v],[na],!1));g.setAttributeForCell(v,"mermaidData",JSON.stringify({data:V,config:T.config},+null,2))}finally{g.getModel().endUpdate()}},function(U){c.handleError(U)})});c.showDialog(J.container,640,420,!0,!0,null,null,null,new mxRectangle(0,0,320,280));J.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(v,J){try{var N=this.graph.getAttributeForCell(v,"plantUmlData");if(null!=N)this.editPlantUmlData(v,J,N);else if(N=this.graph.getAttributeForCell(v,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(v,J,N);else{var T=g.getCellStyle(v);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(v):n.apply(this,arguments)}}catch(V){c.handleError(V)}};g.getLinkTitle=function(v){return c.getLinkTitle(v)};g.customLinkClicked=function(v,J){var N=!1;try{var T=this.getGraphBounds();c.handleCustomLink(v,J);N=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(J))}catch(V){c.handleError(V)}return N};var x=g.parseBackgroundImage;g.parseBackgroundImage=function(v){var J=x.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var F=g.setBackgroundImage;g.setBackgroundImage=function(v){null!=v&&null!=v.originalSrc&&(v=c.createImageForPageLink(v.originalSrc,c.currentPage,this));F.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(v,J){v=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=v){var N=v.indexOf(",");if(0<N)for(v=v.substring(N+1),J=J.getProperty("patches"),N=0;N<J.length;N++)if(null!=J[N][EditorUi.DIFF_UPDATE]&&null!=J[N][EditorUi.DIFF_UPDATE][v]||null!=J[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[N][EditorUi.DIFF_REMOVE],v)){g.refreshBackgroundImage();break}}}));var I=g.getBackgroundImageObject;g.getBackgroundImageObject=function(v,J){var N=I.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=J?c.createImageForPageLink(N.originalSrc,null,null,!0):{src:N.originalSrc});return N};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 M=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(v){v=null!=v?v:"";"1"==-urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(V,U,Y){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,Y)&&mxEvent.consume(V);null!=T&&T(V,U,Y)};L.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,+urlParams.dev&&(v+=(0<v.length?"&":"?")+"dev=1");return M.apply(this,arguments)};var L=g.addClickHandler;g.addClickHandler=function(v,J,N){var T=J;J=function(V,U,X){if(null==U){var fa=mxEvent.getSource(V);"a"==fa.nodeName.toLowerCase()&&(U=fa.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(U,X)&&mxEvent.consume(V);null!=T&&T(V,U,X)};L.call(this,v,J,N)};q.apply(this,arguments);this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var K=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(v,J,N){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(v,["zoomIn","zoomOut","-"],null,N);K.apply(this,arguments);g.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(v,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(v,["-","exitGroup","home"],null,N)};var aa=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(v,J,N){if(c.editor.graph.isSelectionEmpty())aa.apply(this,arguments),c.menus.addMenuItems(v,["copyAsImage","copyAsSvg"],null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(v,J,N):this.addPopupMenuArrangeItems(v,J,N),this.addMenuItems(v,"- cut copy copyAsImage copyAsSvg duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(v,J,N),this.addMenuItems(v,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(J)&&g.isCellEditable(J)&&(this.addSubmenu("editCell",v,null,mxResources.get("edit")),v.addSeparator(),g.getModel().isEdge(J))){this.addSubmenu("line",v);var T=g.getModel().getGeometry(J);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(v,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(v,["enterGroup"],null,N);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(v,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(v,"unmergeCells")}};this.menus.isShowStyleItems=-function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ia=g.getExportVariables;g.getExportVariables=-function(){var v=ia.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var da=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:da.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var X=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");-if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))X.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.isEnabled();if(!this.editor.chromeless||+function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ja=g.getExportVariables;g.getExportVariables=+function(){var v=ja.apply(this,arguments),J=c.getCurrentFile();null!=J&&(v.filename=J.getTitle());v.pagecount=null!=c.pages?c.pages.length:1;v.page=null!=c.currentPage?c.currentPage.getName():"";v.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return v};var ca=g.getGlobalVariable;g.getGlobalVariable=function(v){var J=c.getCurrentFile();return"filename"==v&&null!=J?J.getTitle():"page"==v&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==v?null!=c.currentPage&&+null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==v?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var ba=null,oa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var v=this.getCurrentFile(),J=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;ba!=J&&v==oa&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());ba=J;oa=v}));var Y=g.labelLinkClicked;g.labelLinkClicked=function(v,J,N){var T=J.getAttribute("href");+if(null==T||!g.isCustomLink(T)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))Y.apply(this,arguments);else{if(!g.isEnabled()||null!=v&&g.isCellLocked(v.cell))g.customLinkClicked(T),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var v=c.defaultFilename,J=c.getCurrentFile();null!=J&&(v=null!=J.getTitle()?J.getTitle():v);return v};var da=this.actions.get("print");da.setEnabled(!mxClient.IS_IOS||!navigator.standalone);da.visible=da.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!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(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(v,J){null!=J&&g.isEnabled()&&!g.isEditing()&&null!=J.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(v){var J=g.cellEditor.text2,N=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(T){null!=N&&(N.parentNode.removeChild(N),N=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(T){null==N&&(N=this.highlightElement(J));T.stopPropagation();T.preventDefault()})),-mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,Y,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Y=0;Y<U.length;Y++)U[Y]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?-this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(U){var Y=Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,Y)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(V),Y*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&-document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ca=this.editor.graph.view;var ha=mxSettings.getUnit();ca.setUnit(ha);Editor.pageSizeUnit=ha==mxConstants.METERS?mxConstants.MILLIMETERS:ha;ca.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||-9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit);this.refresh()}if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility=-"hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility=-"visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:Z.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});-mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,Y=J.y/-V-T.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(Y=U=null),this.importFiles(N,U,Y,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(Y=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,-null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,Y,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):-(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,Y,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ja=Math.max(1,wa.width);-wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ja)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,Y,Ja*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,Y,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),-U,Y,!0))}}v.stopPropagation();v.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});+mxEvent.addListener(J,"drop",mxUtils.bind(this,function(T){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,fa,na,la,qa){g.insertImage(U,la,qa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?+this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var fa=this.maxImageSize;fa=Math.min(1,Math.min(fa/Math.max(1,X)),fa/Math.max(1,U));g.insertImage(decodeURIComponent(V),X*fa,U*fa)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&+document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){da=this.editor.graph.view;var ha=mxSettings.getUnit();da.setUnit(ha);Editor.pageSizeUnit=ha==mxConstants.METERS?mxConstants.MILLIMETERS:ha;da.addListener("unitChanged",function(v,J){v=J.getProperty("unit");mxSettings.setUnit(v);mxSettings.save();Editor.pageSizeUnit=v==mxConstants.METERS?mxConstants.MILLIMETERS:v});this.ruler=!Editor.canvasSupported||+9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,da.unit);this.refresh()}if("1"==urlParams.styledev){da=document.getElementById("geFooter");null!=da&&(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)})),da.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,J){0<this.editor.graph.getSelectionCount()?(v=this.editor.graph.getSelectionCell(),v=this.editor.graph.getModel().getStyle(v),this.styleInput.value=v||"",this.styleInput.style.visibility=+"visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==this.styleInput?!0:Z.apply(this,arguments)}}da=document.getElementById("geInfo");null!=da&&da.parentNode.removeChild(da);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var k=null;mxEvent.addListener(g.container,"dragleave",function(v){g.isEnabled()&&(null!=k&&(k.parentNode.removeChild(k),k=null),v.stopPropagation(),v.preventDefault())});+mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(v){null==k&&(k=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();v.stopPropagation();v.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(v){null!=k&&(k.parentNode.removeChild(k),k=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),N=v.dataTransfer.files,T=g.view.translate,V=g.view.scale,U=J.x/V-T.x,X=J.y/+V-T.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(v)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(v)&&(X=U=null),this.importFiles(N,U,X,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(v),null,null,mxEvent.isShiftDown(v),v));else{mxEvent.isAltDown(v)&&(X=U=0);var fa=0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(v,+null!=this.pages);if(null!=J)g.setSelectionCells(this.importXml(J,U,X,!0));else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/html")){var na=v.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(na);var la=null;N=J.getElementsByTagName("img");null!=N&&1==N.length?(na=N[0].getAttribute("src"),null==na&&(na=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(na)||(la=!0)):(N=J.getElementsByTagName("a"),null!=N&&1==N.length?na=N[0].getAttribute("href"):+(J=J.getElementsByTagName("pre"),null!=J&&1==J.length&&(na=mxUtils.getTextContent(J[0]))));var qa=!0,ya=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(na,U,X,!0,la,null,qa,mxEvent.isControlDown(v)))});la&&null!=na&&na.length>this.resampleThreshold?this.confirmImageResize(function(wa){qa=wa;ya()},mxEvent.isControlDown(v)):ya()}else null!=fa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)?this.loadImage(decodeURIComponent(fa),mxUtils.bind(this,function(wa){var Ja=Math.max(1,wa.width);+wa=Math.max(1,wa.height);var Aa=this.maxImageSize;Aa=Math.min(1,Math.min(Aa/Math.max(1,Ja)),Aa/Math.max(1,wa));g.setSelectionCell(g.insertVertex(null,null,"",U,X,Ja*Aa,wa*Aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+fa+";"))}),mxUtils.bind(this,function(wa){g.setSelectionCells(this.insertTextAt(fa,U,X,!0))})):0<=mxUtils.indexOf(v.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(v.dataTransfer.getData("text/plain"),+U,X,!0))}}v.stopPropagation();v.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var v=parseInt(this.div.offsetLeft),J=parseInt(this.div.offsetWidth),N=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(v,-N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ca=Editor.currentTheme,"simple"==ca||"sketch"==ca)this.doSetCurrentTheme(ca,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||-document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ca=!1;if(null!=urlParams.dark)ca=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ca="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ca&&"auto"!=mxSettings.settings.darkMode||(ca=mxSettings.settings.darkMode);"auto"==ca&&this.isAutoDarkModeSupported()&&(ca=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===-typeof ca?"1"==ca:ca);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&+N-J))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-V))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(da=Editor.currentTheme,"simple"==da||"sketch"==da)this.doSetCurrentTheme(da,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||+document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));da=!1;if(null!=urlParams.dark)da=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)da="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||da&&"auto"!=mxSettings.settings.darkMode||(da=mxSettings.settings.darkMode);"auto"==da&&this.isAutoDarkModeSupported()&&(da=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===+typeof da?"1"==da:da);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(v){this.isAutoDarkMode()&&this.setDarkMode(v.matches)}))}catch(v){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(v,J){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&c<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&c>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,n=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(K){mxEvent.getSource(K)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K)),this.sendEmbeddedSvgExport())}));@@ -3872,17 +3873,17 @@ EditorUi.prototype.copyImage=function(c,g,m){try{m=null!=m?m:4,null!=navigator.cI,M,"image/png",null,mxUtils.bind(this,function(){if(this.isLocalFileSave()){var L=this.getBaseFilename(!1)+(null!=g?".drawio":"")+".png";this.saveLocalFile(F.substring(F.lastIndexOf(",")+1),L,"image/png",!0,"png",null,null,null,"copy")}else this.handleError(e)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,m,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,g){var m=this.editor.graph;if(m.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),x=mxUtils.getXml(m.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(x));g?(m.removeCells(n,!1),m.lastPasteXml=null):(m.lastPasteXml=x,m.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeClipboard){var g=this.editor.graph;g.isSelectionEmpty()||(c=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(c)),navigator.clipboard.writeText(g))}return c};EditorUi.prototype.pasteXml=function(c,g,m,n,x,F){EditorUi.debug("EditorUi.pasteXml",[this],"xml",[c],"pasteAsLabel",[g],"compat",[m],"evt",[n],"html",[x],"pt",[F]);x=null!=x?x:!0;var I=this.editor.graph,M=null!=F?F:Editor.pasteAtMousePointer&&I.isMouseInsertPoint()?-I.getInsertPoint():null;F=null;I.lastPasteXml==c?null==M&&I.pasteCounter++:(I.lastPasteXml=c,I.pasteCounter=0);var L=I.pasteCounter*I.gridSize;if(m||this.isCompatibleString(c)){I.model.beginUpdate();try{if(F=this.importXml(c,L,L),null!=M){var K=I.getBoundingBoxFromGeometry(F,!0);if(null!=K){var aa=Math.round(I.snap(M.x)),ia=Math.round(I.snap(M.y));I.cellsMoved(F,aa-K.x,ia-K.y)}}}finally{I.model.endUpdate()}I.setSelectionCells(F)}else if(g&&1==I.getSelectionCount()){g=I.getStartEditingCell(I.getSelectionCell(),+I.getInsertPoint():null;F=null;I.lastPasteXml==c?null==M&&I.pasteCounter++:(I.lastPasteXml=c,I.pasteCounter=0);var L=I.pasteCounter*I.gridSize;if(m||this.isCompatibleString(c)){I.model.beginUpdate();try{if(F=this.importXml(c,L,L),null!=M){var K=I.getBoundingBoxFromGeometry(F,!0);if(null!=K){var aa=Math.round(I.snap(M.x)),ja=Math.round(I.snap(M.y));I.cellsMoved(F,aa-K.x,ja-K.y)}}}finally{I.model.endUpdate()}I.setSelectionCells(F)}else if(g&&1==I.getSelectionCount()){g=I.getStartEditingCell(I.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==I.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])I.setCellStyles(mxConstants.STYLE_IMAGE,c,[g]);else{I.model.beginUpdate();try{I.labelChanged(g,c),Graph.isLink(c)&&I.setLinkForCell(g,c)}finally{I.model.endUpdate()}}I.setSelectionCell(g)}else M=null!=M?M:I.getInsertPoint(),I.isMouseInsertPoint()&&(L=0,I.lastPasteXml==c&&0<I.pasteCounter&&I.pasteCounter--),F=this.insertTextAt(c,M.x+L,M.y+L,x),I.setSelectionCells(F);I.isSelectionEmpty()||(I.scrollCellToVisible(I.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(I.view.getState(I.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,g,m,n){if(!mxEvent.isConsumed(c)){var x=c.clipboardData,F=this.editor.graph,I=!1,M=g;if(m&&null!=x&&x.getData){var L=x.getData("text/plain"),K=!1;if(null!=L&&0<L.length&&"%3CmxGraphModel%3E"==L.substring(0,18))try{var aa=decodeURIComponent(L);this.isCompatibleString(aa)&&(K=!0,L=aa)}catch(ha){}K=K?null:x.getData("text/html");null!=K&&0<K.length?(M=this.parseHtmlData(K),I="text/plain"!=M.getAttribute("data-type")):null!=L&&0<L.length&&(M=document.createElement("div"),mxUtils.setTextContent(M,K))}L=M.getElementsByTagName("span");if(null!=L&&0<L.length&&"application/vnd.lucid.chart.objects"===L[0].getAttribute("data-lucid-type"))m=L[0].getAttribute("data-lucid-content"),null!=m&&0<m.length&&(this.convertLucidChart(m,mxUtils.bind(this,function(ha){var Z=this.editor.graph;Z.lastPasteXml==ha?Z.pasteCounter++:(Z.lastPasteXml=ha,Z.pasteCounter=0);var k=Z.pasteCounter*Z.gridSize;-Z.setSelectionCells(this.importXml(ha,k,k));Z.scrollCellToVisible(Z.getSelectionCell())}),mxUtils.bind(this,function(ha){this.handleError(ha)})),mxEvent.consume(c));else{var ia=!1,da="";da=I?null!=M.textContent&&"<mxfile"==M.textContent.substring(0,7)&&"</mxfile>"==M.textContent.substring(M.textContent.length-9)||"<mxGraphModel"==M.textContent.substring(0,13)&&"</mxGraphModel>"==M.textContent.substring(M.textContent.length-15)?M.textContent.replace(/\u00a0/g," "):M.innerHTML:mxUtils.trim(null==M.innerText?-mxUtils.getTextContent(M):M.innerText);try{var ba=da.lastIndexOf("%3E");0<=ba&&ba<da.length-3&&(da=da.substring(0,ba+3))}catch(ha){}try{L=M.getElementsByTagName("span"),(aa=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(aa)||0==aa.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,da=aa)}catch(ha){}aa=null;try{if(!ia&&""==M.textContent)for(ba=0;ba<x.items.length;ba++){var oa=x.items[ba];if("file"===oa.kind){aa=-oa.getAsFile();break}}}catch(ha){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[M.outerHTML],"useEvent",m,"pasteAsLabel",n,"xml",[da],"compat",ia,"asHtml",I,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[aa]);try{if(ia||null==aa)if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),-this.pasteXml(da,n,ia,c)}catch(ha){console.log("Miro import error:",ha)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,n,ia,c,I);mxEvent.consume(c)}else m||(F.lastPasteXml=null,F.pasteCounter=0);else{var X=F.getInsertPoint();this.importFiles([aa],X.x,X.y,this.maxImageSize);mxEvent.consume(c)}}catch(ha){this.handleError(ha)}}}g.innerHTML=" "};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&+Z.setSelectionCells(this.importXml(ha,k,k));Z.scrollCellToVisible(Z.getSelectionCell())}),mxUtils.bind(this,function(ha){this.handleError(ha)})),mxEvent.consume(c));else{var ja=!1,ca="";ca=I?null!=M.textContent&&"<mxfile"==M.textContent.substring(0,7)&&"</mxfile>"==M.textContent.substring(M.textContent.length-9)||"<mxGraphModel"==M.textContent.substring(0,13)&&"</mxGraphModel>"==M.textContent.substring(M.textContent.length-15)?M.textContent.replace(/\u00a0/g," "):M.innerHTML:mxUtils.trim(null==M.innerText?+mxUtils.getTextContent(M):M.innerText);try{var ba=ca.lastIndexOf("%3E");0<=ba&&ba<ca.length-3&&(ca=ca.substring(0,ba+3))}catch(ha){}try{L=M.getElementsByTagName("span"),(aa=null!=L&&0<L.length?mxUtils.trim(decodeURIComponent(L[0].textContent)):decodeURIComponent(ca))&&(this.isCompatibleString(aa)||0==aa.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ja=!0,ca=aa)}catch(ha){}aa=null;try{if(!ja&&""==M.textContent)for(ba=0;ba<x.items.length;ba++){var oa=x.items[ba];if("file"===oa.kind){aa=+oa.getAsFile();break}}}catch(ha){}EditorUi.debug("EditorUi.pasteCells",[this],"evt",[c],"realElt",[g.outerHTML],"elt",[M.outerHTML],"useEvent",m,"pasteAsLabel",n,"xml",[ca],"compat",ja,"asHtml",I,"data",x,"items",[x.items.length],"files",[x.files.length],"types",[JSON.stringify(x.types)],"blob",[aa]);try{if(ja||null==aa)if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var da=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),+this.pasteXml(ca,n,ja,c)}catch(ha){console.log("Miro import error:",ha)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",da):da()}else this.pasteXml(ca,n,ja,c,I);mxEvent.consume(c)}else m||(F.lastPasteXml=null,F.pasteCounter=0);else{var Y=F.getInsertPoint();this.importFiles([aa],Y.x,Y.y,this.maxImageSize);mxEvent.consume(c)}}catch(ha){this.handleError(ha)}}}g.innerHTML=" "};EditorUi.prototype.pasteFromClipboard=function(c){var g=this.editor.graph;if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{Editor.enableNativeClipboard?this.readGraphModelFromClipboard(mxUtils.bind(this,function(m,n,x,F,I){if(null!=m){g.getModel().beginUpdate();try{this.pasteXml(m,!0,null,null,null,c)}finally{g.getModel().endUpdate()}}else m=null!=n?n:null!=x?x:F,null!=m?(c=null!=c?c:g.getInsertPoint(),this.importFiles([m],c.x,c.y,this.maxImageSize)):this.pasteFromLocalClipboard(c)})):this.pasteFromLocalClipboard(c)}catch(m){}};EditorUi.prototype.pasteFromLocalClipboard=function(c){var g=this.editor.graph;g.getModel().beginUpdate();try{g.moveCellsTo(mxClipboard.paste(g),c)}finally{g.getModel().endUpdate()}};EditorUi.prototype.installImagePasteHandler=function(){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(g){for(var m=null!=g.clipboardData?g.clipboardData:g.originalEvent.clipboardData,n=!1,x=null,F=0;F<m.types.length;F++)if("text/"===m.types[F].substring(0,5)){n=!0;break}for(F=0;F<m.items.length;F++){var I=m.items[F];if("file"===I.kind){x=-I.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[m],"items",[m.items.length],"files",[m.files.length],"types",[JSON.stringify(m.types)],"containsText",n,"file",[x],"editing",c.isEditing());var M=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,aa,ia,da,ba,oa){c.insertImage(K,ba,oa)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var aa=0;aa<K.length;aa++)K[aa]()});+I.getAsFile();break}}EditorUi.debug("EditorUi.imagePasteHandler",[this],"evt",[g],"data",[m],"items",[m.items.length],"files",[m.files.length],"types",[JSON.stringify(m.types)],"containsText",n,"file",[x],"editing",c.isEditing());var M=mxUtils.bind(this,function(){try{if(!n&&null!=x){if(c.isEditing())this.importFiles([x],0,0,this.maxImageSize,function(K,aa,ja,ca,ba,oa){c.insertImage(K,ba,oa)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var aa=0;aa<K.length;aa++)K[aa]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([x],L.x,L.y,this.maxImageSize)}mxEvent.consume(g)}}catch(K){}});if(!mxEvent.isConsumed(g)&&!n)if(Editor.enableNativeClipboard)navigator.clipboard.read().then(mxUtils.bind(this,function(L){this.readTypeFromClipboardData(L,"image/svg+xml",mxUtils.bind(this,function(K){if(null!=K){K=new Blob([K],{type:"image/svg+xml"});var aa=this.editor.graph.getInsertPoint();this.importFiles([K],aa.x,aa.y,this.maxImageSize)}else M()}),"image")}))["catch"](M);else M()}),!1)};EditorUi.prototype.readGraphModelFromClipboard=function(c){navigator.clipboard.read().then(mxUtils.bind(this,function(g){try{EditorUi.debug("EditorUi.readGraphModelFromClipboard",[this],"data",g,"types",null!=g&&0<g.length?[JSON.stringify(g[0].types)]:[]),this.readGraphModelFromHtmlClipboardData(g,mxUtils.bind(this,function(m,n){null!=m?c(m):this.readGraphModelFromImageClipboardData(g,mxUtils.bind(this,function(x,F,I){null!=x?c(x):this.readTypeFromClipboardData(g,"text/plain",mxUtils.bind(this,function(M){c(M,F,I,n,g)}))}))}))}catch(m){c(null)}}))["catch"](function(){c(null)})};EditorUi.prototype.readGraphModelFromHtmlClipboardData=function(c,g){this.readTypeFromClipboardData(c,"text/html",mxUtils.bind(this,function(m){var n=null,x=null;try{var F=this.parseHtmlData(m);if(null!=F){n="text/plain"!=F.getAttribute("data-type")?F.innerHTML:mxUtils.trim(null==F.innerText?mxUtils.getTextContent(F):F.innerText);try{var I=n.lastIndexOf("%3E");0<=I&&I<n.length-3&&(n=n.substring(0,I+3))}catch(K){}try{null==@@ -3893,17 +3894,17 @@ F);this.isCompatibleString(x)?g(x):g(null,n,I)}))}))};EditorUi.prototype.readTypnull!=g.firstChild.nextSibling&&g.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==g.firstChild.nodeName&&"A"==g.firstChild.nextSibling.nodeName&&null==g.firstChild.nextSibling.nextSibling){var n=null==g.firstChild.nextSibling.innerText?mxUtils.getTextContent(g.firstChild.nextSibling):g.firstChild.nextSibling.innerText;n==g.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(g,n),asHtml=!1)}if(""==g.textContent&&(m=g.getElementsByTagName("img"),1==m.length&&(n=m[0].getAttribute("src"),m=null,null!=n))){if(Editor.isPngDataUrl(n)){var x=Editor.extractGraphModelFromPng(n);null!=x&&0<x.length&&(m=x)}else if("data:image/svg+xml;base64,"==n.substring(0,26)){img=this.base64ToBlob(n.substring(n.indexOf(",")+1),"image/svg+xml");n=Graph.getSvgFromDataUri(n);try{x=mxUtils.parseXml(n).documentElement.getAttribute("content"),this.isCompatibleString(x)&&(m=x)}catch(F){}}null!=m&&(mxUtils.setTextContent(g,m),asHtml=!1)}asHtml?Graph.removePasteFormatting(g):g.setAttribute("data-type","text/plain")}EditorUi.debug("EditorUi.parseHtmlData",[this],"data",[c],"elt",[g],"asHtml",asHtml);return g};EditorUi.prototype.showPrintDialog=function(c,g,m){var n=330;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,c,g,m)).container,320,n,!0,!0)};EditorUi.prototype.print=function(c,g){var m=this.editor,n=m.graph,-x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,N=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var Y=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);-la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ja=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ja/(Y.height/ha.view.scale),la.width*wa/(Y.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(Y=n.getBoundingBox(n.getSelectionCells())),la.width=(Y.width+1)*wa/ha.view.scale,la.height=(Y.height++x=this.getPageIndex(this.currentPage),F=null!=x?x+1:1,I=mxUtils.bind(this,function(ha,Z,k,v){var J=ha.useCssTransforms,N=ha.currentTranslate,T=ha.currentScale,V=ha.view.translate,U=ha.view.scale;ha.useCssTransforms&&(ha.useCssTransforms=!1,ha.currentTranslate=new mxPoint(0,0),ha.currentScale=1,ha.view.translate=new mxPoint(0,0),ha.view.scale=1);var X=ha.getGraphBounds(),fa=0,na=0,la=mxRectangle.fromRectangle(ha.pageFormat),qa=g.fit||g.crop||!ha.pageVisible,ya=g.scale;la.width=Math.ceil(la.width*ha.pageScale);+la.height=Math.ceil(la.height*ha.pageScale);var wa=1;if(g.fit){wa=g.sheetsAcross;var Ja=g.sheetsDown;isNaN(ya)||(la.width=Math.ceil(la.width*ya),la.height=Math.ceil(la.height*ya));wa=Math.min(la.height*Ja/(X.height/ha.view.scale),la.width*wa/(X.width/ha.view.scale))}else wa=isNaN(ya)?1:ya;wa*=1;!qa&&ha.pageVisible?(ya=ha.getPageLayout(),fa-=ya.x*la.width,na-=ya.y*la.height):qa=!0;g.crop&&(g.selection&&(X=n.getBoundingBox(n.getSelectionCells())),la.width=(X.width+1)*wa/ha.view.scale,la.height=(X.height+1)*wa/ha.view.scale);la.width=Math.ceil(1*la.width);la.height=Math.ceil(1*la.height);v=null!=v?"page/id,"+v:null;if(null==Z){Z=PrintDialog.createPrintPreview(ha,wa,null,0,fa,na,qa);Z.title=this.getBaseFilename(!0);Z.pageSelector=!1;Z.mathEnabled=!1;fa=g.border;isNaN(fa)||(Z.pageMargin=fa);g.selection&&(Z.isCellVisible=function(Ma){return ha.isCellSelected(Ma)});var Aa=Z.writeHead;Z.writeHead=function(Ma,ra){ra=null!=ra?ra:"";g.shadows||(ra+='g[style*="filter: drop-shadow("] {\n filter: none !important;{\n}\n');mxClient.IS_GC&&(ra+="@media print {\n.MathJax svg { shape-rendering: crispEdges; }\n}\n");null!=m.fontCss&&(ra+=m.fontCss);Aa.apply(this,arguments);for(var Ca=ha.getCustomFonts(),Da=0;Da<Ca.length;Da++){var va=Ca[Da].name,Na=Ca[Da].url;Graph.isCssFontUrl(Na)?Ma.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Na))+'" charset="UTF-8" type="text/css">'):(Ma.writeln('<style type="text/css">'),Ma.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(va)+'";\nsrc: url("'+mxUtils.htmlEntities(Na)+'");\n}'),Ma.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ba=Z.drawBackgroundImage;Z.drawBackgroundImage=function(Ma){Ba.apply(this,arguments);null!=Ma.node&&(EditorUi.embedSvgImages(Ma.node),n.disableSvgLinks(Ma.node,function(ra){ra.setAttribute("href","javascript:void(0)")}))}}var Ga=Z.addGraphFragment;Z.addGraphFragment=function(Ma,ra,Ca,Da,va,Na){Ga.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:va.classList.add("geDisableMathJax");-if(this.graph.shadowVisible)for(var Oa=va.getElementsByTagName("svg"),Qa=0;Qa<Oa.length;Qa++)ha.addSvgShadow(Oa[Qa])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{Y=ha.background;if(null==Y||""==Y||Y==mxConstants.NONE)Y="#ffffff";Z.backgroundColor=Y;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,+if(this.graph.shadowVisible)for(var Oa=va.getElementsByTagName("svg"),Qa=0;Qa<Oa.length;Qa++)ha.addSvgShadow(Oa[Qa])};g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.open(null,null,k,!0,v,la,g.selection?ha.getSelectionCells():null)}else{X=ha.background;if(null==X||""==X||X==mxConstants.NONE)X="#ffffff";Z.backgroundColor=X;Z.autoOrigin=qa;g.grid&&(Z.gridSize=ha.gridSize,Z.gridSteps=ha.view.gridSteps,Z.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ha.view.gridColor);Z.appendGraph(ha,wa,fa,na,k,!0,v,la,g.selection?ha.getSelectionCells():null);k=ha.getCustomFonts();if(null!=Z.wnd)for(la=0;la<k.length;la++)fa=k[la].name,na=k[la].url,Graph.isCssFontUrl(na)?Z.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(na)+'" charset="UTF-8" type="text/css">'):(Z.wnd.document.writeln('<style type="text/css">'),Z.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),Z.wnd.document.writeln("</style>"))}J&&(ha.useCssTransforms=J,ha.currentTranslate=N,ha.currentScale=T,ha.view.translate=V,ha.view.scale=U);return Z}),M=g.pagesFrom,L=g.pagesTo,K=!g.allPages;x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{K&&(K=g.selection||M==F&&L==F);if(!K&&null!=this.pages&&this.pages.length){K=0;F=this.pages.length-1;g.allPages||(K=parseInt(M)-1,F=parseInt(L)-1);for(var aa=K;aa<=-F;aa++){var ia=this.pages[aa];M=ia==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var da=K=!1,ba=null,oa=null;null==ia.viewState&&null==ia.root&&this.updatePageRoot(ia);null!=ia.viewState&&(L=ia.viewState.pageVisible,K=ia.viewState.mathEnabled,da=ia.viewState.shadowVisible,ba=ia.viewState.background,oa=ia.viewState.backgroundImage,M.pageFormat=ia.viewState.pageFormat,M.gridSize=-ia.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ia));M.background=ba;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=da;var X=M.getGraphBounds;M.getGraphBounds=function(){var ha=X.apply(this,arguments),Z=this.backgroundImage;if(null!=Z&&null!=Z.width&&null!=Z.height){var k=this.view.translate,v=this.view.scale;ha=mxRectangle.fromRectangle(ha);ha.add(new mxRectangle((k.x+-Z.x)*v,(k.y+Z.y)*v,Z.width*v,Z.height*v))}return ha};var ca=M.getGlobalVariable;M.getGlobalVariable=function(ha){return"page"==ha?ia.getName():"pagenumber"==ha?aa+1:"pagecount"==ha?null!=this.pages?this.pages.length:1:ca.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ia);M.model.setRoot(ia.root)}x=I(M,x,aa!=F,ia.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=I(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):+F;aa++){var ja=this.pages[aa];M=ja==this.currentPage?n:null;if(null==M){M=this.createTemporaryGraph(n.stylesheet);M.shapeForegroundColor=n.shapeForegroundColor;M.shapeBackgroundColor=n.shapeBackgroundColor;L=!0;var ca=K=!1,ba=null,oa=null;null==ja.viewState&&null==ja.root&&this.updatePageRoot(ja);null!=ja.viewState&&(L=ja.viewState.pageVisible,K=ja.viewState.mathEnabled,ca=ja.viewState.shadowVisible,ba=ja.viewState.background,oa=ja.viewState.backgroundImage,M.pageFormat=ja.viewState.pageFormat,M.gridSize=+ja.viewState.gridSize);null!=oa&&null!=oa.originalSrc&&(oa=this.createImageForPageLink(oa.originalSrc,ja));M.background=ba;M.backgroundImage=null!=oa?new mxImage(oa.src,oa.width,oa.height,oa.x,oa.y):null;M.pageVisible=L;M.mathEnabled=K;M.shadowVisible=ca;var Y=M.getGraphBounds;M.getGraphBounds=function(){var ha=Y.apply(this,arguments),Z=this.backgroundImage;if(null!=Z&&null!=Z.width&&null!=Z.height){var k=this.view.translate,v=this.view.scale;ha=mxRectangle.fromRectangle(ha);ha.add(new mxRectangle((k.x++Z.x)*v,(k.y+Z.y)*v,Z.width*v,Z.height*v))}return ha};var da=M.getGlobalVariable;M.getGlobalVariable=function(ha){return"page"==ha?ja.getName():"pagenumber"==ha?aa+1:"pagecount"==ha?null!=this.pages?this.pages.length:1:da.apply(this,arguments)};document.body.appendChild(M.container);this.updatePageRoot(ja);M.model.setRoot(ja.root)}x=I(M,x,aa!=F,ja.getId());M!=n&&M.container.parentNode.removeChild(M.container)}}else x=I(n);null==x||null==x.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(x.mathEnabled&&(I=x.wnd.document,c||(x.wnd.IMMEDIATE_PRINT=!0),I.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),x.closeDocument(),Graph.rewritePageLinks(x.wnd.document,!0),x.mathEnabled||c||PrintDialog.printPreview(x));return x}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var g=null,m=0;m<c.length;m++)mxEvent.addListener(c[m],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(c[m],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[m],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(n);if(null==x){var F=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=F&&(10==document.documentMode||11==document.documentMode?x=F.getData("Text"):(x=null,x=0<=mxUtils.indexOf(F.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(F.types,"text/html")?F.getData("text/html"):null,null!=x&&0<x.length?(F=document.createElement("div"),@@ -3928,37 +3929,37 @@ this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(x){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(x){c||this.handleError(x)}};EditorUi.prototype.installMessageHandler=function(c){var g=null,m=!1,n=!1,x=null,F=mxUtils.bind(this,function(L,K){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,F);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var K=-L.data,aa=null,ia=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(Ca){}return ra});if("json"==urlParams.proto){var da=+L.data,aa=null,ja=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(Ca){}return ra});if("json"==urlParams.proto){var ca=!1;try{K=JSON.parse(K),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[K])}catch(ra){K=null}try{if(null==K)return;if("dialog"==K.action){this.showError(null!=K.titleKey?mxResources.get(K.titleKey):K.title,null!=K.messageKey?mxResources.get(K.messageKey):mxUtils.htmlEntities(K.message),null!=K.buttonKey?mxResources.get(K.buttonKey):K.button);null!=K.modified&&(this.editor.modified=K.modified);return}if("layout"==K.action){this.executeLayouts(this.editor.graph.createLayouts(K.layouts));return}if("prompt"==K.action){this.spinner.stop();var ba=new FilenameDialog(this,K.defaultValue||"",null!=K.okKey?mxResources.get(K.okKey):K.ok,function(ra){null!=ra?I.postMessage(JSON.stringify({event:"prompt",value:ra,message:K}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")},null!=K.titleKey?mxResources.get(K.titleKey):K.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:K}),"*")});this.showDialog(ba.container,300,80,!0,-!1);ba.init();return}if("draft"==K.action){var oa=ia(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):-null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){I.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var X=1==K.enableRecent,ca=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,-!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(ra,Ca,Da,va){ra=ra||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(ra,L,ra!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,X?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):-null,ca?mxUtils.bind(this,function(ra,Ca){this.remoteInvoke("searchDiagrams",[ra,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:ra,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=+!1);ba.init();return}if("draft"==K.action){var oa=ja(K.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[K.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:K}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:K}),"*")}),K.editKey?mxResources.get(K.editKey):null,K.discardKey?mxResources.get(K.discardKey):+null,K.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:K}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){I.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:K}),"*")}return}if("template"==K.action){this.spinner.stop();var Y=1==K.enableRecent,da=1==K.enableSearch,ha=1==K.enableCustomTemp;ba=new NewDialog(this,+!1,K.templatesOnly?!1:null!=K.callback,mxUtils.bind(this,function(ra,Ca,Da,va){ra=ra||this.emptyDiagramXml;null!=K.callback?I.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:Ca,tempUrl:Da,libs:va,builtIn:!0,message:K}),"*"):(c(ra,L,ra!=this.emptyDiagramXml,K.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):+null,da?mxUtils.bind(this,function(ra,Ca){this.remoteInvoke("searchDiagrams",[ra,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,Ca,Da){I.postMessage(JSON.stringify({event:"template",docUrl:ra,info:Ca,name:Da}),"*")}),null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==K.withoutType,null,K.templatesOnly);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==K.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:K}),"*");return}if("status"==K.action){this.updateStatus(mxUtils.bind(this,function(){null!=K.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(K.messageKey))):null!=K.message&&this.editor.setStatus(mxUtils.htmlEntities(K.message))}));null!=K.modified&&(this.editor.modified=K.modified);return}if("spinner"==K.action){var k=null!=K.messageKey?mxResources.get(K.messageKey):K.message;null==K.show||K.show?this.spinner.spin(document.body,k):this.spinner.stop();return}if("exit"==K.action){this.actions.get("exit").funct();return}if("viewport"==K.action){if(null!=K.viewport){var v=this.editor.graph,J=v.view.translate.x,N=v.view.translate.y;this.embedViewport=K.viewport;v.refresh();this.diagramContainer.scrollTop-=(N-v.view.translate.y)*v.view.scale;this.diagramContainer.scrollLeft-=(J-v.view.translate.x)*v.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==K.action){ba=null;try{var T=this.diagramContainer.getAttribute("data-scrollState");null!=T&&(this.diagramContainer.removeAttribute("data-scrollState"),ba=JSON.parse(T))}catch(ra){}Editor.inlineFullscreen=K.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==K.action){this.sendEmbeddedSvgExport(!0);return}if("export"==K.action){if("png"==K.format||"xmlpng"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){var V=null!=K.xml?K.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);v=this.editor.graph;var U=mxUtils.bind(this,function(ra,Ca){if(K.withSvg)K.withSvg=!1,this.getEmbeddedSvg(V,this.editor.graph,null,!0,function(va){U(ra,va)},null,null,K.embedImages,this.editor.graph.background,K.scale,K.border,K.shadow,"auto");else{this.editor.graph.setEnabled(!0);-this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=ra;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),Y=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==K.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(ra)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=+this.spinner.stop();var Da=this.createLoadMessage("export");Da.format=K.format;Da.message=K;Da.data=ra;Da.svg=Ca;Da.xml=V;I.postMessage(JSON.stringify(Da),"*")}}),X=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==K.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(V)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);U(ra)}),fa=K.pageId||(null!=this.pages?K.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.editor.isExportToCanvas()){var na=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=fa){var ra=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());for(var Ca,Da=0;Da<this.pages.length;Da++)if(this.pages[Da].getId()==fa){Ca=this.updatePageRoot(this.pages[Da]);break}null==Ca&&(Ca=this.currentPage);v.getGlobalVariable=function(Qa){return"page"==Qa?Ca.getName():"pagenumber"==Qa?1:ra.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(Ca.root)}if(null!=K.layerIds){var va=-v.model,Na=va.getChildCells(va.getRoot()),Oa={};for(Da=0;Da<K.layerIds.length;Da++)Oa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Oa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Qa){Y(Qa.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){Y(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),-m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):Y(null)}),mxUtils.bind(this,function(){Y(null)}))}}else if(na=mxUtils.bind(this,+v.model,Na=va.getChildCells(va.getRoot()),Oa={};for(Da=0;Da<K.layerIds.length;Da++)Oa[K.layerIds[Da]]=!0;for(Da=0;Da<Na.length;Da++)va.setVisible(Na[Da],Oa[Na[Da].id]||!1)}Da=null;K.keepTheme&&(Da=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Qa){X(Qa.toDataURL("image/png"))}),K.width,null,K.background,mxUtils.bind(this,function(){X(null)}),null,null,K.scale,K.transparent,K.shadow,null,v,K.border,null,K.grid,Da)});null!=K.xml&&0<K.xml.length&&(m=!0,this.setFileData(V),+m=!1);na()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==K.format?"1":"0")+(null!=fa?"&pageId="+fa:"")+(null!=K.layerIds&&0<K.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:K.layerIds})):"")+(null!=K.scale?"&scale="+K.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else if(na=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=K;if("html2"==K.format||"html"==K.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();ra.xml=mxUtils.getXml(Ca);ra.data=this.getFileData(null,null,!0,null,null,null,Ca);ra.format=K.format}else if("html"==K.format)Ca=this.editor.getGraphXml(),ra.data=this.getHtml(Ca,this.editor.graph),ra.xml=mxUtils.getXml(Ca),ra.format=K.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=K.background?K.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Da=mxUtils.bind(this,function(Na){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=K.asText?Na:Editor.createSvgDataUri(Na);I.postMessage(JSON.stringify(ra),"*")}),va="auto";K.keepTheme&&(va=Editor.isDarkMode()?"dark":"light");null!=K.theme&&(va=K.theme);if("xmlsvg"==K.format){if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin)){va=null;if(this.isAutoDarkMode()||Editor.isDarkMode())va="auto";null!=K.theme&&(va=K.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Da,null,null,K.embedImages,Ca,K.scale,K.border,K.shadow,va)}}else if(null==K.spin&&null==K.spinKey||this.spinner.spin(document.body,null!=K.spinKey?mxResources.get(K.spinKey):K.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,K.scale,K.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||K.shadow,null,va),(this.editor.graph.shadowVisible||K.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Na){K.embedImages||null==K.embedImages?this.editor.convertImages(Na,mxUtils.bind(this,function(Oa){Da(mxUtils.getXml(Oa))})):Da(mxUtils.getXml(Na))}));return}I.postMessage(JSON.stringify(ra),"*")}),null!=K.xml&&0<K.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);na()}}m=!0;-this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){da=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),+this.setFileData(K.xml);m=!1;this.editor.graph.mathEnabled||na()}else na();return}if("load"==K.action){ca=K.toSketch;n=1==K.autosave;this.hideDialog();null!=K.modified&&null==urlParams.modified&&(urlParams.modified=K.modified);null!=K.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=K.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+"+Editor.shiftKey+"+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=K.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=K.noSaveBtn);if(null!=K.rough){var qa=Editor.sketchMode;this.doSetSketchMode(K.rough);qa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=K.dark&&this.setDarkMode(K.dark);null!=K.border&&(this.embedExportBorder=K.border);null!=K.theme&&(this.embedExportTheme=K.theme);null!=K.background&&(this.embedExportBackground=K.background);null!=K.viewport&&(this.embedViewport=K.viewport);this.embedExitPoint=null;if(null!=K.rect){var ya=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,K.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,K.rect.top)+"px";this.minInlineWidth=K.minWidth;this.minInlineHeight=K.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var wa=K.maxFitScale,Ja=K.rect.width+2*ya,Aa=K.rect.height+2*ya;aa=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();Ja=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ja):Ja,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,Aa):Aa,ra.height-80);this.diagramContainer.style.width=Ja+"px";this.diagramContainer.style.height=ra+"px";var Ca=this.editor.graph;ra=Ca.maxFitScale;Ca.maxFitScale=wa;Ca.fit(2*ya,null,null,null,null,null,Aa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var Da=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Da}Ca.maxFitScale=ra;Ca.container.scrollTop-=ya;Ca.container.scrollLeft-=ya;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[K]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);var va=Ca.getGraphBounds();Ca.container.clientWidth>va.width+2*ya&&(Ca.container.scrollLeft=va.x+(va.width+ya-Ca.container.clientWidth)/2)}),10)})}null!=K.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=K.noExitBtn);null!=K.title&&null!=this.buttonContainer&&this.setEmbedTitle(K.title);try{K.libs&&this.sidebar.showEntries(K.libs)}catch(ra){}K=null!=K.xmlpng?this.extractGraphModelFromPng(K.xmlpng):null!=K.descriptor?K.descriptor:K.xml}else{if("merge"==K.action){var Ba=this.getCurrentFile();-null!=Ba&&(oa=ia(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(ra){I.postMessage(JSON.stringify({event:"merge",message:K,error:ra}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),-"*");return}}catch(ra){this.handleError(ra)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(ra,Ca){m=!0;try{c(ra,Ca,null,da)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),+null!=Ba&&(oa=ja(K.xml),null!=oa&&""!=oa&&Ba.mergeFile(new LocalFile(this,oa),function(){I.postMessage(JSON.stringify({event:"merge",message:K}),"*")},function(ra){I.postMessage(JSON.stringify({event:"merge",message:K,error:ra}),"*")}))}else"remoteInvokeReady"==K.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==K.action?this.handleRemoteInvoke(K,L.origin):"remoteInvokeResponse"==K.action?this.handleRemoteInvokeResponse(K):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(K)}),+"*");return}}catch(ra){this.handleError(ra)}}var Ga=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ma=mxUtils.bind(this,function(ra,Ca){m=!0;try{c(ra,Ca,null,ca)}catch(Da){this.handleError(Da)}m=!1;null!=urlParams.modified&&this.clearStatus();x=Ga();n&&null==g&&(g=mxUtils.bind(this,function(Da,va){Da=Ga();Da==x||m||(va=this.createLoadMessage("autosave"),va.xml=Da,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));x=Da}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",-g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=ra,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ia="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(ra){Ma(ra,L)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ia)):+g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=ra,I.postMessage(JSON.stringify(Ca),"*");null!=aa&&aa()});null!=K&&"function"===typeof K.substring&&"data:application/vnd.visio;base64,"==K.substring(0,34)?(ja="0M8R4KGxGuE"==K.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(ra){Ma(ra,L)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ja)):null!=K&&"function"===typeof K.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(K,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ma(ra.responseText,L):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=K&&"function"===-typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(ra){Ma(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ia(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(ra){Ma(Ga(),L)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):+typeof K.substring&&this.isLucidChartData(K)?this.convertLucidChart(K,mxUtils.bind(this,function(ra){Ma(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==K||"object"!==typeof K||null==K.format||null==K.data&&null==K.url?(K=ja(K),Ma(K,L)):this.loadDescriptor(K,mxUtils.bind(this,function(ra){Ma(Ga(),L)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;F="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(F,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(L,K,aa){M.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:L,target:K,allowOpener:aa}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,g,m,n){var x=document.createElement("button");x.className="geEmbedBtn geBtn";x.setAttribute("title",c+(null!=m?" ("+m+")":""));mxUtils.write(x,c);n&&x.classList.add("gePrimaryBtn");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),@@ -3968,23 +3969,23 @@ function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new Textn.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=F}catch(I){this.handleError(I)}}));x.setAttribute("title","copy");x.className="geBtn";m.appendChild(x)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(g){var m=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(x){this.loadingOrgChart=!1;g.clear()&&this.handleError(x)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?m():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",m,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,g)}))};EditorUi.prototype.doImportCsv=function(c,g){try{var m=c.split("\n"),n=[],x=[],F=[],I={};if(0<m.length){var M=-{},L=this.editor.graph,K=null,aa=null,ia=null,da=null,ba=null,oa=null,X=null,ca="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",N=!1,T=null,V=null,U=40,Y=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ta):(L.setSelectionCells(ta),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ja=null,Aa="auto";Z=null;for(var Ba=[],-Ga=null,Ma=null,ra=0;ra<m.length&&"#"==m[ra].charAt(0);){c=m[ra].replace(/\r$/,"");for(ra++;ra<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ra].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ra].substring(1)),ra++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ja=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?X=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==-Da?ca=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?da=va:"styles"==Da&&0<va.length&&"-"!=va?ia=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):-"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?Y=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[ra])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[ra].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ja&&(Ja="%"+Da[0]++{},L=this.editor.graph,K=null,aa=null,ja=null,ca=null,ba=null,oa=null,Y=null,da="whiteSpace=wrap;html=1;",ha=null,Z=null,k="",v="auto",J="auto",N=!1,T=null,V=null,U=40,X=40,fa=100,na=0,la=mxUtils.bind(this,function(){null!=g?g(ta):(L.setSelectionCells(ta),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),qa=L.getFreeInsertPoint(),ya=qa.x,wa=qa.y;qa=wa;var Ja=null,Aa="auto";Z=null;for(var Ba=[],+Ga=null,Ma=null,ra=0;ra<m.length&&"#"==m[ra].charAt(0);){c=m[ra].replace(/\r$/,"");for(ra++;ra<m.length&&"\\"==c.charAt(c.length-1)&&"#"==m[ra].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(m[ra].substring(1)),ra++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Da=mxUtils.trim(c.substring(1,Ca)),va=mxUtils.trim(c.substring(Ca+1));"label"==Da?Ja=Graph.sanitizeHtml(va):"labelname"==Da&&0<va.length&&"-"!=va?ba=va:"labels"==Da&&0<va.length&&"-"!=va?Y=JSON.parse(va):"style"==Da?aa=va:"parentstyle"==+Da?da=va:"unknownStyle"==Da&&"-"!=va?oa=va:"stylename"==Da&&0<va.length&&"-"!=va?ca=va:"styles"==Da&&0<va.length&&"-"!=va?ja=JSON.parse(va):"vars"==Da&&0<va.length&&"-"!=va?K=JSON.parse(va):"identity"==Da&&0<va.length&&"-"!=va?ha=va:"parent"==Da&&0<va.length&&"-"!=va?Z=va:"namespace"==Da&&0<va.length&&"-"!=va?k=va:"width"==Da?v=va:"height"==Da?J=va:"collapsed"==Da&&"-"!=va?N="true"==va:"left"==Da&&0<va.length?T=va:"top"==Da&&0<va.length?V=va:"ignore"==Da?Ma=va.split(","):"connect"==Da?Ba.push(JSON.parse(va)):+"link"==Da?Ga=va:"padding"==Da?na=parseFloat(va):"edgespacing"==Da?U=parseFloat(va):"nodespacing"==Da?X=parseFloat(va):"levelspacing"==Da?fa=parseFloat(va):"layout"==Da&&(Aa=va)}}}if(null==m[ra])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(m[ra].replace(/\r$/,""));Ca=c=null;Da=[];for(va=0;va<Na.length;va++)ha==Na[va]&&(c=va),Z==Na[va]&&(Ca=va),Da.push(mxUtils.trim(Na[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ja&&(Ja="%"+Da[0]+"%");if(null!=Ba)for(var Oa=0;Oa<Ba.length;Oa++)null==M[Ba[Oa].to]&&(M[Ba[Oa].to]={});ha=[];for(va=ra+1;va<m.length;va++){var Qa=this.editor.csvToArray(m[va].replace(/\r$/,""));if(null==Qa){var Ra=40<m[va].length?m[va].substring(0,40)+"...":m[va];throw Error(Ra+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ha.push(Qa)}L.model.beginUpdate();try{for(va=0;va<ha.length;va++){Qa=ha[va];var za=null,Ea=null!=c?k+Qa[c]:null;m=!1;null!=Ea&&(za=L.model.getCell(Ea),m=null==za||0<=-mxUtils.indexOf(n,za));var C=new mxCell(Ja,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var P=0;P<Qa.length;P++)L.setAttributeForCell(C,Da[P],Qa[P]),null==za||m||L.setAttributeForCell(za,Da[P],Qa[P]);if(null!=ba&&null!=X){var R=X[C.getAttribute(ba)];null!=R&&(L.labelChanged(C,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=da&&null!=ia){var W=ia[C.getAttribute(da)];null!=W&&(C.style=W)}L.setAttributeForCell(C,-"placeholders","1");C.style=L.replacePlaceholders(C,C.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(L.model.setStyle(za,C.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=C;if(!m)for(Oa=0;Oa<Ba.length;Oa++)M[Ba[Oa].to][za.getAttribute(Ba[Oa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ja=this.editor.graph.getPreferredSizeForCell(za);-Z=null!=Ca?L.model.getCell(k+Qa[Ca]):null;if(za.vertex){Ra=null!=Z?0:ya;ra=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ra+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ra+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ja.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):-null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ja.height+na:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+Y}m?(null==I[Ea]&&(I[Ea]=[]),I[Ea].push(za)):(n.push(za),null!=Z?(Z.style=L.replacePlaceholders(Z,ca,K),L.addCell(za,Z),x.push(Z)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ka="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?x[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ka||"auto"!=+mxUtils.indexOf(n,za));var C=new mxCell(Ja,new mxGeometry(ya,qa,0,0),aa||"whiteSpace=wrap;html=1;");C.collapsed=N;C.vertex=!0;C.id=Ea;null==za||m||L.model.setCollapsed(za,N);for(var P=0;P<Qa.length;P++)L.setAttributeForCell(C,Da[P],Qa[P]),null==za||m||L.setAttributeForCell(za,Da[P],Qa[P]);if(null!=ba&&null!=Y){var R=Y[C.getAttribute(ba)];null!=R&&(L.labelChanged(C,R),null==za||m||L.cellLabelChanged(za,R))}if(null!=ca&&null!=ja){var W=ja[C.getAttribute(ca)];null!=W&&(C.style=W)}L.setAttributeForCell(C,+"placeholders","1");C.style=L.replacePlaceholders(C,C.style,K);null==za||m?L.fireEvent(new mxEventObject("cellsInserted","cells",[C])):(L.model.setStyle(za,C.style),0>mxUtils.indexOf(F,za)&&F.push(za),L.fireEvent(new mxEventObject("cellsInserted","cells",[za])));m=null!=za;za=C;if(!m)for(Oa=0;Oa<Ba.length;Oa++)M[Ba[Oa].to][za.getAttribute(Ba[Oa].to)]=za;null!=Ga&&"link"!=Ga&&(L.setLinkForCell(za,za.getAttribute(Ga)),L.setAttributeForCell(za,Ga,null));var ia=this.editor.graph.getPreferredSizeForCell(za);+Z=null!=Ca?L.model.getCell(k+Qa[Ca]):null;if(za.vertex){Ra=null!=Z?0:ya;ra=null!=Z?0:wa;null!=T&&null!=za.getAttribute(T)&&(za.geometry.x=Ra+parseFloat(za.getAttribute(T)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ra+parseFloat(za.getAttribute(V)));var ka="@"==v.charAt(0)?za.getAttribute(v.substring(1)):null;za.geometry.width=null!=ka&&"auto"!=ka?parseFloat(za.getAttribute(v.substring(1))):"auto"==v||"auto"==ka?ia.width+na:parseFloat(v);var pa="@"==J.charAt(0)?za.getAttribute(J.substring(1)):+null;za.geometry.height=null!=pa&&"auto"!=pa&&"width"!=J?parseFloat(pa):"auto"==J||"auto"==pa?ia.height+na:"width"==J?za.geometry.width:parseFloat(J);qa+=za.geometry.height+X}m?(null==I[Ea]&&(I[Ea]=[]),I[Ea].push(za)):(n.push(za),null!=Z?(Z.style=L.replacePlaceholders(Z,da,K),L.addCell(za,Z),x.push(Z)):F.push(L.addCell(za)))}for(va=0;va<x.length;va++)ka="@"==v.charAt(0)?x[va].getAttribute(v.substring(1)):null,pa="@"==J.charAt(0)?x[va].getAttribute(J.substring(1)):null,"auto"!=v&&"auto"!=ka||"auto"!=J&&"auto"!=pa||L.updateGroupBounds([x[va]],na,!0);var xa=F.slice(),ta=F.slice();for(Oa=0;Oa<Ba.length;Oa++){var ua=Ba[Oa];for(va=0;va<n.length;va++){za=n[va];var Ia=mxUtils.bind(this,function(kb,ob,hb){var pb=ob.getAttribute(hb.from);if(null!=pb&&""!=pb){pb=pb.split(",");for(var sb=0;sb<pb.length;sb++){var ib=M[hb.to][pb[sb]];if(null==ib&&null!=oa){ib=new mxCell(pb[sb],new mxGeometry(ya,wa,0,0),oa);ib.style=L.replacePlaceholders(ob,ib.style,K);var mb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=mb.width+na;ib.geometry.height=mb.height+na;M[hb.to][pb[sb]]=ib;ib.vertex=!0;ib.id=pb[sb];F.push(L.addCell(ib))}if(null!=ib){mb=hb.label;null!=hb.fromlabel&&(mb=(ob.getAttribute(hb.fromlabel)||"")+(mb||""));null!=hb.sourcelabel&&(mb=L.replacePlaceholders(ob,hb.sourcelabel,K)+(mb||""));null!=hb.tolabel&&(mb=(mb||"")+(ib.getAttribute(hb.tolabel)||""));null!=hb.targetlabel&&(mb=(mb||"")+L.replacePlaceholders(ib,hb.targetlabel,K));var nb="target"==hb.placeholders==!hb.invert?ib:kb;nb=null!=hb.style?L.replacePlaceholders(nb,hb.style,K):L.createCurrentEdgeStyle();mb=L.insertEdge(null,null,mb||"",hb.invert?ib:kb,hb.invert?kb:ib,nb);if(null!=hb.labels)for(nb=0;nb<hb.labels.length;nb++){var qb=hb.labels[nb],ub=new mxCell(qb.label||nb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!hb.invert?ib:kb,ub.value,K));if(null!=qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);mb.insert(ub)}if(null!=hb.data)for(var zb in hb.data)L.setAttributeForCell(mb,zb,hb.data[zb]);ta.push(mb);mxUtils.remove(hb.invert?kb:ib,xa)}}}});Ia(za,za,ua);if(null!=I[za.id])for(P=0;P<I[za.id].length;P++)Ia(za,I[za.id][P],ua)}}if(null!=Ma)for(va=0;va<n.length;va++)for(za=n[va],P=0;P<Ma.length;P++)L.setAttributeForCell(za,mxUtils.trim(Ma[P]),null);if(0<F.length){var Va=new mxParallelEdgeLayout(L);Va.spacing=U;Va.checkOverlap=!0;var Wa=function(){0<Va.spacing&&Va.execute(L.getDefaultParent());for(var kb=0;kb<F.length;kb++){var ob=L.getCellGeometry(F[kb]);ob.x=Math.round(L.snap(ob.x));ob.y=Math.round(L.snap(ob.y));"auto"==v&&(ob.width=Math.round(L.snap(ob.width)));"auto"==J&&(ob.height=Math.round(L.snap(ob.height)))}};if("["==Aa.charAt(0)){var Ta=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(Aa)),function(){Wa();Ta()});la=null}else if("circle"==Aa){var ab=new mxCircleLayout(L);ab.disableEdgeStyle=-!1;ab.resetEdges=!1;var Pa=ab.isVertexIgnored;ab.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){ab.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ta.length==2*F.length-1&&1==xa.length){L.view.validate();var Sa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Sa.levelDistance=Y;Sa.edgeRouting=!1;Sa.resetEdges=!1;Sa.sortEdges=!0;this.executeLayout(function(){Sa.execute(L.getDefaultParent(),-0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=Y;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ta);L.moveCells(ta,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,-2,fa,Y),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ta.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*Y;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());+!1;ab.resetEdges=!1;var Pa=ab.isVertexIgnored;ab.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){ab.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("horizontaltree"==Aa||"verticaltree"==Aa||"auto"==Aa&&ta.length==2*F.length-1&&1==xa.length){L.view.validate();var Sa=new mxCompactTreeLayout(L,"horizontaltree"==Aa);Sa.levelDistance=X;Sa.edgeRouting=!1;Sa.resetEdges=!1;Sa.sortEdges=!0;this.executeLayout(function(){Sa.execute(L.getDefaultParent(),+0<xa.length?xa[0]:null)},!0,la);la=null}else if("horizontalflow"==Aa||"verticalflow"==Aa||"auto"==Aa&&1==xa.length){L.view.validate();var gb=new mxHierarchicalLayout(L,"horizontalflow"==Aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);gb.intraCellSpacing=X;gb.parallelEdgeSpacing=U;gb.interRankCellSpacing=fa;gb.disableEdgeStyle=!1;this.executeLayout(function(){gb.execute(L.getDefaultParent(),ta);L.moveCells(ta,ya,wa)},!0,la);la=null}else if("orgchart"==Aa){L.view.validate();var fb=new mxOrgChartLayout(L,+2,fa,X),cb=fb.isVertexIgnored;fb.isVertexIgnored=function(kb){return cb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){fb.execute(L.getDefaultParent());Wa()},!0,la);la=null}else if("organic"==Aa||"auto"==Aa&&ta.length>F.length){L.view.validate();var eb=new mxFastOrganicLayout(L);eb.forceConstant=3*X;eb.disableEdgeStyle=!1;eb.resetEdges=!1;var lb=eb.isVertexIgnored;eb.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(F,kb)};this.executeLayout(function(){eb.execute(L.getDefaultParent());Wa()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var m="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(g+=m+n+"="+urlParams[n],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var g=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(m,n)&&(c=0==g?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],g++))}return c};EditorUi.prototype.showLinkDialog=function(c,g,m,n,x){c=new LinkDialog(this,c,g,m,!0,n,x);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;c&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),g=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);@@ -3997,23 +3998,23 @@ this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").sethis.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,g,m,n,-x,F,I,M){var L=c.editor.graph;if("xml"==m)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==m)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(L.getSvg(n,x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),aa=L.getGraphBounds(),ia=Math.floor(aa.width*x/L.view.scale),da=Math.floor(aa.height*x/L.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ia*da<MAX_AREA)if(c.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!c.editor.isExportToCanvas()){var ba=-{globalVars:L.getExportVariables()};M&&(ba.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(g,m,function(oa,X){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+(X||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<I?"&dpi="+I:"")+"&bg="+(null!=n?n:"none")+"&w="+ia+"&h="+da+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==m?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,M,I):c.exportImage(x,+x,F,I,M){var L=c.editor.graph;if("xml"==m)c.hideDialog(),c.saveData(g,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==m)c.hideDialog(),c.saveData(g,"svg",mxUtils.getXml(L.getSvg(n,x,F)),"image/svg+xml");else{var K=c.getFileData(!0,null,null,null,null,!0),aa=L.getGraphBounds(),ja=Math.floor(aa.width*x/L.view.scale),ca=Math.floor(aa.height*x/L.view.scale);if(K.length<=MAX_REQUEST_SIZE&&ja*ca<MAX_AREA)if(c.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!c.editor.isExportToCanvas()){var ba=+{globalVars:L.getExportVariables()};M&&(ba.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(g,m,function(oa,Y){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+(Y||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<I?"&dpi="+I:"")+"&bg="+(null!=n?n:"none")+"&w="+ja+"&h="+ca+"&border="+F+"&xml="+encodeURIComponent(K))})}else"png"==m?c.exportImage(x,null==n||"none"==n,!0,!1,!1,F,!0,!1,null,M,I):c.exportImage(x,!1,!0,!1,!1,F,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,g="";if(null!=this.pages)for(var m=0;m<this.pages.length;m++){var n=c;this.currentPage!=this.pages[m]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[m]),n.model.setRoot(this.pages[m].root));g+=this.pages[m].getName()+" "+n.getIndexableText()+" "}else g=c.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var g={},m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var F={};try{var I=mxSettings.getCustomLibraries();for(c=0;c<I.length;c++){var M=I[c];if("R"==M.substring(0,1)){var L=JSON.parse(decodeURIComponent(M.substring(1)));F[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(K){}this.remoteInvoke("getCustomLibraries",null,null,function(K){x.innerText="";if(0==K.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<-K.length;aa++){var ia=K[aa];F[ia.id]&&(g[ia.id]=ia);var da=this.addCheckbox(x,ia.title,F[ia.id]);(function(ba,oa){mxEvent.addListener(oa,"change",function(){this.checked?g[ba.id]=ba:delete g[ba.id]})})(ia,da)}},mxUtils.bind(this,function(K){x.innerText="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(aa)}));m.appendChild(x);-m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,aa;for(aa in g)null==F[aa]&&(K++,mxUtils.bind(this,function(ia){this.remoteInvoke("getFileContent",[ia.downloadUrl],null,mxUtils.bind(this,function(da){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,da,ia)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();+K.length;aa++){var ja=K[aa];F[ja.id]&&(g[ja.id]=ja);var ca=this.addCheckbox(x,ja.title,F[ja.id]);(function(ba,oa){mxEvent.addListener(oa,"change",function(){this.checked?g[ba.id]=ba:delete g[ba.id]})})(ja,ca)}},mxUtils.bind(this,function(K){x.innerText="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=K&&null!=K.message?K.message:mxResources.get("unknownError"));x.appendChild(aa)}));m.appendChild(x);+m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var K=0,aa;for(aa in g)null==F[aa]&&(K++,mxUtils.bind(this,function(ja){this.remoteInvoke("getFileContent",[ja.downloadUrl],null,mxUtils.bind(this,function(ca){K--;0==K&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ja)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){K--;0==K&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[aa]));for(aa in F)g[aa]||this.closeLibrary(new RemoteLibrary(this,null,F[aa]));0==K&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(m.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var g=0;g<this.remoteInvokeQueue.length;g++)c.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var g=c.msgMarkers,m=this.remoteInvokeCallbacks[g.callbackId];if(null==m)throw Error("No callback for "+(null!=g?g.callbackId:"null"));c.error?m.error&&m.error(c.error.errResp):m.callback&&m.callback.apply(this,c.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,g,m,n,x){var F=!0,I=window.setTimeout(mxUtils.bind(this,function(){F=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(I);F&&n.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(I);F&&x.apply(this,-arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:m});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var m=mxUtils.bind(this,function(K,aa){var ia={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=aa?ia.error={errResp:aa}:null!=K&&(ia.resp=K);this.remoteWin.postMessage(JSON.stringify(ia),+arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:g,msgMarkers:m});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,g){var m=mxUtils.bind(this,function(K,aa){var ja={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=aa?ja.error={errResp:aa}:null!=K&&(ja.resp=K);this.remoteWin.postMessage(JSON.stringify(ja),"*")});try{var n=c.funtionName,x=this.remoteInvokableFns[n];if(null!=x&&"function"===typeof this[n]){if(x.allowedDomains){for(var F=!1,I=0;I<x.allowedDomains.length;I++)if(g=="https://"+x.allowedDomains[I]){F=!0;break}if(!F){m(null,"Invalid Call: "+n+" is not allowed.");return}}var M=c.functionArgs;Array.isArray(M)||(M=[]);if(x.isAsync)M.push(function(){m(Array.prototype.slice.apply(arguments))}),M.push(function(K){m(null,K||"Unkown Error")}),this[n].apply(this,M);else{var L=this[n].apply(this,M);m([L])}}else m(null,"Invalid Call: "+n+" is not found.")}catch(K){m(null,"Invalid Call: An error occurred, "+K.message)}};EditorUi.prototype.openDatabase=function(c,g){if(null==this.database){var m=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=m)try{var n=m.open("database",2);n.onupgradeneeded=function(x){try{var F=n.result;1>x.oldVersion&&F.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(F.createObjectStore("files",{keyPath:"title"}),F.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=g&&g(I)}};n.onsuccess=mxUtils.bind(this,function(x){try{var F=n.result;this.database=F;EditorUi.migrateStorageFiles&&(StorageFile.migrate(F),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if((!I||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var M=document.createElement("iframe");-M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var L=!0,K=!1,aa,ia=0,da=mxUtils.bind(this,function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ia++;oa()}),oa=mxUtils.bind(this,function(){try{if(ia>=aa.length)da();else{var ca=aa[ia];StorageFile.getFileContent(this,-ca,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==ca&&ha==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ca]}),"*"):ba()}),ba)}}catch(ha){console.log(ha)}}),X=mxUtils.bind(this,function(ca){try{this.setDatabaseItem(null,[{title:ca.title,size:ca.data.length,lastModified:Date.now(),type:ca.isLib?"L":"F"},{title:ca.title,data:ca.data}],ba,ba,["filesInfo","files"])}catch(ha){console.log(ha)}});I=mxUtils.bind(this,-function(ca){try{if(ca.source==M.contentWindow){var ha={};try{ha=JSON.parse(ca.data)}catch(Z){}"init"==ha.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||K||(L?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(aa=ha.resp[0],L=!1,oa()):da():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?X(ha.resp[0]):ba())}}catch(Z){console.log(Z)}});+M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var L=!0,K=!1,aa,ja=0,ca=mxUtils.bind(this,function(){K=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ja++;oa()}),oa=mxUtils.bind(this,function(){try{if(ja>=aa.length)ca();else{var da=aa[ja];StorageFile.getFileContent(this,+da,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==da&&ha==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[da]}),"*"):ba()}),ba)}}catch(ha){console.log(ha)}}),Y=mxUtils.bind(this,function(da){try{this.setDatabaseItem(null,[{title:da.title,size:da.data.length,lastModified:Date.now(),type:da.isLib?"L":"F"},{title:da.title,data:da.data}],ba,ba,["filesInfo","files"])}catch(ha){console.log(ha)}});I=mxUtils.bind(this,+function(da){try{if(da.source==M.contentWindow){var ha={};try{ha=JSON.parse(da.data)}catch(Z){}"init"==ha.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||K||(L?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(aa=ha.resp[0],L=!1,oa()):ca():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?Y(ha.resp[0]):ba())}}catch(Z){console.log(Z)}});window.addEventListener("message",I)}})));c(F);F.onversionchange=function(){F.close()}}catch(I){null!=g?g(I):null!=window.console&&console.warn(I)}});n.onerror=g;n.onblocked=function(){}}catch(x){null!=g?g(x):null!=window.console&&console.error(x)}else null!=g&&g(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,g,m,n,x){this.openDatabase(mxUtils.bind(this,function(F){try{x=x||"objects";Array.isArray(x)||(x=[x],c=[c],g=[g]);var I=F.transaction(x,"readwrite");I.oncomplete=m;I.onerror=n;for(F=0;F<x.length;F++)I.objectStore(x[F]).put(null!=c&&null!=c[F]?{key:c[F],data:g[F]}:g[F])}catch(M){null!=n&&n(M)}}),n)};EditorUi.prototype.removeDatabaseItem=function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var F=x.transaction(n,"readwrite");F.oncomplete=g;F.onerror=m;for(x=0;x<n.length;x++)F.objectStore(n[x]).delete(c[x])}catch(I){null!=m&&m(I)}}),m)};EditorUi.prototype.getDatabaseItem=function(c,g,m,n){this.openDatabase(mxUtils.bind(this,function(x){try{n=n||"objects";var F=x.transaction([n],"readonly").objectStore(n).get(c);F.onsuccess=function(){g(F.result)};F.onerror=m}catch(I){null!=m&&m(I)}}),m)};EditorUi.prototype.getDatabaseItems=function(c,g,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";var x=n.transaction([m],"readonly").objectStore(m).openCursor(IDBKeyRange.lowerBound(0)),F=[];x.onsuccess=function(I){null==I.target.result?c(F):(F.push(I.target.result.value),@@ -4022,31 +4023,31 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.protc.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,g){var m=this.getCurrentFile();return null!=m?m.newComment(c,g):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,g){var m=this.getCurrentFile();null!=m&&m.getRevisions?m.getRevisions(c,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,g,m,n,x,F,I,M){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,g,m,n,x,F,I,M)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");-return this.editor.embedCssFonts(c,g)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,m,n,x,F,I,M,L,K,aa,ia,da,ba,oa,X)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");+return this.editor.embedCssFonts(c,g)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,g,m,n,x,F,I,M,L,K,aa,ja,ca,ba,oa,Y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,g,m,n)};EditorUi.prototype.convertImageToDataUri=function(c,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,g)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,g,m,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,g,m,n,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,g,m,n,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),n=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<n.length){var x="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(x||n)&&c.push(m)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(c);return{title:c,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,f,l,u,y,q){function B(){for(var X=M.getElementsByTagName("div"),ca=0,ha=0;ha<X.length;ha++)"none"!=X[ha].style.display&&X[ha].parentNode==M&&ca++;L.style.display=0==ca?"block":"none"}function H(X,ca,ha,Z){function k(){ca.removeChild(N);ca.removeChild(T);J.style.display="block";v.style.display="block"}x={div:ca,comment:X,saveCallback:ha,deleteOnCancel:Z};var v=ca.querySelector(".geCommentTxt"),J=ca.querySelector(".geCommentActionsList"),N=document.createElement("textarea");-N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=X.content;ca.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(ca.parentNode.removeChild(ca),B()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";X.content=N.value;mxUtils.write(v,X.content);k();ha(X);x=null});mxEvent.addListener(N,"keydown",-mxUtils.bind(this,function(Y){mxEvent.isConsumed(Y)||((mxEvent.isControlDown(Y)||mxClient.IS_MAC&&mxEvent.isMetaDown(Y))&&13==Y.keyCode?(U.click(),mxEvent.consume(Y)):27==Y.keyCode&&(V.click(),mxEvent.consume(Y)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);ca.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(X,ca){ca.innerText="";X=new Date(X.modifiedDate);var ha=b.timeSince(X);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(ca,-mxResources.get("timeAgo",[ha],"{1} ago"));ca.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString())}function E(X){var ca=document.createElement("img");ca.className="geCommentBusyImg";ca.src=IMAGE_PATH+"/spin.gif";X.appendChild(ca);X.busyImg=ca}function Q(X){X.style.border="1px solid red";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function c(X){X.style.border="";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function g(X,ca,ha,Z,k){function v(na,la,qa){var ya=document.createElement("li");-ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ja){la(Ja,X);Ja.preventDefault();mxEvent.consume(Ja)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(X);return{pdiv:qa,replies:la}}function N(na,la,qa,ya,wa){function Ja(){E(Ma);-X.addReply(Ga,function(ra){Ga.id=ra;X.replies.push(Ga);c(Ma);qa&&qa()},function(ra){Aa();Q(Ma);b.handleError(ra,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(ra){Ja()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=X.id;null==X.replies&&(X.replies=[]);var Ma=g(Ga,X.replies,Ba,Z+1);la?Aa():Ja()}if(k||!X.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",-X.id);T.style.marginLeft=20*Z+5+"px";X.isResolved&&(F.style.opacity="0.7");var V=document.createElement("div");V.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=X.user&&null!=X.user.pictureUrl?X.user.pictureUrl:Editor.userImage;V.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";V.appendChild(U);var Y=document.createElement("div");Y.className="geCommentUsername";mxUtils.write(Y,null!=X.user?X.user.displayName:-mxResources.get("unknownUser"));U.appendChild(Y);Y=document.createElement("div");Y.className="geCommentDate";Y.setAttribute("data-commentId",X.id);S(X,Y);U.appendChild(Y);T.appendChild(V);V=document.createElement("div");V.className="geCommentTxt";mxUtils.write(V,X.content||"");T.appendChild(V);X.isLocked&&(T.style.opacity="0.5");V=document.createElement("div");V.className="geCommentActions";var fa=document.createElement("ul");fa.className="geCommentActionsList";V.appendChild(fa);m||X.isLocked||0!=-Z&&!n||v(mxResources.get("reply"),function(){N("",!0)},X.isResolved);U=b.getCurrentUser();null==U||null==X.user||U.id!=X.user.id||m||X.isLocked||(v(mxResources.get("edit"),function(){function na(){H(X,T,function(){E(T);X.editComment(X.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},X.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);X.deleteComment(function(na){if(!0===-na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=J(X).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<ca.length;na++)if(ca[na]==X){ca.splice(na,1);break}L.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(na){Q(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},-X.isResolved));m||X.isLocked||0!=Z||v(X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";X.isResolved=!X.isResolved;mxUtils.write(qa,X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=X.isResolved?"none":"",wa=J(X).replies,Ja="light-dark("+(X.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ja;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),-Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);da||(wa[Aa].style.display="none")}B()}X.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=X.replies&&ha<X.replies.length;ha++)V=X.replies[ha],V.isResolved=X.isResolved,g(V,X.replies,null,Z+1,k);null!=x&&(x.comment.id==X.id?(k=X.content,X.content=x.comment.content,H(X,T,x.saveCallback,-x.deleteOnCancel),X.content=k):null==x.comment.id&&x.comment.pCommentId==X.id&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var I=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(I)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";-mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=I;K.style.padding="3px 4px 4px 4px";I=document.createElement("a");I.className="geButton";if(!m){var aa=I.cloneNode();aa.style.backgroundImage="url("+Editor.plusImage+")";aa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(aa,"click",function(X){function ca(){H(ha,Z,function(k){E(Z);b.addComment(k,function(v){k.id=v;ba.push(k);-c(Z)},function(v){Q(Z);ca();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ha=b.newComment("",b.getCurrentUser()),Z=g(ha,ba,null,0);ca();X.preventDefault();mxEvent.consume(X)});K.appendChild(aa)}var ia=I.cloneNode();ia.style.backgroundImage="url("+Editor.checkImage+")";ia.setAttribute("title",mxResources.get("showResolved"));var da=!1;mxEvent.addListener(ia,"click",function(X){(da=!da)?ia.classList.add("geActiveItem"):ia.classList.remove("geActiveItem");-oa();X.preventDefault();mxEvent.consume(X)});K.appendChild(ia);b.commentsRefreshNeeded()&&(aa=I.cloneNode(),aa.style.backgroundImage="url("+Editor.refreshImage+")",aa.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(aa,"click",function(X){oa();X.preventDefault();mxEvent.consume(X)}),K.appendChild(aa));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=-"geButton geAdaptiveAsset",mxEvent.addListener(I,"click",function(X){q();X.preventDefault();mxEvent.consume(X)}),K.appendChild(I));F.appendChild(K);var ba=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var X=x.div.querySelector(".geCommentEditTxtArea"),ca=x.div.querySelector(".geCommentEditBtns");x.comment.content=X.value;X.parentNode.removeChild(X);ca.parentNode.removeChild(ca)}catch(ha){b.handleError(ha)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'++var CommentsWindow=function(b,f,l,u,y,q){function B(){for(var Y=M.getElementsByTagName("div"),da=0,ha=0;ha<Y.length;ha++)"none"!=Y[ha].style.display&&Y[ha].parentNode==M&&da++;L.style.display=0==da?"block":"none"}function H(Y,da,ha,Z){function k(){da.removeChild(N);da.removeChild(T);J.style.display="block";v.style.display="block"}x={div:da,comment:Y,saveCallback:ha,deleteOnCancel:Z};var v=da.querySelector(".geCommentTxt"),J=da.querySelector(".geCommentActionsList"),N=document.createElement("textarea");+N.className="geCommentEditTxtArea";N.style.minHeight=v.offsetHeight+"px";N.value=Y.content;da.insertBefore(N,v);var T=document.createElement("div");T.className="geCommentEditBtns";var V=mxUtils.button(mxResources.get("cancel"),function(){Z?(da.parentNode.removeChild(da),B()):k();x=null});V.className="geCommentEditBtn";T.appendChild(V);var U=mxUtils.button(mxResources.get("save"),function(){v.innerText="";Y.content=N.value;mxUtils.write(v,Y.content);k();ha(Y);x=null});mxEvent.addListener(N,"keydown",+mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(U.click(),mxEvent.consume(X)):27==X.keyCode&&(V.click(),mxEvent.consume(X)))}));U.focus();U.className="geCommentEditBtn gePrimaryBtn";T.appendChild(U);da.insertBefore(T,v);J.style.display="none";v.style.display="none";N.focus()}function S(Y,da){da.innerText="";Y=new Date(Y.modifiedDate);var ha=b.timeSince(Y);null==ha&&(ha=mxResources.get("lessThanAMinute"));mxUtils.write(da,+mxResources.get("timeAgo",[ha],"{1} ago"));da.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString())}function E(Y){var da=document.createElement("img");da.className="geCommentBusyImg";da.src=IMAGE_PATH+"/spin.gif";Y.appendChild(da);Y.busyImg=da}function Q(Y){Y.style.border="1px solid red";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function c(Y){Y.style.border="";Y.busyImg.parentNode==Y&&Y.removeChild(Y.busyImg)}function g(Y,da,ha,Z,k){function v(na,la,qa){var ya=document.createElement("li");+ya.className="geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,na);ya.appendChild(wa);mxEvent.addListener(wa,"click",function(Ja){la(Ja,Y);Ja.preventDefault();mxEvent.consume(Ja)});fa.appendChild(ya);qa&&(ya.style.display="none")}function J(){function na(ya){la.push(qa);if(null!=ya.replies)for(var wa=0;wa<ya.replies.length;wa++)qa=qa.nextSibling,na(ya.replies[wa])}var la=[],qa=T;na(Y);return{pdiv:qa,replies:la}}function N(na,la,qa,ya,wa){function Ja(){E(Ma);+Y.addReply(Ga,function(ra){Ga.id=ra;Y.replies.push(Ga);c(Ma);qa&&qa()},function(ra){Aa();Q(Ma);b.handleError(ra,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ya,wa)}function Aa(){H(Ga,Ma,function(ra){Ja()},!0)}var Ba=J().pdiv,Ga=b.newComment(na,b.getCurrentUser());Ga.pCommentId=Y.id;null==Y.replies&&(Y.replies=[]);var Ma=g(Ga,Y.replies,Ba,Z+1);la?Aa():Ja()}if(k||!Y.isResolved){L.style.display="none";var T=document.createElement("div");T.className="geCommentContainer";T.setAttribute("data-commentId",+Y.id);T.style.marginLeft=20*Z+5+"px";Y.isResolved&&(F.style.opacity="0.7");var V=document.createElement("div");V.className="geCommentHeader";var U=document.createElement("img");U.className="geCommentUserImg";U.src=null!=Y.user&&null!=Y.user.pictureUrl?Y.user.pictureUrl:Editor.userImage;V.appendChild(U);U=document.createElement("div");U.className="geCommentHeaderTxt";V.appendChild(U);var X=document.createElement("div");X.className="geCommentUsername";mxUtils.write(X,null!=Y.user?Y.user.displayName:+mxResources.get("unknownUser"));U.appendChild(X);X=document.createElement("div");X.className="geCommentDate";X.setAttribute("data-commentId",Y.id);S(Y,X);U.appendChild(X);T.appendChild(V);V=document.createElement("div");V.className="geCommentTxt";mxUtils.write(V,Y.content||"");T.appendChild(V);Y.isLocked&&(T.style.opacity="0.5");V=document.createElement("div");V.className="geCommentActions";var fa=document.createElement("ul");fa.className="geCommentActionsList";V.appendChild(fa);m||Y.isLocked||0!=+Z&&!n||v(mxResources.get("reply"),function(){N("",!0)},Y.isResolved);U=b.getCurrentUser();null==U||null==Y.user||U.id!=Y.user.id||m||Y.isLocked||(v(mxResources.get("edit"),function(){function na(){H(Y,T,function(){E(T);Y.editComment(Y.content,function(){c(T)},function(la){Q(T);na();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}na()},Y.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){E(T);Y.deleteComment(function(na){if(!0===+na){na=T.querySelector(".geCommentTxt");na.innerText="";mxUtils.write(na,mxResources.get("msgDeleted"));var la=T.querySelectorAll(".geCommentAction");for(na=0;na<la.length;na++)la[na].parentNode.removeChild(la[na]);c(T);T.style.opacity="0.5"}else{la=J(Y).replies;for(na=0;na<la.length;na++)M.removeChild(la[na]);for(na=0;na<da.length;na++)if(da[na]==Y){da.splice(na,1);break}L.style.display=0==M.getElementsByTagName("div").length?"block":"none"}},function(na){Q(T);b.handleError(na,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},+Y.isResolved));m||Y.isLocked||0!=Z||v(Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(na){function la(){var qa=na.target;qa.innerText="";Y.isResolved=!Y.isResolved;mxUtils.write(qa,Y.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ya=Y.isResolved?"none":"",wa=J(Y).replies,Ja="light-dark("+(Y.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<wa.length;Aa++){wa[Aa].style.backgroundColor=Ja;for(var Ba=wa[Aa].querySelectorAll(".geCommentAction"),+Ga=0;Ga<Ba.length;Ga++)Ba[Ga]!=qa.parentNode&&(Ba[Ga].style.display=ya);ca||(wa[Aa].style.display="none")}B()}Y.isResolved?N(mxResources.get("reOpened")+": ",!0,la,!1,!0):N(mxResources.get("markedAsResolved"),!1,la,!0)});T.appendChild(V);null!=ha?M.insertBefore(T,ha.nextSibling):M.appendChild(T);for(ha=0;null!=Y.replies&&ha<Y.replies.length;ha++)V=Y.replies[ha],V.isResolved=Y.isResolved,g(V,Y.replies,null,Z+1,k);null!=x&&(x.comment.id==Y.id?(k=Y.content,Y.content=x.comment.content,H(Y,T,x.saveCallback,+x.deleteOnCancel),Y.content=k):null==x.comment.id&&x.comment.pCommentId==Y.id&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return T}}var m=!b.canComment(),n=b.canReplyToReplies(),x=null,F=document.createElement("div");F.className="geCommentsWin";var I=EditorUi.compactUi?"26px":"30px",M=document.createElement("div");M.className="geCommentsList";M.style.bottom=parseInt(I)+7+"px";F.appendChild(M);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";+mxUtils.write(L,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=I;K.style.padding="3px 4px 4px 4px";I=document.createElement("a");I.className="geButton";if(!m){var aa=I.cloneNode();aa.style.backgroundImage="url("+Editor.plusImage+")";aa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(aa,"click",function(Y){function da(){H(ha,Z,function(k){E(Z);b.addComment(k,function(v){k.id=v;ba.push(k);+c(Z)},function(v){Q(Z);da();b.handleError(v,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ha=b.newComment("",b.getCurrentUser()),Z=g(ha,ba,null,0);da();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(aa)}var ja=I.cloneNode();ja.style.backgroundImage="url("+Editor.checkImage+")";ja.setAttribute("title",mxResources.get("showResolved"));var ca=!1;mxEvent.addListener(ja,"click",function(Y){(ca=!ca)?ja.classList.add("geActiveItem"):ja.classList.remove("geActiveItem");+oa();Y.preventDefault();mxEvent.consume(Y)});K.appendChild(ja);b.commentsRefreshNeeded()&&(aa=I.cloneNode(),aa.style.backgroundImage="url("+Editor.refreshImage+")",aa.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(aa,"click",function(Y){oa();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(aa));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=+"geButton geAdaptiveAsset",mxEvent.addListener(I,"click",function(Y){q();Y.preventDefault();mxEvent.consume(Y)}),K.appendChild(I));F.appendChild(K);var ba=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var Y=x.div.querySelector(".geCommentEditTxtArea"),da=x.div.querySelector(".geCommentEditBtns");x.comment.content=Y.value;Y.parentNode.removeChild(Y);da.parentNode.removeChild(da)}catch(ha){b.handleError(ha)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ha){function Z(k){if(null!=k){k.sort(function(J,N){return new Date(J.modifiedDate)-new Date(N.modifiedDate)});for(var v=0;v<k.length;v++)Z(k[v].replies)}}ha.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});M.innerText="";M.appendChild(L);L.style.display="block";ba=ha;for(ha=0;ha<ba.length;ha++)Z(ba[ha].replies),-g(ba[ha],ba,null,0,da);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ha){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ha&&ha.message?": "+ha.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function X(v){var J=ha[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)X(v.replies[J])}-if(this.window.isVisible()){for(var ca=M.querySelectorAll(".geCommentDate"),ha={},Z=0;Z<ca.length;Z++){var k=ca[Z];ha[k.getAttribute("data-commentId")]=k}for(Z=0;Z<ba.length;Z++)X(ba[Z])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);+g(ba[ha],ba,null,0,ca);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(M.appendChild(x.div),H(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(ha){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ha&&ha.message?": "+ha.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;K=mxUtils.bind(this,function(){function Y(v){var J=ha[v.id];if(null!=J)for(S(v,J),J=0;null!=v.replies&&J<v.replies.length;J++)Y(v.replies[J])}+if(this.window.isVisible()){for(var da=M.querySelectorAll(".geCommentDate"),ha={},Z=0;Z<da.length;Z++){var k=da[Z];ha[k.getAttribute("data-commentId")]=k}for(Z=0;Z<ba.length;Z++)Y(ba[Z])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),F,f,l,u,y,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,u,y,q,B,H,S,E,Q){var c=document.createElement("div");c.style.textAlign="center";Q=null!=Q?Q:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=Q+"px";g.style.lineHeight="1.2em";mxUtils.write(g,f);c.appendChild(g);null!=E&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",E),g.appendChild(f),c.appendChild(g));E=document.createElement("div");E.style.textAlign="center";E.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u(m.checked)});q.className="geBtn";null!=H&&(q.innerHTML=H+"<br>"+q.innerHTML,q.style.display="inline-block",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&E.appendChild(q);var n=mxUtils.button(y||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(m.checked)});E.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||E.appendChild(q);c.appendChild(E);S?(E.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop=@@ -4121,12 +4122,12 @@ EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,functiofunction(E){return this.isTreeEdge(E)}))};Graph.prototype.getIncomingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(u,y){return this.getTreeEdges(u,y,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function u(Z){return x.isVertex(Z)&&q(Z)}function y(Z){var k=!1;null!=Z&&(k="1"==n.getCurrentCellStyle(Z).treeMoving);return k}function q(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),k="tree"==(null!=k?k.style:n.getCellStyle(Z)).containerType);return k}function B(Z){var k=!1;null!=Z&&(Z=x.getParent(Z),k=n.view.getState(Z),n.view.getState(Z),k=null!=(null!=k?k.style:n.getCellStyle(Z)).childLayout);return k}function H(Z){Z=n.view.getState(Z);if(null!=Z){var k=n.getIncomingTreeEdges(Z.cell);if(0<k.length&&(k=n.view.getState(k[0]),null!=k&&(k=k.absolutePoints,null!=k&&0<k.length&&(k=k[k.length-1],null!=k)))){if(k.y==Z.y&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_SOUTH;if(k.y==Z.y+Z.height&&Math.abs(k.x-Z.getCenterX())<Z.width/2)return mxConstants.DIRECTION_NORTH;if(k.x>Z.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Z,k){k=null!=k?k:!0;n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=n.cloneCells([J[0],Z]);n.model.setTerminal(N[0],n.model.getTerminal(J[0],-!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?Z.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?Z.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=V.x,N[1].geometry.y-=V.y);var U=n.view.getState(Z),Y=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-N[1].geometry.width-10)*Y:fa.y+=-(k?Z.geometry.height+10:-N[1].geometry.height-10)*Y;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/-Y),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/Y))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ja=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ja.push(Ba);(null==Ba||Ga)&&Ja.push(Aa);return null==Ba||Ga});n.moveCells(Ja,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(N,+!0),!0);var T=H(Z),V=v.geometry;T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?N[1].geometry.x+=k?Z.geometry.width+10:-N[1].geometry.width-10:N[1].geometry.y+=k?Z.geometry.height+10:-N[1].geometry.height-10;n.view.currentRoot!=v&&(N[1].geometry.x-=V.x,N[1].geometry.y-=V.y);var U=n.view.getState(Z),X=n.view.scale;if(null!=U){var fa=mxRectangle.fromRectangle(U);T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH?fa.x+=(k?Z.geometry.width+10:-N[1].geometry.width-10)*X:fa.y+=+(k?Z.geometry.height+10:-N[1].geometry.height-10)*X;var na=n.getOutgoingTreeEdges(n.model.getTerminal(J[0],!0));if(null!=na){for(var la=T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NORTH,qa=V=J=0;qa<na.length;qa++){var ya=n.model.getTerminal(na[qa],!1);if(T==H(ya)){var wa=n.view.getState(ya);ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY())&&mxUtils.intersects(fa,wa)&&(J=10+Math.max(J,(Math.min(fa.x+fa.width,wa.x+wa.width)-Math.max(fa.x,wa.x))/+X),V=10+Math.max(V,(Math.min(fa.y+fa.height,wa.y+wa.height)-Math.max(fa.y,wa.y))/X))}}la?V=0:J=0;for(qa=0;qa<na.length;qa++)if(ya=n.model.getTerminal(na[qa],!1),T==H(ya)&&(wa=n.view.getState(ya),ya!=Z&&null!=wa&&(la&&k!=wa.getCenterX()<U.getCenterX()||!la&&k!=wa.getCenterY()<U.getCenterY()))){var Ja=[];n.traverse(wa.cell,!0,function(Aa,Ba){var Ga=null!=Ba&&n.isTreeEdge(Ba);Ga&&Ja.push(Ba);(null==Ba||Ga)&&Ja.push(Aa);return null==Ba||Ga});n.moveCells(Ja,(k?1:-1)*J,(k?1:-1)*V)}}}return n.addCells(N,v)}finally{n.model.endUpdate()}}function E(Z){n.model.beginUpdate();try{var k=H(Z),v=n.getIncomingTreeEdges(Z),J=n.cloneCells([v[0],Z]);n.model.setTerminal(v[0],J[1],!1);n.model.setTerminal(J[0],J[1],!0);n.model.setTerminal(J[0],Z,!1);var N=n.model.getParent(Z),T=N.geometry,V=[];n.view.currentRoot!=N&&(J[1].geometry.x-=T.x,J[1].geometry.y-=T.y);n.traverse(Z,!0,function(fa,na){var la=null!=na&&n.isTreeEdge(na);la&&V.push(na);(null==na||la)&&V.push(fa);return null==na||la});var U=Z.geometry.width+40,-Y=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,Y=-Y):k==mxConstants.DIRECTION_WEST?(U=-U,Y=0):k==mxConstants.DIRECTION_EAST&&(Y=0);n.moveCells(V,U,Y);return n.addCells(J,N)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==-n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var Y=n.model.getTerminal(J[U],!1);null!=Y&&k.push(Y)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height-+X=Z.geometry.height+40;k==mxConstants.DIRECTION_SOUTH?U=0:k==mxConstants.DIRECTION_NORTH?(U=0,X=-X):k==mxConstants.DIRECTION_WEST?(U=-U,X=0):k==mxConstants.DIRECTION_EAST&&(X=0);n.moveCells(V,U,X);return n.addCells(J,N)}finally{n.model.endUpdate()}}function Q(Z,k){n.model.beginUpdate();try{var v=n.model.getParent(Z),J=n.getIncomingTreeEdges(Z),N=H(Z);0==J.length&&(J=[n.createEdge(v,null,"",null,null,n.createCurrentEdgeStyle())],N=k);var T=n.cloneCells([J[0],Z]);n.model.setTerminal(T[0],Z,!0);null==+n.model.getTerminal(T[0],!1)&&(n.model.setTerminal(T[0],T[1],!1),n.applyNewEdgeStyle(T[1],[T[0]],N));J=n.getOutgoingTreeEdges(Z);var V=v.geometry;k=[];n.view.currentRoot==v&&(V=new mxRectangle);for(var U=0;U<J.length;U++){var X=n.model.getTerminal(J[U],!1);null!=X&&k.push(X)}var fa=n.view.getBounds(k),na=n.view.translate,la=n.view.scale;N==mxConstants.DIRECTION_SOUTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x-V.x+10,T[1].geometry.y+=T[1].geometry.height-V.y+40):N==mxConstants.DIRECTION_NORTH?(T[1].geometry.x=null==fa?Z.geometry.x+(Z.geometry.width-T[1].geometry.width)/2:(fa.x+fa.width)/la-na.x+-V.x+10,T[1].geometry.y-=T[1].geometry.height+V.y+40):(T[1].geometry.x=N==mxConstants.DIRECTION_WEST?T[1].geometry.x-(T[1].geometry.width+V.x+40):T[1].geometry.x+(T[1].geometry.width-V.x+40),T[1].geometry.y=null==fa?Z.geometry.y+(Z.geometry.height-T[1].geometry.height)/2:(fa.y+fa.height)/la-na.y+-V.y+10);return n.addCells(T,v)}finally{n.model.endUpdate()}}function c(Z,k,v){Z=n.getOutgoingTreeEdges(Z);v=n.view.getState(v);var J=[];if(null!=v&&null!=Z){for(var N=0;N<Z.length;N++){var T=n.view.getState(n.model.getTerminal(Z[N],!1));null!=T&&(!k&&Math.min(T.x+T.width,v.x+v.width)>=Math.max(T.x,v.x)||k&&Math.min(T.y+T.height,v.y+v.height)>=Math.max(T.y,v.y))&&J.push(T)}J.sort(function(V,U){return k?V.x+V.width-U.x-U.width:V.y+V.height-U.y-U.height})}return J}function g(Z,k){var v=H(Z),J=k==mxConstants.DIRECTION_EAST||k==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)==J&&v!=k?m.actions.get("selectParent").funct():v==k?(k=n.getOutgoingTreeEdges(Z),null!=k&&0<k.length&&n.setSelectionCell(n.model.getTerminal(k[0],!1))):(v=n.getIncomingTreeEdges(Z),null!=v&&0<v.length&&(J=c(n.model.getTerminal(v[0],!0),J,Z),Z=n.view.getState(Z),null!=Z&&(Z=mxUtils.indexOf(J,Z),0<=Z&&(Z+=k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_WEST?-1:1,0<=Z&&Z<=J.length-1&&n.setSelectionCell(J[Z].cell)))))}var m=this,n=m.editor.graph,x=n.getModel(),@@ -4134,19 +4135,19 @@ F=m.menus.createPopupMenu;m.menus.createPopupMenu=function(Z,k,v){F.apply(this,a["selectConnections"],null,v)}};m.actions.addAction("selectChildren",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell();Z=mxEvent.isControlDown(Z)?null:n.getOutgoingTreeEdges(k);if(null!=Z&&0<Z.length){k=[];for(var v=0;v<Z.length;v++)k.push(n.model.getTerminal(Z[v],!1));n.setSelectionCells(k)}else n.setSelectionCells(n.model.getChildren(k))}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+C");m.actions.addAction("selectDescendants",function(Z){var k=n.getSelectionCell();if(n.isEnabled()&&null!=k){var v=[];mxEvent.isControlDown(Z)||n.traverse(k,!0,function(J,N){var T=null!=N&&n.isTreeEdge(N);T&&mxEvent.isControlDown(Z)&&v.push(N);(null==N||T)&&v.push(J);return null==N||T});if(0==v.length||1==v.length&&v[0]==k)v=n.model.getDescendants(k);n.setSelectionCells(v)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+X");m.actions.addAction("selectParent",function(Z){var k=n.getSelectionCell();n.isEnabled()&&null!=k&&(Z=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k),null!=Z&&0<Z.length?n.setSelectionCell(n.model.getTerminal(Z[0],!0)):n.selectParentCell())},null,null,Editor.altKey+"+"+Editor.shiftKey+"+P");m.actions.addAction("selectSiblings",function(Z){if(n.isEnabled()&&1==n.getSelectionCount()){var k=n.getSelectionCell(),v=mxEvent.isControlDown(Z)?null:n.getIncomingTreeEdges(k);Z=[];if(null!=v&&0<v.length&&(v=n.getOutgoingTreeEdges(n.model.getTerminal(v[0],!0)),null!=v))for(var J=0;J<v.length;J++)Z.push(n.model.getTerminal(v[J],!1));0==Z.length&&(Z=n.model.getChildren(n.model.getParent(k)));-n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var N=Z[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(V,U){var Y=null!=U&&n.isTreeEdge(U);Y&&T.push(U);(null==U||Y)&&T.push(V);return null==U||Y});0<T.length&&(v=v.concat(T),+n.setSelectionCells(Z)}},null,null,Editor.altKey+"+"+Editor.shiftKey+"+S");var I=n.removeCells;n.removeCells=function(Z,k){k=null!=k?k:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));k&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var v=[],J=0;J<Z.length;J++){var N=Z[J];x.isEdge(N)&&q(N)&&(v.push(N),N=x.getTerminal(N,!1));if(u(N)){var T=[];n.traverse(N,!0,function(V,U){var X=null!=U&&n.isTreeEdge(U);X&&T.push(U);(null==U||X)&&T.push(V);return null==U||X});0<T.length&&(v=v.concat(T),N=n.getIncomingTreeEdges(Z[J]),Z=Z.concat(N))}else null!=N&&v.push(Z[J])}Z=v;return I.apply(this,arguments)};m.hoverIcons.getStateAt=function(Z,k,v){return u(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(k,v))};var M=n.duplicateCells;n.duplicateCells=function(Z,k){Z=null!=Z?Z:this.getSelectionCells();for(var v=Z.slice(0),J=0;J<v.length;J++){var N=n.view.getState(v[J]);if(null!=N&&u(N.cell)){var T=n.getIncomingTreeEdges(N.cell);for(N=0;N<T.length;N++)mxUtils.remove(T[N],Z)}}this.model.beginUpdate();-try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var Y=this.cloneCell(T[0]);this.addEdge(Y,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,N,T,V){for(var U=null,Y=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!B(Z[fa])&&this.isCellCollapsed(Z[fa])?Y=Y.concat(this.getSubtree(Z[fa])):-Y.push(Z[fa]);Z=mxUtils.removeDuplicates(Y);this.model.beginUpdate();try{Y=N;var na=this.getCurrentCellStyle(N);if(null!=Z&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){N=n.model.getParent(Z[fa]);break}if(null!=Y&&N!=Y&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(Y);-null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=Z&&U.length==Z.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(Y)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],Y,!0);else if(u(Z[fa])&&(la=n.getIncomingTreeEdges(Z[fa]),0<la.length))if(!J)u(Y)&&0>mxUtils.indexOf(Z,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],Y,!0);else if(0==-n.getIncomingTreeEdges(U[fa]).length){na=Y;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(N.isEdge(T[V])&&null==N.getTerminal(T[V],!0)){N.setTerminal(T[V],Z,!0);var U=-n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ia={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},da=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?-aa[Z.keyCode]:mxEvent.isAltDown(Z)?ia[Z.keyCode]:null;null!=v?(v.funct(Z),mxEvent.consume(Z)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==Z.which?v=mxEvent.isShiftDown(Z)?E(k):Q(k):13==Z.which&&(v=S(k,!mxEvent.isShiftDown(Z)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(Z)):37==Z.keyCode?(g(k,mxConstants.DIRECTION_WEST),-mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||da.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,N,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var Y=H(Z),fa=Y==mxConstants.DIRECTION_EAST||Y==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||-k==mxConstants.DIRECTION_WEST;return Y==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||B(Z)||n.traverse(Z,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,+try{var V=M.call(this,Z,k);if(V.length==Z.length)for(J=0;J<Z.length;J++)if(u(Z[J])){var U=n.getIncomingTreeEdges(V[J]);T=n.getIncomingTreeEdges(Z[J]);if(0==U.length&&0<T.length){var X=this.cloneCell(T[0]);this.addEdge(X,n.getDefaultParent(),this.model.getTerminal(T[0],!0),V[J])}}}finally{this.model.endUpdate()}return V};var L=n.moveCells;n.moveCells=function(Z,k,v,J,N,T,V){for(var U=null,X=[],fa=0;fa<Z.length;fa++)(y(Z[fa])||u(Z[fa]))&&!B(Z[fa])&&this.isCellCollapsed(Z[fa])?X=X.concat(this.getSubtree(Z[fa])):+X.push(Z[fa]);Z=mxUtils.removeDuplicates(X);this.model.beginUpdate();try{X=N;var na=this.getCurrentCellStyle(N);if(null!=Z&&u(N)&&"1"==mxUtils.getValue(na,"treeFolding","0")){for(fa=0;fa<Z.length;fa++)if(u(Z[fa])||n.model.isEdge(Z[fa])&&null==n.model.getTerminal(Z[fa],!0)){N=n.model.getParent(Z[fa]);break}if(null!=X&&N!=X&&null!=this.view.getState(Z[0])){var la=n.getIncomingTreeEdges(Z[0]);if(0<la.length){var qa=n.view.getState(n.model.getTerminal(la[0],!0));if(null!=qa){var ya=n.view.getState(X);+null!=ya&&(k=(ya.getCenterX()-qa.getCenterX())/n.view.scale,v=(ya.getCenterY()-qa.getCenterY())/n.view.scale)}}}}U=L.apply(this,arguments);if(null!=U&&null!=Z&&U.length==Z.length)for(fa=0;fa<U.length;fa++)if(this.model.isEdge(U[fa]))u(X)&&0>mxUtils.indexOf(U,this.model.getTerminal(U[fa],!0))&&this.model.setTerminal(U[fa],X,!0);else if(u(Z[fa])&&(la=n.getIncomingTreeEdges(Z[fa]),0<la.length))if(!J)u(X)&&0>mxUtils.indexOf(Z,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],X,!0);else if(0==+n.getIncomingTreeEdges(U[fa]).length){na=X;if(null==na||na==n.model.getParent(Z[fa]))na=n.model.getTerminal(la[0],!0);J=this.cloneCell(la[0]);this.addEdge(J,n.getDefaultParent(),na,U[fa])}}finally{this.model.endUpdate()}return U};if(null!=m.sidebar){var K=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(Z,k,v,J){var N=n.model,T=null;N.beginUpdate();try{if(T=K.apply(this,arguments),u(Z))for(var V=0;V<T.length;V++)if(N.isEdge(T[V])&&null==N.getTerminal(T[V],!0)){N.setTerminal(T[V],Z,!0);var U=+n.getCellGeometry(T[V]);U.points=null;null!=U.getTerminalPoint(!0)&&U.setTerminalPoint(null,!0)}}finally{N.endUpdate()}return T}}var aa={67:m.actions.get("selectChildren"),88:m.actions.get("selectDescendants"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},ja={67:m.actions.get("copyStyle"),86:m.actions.get("pasteStyle")},ca=m.onKeyDown;m.onKeyDown=function(Z){try{var k=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=k){var v=mxEvent.isAltDown(Z)&&mxEvent.isShiftDown(Z)?+aa[Z.keyCode]:mxEvent.isAltDown(Z)?ja[Z.keyCode]:null;null!=v?(v.funct(Z),mxEvent.consume(Z)):u(k)&&(v=null,0<n.getIncomingTreeEdges(k).length&&(9==Z.which?v=mxEvent.isShiftDown(Z)?E(k):Q(k):13==Z.which&&(v=S(k,!mxEvent.isShiftDown(Z)))),null!=v&&0<v.length?(1==v.length&&n.model.isEdge(v[0])?n.setSelectionCell(n.model.getTerminal(v[0],!1)):n.setSelectionCell(v[v.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(k)),n.startEditingAtCell(k),mxEvent.consume(Z)):37==Z.keyCode?(g(k,mxConstants.DIRECTION_WEST),+mxEvent.consume(Z)):38==Z.keyCode?(g(k,mxConstants.DIRECTION_NORTH),mxEvent.consume(Z)):39==Z.keyCode?(g(k,mxConstants.DIRECTION_EAST),mxEvent.consume(Z)):40==Z.keyCode&&(g(k,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Z)))}}catch(J){m.handleError(J)}mxEvent.isConsumed(Z)||ca.apply(this,arguments)};var ba=n.connectVertex;n.connectVertex=function(Z,k,v,J,N,T,V){var U=n.getIncomingTreeEdges(Z);if(u(Z)){var X=H(Z),fa=X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST,na=k==mxConstants.DIRECTION_EAST||+k==mxConstants.DIRECTION_WEST;return X==k||0==U.length?Q(Z,k):fa==na?E(Z):S(Z,k!=mxConstants.DIRECTION_NORTH&&k!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};n.getSubtree=function(Z){var k=[Z];!y(Z)&&!u(Z)||B(Z)||n.traverse(Z,!0,function(v,J){var N=null!=J&&n.isTreeEdge(J);N&&0>mxUtils.indexOf(k,J)&&k.push(J);(null==J||N)&&0>mxUtils.indexOf(k,v)&&k.push(v);return null==J||N});return k};var oa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){oa.apply(this,arguments);(y(this.state.cell)||u(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Z){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(Z)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var X=mxVertexHandler.prototype.redrawHandles;-mxVertexHandler.prototype.redrawHandles=function(){X.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Z){ca.apply(this,arguments);null!=+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Z){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z);this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(Z)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var Y=mxVertexHandler.prototype.redrawHandles;+mxVertexHandler.prototype.redrawHandles=function(){Y.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Z){da.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=Z?"":"none")};var ha=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Z,k){ha.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var u=l.apply(this,arguments),y=this.graph,q=this;return u.concat([this.addEntry("tree container",function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");E.geometry.relative=!0;E.edge=!0;H.insertEdge(E,!0);S.insertEdge(E,!1);B.insert(E);B.insert(H);B.insert(S);return q.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,@@ -4178,18 +4179,18 @@ arguments);if(E){var Q=window.innerWidth||document.documentElement.clientWidth||this.editor.graph,c=document.createElement("div");c.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";Q.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,m){0<Q.getSelectionCount()?(E.appendChild(c),c.innerHTML="Selected: "+Q.getSelectionCount()):null!=c.parentNode&&c.parentNode.removeChild(c)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var E=this.formatWindow.window.toggleMinimized,Q=240;this.formatWindow.window.toggleMinimized=function(){E.apply(this,arguments);this.minimized?(Q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+Q-140+"px"):(this.div.style.width=Q+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-Q+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(c){mxEvent.getSource(c)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var S=EditorUi.prototype.init;EditorUi.prototype.init=function(){function E(J,N,T){var V=n.menus.get(J);N=I.addMenu(mxResources.get(J),mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));N.className="geButton";N.setAttribute("title",mxResources.get(J));n.menus.menuCreated(V,N,"geButton");null!=T&&-(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function Q(J,N,T,V,U,Y){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=Y?fa.style.backgroundImage="url("+Y+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled",+(N.style.backgroundImage="url("+T+")",N.innerText="");return N}function Q(J,N,T,V,U,X){var fa=document.createElement("a");fa.className="geButton";F.appendChild(fa);null!=X?fa.style.backgroundImage="url("+X+")":mxUtils.write(fa,J);mxEvent.addListener(fa,"click",function(na){"disabled"!=fa.getAttribute("disabled")&&N(na);mxEvent.consume(na)});mxEvent.preventDefault(fa);null!=V&&fa.setAttribute("title",V);null!=U&&(J=function(){U.isEnabled()?fa.removeAttribute("disabled"):fa.setAttribute("disabled","disabled")},U.addListener("stateChanged",J),x.addListener("enabledChanged",J),J());return fa}function c(J,N,T){N=document.createElement("div");N.className="geButtonGroup";for(T=0;T<J.length;T++)null!=J[T]&&N.appendChild(J[T]);F.appendChild(N);return N}function g(){l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.innerHTML="";var J=1E3>l,N=E("diagram",null,J?Editor.menuImage:null);c([N,Q(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),-n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=E("insert",!0,J?ia:null);c([N,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")+-" ("+ca.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ha.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([Z,k]),520<=l&&c([v,640<=l?Q("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?Q("",X.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",X,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=+n.actions.get("image"),J?Editor.shapesImage:null),Q(mxResources.get("format"),n.actions.get("format").funct,null,mxResources.get("format")+" ("+n.actions.get("format").shortcut+")",n.actions.get("image"),J?Editor.formatImage:null)]);N=E("insert",!0,J?ja:null);c([N,Q(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),J?Editor.trashImage:null)]);x.isEnabled()||N.setAttribute("disabled","disabled");Z.setAttribute("title",mxResources.get("undo")++" ("+da.shortcut+")");k.setAttribute("title",mxResources.get("redo")+" ("+ha.shortcut+")");v.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=l&&(c([Z,k]),520<=l&&c([v,640<=l?Q("",oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",oa,Editor.zoomInImage):null,640<=l?Q("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null]));F.appendChild(n.statusContainer);F.appendChild(n.buttonContainer)}S.apply(this,arguments);var m=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);if(1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var n=this,x=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));var F=document.createElement("div");F.className="geMenubarContainer";var I=new Menubar(n,F),M=n.hideCurrentMenu;n.hideCurrentMenu=function(){M.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=n.descriptorChanged;n.descriptorChanged=function(){L.apply(this,arguments);var J=n.getCurrentFile();if(null!=J&&null!=J.getTitle()){var N=J.getMode();"google"==N?N="googleDrive":"github"==N?N="gitHub":"gitlab"==N?N="gitLab":"onedrive"==N&&(N="oneDrive");N=mxResources.get(N);F.setAttribute("title",J.getTitle()+(null!=N?" ("+N+")":""))}else F.removeAttribute("title")};n.setStatusText(n.editor.getStatus());F.appendChild(n.statusContainer);n.buttonContainer=this.createButtonContainer();F.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=this.createTabContainer();var K=this.createZoomInput(!0),aa=n.updateTabContainer;-n.updateTabContainer=function(){aa.apply(this,arguments);n.tabContainer.appendChild(K)};var ia=Editor.addBoxImage;if(null!=n.hoverIcons){var da=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||da.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());-var oa=n.actions.get("zoomIn"),X=n.actions.get("zoomOut");m=n.actions.get("resetView");var ca=n.actions.get("undo"),ha=n.actions.get("redo"),Z=Q("",ca.funct,null,"",ca,Editor.undoImage),k=Q("",ha.funct,null,"",ha,Editor.redoImage),v=Q("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,+n.updateTabContainer=function(){aa.apply(this,arguments);n.tabContainer.appendChild(K)};var ja=Editor.addBoxImage;if(null!=n.hoverIcons){var ca=n.hoverIcons.update;n.hoverIcons.update=function(){x.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=x.freehand){var ba=x.freehand.createStyle;x.freehand.createStyle=function(J){return ba.apply(this,arguments)+"sketch=0;"}}n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));n.setStatusText(n.editor.getStatus());+var oa=n.actions.get("zoomIn"),Y=n.actions.get("zoomOut");m=n.actions.get("resetView");var da=n.actions.get("undo"),ha=n.actions.get("redo"),Z=Q("",da.funct,null,"",da,Editor.undoImage),k=Q("",ha.funct,null,"",ha,Editor.redoImage),v=Q("",function(J){mxEvent.isAltDown(J)?(n.hideCurrentMenu(),n.actions.get("customZoom").funct()):(n.hideCurrentMenu(),n.actions.get("smartFit").funct());mxEvent.consume(J)},!0,"",m,Editor.zoomFitImage);n.actions.get("toggleShapes").funct=mxUtils.bind(this,function(){f(n,null)});n.container.appendChild(n.tabContainer);n.container.appendChild(F);n.updateTabContainer();!EditorUi.windowed&&1E3<=l&&b(this,!0);g();n.addListener("lockedChanged",g);n.addListener("languageChanged",g);n.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();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.chatWindow&&n.menus.chatWindow.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()})}}};-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,B){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\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\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\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\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\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\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\nfindInDiagram=Find in Diagram\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\nflowAnimation=Flow Animation\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\nformatWebp=WebP\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\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">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.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\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\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\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\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\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\ndrives=Drives\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;+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,f,l,u,y,q,B){this.file=b;this.id=f;this.content=l;this.modifiedDate=u;this.createdDate=y;this.isResolved=q;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,u,y){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};DrawioUser=function(b,f,l,u,y){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=u;this.locale=y};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\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\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\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\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\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\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\nfindInDiagram=Find in Diagram\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\nflowAnimation=Flow Animation\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\nformatWebp=WebP\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\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">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.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmaximize=Maximize\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nminimize=Minimize\nmisc=Misc\nmockups=Mockups\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshadows=Shadows\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\ntypeSlashToSearch=Type / to search\numl=UML\nunassigned=Unassigned\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\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\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\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\ncopyAsText=Copy as Text\ncopyAsSvg=Copy as SVG\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\ntryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails\nconfAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.\ngliffyVersionPinning=Import Gliffy pinned version instead of the latest version\nconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.\nconfPublishErr=Another update conflicted with your publish, please try the operation again\ndrives=Drives\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"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,f,l){this.init(b,f,l)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";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.darkMode=null;GraphViewer.prototype.init=function(b,f,l){GraphViewer.initCss();this.graphConfig=null!=l?l:{};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=@@ -4233,21 +4234,21 @@ this.toolbarZIndex;f.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.damxUtils.setOpacity(f,30);var u=null,y=null,q=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);u=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,0);u=null;y=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";y=null}),100)}),ba||200)}),B=mxUtils.bind(this,function(ba){null!=u&&(window.clearTimeout(u),fadeThead=null);null!=y&&(window.clearTimeout(y),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(B(30),q())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(ba){B(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(ba){B(100);mxEvent.consume(ba)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ba,oa){},mouseUp:function(ba,oa){mxEvent.isTouchEvent(oa.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<-S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,X,ca){ba=this.createToolbarButton(ba,oa,X,ca);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";+S&&Math.abs(this.startX-oa.getGraphX())<S&&Math.abs(this.startY-oa.getGraphY())<S&&(0<parseFloat(f.style.opacity||0)?q():B(30))}})}l=this.toolbarItems;for(var E=0,Q=mxUtils.bind(this,function(ba,oa,Y,da){ba=this.createToolbarButton(ba,oa,Y,da);f.appendChild(ba);E++;return ba}),c=this.graph.getModel(),g=null,m=null,n=null,x=null,F=0;F<l.length;F++){var I=l[F];if("pages"==I){x=b.ownerDocument.createElement("div");x.style.display="inline-flex";x.style.position="relative";x.style.alignItems="center";x.style.padding="4px";x.style.fontFamily=GraphViewer.cssFontFamily;x.style.fontSize="12px";x.style.cursor="default";x.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(x,70);var M=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");M.style.borderRightStyle="none";M.style.paddingLeft="0px";M.style.paddingRight="0px";f.appendChild(x);var L=Q(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";I=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,this.currentPage+1+" / "+this.diagrams.length);x.style.display=1<this.diagrams.length?"inline-flex":"none";M.style.display=x.style.display;L.style.display=x.style.display});this.addListener("graphChanged",I);I()}else if("zoom"==I)this.zoomEnabled&&(Q(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),Q(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),Q(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"==I){if(this.layersEnabled){var K=Q(mxUtils.bind(this,function(ba){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 X=this.graph.getGraphBounds(),ca=this.graph.view;0>X.x||0>X.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale}):null!=this.graph.originalViewState&&0<X.x/ca.scale+this.graph.originalViewState.translate.x-ca.translate.x&&0<X.y/ca.scale+this.graph.originalViewState.translate.y--ca.translate.y&&(ca.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ba=K.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=GraphViewer.cssFontFamily;+g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var Y=this.graph.getGraphBounds(),da=this.graph.view;0>Y.x||0>Y.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:da.translate.clone(),scale:da.scale}):null!=this.graph.originalViewState&&0<Y.x/da.scale+this.graph.originalViewState.translate.x-da.translate.x&&0<Y.y/da.scale+this.graph.originalViewState.translate.y-+da.translate.y&&(da.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:da.translate.clone(),scale:da.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ba=K.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=GraphViewer.cssFontFamily;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;g.style.color="#000";mxUtils.setOpacity(g,85);var oa=mxUtils.getDocumentScrollOrigin(document);g.style.left=oa.x+ba.left-1+"px";g.style.top=oa.y+ba.bottom-2+"px";this.isDarkMode()&&(g.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,function(){K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});K.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==I){if(this.tagsEnabled){var aa=Q(mxUtils.bind(this,function(ba){null==m&&(m=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),m.div.getElementsByTagName("div")[0].style.position="",m.div.style.maxHeight="160px",m.div.style.maxWidth="120px",m.div.style.padding="2px",m.div.style.overflow="auto",m.div.style.height="auto",m.div.style.position="fixed",m.div.style.fontFamily=GraphViewer.cssFontFamily,m.div.style.fontSize="11px",m.div.style.backgroundColor="#eee",m.div.style.color="#000",m.div.style.border="1px solid #d0d0d0",m.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(m.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(m.div,85));if(null!=n)n.parentNode.removeChild(n),n=null;else{n=m.div;n.style.position="absolute";mxEvent.addListener(n,"mouseleave",function(){null!=n&&(n.parentNode.removeChild(n),n=null)});ba=aa.getBoundingClientRect();var oa=mxUtils.getDocumentScrollOrigin(document);n.style.left=oa.x+ba.left-1+"px";n.style.top=oa.y+ba.bottom-2+"px";document.body.appendChild(n);m.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){aa.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=n&&0==this.graph.getAllTags().length&&(n.parentNode.removeChild(n),n=null)}));aa.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==I?this.lightboxEnabled&&Q(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ba){alert(ba.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(I=this.graphConfig["toolbar-buttons"][I],null!=I&&(I.elem=Q(null==I.enabled||I.enabled?I.handler:function(){},I.image,I.title,I.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*E);null!=this.graphConfig.title&&-(l=b.ownerDocument.createElement("div"),l.style.display="inline-flex",l.style.position="relative",l.style.alignItems="center",l.style.padding="6px",l.style.fontFamily=GraphViewer.cssFontFamily,l.style.fontSize="12px",l.style.cursor="default",l.style.color="light-dark(#000000, #ffffff)",l.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),f.appendChild(l),this.filename=l);this.minToolbarWidth=34*E;var ia=b.style.border,-da=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ba=b.getBoundingClientRect(),oa=mxUtils.getScrollOrigin(document.body);oa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-oa.x,top:-oa.y};ba={left:ba.left-oa.left,top:ba.top-oa.top,bottom:ba.bottom-oa.top,right:ba.right-oa.left};f.style.left=-ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=ba.top+1+"px"):f.style.top=ba.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var X=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);-b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ca){for(ca=mxEvent.getSource(ca);null!=ca;){if(ca==b||ca==f||ca==g||ca==n)return;ca=ca.parentNode}X()});mxEvent.addListener(document.body,"mouseleave",function(ca){X()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&da()})).observe(b)};+(l=b.ownerDocument.createElement("div"),l.style.display="inline-flex",l.style.position="relative",l.style.alignItems="center",l.style.padding="6px",l.style.fontFamily=GraphViewer.cssFontFamily,l.style.fontSize="12px",l.style.cursor="default",l.style.color="light-dark(#000000, #ffffff)",l.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),f.appendChild(l),this.filename=l);this.minToolbarWidth=34*E;var ja=b.style.border,+ca=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ba=b.getBoundingClientRect(),oa=mxUtils.getScrollOrigin(document.body);oa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-oa.x,top:-oa.y};ba={left:ba.left-oa.left,top:ba.top-oa.top,bottom:ba.bottom-oa.top,right:ba.right-oa.left};f.style.left=+ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=ba.top+1+"px"):f.style.top=ba.top+"px";"1px solid transparent"==ja&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var Y=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=n&&(n.parentNode.removeChild(n),n=null);null!=g&&(g.parentNode.removeChild(g),g=null);+b.style.border=ja});mxEvent.addListener(document,"mousemove",function(da){for(da=mxEvent.getSource(da);null!=da;){if(da==b||da==f||da==g||da==n)return;da=da.parentNode}Y()});mxEvent.addListener(document.body,"mouseleave",function(da){Y()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ca):ca();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=f.parentNode&&ca()})).observe(b)};GraphViewer.prototype.createToolbarButton=function(b,f,l,u){var y=document.createElement("div");y.style.borderRight="1px solid #d0d0d0";y.style.display="inline-flex";y.style.alignItems="center";y.style.padding="6px";mxEvent.addListener(y,"click",b);null!=l&&y.setAttribute("title",l);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",f);b.style.width="18px";b.className="geAdaptiveAsset";null==u||u?(mxEvent.addListener(y,"mouseenter",function(){y.style.backgroundColor="light-dark(#dddddd,#333333)"}),mxEvent.addListener(y,"mouseleave",function(){y.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),y.style.cursor="pointer"):mxUtils.setOpacity(y,30);y.appendChild(b);return y};GraphViewer.prototype.disableButton=function(b,f){var l=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=l&&(mxUtils.setOpacity(l.elem,30),mxEvent.removeListener(l.elem,"click",l.handler),mxEvent.addListener(l.elem,"mouseenter",function(){l.elem.style.backgroundColor="#eee"}),f&&l.elem.setAttribute("title",f))};@@ -4279,7 +4280,7 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,f,l){if(null!=GraphViewer.cachedUrls[b])f(GraphViewer.cachedUrls[b]);else{var u=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;u.open("GET",b);u.onload=function(){f(null!=u.getText?u.getText():u.responseText)};u.onerror=l;u.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(l){return window.setTimeout(l,20)},f=function(l,u){function y(){this.q=[];this.add=function(x){this.q.push(x)};var m,n;this.call=function(){m=0;for(n=this.q.length;m<n;m++)this.q[m].call()}}function q(m,n){return m.currentStyle?m.currentStyle[n]:window.getComputedStyle?window.getComputedStyle(m,null).getPropertyValue(n):m.style[n]}function B(m,n){if(!m.resizedAttached)m.resizedAttached=new y,m.resizedAttached.add(n);else if(m.resizedAttached){m.resizedAttached.add(n);return}m.resizeSensor=document.createElement("div");m.resizeSensor.className="resize-sensor";m.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";m.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>';-m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],I=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var aa,ia,da,ba;n=function(){if((da=m.offsetWidth)!=aa||(ba=m.offsetHeight)!=ia)L=!0,aa=da,ia=ba;M()};var oa=-function(X,ca,ha){X.attachEvent?X.attachEvent("on"+ca,ha):X.addEventListener(ca,ha)};oa(x,"scroll",n);oa(I,"scroll",n)}var H=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,E=!1;(new ResizeObserver(function(){E||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){E=!0;H();S=null;E=!1},200))})).observe(l)}else{var Q=Object.prototype.toString.call(l),c="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===+m.appendChild(m.resizeSensor);"static"==q(m,"position")&&(m.style.position="relative");var x=m.resizeSensor.childNodes[0],F=x.childNodes[0],I=m.resizeSensor.childNodes[1],M=function(){F.style.width="100000px";F.style.height="100000px";x.scrollLeft=1E5;x.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};M();var L=!1,K=function(){m.resizedAttached&&(L&&(m.resizedAttached.call(),L=!1),b(K))};b(K);var aa,ja,ca,ba;n=function(){if((ca=m.offsetWidth)!=aa||(ba=m.offsetHeight)!=ja)L=!0,aa=ca,ja=ba;M()};var oa=+function(Y,da,ha){Y.attachEvent?Y.attachEvent("on"+da,ha):Y.addEventListener(da,ha)};oa(x,"scroll",n);oa(I,"scroll",n)}var H=function(){GraphViewer.resizeSensorEnabled&&u()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,E=!1;(new ResizeObserver(function(){E||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){E=!0;H();S=null;E=!1},200))})).observe(l)}else{var Q=Object.prototype.toString.call(l),c="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&l instanceof jQuery||"undefined"!==typeof Elements&&l instanceof Elements;if(c){Q=0;for(var g=l.length;Q<g;Q++)B(l[Q],H)}else B(l,H);this.detach=function(){if(c)for(var m=0,n=l.length;m<n;m++)f.detach(l[m]);else f.detach(l)}}};f.detach=function(l){l.resizeSensor&&(l.removeChild(l.resizeSensor),delete l.resizeSensor,delete l.resizedAttached)};window.ResizeSensor=f})();(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txtindex 8fe9874e9..59c162374 100644--- a/src/main/webapp/resources/dia.txt+++ b/src/main/webapp/resources/dia.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Import Gliffy pinned version instead of the latest versionconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.confPublishErr=Another update conflicted with your publish, please try the operation againdiff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txtindex dc8546958..e255929bf 100644--- a/src/main/webapp/resources/dia_am.txt+++ b/src/main/webapp/resources/dia_am.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=ግሊፊይ የተሰናከለውን ስሪት ከአዲሱ ስሪት ይልቅ ያስመጡconfEmbedUpload=ለተሻለ የማረሚያ ተሞክሮ፣ እባክዎ ባዶ ዲያግራም ለማስገባት የ draw.io መደበኛ ማክሮን ይጠቀሙ፣ ከዚያም (የፋይል ሜኑ → ከ... አካል ማስመጣት) ውስጥ ማስገባት የሚፈልጉትን ፋይል ይምረጡ።confPublishErr=ሌላ አዘምን ከማትረፍዎ ጋር ተጣልቷል፣ እባክዎን እንደገና ይሞክሩdiff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txtindex 15ea62552..c0087b9c0 100644--- a/src/main/webapp/resources/dia_ar.txt+++ b/src/main/webapp/resources/dia_ar.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=استيراد إصدار Gliffy المثبت بدلاً من الإصدار الأحدثconfEmbedUpload=لتحسين تجربة التحرير، يُرجى استخدام الماكرو العادي لـ draw.io لإدراج مخطط فارغ، ثم من (قائمة الملف → استيراد من → الجهاز...) حدد الملف الذي تريد تحميله وتضمينه.confPublishErr=تعارض تحديث آخر مع النشر الخاص بك، يرجى محاولة العملية مرة أخرىdiff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txtindex e9a2acafa..b944db181 100644--- a/src/main/webapp/resources/dia_bg.txt+++ b/src/main/webapp/resources/dia_bg.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Импортиране на фиксирана версия на Gliffy вместо най-новата версияconfEmbedUpload=За по-добро изживяване при редактиране, моля използвайте обикновения макрос на draw.io, за да вмъкнете празна диаграма, след това от (Меню Файл → Импортиране от → Устройство...) изберете файла, който искате да качите и вградите.confPublishErr=Друго обновяване влезе в конфликт с вашата публикация, моля, опитайте отновоdiff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txtindex 1e138ad4d..28a43d370 100644--- a/src/main/webapp/resources/dia_bn.txt+++ b/src/main/webapp/resources/dia_bn.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy-এর সর্বশেষ সংস্করণের পরিবর্তে পিন করা সংস্করণ আমদানি করুনconfEmbedUpload=উন্নত সম্পাদনার অভিজ্ঞতার জন্য, অনুগ্রহ করে একটি ফাঁকা ডায়াগ্রাম সন্নিবেশ করতে draw.io এর নিয়মিত ম্যাক্রো ব্যবহার করুন, তারপর (ফাইল মেনু → আমদানি করুন → ডিভাইস...) থেকে আপনি যে ফাইলটি আপলোড এবং এম্বেড করতে চান তা নির্বাচন করুন।confPublishErr=আপনার প্রকাশের সাথে অন্য একটি আপডেট সংঘর্ষ করেছে, অনুগ্রহ করে আবার চেষ্টা করুনdiff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txtindex 34803bdf4..6c6ae8e96 100644--- a/src/main/webapp/resources/dia_bs.txt+++ b/src/main/webapp/resources/dia_bs.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Uvoz fiksirane verzije Gliffy umjesto najnovije verzijeconfEmbedUpload=Za bolje iskustvo uređivanja, molimo koristite redovni draw.io makro za umetanje praznog dijagrama, zatim iz (Izbornik datoteka → Uvoz iz → Uređaj...) odaberite datoteku koju želite prenijeti i ugraditi.confPublishErr=Drugo ažuriranje je u sukobu s vašom objavom, pokušajte ponovodiff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txtindex 72ad703cc..8e1a9175e 100644--- a/src/main/webapp/resources/dia_cs.txt+++ b/src/main/webapp/resources/dia_cs.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importovat připnutou verzi Gliffy místo nejnovější verzeconfEmbedUpload=Pro lepší zážitek z úprav použijte běžné makro draw.io pro vložení prázdného diagramu, poté z (Nabídka Soubor → Importovat z → Zařízení...) vyberte soubor, který chcete nahrát a vložit.confPublishErr=Další aktualizace byla v konfliktu s vaším publikováním, zkuste operaci znovudiff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txtindex 96f89355b..47521b097 100644--- a/src/main/webapp/resources/dia_da.txt+++ b/src/main/webapp/resources/dia_da.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importer den fastlåste version af Gliffy i stedet for den nyeste versionconfEmbedUpload=For en bedre redigeringsoplevelse, brug venligst den almindelige draw.io-makro til at indsætte et tomt diagram, og vælg derefter fra (Filer-menuen → Importer fra → Enhed...) den fil, du vil uploade og integrere.confPublishErr=En anden opdatering var i konflikt med din udgivelse, prøv venligst operationen igendiff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txtindex 347c50c01..a74f64bdc 100644--- a/src/main/webapp/resources/dia_de.txt+++ b/src/main/webapp/resources/dia_de.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagramme in Seitenvorlagen können nicht bearbeitet werden.confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importieren Sie die angeheftete Version von Gliffy anstelle der neuesten VersionconfEmbedUpload=Für ein besseres Bearbeitungserlebnis verwenden Sie bitte das reguläre draw.io-Makro, um ein leeres Diagramm einzufügen, und wählen Sie dann im (Dateimenü → Importieren von → Gerät...) die Datei aus, die Sie hochladen und einbetten möchten.confPublishErr=Ein weiteres Update stand im Konflikt mit Ihrer Veröffentlichung, bitte versuchen Sie den Vorgang erneutdiff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txtindex fe0ad5eba..be8345ea9 100644--- a/src/main/webapp/resources/dia_el.txt+++ b/src/main/webapp/resources/dia_el.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Εισαγωγή καρφιτσωμένης έκδοσης του Gliffy αντί της πιο πρόσφατης έκδοσηςconfEmbedUpload=Για καλύτερη εμπειρία επεξεργασίας, παρακαλώ χρησιμοποιήστε το κανονικό macro του draw.io για να εισάγετε ένα κενό διάγραμμα, στη συνέχεια από το (Μενού Αρχείου → Εισαγωγή από → Συσκευή...) επιλέξτε το αρχείο που θέλετε να ανεβάσετε και να ενσωματώσετε.confPublishErr=Μια άλλη ενημέρωση συγκρούστηκε με τη δημοσίευσή σας, παρακαλώ προσπαθήστε ξανάdiff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txtindex 9fcdffbce..21161c4cf 100644--- a/src/main/webapp/resources/dia_eo.txt+++ b/src/main/webapp/resources/dia_eo.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importu la versionon de Gliffy fiksitan anstataŭ la plej lastan versionconfEmbedUpload=Por una mejor experiencia de edición, utilice el macro regular de draw.io para insertar un diagrama en blanco, luego desde (Menú Archivo → Importar desde → Dispositivo...) seleccione el archivo que desea cargar e incrustar.confPublishErr=Alia ĝisdatigo konfliktis kun via publikigo, bonvolu provi la operacion denovediff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txtindex b58598c63..90b3970c3 100644--- a/src/main/webapp/resources/dia_es.txt+++ b/src/main/webapp/resources/dia_es.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importar la versión fijada de Gliffy en lugar de la última versiónconfEmbedUpload=Parima redigeerimiskogemuse saamiseks kasutage palun tavalist draw.io makrot tühja diagrammi sisestamiseks, seejärel valige (Failimenüü → Impordi → Seade...) fail, mida soovite üles laadida ja manustada.confPublishErr=Otra actualización entró en conflicto con su publicación, por favor intente la operación nuevamentediff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txtindex 5ecaa440c..6e549ee41 100644--- a/src/main/webapp/resources/dia_et.txt+++ b/src/main/webapp/resources/dia_et.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Impordi Gliffy kinnitatud versioon uusima versiooni asemelconfEmbedUpload=For a better editing experience, please use the regular draw.io macro to insert a blank diagram, then from (File menu → Import From → Device...) select the file you want to upload and embed.confPublishErr=Teine värskendus oli teie avaldamisega vastuolus, proovige toimingut uuestidiff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txtindex 93d401a48..42d6f7409 100644--- a/src/main/webapp/resources/dia_fa.txt+++ b/src/main/webapp/resources/dia_fa.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=وارد کردن نسخه پینشده Gliffy به جای جدیدترین نسخهconfEmbedUpload=برای تجربه ویرایش بهتر، لطفاً از ماکرو معمولی draw.io برای وارد کردن نمودار خالی استفاده کنید، سپس از (منوی فایل → وارد کردن از → دستگاه...) فایلی را که میخواهید بارگذاری و جاسازی کنید انتخاب کنید.confPublishErr=Another update conflicted with your publish, please try the operation againdiff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txtindex 5856153ee..fe9bdeec0 100644--- a/src/main/webapp/resources/dia_fi.txt+++ b/src/main/webapp/resources/dia_fi.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Tuo Gliffyn kiinnitetty versio uusimman version sijaanconfEmbedUpload=Parhaan muokkauskokemuksen saamiseksi käytä tavallista draw.io-makroa tyhjän kaavion lisäämiseen ja valitse sitten (Tiedosto-valikko → Tuo → Laite...) tiedosto, jonka haluat ladata ja upottaa.confPublishErr=Toinen päivitys oli ristiriidassa julkaisusi kanssa, yritä uudelleendiff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txtindex 1f79c4c6b..051b4acc3 100644--- a/src/main/webapp/resources/dia_fil.txt+++ b/src/main/webapp/resources/dia_fil.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=I-import ang naka-pin na bersyon ng Gliffy sa halip na ang pinakabagong bersyonconfEmbedUpload=Para sa mas mahusay na karanasan sa pag-edit, mangyaring gamitin ang regular na draw.io macro upang magpasok ng blangkong diagram, pagkatapos mula sa (File menu → Import From → Device...) piliin ang file na nais mong i-upload at i-embed.confPublishErr=May ibang update na nagka-conflict sa iyong publish, pakisubukang muli l'operazionediff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txtindex 93834db72..2f89500ef 100644--- a/src/main/webapp/resources/dia_fr.txt+++ b/src/main/webapp/resources/dia_fr.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Les diagrammes ne peuvent pas être modifiés dans un modèlconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importer la version épinglée de Gliffy au lieu de la dernière versionconfEmbedUpload=Pour une meilleure expérience d'édition, veuillez utiliser la macro régulière de draw.io pour insérer un diagramme vierge, puis depuis (Menu Fichier → Importer depuis → Appareil...) sélectionnez le fichier que vous souhaitez télécharger et intégrer.confPublishErr=Une autre mise à jour a été en conflit avec votre publication, veuillez réessayer l'opérationdiff --git a/src/main/webapp/resources/dia_gl.txt b/src/main/webapp/resources/dia_gl.txtindex 514e3d180..877c19644 100644--- a/src/main/webapp/resources/dia_gl.txt+++ b/src/main/webapp/resources/dia_gl.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importar a versión fixada de Gliffy no canto da versión máis recenteconfEmbedUpload=Para unha mellor experiencia de edición, utilice a macro regular de draw.io para inserir un diagrama en branco, logo desde (Menú Ficheiro → Importar desde → Dispositivo...) seleccione o ficheiro que desexa cargar e incrustar.confPublishErr=Outra actualización entrou en conflito coa súa publicación, intente de novo a operacióndiff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txtindex 0063191d9..3c32c0d8d 100644--- a/src/main/webapp/resources/dia_gu.txt+++ b/src/main/webapp/resources/dia_gu.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=ગ્લિફીનું પિન કરેલું સંસ્કરણ નવું સંસ્કરણ બદલે આયાત કરોconfEmbedUpload=સારા સંપાદન અનુભવ માટે, કૃપા કરીને ખાલી આલેખ દાખલ કરવા માટે draw.io નું નિયમિત મેક્રો ઉપયોગ કરો, પછી (ફાઇલ મેનુ → આયાત કરો → ઉપકરણ...) માંથી તમે જે ફાઇલ અપલોડ અને એમ્બેડ કરવા માંગો છો તે પસંદ કરો.confPublishErr=તમારા પ્રકાશન સાથે બીજું અપડેટ સંઘર્ષ થયું, કૃપા કરીને ફરીથી પ્રયાસ કરોdiff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txtindex b562bbdb3..b3f2ca124 100644--- a/src/main/webapp/resources/dia_he.txt+++ b/src/main/webapp/resources/dia_he.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy המהדורה המקובעת במקום הגרסה האחרונה ייבואconfEmbedUpload=לניסיון עריכה טוב יותר, השתמש במאקרו הרגיל של draw.io כדי להכניס דיאגרמה ריקה, ואז מתוך (תפריט קובץ → ייבוא מ → מכשיר...) בחר את הקובץ שברצונך להעלות ולהטמיע.confPublishErr=עדכון נוסף התנגש עם הפרסום שלך, אנא נסה שובdiff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txtindex ebed3e402..44d00bd86 100644--- a/src/main/webapp/resources/dia_hi.txt+++ b/src/main/webapp/resources/dia_hi.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy का पिन किया हुआ संस्करण नवीनतम संस्करण के बजाय आयात करेंconfEmbedUpload=बेहतर संपादन अनुभव के लिए, कृपया एक खाली आरेख सम्मिलित करने के लिए draw.io का नियमित मैक्रो उपयोग करें, फिर (फ़ाइल मेनू → से आयात करें → डिवाइस...) से वह फ़ाइल चुनें जिसे आप अपलोड और एम्बेड करना चाहते हैं।confPublishErr=आपके प्रकाशन के साथ एक और अपडेट टकरा गया, कृपया पुनः प्रयास करेंdiff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txtindex 7c585305c..da269ada5 100644--- a/src/main/webapp/resources/dia_hr.txt+++ b/src/main/webapp/resources/dia_hr.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Uvozite prikvačenu verziju Gliffy umjesto najnovije verzijeconfEmbedUpload=Za bolje iskustvo uređivanja, koristite redovni draw.io makro za umetanje praznog dijagrama, zatim iz (Izbornik datoteka → Uvoz iz → Uređaj...) odaberite datoteku koju želite prenijeti i ugraditi.confPublishErr=Drugo ažuriranje je u sukobu s vašom objavom, pokušajte ponovodiff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txtindex 22edfd5c2..3f8d48515 100644--- a/src/main/webapp/resources/dia_hu.txt+++ b/src/main/webapp/resources/dia_hu.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importálja a Gliffy rögzített verzióját a legújabb verzió helyettconfEmbedUpload=A jobb szerkesztési élmény érdekében használja a draw.io szokásos makrót egy üres diagram beszúrásához, majd a (Fájl menü → Importálás → Eszköz...) menüpontból válassza ki a feltölteni és beágyazni kívánt fájlt.confPublishErr=Egy másik frissítés ütközött a közzétételével, kérjük, próbálja meg újradiff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txtindex 171453dfd..f46005394 100644--- a/src/main/webapp/resources/dia_it.txt+++ b/src/main/webapp/resources/dia_it.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importa la versione bloccata di Gliffy invece della versione più recenteconfEmbedUpload=Per una migliore esperienza di modifica, utilizza la macro regolare di draw.io per inserire un diagramma vuoto, quindi dal (Menu File → Importa Da → Dispositivo...) seleziona il file che desideri caricare e incorporare.confPublishErr=Un altro aggiornamento è entrato in conflitto con la tua pubblicazione, riprova l'operazionediff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txtindex aa82a2063..7e0a3fd1c 100644--- a/src/main/webapp/resources/dia_ja.txt+++ b/src/main/webapp/resources/dia_ja.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffyの固定バージョンを最新バージョンの代わりにインポートするconfEmbedUpload=編集体験を向上させるために、通常の draw.io マクロを使用して空の図を挿入し、次に (ファイルメニュー → デバイスからインポート...) からアップロードして埋め込みたいファイルを選択してください。confPublishErr=別の更新が公開と競合しました。もう一度操作を試してくださいdiff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txtindex 30e809717..994546714 100644--- a/src/main/webapp/resources/dia_kn.txt+++ b/src/main/webapp/resources/dia_kn.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=ಗ್ಲಿಫಿಯ ಪಿನ್ ಮಾಡಲಾದ ಆವೃತ್ತಿಯನ್ನು ಇತ್ತೀಚಿನ ಆವೃತ್ತಿಯ ಬದಲು ಆಮದು ಮಾಡಿconfEmbedUpload=ಉತ್ತಮ ಸಂಪಾದನಾ ಅನುಭವಕ್ಕಾಗಿ, ದಯವಿಟ್ಟು ಖಾಲಿ ಡಯಾಗ್ರಾಮ್ ಅನ್ನು ಸೇರಿಸಲು ಸಾಮಾನ್ಯ draw.io ಮ್ಯಾಕ್ರೋವನ್ನು ಬಳಸಿ, ನಂತರ (ಫೈಲ್ ಮೆನು → ಇಂಪೋರ್ಟ್ ಫ್ರಮ್ → ಡಿವೈಸ್...) ನಿಂದ ನೀವು ಅಪ್ಲೋಡ್ ಮತ್ತು ಎಂಬೆಡ್ ಮಾಡಲು ಬಯಸುವ ಫೈಲ್ ಅನ್ನು ಆಯ್ಕೆಮಾಡಿ.confPublishErr=ನಿಮ್ಮ ಪ್ರಕಟಣೆಯೊಂದಿಗೆ ಇನ್ನೊಂದು ನವೀಕರಣದ ಸಂಘರ್ಷವಾಗಿದೆ, ದಯವಿಟ್ಟು ಕಾರ್ಯಾಚರಣೆಯನ್ನು ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿdiff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txtindex 621628012..068229789 100644--- a/src/main/webapp/resources/dia_ko.txt+++ b/src/main/webapp/resources/dia_ko.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=최신 버전 대신 Gliffy 고정 버전을 가져오기confEmbedUpload=더 나은 편집 경험을 위해 일반 draw.io 매크로를 사용하여 빈 다이어그램을 삽입한 다음 (파일 메뉴 → 가져오기 → 장치...)에서 업로드하고 삽입할 파일을 선택하세요.confPublishErr=다른 업데이트가 게시와 충돌했습니다. 작업을 다시 시도하십시오diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txtindex 2ec685eb8..acf2f9e21 100644--- a/src/main/webapp/resources/dia_lt.txt+++ b/src/main/webapp/resources/dia_lt.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importuokite prisegtą „Gliffy“ versiją vietoj naujausios versijosconfEmbedUpload=Geriau redagavimo patirčiai naudokite įprastą draw.io makrokomandą tuščiam diagramai įterpti, tada iš (Failo meniu → Importuoti iš → Įrenginio...) pasirinkite failą, kurį norite įkelti ir įterpti.confPublishErr=Kitas atnaujinimas konfliktavo su jūsų paskelbimu, bandykite dar kartądiff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txtindex 440cd318a..3b3dd0788 100644--- a/src/main/webapp/resources/dia_lv.txt+++ b/src/main/webapp/resources/dia_lv.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importējiet piesprausto Gliffy versiju, nevis jaunāko versijuconfEmbedUpload=Lai iegūtu labāku rediģēšanas pieredzi, lūdzu, izmantojiet parasto draw.io makro, lai ievietotu tukšu diagrammu, pēc tam no (Failu izvēlne → Importēt no → Ierīces...) atlasiet failu, kuru vēlaties augšupielādēt un iegult.confPublishErr=Cits atjauninājums konfliktēja ar jūsu publicēšanu, lūdzu, mēģiniet vēlreizdiff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txtindex 6f8f9340e..41a91ebb1 100644--- a/src/main/webapp/resources/dia_ml.txt+++ b/src/main/webapp/resources/dia_ml.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy-യുടെ പിന് ചെയ്ത പതിപ്പ് ഏറ്റവും പുതിയ പതിപ്പിന് പകരം ഇറക്കുമതി ചെയ്യുകconfEmbedUpload=മെച്ചപ്പെട്ട എഡിറ്റിംഗ് അനുഭവത്തിനായി, ദയവായി ഒരു ശൂന്യമായ ഡയഗ്രാം ചേർക്കാൻ സാധാരണ draw.io മാക്രോ ഉപയോഗിക്കുക, തുടർന്ന് (ഫയൽ മെനു → ഉപകരണത്തിൽ നിന്ന് ഇറക്കുമതി ചെയ്യുക...) എന്നതിൽ നിന്ന് നിങ്ങൾ അപ്ലോഡ് ചെയ്യാനും എംബഡ് ചെയ്യാനും ആഗ്രഹിക്കുന്ന ഫയൽ തിരഞ്ഞെടുക്കുക.confPublishErr=നിങ്ങളുടെ പ്രസിദ്ധീകരണവുമായി മറ്റൊരു അപ്ഡേറ്റ് തർക്കിച്ചു, ദയവായി പ്രവർത്തനം വീണ്ടും ശ്രമിക്കുകdiff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txtindex 8ffb72c10..244b6b26c 100644--- a/src/main/webapp/resources/dia_mr.txt+++ b/src/main/webapp/resources/dia_mr.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy चे पिन केलेले आवृत्ती नवीनतम आवृत्तीऐवजी आयात कराconfEmbedUpload=चांगल्या संपादन अनुभवासाठी, कृपया रिकामे आकृती घालण्यासाठी draw.io चे नियमित मॅक्रो वापरा, नंतर (फाइल मेनू → आयात करा → डिव्हाइस...) मधून तुम्हाला अपलोड आणि एम्बेड करायचा फाइल निवडा.confPublishErr=आपल्या प्रकाशनासह आणखी एक अद्यतन संघर्ष झाला, कृपया ऑपरेशन पुन्हा प्रयत्न कराdiff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txtindex 0ae6a83dc..400b89db3 100644--- a/src/main/webapp/resources/dia_ms.txt+++ b/src/main/webapp/resources/dia_ms.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Impor versi Gliffy yang dipin daripada versi terbaruconfEmbedUpload=Untuk pengalaman penyuntingan yang lebih baik, sila gunakan makroconfPublishErr=Terjadi konflik dengan pembaruan lain saat Anda mempublikasikan, silakan coba lagidiff --git a/src/main/webapp/resources/dia_my.txt b/src/main/webapp/resources/dia_my.txtindex ff801c6e1..edf5b76ae 100644--- a/src/main/webapp/resources/dia_my.txt+++ b/src/main/webapp/resources/dia_my.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy ၏ pin လုပ်ထားသောဗားရှင်းကိုနောက်ဆုံးဗားရှင်းအစားတင်သွင်းပါconfEmbedUpload=ဖန်တီးခြင်းအတွေ့အကြုံပိုမိုကောင်းစေရန်အတွက်၊ စာရွက်ပုံသဏ္ဍာန်ဗလာတစ်ခုထည့်ရန် draw.io ၏ ပုံမှန်မက်ခရိုကို အသုံးပြုပါ၊ ထို့နောက် (ဖိုင်မီနူး → ထည့်သွင်းရန် → ကိရိယာ...) မှတင်လိုသောဖိုင်ကို ရွေးချယ်ပြီး ပေါင်းထည့်ပါ။confPublishErr=သင့်ပေးပို့မှုနှင့်အခြားအပ်ဒိတ်တစ်ခုဆန့်ကျင်နေသည်၊ ကျေးဇူးပြုပြီး ပြန်လည်ကြိုးစားပါdiff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txtindex 0d74f5ecd..dd944a347 100644--- a/src/main/webapp/resources/dia_no.txt+++ b/src/main/webapp/resources/dia_no.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importer den fastlåste versjonen av Gliffy i stedet for den nyeste versjonenconfEmbedUpload=Bruk den vanlige draw.io-makroen for å sette inn et tomt diagram for en bedre redigeringsopplevelse, og velg deretter filen du vil laste opp og bygge inn fra (Fil-meny → Importer fra → Enhet...).confPublishErr=En annen oppdatering var i konflikt med publiseringen din, vennligst prøv operasjonen på nyttdiff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txtindex 6c8c926cd..291efe7ab 100644--- a/src/main/webapp/resources/dia_pl.txt+++ b/src/main/webapp/resources/dia_pl.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importuj przypiętą wersję Gliffy zamiast najnowszej wersjiconfEmbedUpload=Aby uzyskać lepsze doświadczenia z edycji, użyj zwykłego makra draw.io, aby wstawić pusty diagram, a następnie w menu Plik → Importuj z → Urządzenie... wybierz plik, który chcesz przesłać i osadzić.confPublishErr=Inna aktualizacja była w konflikcie z twoją publikacją, spróbuj ponowniediff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txtindex 1193d9d19..0a26ee43f 100644--- a/src/main/webapp/resources/dia_pt-br.txt+++ b/src/main/webapp/resources/dia_pt-br.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importar a versão fixada do Gliffy em vez da versão mais recenteconfEmbedUpload=Para uma melhor experiência de edição, use o macro regular do draw.io para inserir um diagrama em branco e, em seguida, em (Menu Arquivo → Importar De → Dispositivo...) selecione o arquivo que você deseja enviar e incorporar.confPublishErr=Outra atualização entrou em conflito com sua publicação, tente a operação novamentediff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txtindex 5caf20dad..7f3dde237 100644--- a/src/main/webapp/resources/dia_pt.txt+++ b/src/main/webapp/resources/dia_pt.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importar a versão fixada do Gliffy em vez da versão mais recenteconfEmbedUpload=Para uma melhor experiência de edição, use o macro regular do draw.io para inserir um diagrama em branco e, em seguida, a partir de (Menu Ficheiro → Importar De → Dispositivo...) selecione o ficheiro que pretende carregar e incorporar.confPublishErr=Outra atualização entrou em conflito com sua publicação, tente a operação novamentediff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txtindex 65795d17c..b893ac1d0 100644--- a/src/main/webapp/resources/dia_ro.txt+++ b/src/main/webapp/resources/dia_ro.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importați versiunea fixată a Gliffy în locul celei mai recente versiuniconfEmbedUpload=Pentru o experiență mai bună de editare, utilizați macro-ul regulat draw.io pentru a insera o diagramă goală, apoi din (Meniul Fișier → Importă Din → Dispozitiv...) selectați fișierul pe care doriți să-l încărcați și să-l încorporați.confPublishErr=O altă actualizare a intrat în conflict cu publicarea dvs., încercați din noudiff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txtindex 1489619d1..783677ca6 100644--- a/src/main/webapp/resources/dia_ru.txt+++ b/src/main/webapp/resources/dia_ru.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Диаграммы в шаблонах страниц редconfDirectEditDraftLost=На этой странице Confluence есть неопубликованные изменения. Редактирование диаграммы из режима просмотра страницы может привести к потере данных. Сначала отредактируйте страницу Confluence, а затем отредактируйте саму диаграмму.confConfigSpacePerm=Примечание: Если вы недавно перешли с приложения DC, проверьте разрешения пространства конфигурации draw.io, чтобы все пользователи могли читать, и только администраторы могли писать. Кроме того, снимите ограничения на страницы «Конфигурация» и «Библиотеки». Для доступа к ним вам могут потребоваться ключи администратора. Также проверьте, доступен ли для загрузки файл «configuration.json» на странице «Конфигурация».tryCurPageOnErr=Попробуйте найти вложение диаграммы на странице макроса, если связанная страница не работает-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Импортировать закрепленную версию Gliffy вместо последней версииconfEmbedUpload=Для лучшего опыта редактирования используйте стандартную макрокоманду draw.io для вставки пустой диаграммы, затем в (меню Файл → Импорт из → Устройство...) выберите файл, который вы хотите загрузить и внедрить.confPublishErr=Другое обновление конфликтовало с вашей публикацией, пожалуйста, попробуйте сноваdiff --git a/src/main/webapp/resources/dia_si.txt b/src/main/webapp/resources/dia_si.txtindex dae17d018..e493d7577 100644--- a/src/main/webapp/resources/dia_si.txt+++ b/src/main/webapp/resources/dia_si.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy හි අලුත්ම අනුවාදය වෙනුවට ස්ථිර කළ අනුවාදය ආයාත කරන්නconfEmbedUpload=වැඩි හොඳ සකස් කිරීමේ අත්දැකීමක් සඳහා, කරුණාකර හිස් රේඛා ආකෘතියක් ඇතුළත් කිරීමට සාමාන්ය draw.io මැක්රෝව භාවිතා කරන්න, පසුව (ගොනු මෙනුව → ආනයනය කිරීම → උපාංගය...) වෙතින් ඔබ උඩුගත කර සහ ආශ්රිත කිරීම කැමති ගොනුව තෝරන්න.confPublishErr=ඔබේ ප්රකාශනය සමඟ වෙනත් යාවත්කාලීන කිරීමක් ගැටුම් විය, කරුණාකර මෙහෙයුම නැවත උත්සාහ කරන්නdiff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txtindex 727620d9a..943cee1b1 100644--- a/src/main/webapp/resources/dia_sk.txt+++ b/src/main/webapp/resources/dia_sk.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importovať pripnutú verziu Gliffy namiesto najnovšej verzieconfEmbedUpload=Pre lepšiu skúsenosť s úpravou použite bežné makro draw.io na vloženie prázdneho diagramu, potom z (ponuky Súbor → Importovať z → Zariadenie...) vyberte súbor, ktorý chcete nahrať a vložiť.confPublishErr=Ďalšia aktualizácia bola v konflikte s vaším publikovaním, skúste operáciu znovadiff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txtindex 1859cc164..5675a43f3 100644--- a/src/main/webapp/resources/dia_sl.txt+++ b/src/main/webapp/resources/dia_sl.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Uvozite pripeto različico Gliffy namesto najnovejše različiceconfEmbedUpload=Za boljšo izkušnjo urejanja uporabite običajni makro draw.io za vstavljanje praznega diagrama, nato iz (Meni Datoteka → Uvozi Iz → Naprava...) izberite datoteko, ki jo želite naložiti in vdelati.confPublishErr=Druga posodobitev je bila v sporu z vašo objavo, poskusite znovadiff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txtindex 6590aeab3..b60d1e1f0 100644--- a/src/main/webapp/resources/dia_sr.txt+++ b/src/main/webapp/resources/dia_sr.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Uvezite zakačanu verziju Gliffy umesto najnovije verzijeconfEmbedUpload=Za bolje uređivanje, koristite uobičajeni draw.io makro za umetanje praznog dijagrama, a zatim iz (Meni Fajl → Uvezi iz → Uređaj...) izaberite datoteku koju želite da otpremite i ugradite.confPublishErr=Drugo ažuriranje je u sukobu sa vašim objavljivanjem, pokušajte ponovodiff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txtindex 702397d24..efdf9be7b 100644--- a/src/main/webapp/resources/dia_sv.txt+++ b/src/main/webapp/resources/dia_sv.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Importera den fastnålade versionen av Gliffy istället för den senaste versionenconfEmbedUpload=För en bättre redigeringsupplevelse, använd draw.io:s vanliga makro för att infoga ett tomt diagram och välj sedan från (Arkivmeny → Importera från → Enhet...) den fil du vill ladda upp och bädda in.confPublishErr=En annan uppdatering stred med din publicering, försök igendiff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txtindex 0a14b9b58..07e772aba 100644--- a/src/main/webapp/resources/dia_sw.txt+++ b/src/main/webapp/resources/dia_sw.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Ingiza toleo la Gliffy lililowekwa badala ya toleo jipya zaidiconfEmbedUpload=Kwa hali bora ya uhariri, tafadhali tumia makro la kawaida la draw.io kuingiza mchoro tupu, kisha kutoka (Menyu ya Faili → Ingiza kutoka → Kifaa...) chagua faili unayotaka kupakia na kupachika.confPublishErr=Pembaharuan lain bertentangan dengan penerbitan anda, sila cuba operasi semuladiff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txtindex 122cc7b40..1aba0f79d 100644--- a/src/main/webapp/resources/dia_ta.txt+++ b/src/main/webapp/resources/dia_ta.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=பக்க வார்ப்புருக்களிconfDirectEditDraftLost=இந்த சங்கம பக்கத்தில் வெளியிடப்படாத மாற்றங்கள் உள்ளன. பக்க பார்வையில் இருந்து வரைபடத்தைத் திருத்துவது தரவு இழப்பை ஏற்படுத்தக்கூடும். முதலில் சங்கம பக்கத்தைத் திருத்தி பின்னர் வரைபடத்தைத் திருத்தவும்.confConfigSpacePerm=குறிப்பு: நீங்கள் அண்மைக் காலத்தில் டிசி பயன்பாட்டிலிருந்து குடியேறியிருந்தால், தயவுசெய்து வரை.உவெ உள்ளமைவு விண்வெளி அனுமதிகளைச் சரிபார்க்கவும், எல்லா பயனர்களும் படிக்க முடியும் மற்றும் நிர்வாகிகள் மட்டுமே எழுத முடியும். கூடுதலாக, "உள்ளமைவு" மற்றும் "நூலகங்கள்" பக்கங்களில் பக்க கட்டுப்பாடுகளை அகற்று. அவற்றை அணுக உங்களுக்கு நிர்வாக விசைகள் தேவைப்படலாம். மேலும், "உள்ளமைவு" பக்கத்தில் "உள்ளமைவு.json" கோப்பை பதிவிறக்க முடியும் என்பதை சரிபார்க்கவும்.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Gliffy இன் பின் செய்யப்பட்ட பதிப்பை சமீபத்திய பதிப்புக்கு பதிலாக இறக்குமதி செய்கconfEmbedUpload=மேம்பட்ட தொகுப்பான அனுபவத்திற்காக, தயவுசெய்து ஒரு வெற்று படங்களை சேர்க்க draw.io இன் வழமையான மேக்ரோவைப் பயன்படுத்தவும், பின்னர் (கோப்பு மெனு → இறக்குமதி → சாதனம்...) என்பதிலிருந்து நீங்கள் பதிவேற்ற விரும்பும் கோப்பை தேர்ந்தெடுக்கவும் மற்றும் உட்செருகவும்.confPublishErr=உங்கள் வெளியீட்டுடன் மற்றொரு புதுப்பிப்பு முரண்பட்டது, தயவுசெய்து செயல்பாட்டை மீண்டும் முயற்சிக்கவும்diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txtindex 12dac2a66..f10ce6bcd 100644--- a/src/main/webapp/resources/dia_te.txt+++ b/src/main/webapp/resources/dia_te.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=గ్లిఫీ యొక్క పిన్ చేసిన వెర్షన్ను తాజా వెర్షన్కు బదులుగా దిగుమతి చేయండిconfEmbedUpload=మెరుగైన ఎడిటింగ్ అనుభవం కోసం, దయచేసి ఖాళీ డయాగ్రామ్ని చేర్చడానికి draw.io యొక్క రెగ్యులర్ మ్యాక్రోని ఉపయోగించండి, ఆపై (ఫైల్ మెనూ → దిగుమతి → పరికరం...) నుండి మీరు అప్లోడ్ చేయాలనుకుంటున్న ఫైల్ని ఎంచుకొని ఎంబెడ్ చేయండి.confPublishErr=మీ ప్రచురణతో మరొక నవీకరణ విభేదించింది, దయచేసి ఆపరేషన్ను మళ్లీ ప్రయత్నించండిdiff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txtindex 7ccc5127e..cad7f32ab 100644--- a/src/main/webapp/resources/dia_th.txt+++ b/src/main/webapp/resources/dia_th.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=นำเข้าเวอร์ชันที่ปักหมุดของ Gliffy แทนเวอร์ชันล่าสุดconfEmbedUpload=สำหรับประสบการณ์การแก้ไขที่ดีขึ้น โปรดใช้แมโคร draw.io ปกติในการแทรกไดอะแกรมเปล่า จากนั้นจาก (เมนูไฟล์ → นำเข้าจาก → อุปกรณ์...) เลือกไฟล์ที่คุณต้องการอัปโหลดและฝังconfPublishErr=การอัปเดตอื่นขัดแย้งกับการเผยแพร่ของคุณ โปรดลองดำเนินการอีกครั้งdiff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txtindex bdb7d213b..5e9fe604b 100644--- a/src/main/webapp/resources/dia_tr.txt+++ b/src/main/webapp/resources/dia_tr.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=En son sürüm yerine Gliffy sabitlenmiş sürümünü içe aktarınconfEmbedUpload=Daha iyi bir düzenleme deneyimi için, lütfen boş bir diyagram eklemek için normal draw.io makrosunu kullanın ve ardından (Dosya menüsü → Şuradan içe aktar → Cihaz...) üzerinden yüklemek ve yerleştirmek istediğiniz dosyayı seçin.confPublishErr=Başka bir güncelleme yayınızla çakıştı, lütfen işlemi tekrar deneyindiff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txtindex 478db0c8d..582b062bd 100644--- a/src/main/webapp/resources/dia_uk.txt+++ b/src/main/webapp/resources/dia_uk.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Імпортувати закріплену версію Gliffy замість останньої версіїconfEmbedUpload=Щоб отримати кращий досвід редагування, скористайтеся стандартною макрокомандою draw.io для вставки порожньої діаграми, а потім у (меню Файл → Імпорт з → Пристрій...) виберіть файл, який потрібно завантажити та вставити.confPublishErr=Інше оновлення конфліктувало з вашою публікацією, будь ласка, спробуйте ще разdiff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txtindex b09ecedfa..3865694f2 100644--- a/src/main/webapp/resources/dia_vi.txt+++ b/src/main/webapp/resources/dia_vi.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=Nhập phiên bản đã ghim của Gliffy thay vì phiên bản mới nhấtconfEmbedUpload=Để có trải nghiệm chỉnh sửa tốt hơn, vui lòng sử dụng macro draw.io thông thường để chèn sơ đồ trống, sau đó từ (Menu Tệp → Nhập Từ → Thiết bị...) chọn tệp bạn muốn tải lên và nhúng.confPublishErr=Một bản cập nhật khác đã xung đột với việc xuất bản của bạn, vui lòng thử lại thao tácdiff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txtindex 780603692..f2f25a60d 100644--- a/src/main/webapp/resources/dia_zh-tw.txt+++ b/src/main/webapp/resources/dia_zh-tw.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=導入 Gliffy 固定版本而不是最新版本confEmbedUpload=若要獲得更佳的編輯體驗,請使用一般 draw.io 巨集插入空白圖表,然後從(檔案選單 → 匯入來源 → 裝置...)中選擇您要上傳和嵌入的檔案。confPublishErr=另一個更新與您的發佈衝突,請再次嘗試該操作diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txtindex 0c30894a1..3b1c3007f 100644--- a/src/main/webapp/resources/dia_zh.txt+++ b/src/main/webapp/resources/dia_zh.txt@@ -1313,7 +1313,7 @@ diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only bconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.confConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.tryCurPageOnErr=Try finding the diagram attachment on the macro page when the linked page fails-confAExtSrvcNoSupported=Embedded diagrams from extrenal services or urls are not supported.+confAExtSrvcNoSupported=Embedded diagrams from external services or urls are not supported.gliffyVersionPinning=导入 Gliffy 固定版本而不是最新版本confEmbedUpload=要获得更好的编辑体验,请使用常规 draw.io 宏插入空白图表,然后从(文件菜单 → 从设备导入...)中选择要上传和嵌入的文件。confPublishErr=另一个更新与您的发布冲突,请重试该操作diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.jsindex 8f2f78999..04480fa4b 100644--- a/src/main/webapp/service-worker.js+++ b/src/main/webapp/service-worker.js@@ -1,2 +1,2 @@-if(!self.define){let e,r={};const i=(i,c)=>(i=new URL(i+".js",c).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(c,a)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(r[s])return;let d={};const o=e=>i(e,s),f={module:{uri:s},exports:d,require:o};r[s]=Promise.all(c.map((e=>f[e]||o(e)))).then((e=>(a(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"1a78eb9fd9223f088ecb257f752f8574"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"282777c4fe68ba971ce14c503466a45a"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"d381db23d3c925eb81854c07b46776a5"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"78b87563d88943ab816a3463927b9b50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"174e06ff4578aa4e2cadf5434494d8dd"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"fad8b817bb8630008946ac0442c26c41"},{url:"resources/dia_am.txt",revision:"b8b416774ef2b8d1780f6d60af7e3d46"},{url:"resources/dia_ar.txt",revision:"aaa8bae413ebee5f49c515b28b6d88ee"},{url:"resources/dia_bg.txt",revision:"a9ea36bb307b977a0a53f1f4c50f6f80"},{url:"resources/dia_bn.txt",revision:"0ad054c1e7e0330a7779d9209770f47a"},{url:"resources/dia_bs.txt",revision:"c9026617d31c611800dc5ff7ee08ad23"},{url:"resources/dia_ca.txt",revision:"1a90a2b54a6f73d62e82772e1acbe8d0"},{url:"resources/dia_cs.txt",revision:"e471bf5441804687526b0d55c6cca53e"},{url:"resources/dia_da.txt",revision:"a6244c3b58703cd2a29fd15b2bd13056"},{url:"resources/dia_de.txt",revision:"eff66c7f27c5a473b9ee8445bfa21364"},{url:"resources/dia_el.txt",revision:"d28664e307db85713c37f891a9f19083"},{url:"resources/dia_eo.txt",revision:"541018663d1e4698c5bfdf665a89ae4e"},{url:"resources/dia_es.txt",revision:"f9f47547d0cb2ea0d5bec80ba1942cbd"},{url:"resources/dia_et.txt",revision:"b1acba19d116680f76f59782d876c7c7"},{url:"resources/dia_eu.txt",revision:"e8adfcede0ea90af8a5683042a01eda0"},{url:"resources/dia_fa.txt",revision:"22ef5d0d215e0b0e559cbe709f0a0fc0"},{url:"resources/dia_fi.txt",revision:"bdfb520e60dd516ba0b1800f3bfb5c63"},{url:"resources/dia_fil.txt",revision:"f0ce6d2bdbec1fa4ceace5caf6b9bd18"},{url:"resources/dia_fr.txt",revision:"4fd0e2aa2d0409c2b2ad91fb666b1626"},{url:"resources/dia_gl.txt",revision:"0f5ef3d4e06ad54199e6f22cbc0a014f"},{url:"resources/dia_gu.txt",revision:"45c70f51baa73093a6782bc840c5670b"},{url:"resources/dia_he.txt",revision:"e3d897e3371a7751fd36cb3be8c8044b"},{url:"resources/dia_hi.txt",revision:"ed18880258f00ea7e2f3303b54906fce"},{url:"resources/dia_hr.txt",revision:"cf63229b1d15f040fbc48daa225f05d7"},{url:"resources/dia_hu.txt",revision:"f72f1eecb98a1bab318c9108250578b8"},{url:"resources/dia_id.txt",revision:"86ec19a2e1447a469019e06b5b45ea58"},{url:"resources/dia_it.txt",revision:"20b500274046dbe3af90f4ad562df90c"},{url:"resources/dia_ja.txt",revision:"67e73b5b9b37c370733fc88a17f88166"},{url:"resources/dia_kn.txt",revision:"c72190df944bed0ffe1c60c12fedd209"},{url:"resources/dia_ko.txt",revision:"4e25ea93d4ba97a9bacaa704d51c535b"},{url:"resources/dia_lt.txt",revision:"d57cc018dc0f245bfb6080a5a6028e05"},{url:"resources/dia_lv.txt",revision:"8d3b3d958ff53586fc02bcfc07557882"},{url:"resources/dia_ml.txt",revision:"c003d16fd704f5f03d6ea6c81e255cf1"},{url:"resources/dia_mr.txt",revision:"d79283163e797cbc84002b85ac34818c"},{url:"resources/dia_ms.txt",revision:"9ca7f4c22515ea922b7b1ab7117c8f9f"},{url:"resources/dia_my.txt",revision:"dacfe19b86bd5bd9063994d5c70d6692"},{url:"resources/dia_nl.txt",revision:"b6e0431168d72e1a515bcef3e2c5aff0"},{url:"resources/dia_no.txt",revision:"8fff5b31fb765406bb7d2317ffbb0fcb"},{url:"resources/dia_pl.txt",revision:"c28ea47141a75166431d5be478ba4abe"},{url:"resources/dia_pt-br.txt",revision:"01819ff35cc92126522578aaf2cc74da"},{url:"resources/dia_pt.txt",revision:"5c94edca8dac2f7fb47dd8861e696391"},{url:"resources/dia_ro.txt",revision:"716f781b1a8c5fad773880dc4d721389"},{url:"resources/dia_ru.txt",revision:"a3c3718265bbd2e961fe7a7f542ef711"},{url:"resources/dia_si.txt",revision:"1ad7512fb461892f3312dc3ae67b2437"},{url:"resources/dia_sk.txt",revision:"7cfc70d7142f3744c7bdd0e869b12c2f"},{url:"resources/dia_sl.txt",revision:"ac897054d94f67f9479c68234e81be6c"},{url:"resources/dia_sr.txt",revision:"8498ffb430e25aa09ccb05f2dbaa17af"},{url:"resources/dia_sv.txt",revision:"3f93760b048aaba21ee2a77f3bf4ea75"},{url:"resources/dia_sw.txt",revision:"c6e8fd3b57f4b3a9dd77141eda1a02d4"},{url:"resources/dia_ta.txt",revision:"ff007d211eef353b605d84e568f059a1"},{url:"resources/dia_te.txt",revision:"4d11c798e331d7a52ba6b8bb7fb06a30"},{url:"resources/dia_th.txt",revision:"2477281bccd4d151bd66a71ce55faee0"},{url:"resources/dia_tr.txt",revision:"710629c6fe665da3a2bf63bf53b15bde"},{url:"resources/dia_uk.txt",revision:"a672e349ced720c3416081125dd554eb"},{url:"resources/dia_vi.txt",revision:"07913aa51ac0d59f9d99eb6fc5c07f19"},{url:"resources/dia_zh-tw.txt",revision:"013e5df6af577864ed9cd7a0ba7b0dcf"},{url:"resources/dia_zh.txt",revision:"c2a5fd91517c85d4615fdb98563b4544"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,r={};const i=(i,a)=>(i=new URL(i+".js",a).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(r[s])return;let d={};const o=e=>i(e,s),f={module:{uri:s},exports:d,require:o};r[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"9f6e65617cb7b7a67185b05427d97feb"},{url:"js/app.min.js",revision:"6d05bed2a81cec4877db56c9f4bad25e"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"d4b2f375b0222562462613f553a3257c"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"52d494798d4f6fc629a801fcd99c7fd5"},{url:"styles/high-contrast.css",revision:"4ecc9f6d08787a9e2d29dacf7aadd1ca"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"06ea84f36f261faf66e05e3ed9b16f2f"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"42137930327ac2a2500f711352b35e25"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"d381db23d3c925eb81854c07b46776a5"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"78b87563d88943ab816a3463927b9b50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"174e06ff4578aa4e2cadf5434494d8dd"},{url:"connect/confluence/includeDiagram.html",revision:"01b04b3f54f1e2e63fcf1df033d24519"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"f9a270e56f91d7b63e219306ff2b63ac"},{url:"resources/dia_am.txt",revision:"32e1e743ecec586536c25f2458cd3a43"},{url:"resources/dia_ar.txt",revision:"80851f14b8286106618f11aa7ae8805f"},{url:"resources/dia_bg.txt",revision:"91587bc16e3b642f40a25ff8d1c3d0f9"},{url:"resources/dia_bn.txt",revision:"f44c3fcc4a7b0890d4156eca0402cccc"},{url:"resources/dia_bs.txt",revision:"0702c63b2aaee2d20306adcddaea7ccc"},{url:"resources/dia_ca.txt",revision:"1a90a2b54a6f73d62e82772e1acbe8d0"},{url:"resources/dia_cs.txt",revision:"fa2847ec6f6e75a95410aa9dc20b8127"},{url:"resources/dia_da.txt",revision:"0efd12fd7f0e123bb9423ad1ffe9e656"},{url:"resources/dia_de.txt",revision:"469fb636bc289ba77a097ab7adf16a34"},{url:"resources/dia_el.txt",revision:"10cfc3115c42dae5c021d650850ae99e"},{url:"resources/dia_eo.txt",revision:"1209ecf16aa7598fe5342727c74a4d75"},{url:"resources/dia_es.txt",revision:"82f09fd89c36d86b3fef59329a613c65"},{url:"resources/dia_et.txt",revision:"f2ab92a7caa15d2161a17f58bd19e997"},{url:"resources/dia_eu.txt",revision:"e8adfcede0ea90af8a5683042a01eda0"},{url:"resources/dia_fa.txt",revision:"6793b6bed8a74a30d0b049b50d0516f2"},{url:"resources/dia_fi.txt",revision:"1a66ce94e0a9fefbd9c55edc49abf6fa"},{url:"resources/dia_fil.txt",revision:"ddcbbdc7230b1d7789002020ed34c01e"},{url:"resources/dia_fr.txt",revision:"c2a77b9e1f6d0b19dfc1e7bd40af2b42"},{url:"resources/dia_gl.txt",revision:"dbd313e4994792f6dcd1b59c39c3da7f"},{url:"resources/dia_gu.txt",revision:"3f5fa7dbec9d1f0c4fff0036b2dba0f8"},{url:"resources/dia_he.txt",revision:"e440cd11862b987985e4a0d2f5afb159"},{url:"resources/dia_hi.txt",revision:"78f34343a4f57ca4ec7e7a2717b625b6"},{url:"resources/dia_hr.txt",revision:"cc8f3026e5fd6a5c4eb4f2fb9b62ac10"},{url:"resources/dia_hu.txt",revision:"e17bfab25490d15929c65bbe3442f0dd"},{url:"resources/dia_id.txt",revision:"86ec19a2e1447a469019e06b5b45ea58"},{url:"resources/dia_it.txt",revision:"9e23d17c9eb7a8d074336f267f7bd2f8"},{url:"resources/dia_ja.txt",revision:"b76dd5c357b3ff1dfcabaddeab376d65"},{url:"resources/dia_kn.txt",revision:"280105c62f3261a784ab73952214dab2"},{url:"resources/dia_ko.txt",revision:"229e8f9c3d84e4635561ba392c465d11"},{url:"resources/dia_lt.txt",revision:"cd0159a46ef2c2bfb84bc6dad5a299cf"},{url:"resources/dia_lv.txt",revision:"9caa404e086db1e4da1a011a99847847"},{url:"resources/dia_ml.txt",revision:"44f8e230e471b112560a5ea979df1575"},{url:"resources/dia_mr.txt",revision:"9f77f05421ef5818d84c070b1b372e2b"},{url:"resources/dia_ms.txt",revision:"57cb8769a2fec369ee56969ecec2534a"},{url:"resources/dia_my.txt",revision:"a4376fafc38fda85318b032edbe9b5e4"},{url:"resources/dia_nl.txt",revision:"b6e0431168d72e1a515bcef3e2c5aff0"},{url:"resources/dia_no.txt",revision:"eb679e14c6b437fd2b22ff67f3d169ee"},{url:"resources/dia_pl.txt",revision:"ae3475b10f2824045fa7076f4584c085"},{url:"resources/dia_pt-br.txt",revision:"d5ce120975a388c3440de40d8179a36f"},{url:"resources/dia_pt.txt",revision:"d0c985f25e2924dd25bd540a82c3fd66"},{url:"resources/dia_ro.txt",revision:"b38b898b99d78cd6dbc7c9d95c0b4297"},{url:"resources/dia_ru.txt",revision:"5aed41ed91e16b0e77879e74c8843768"},{url:"resources/dia_si.txt",revision:"e70185bbb8fd9be659522ff2fa957ed3"},{url:"resources/dia_sk.txt",revision:"bf62dbf0de6a754291a822fb0ac718f4"},{url:"resources/dia_sl.txt",revision:"a6b715115ec4be67fe24a4474d74801c"},{url:"resources/dia_sr.txt",revision:"81470f91f04359c1b3b627515d71ef6f"},{url:"resources/dia_sv.txt",revision:"9ae3be18b492a3f448bf771f520f7ab4"},{url:"resources/dia_sw.txt",revision:"e217cba6058fe404745a91f5cd292245"},{url:"resources/dia_ta.txt",revision:"55349be1ac0abd9d35c9029cc289c8b0"},{url:"resources/dia_te.txt",revision:"4147210236a771e3990faedd0fe6d496"},{url:"resources/dia_th.txt",revision:"397f4bcb46b5fb76cba6a06af33005b4"},{url:"resources/dia_tr.txt",revision:"1bbf900c6d0b810f8cc944baa003802a"},{url:"resources/dia_uk.txt",revision:"5b3f8485623c0cbd22985c141e7f1c7f"},{url:"resources/dia_vi.txt",revision:"8576286953704e5cdd6727eb3ec484f4"},{url:"resources/dia_zh-tw.txt",revision:"298ab192edb19a1ef363bfb1ed8f97e4"},{url:"resources/dia_zh.txt",revision:"f2fcdf5b619faf471bff3703fc0bf75f"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"421b4fae5b46499348d194e1f93558c3"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker.js.mapdiff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.mapindex a387e3f0a..dd7843daa 100644--- a/src/main/webapp/service-worker.js.map+++ b/src/main/webapp/service-worker.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/fd032b9d7274cb440e1f22d050194ece/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1a78eb9fd9223f088ecb257f752f8574\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"282777c4fe68ba971ce14c503466a45a\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"ce61a0e62031a160e057809fefe64aa2\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"d381db23d3c925eb81854c07b46776a5\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"78b87563d88943ab816a3463927b9b50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"174e06ff4578aa4e2cadf5434494d8dd\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"fad8b817bb8630008946ac0442c26c41\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"b8b416774ef2b8d1780f6d60af7e3d46\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"aaa8bae413ebee5f49c515b28b6d88ee\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"a9ea36bb307b977a0a53f1f4c50f6f80\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"0ad054c1e7e0330a7779d9209770f47a\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"c9026617d31c611800dc5ff7ee08ad23\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"1a90a2b54a6f73d62e82772e1acbe8d0\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"e471bf5441804687526b0d55c6cca53e\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"a6244c3b58703cd2a29fd15b2bd13056\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"eff66c7f27c5a473b9ee8445bfa21364\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"d28664e307db85713c37f891a9f19083\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"541018663d1e4698c5bfdf665a89ae4e\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f9f47547d0cb2ea0d5bec80ba1942cbd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"b1acba19d116680f76f59782d876c7c7\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"e8adfcede0ea90af8a5683042a01eda0\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"22ef5d0d215e0b0e559cbe709f0a0fc0\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"bdfb520e60dd516ba0b1800f3bfb5c63\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"f0ce6d2bdbec1fa4ceace5caf6b9bd18\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"4fd0e2aa2d0409c2b2ad91fb666b1626\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"0f5ef3d4e06ad54199e6f22cbc0a014f\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"45c70f51baa73093a6782bc840c5670b\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"e3d897e3371a7751fd36cb3be8c8044b\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"ed18880258f00ea7e2f3303b54906fce\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"cf63229b1d15f040fbc48daa225f05d7\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f72f1eecb98a1bab318c9108250578b8\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"86ec19a2e1447a469019e06b5b45ea58\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"20b500274046dbe3af90f4ad562df90c\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"67e73b5b9b37c370733fc88a17f88166\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"c72190df944bed0ffe1c60c12fedd209\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"4e25ea93d4ba97a9bacaa704d51c535b\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"d57cc018dc0f245bfb6080a5a6028e05\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"8d3b3d958ff53586fc02bcfc07557882\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"c003d16fd704f5f03d6ea6c81e255cf1\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"d79283163e797cbc84002b85ac34818c\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"9ca7f4c22515ea922b7b1ab7117c8f9f\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"dacfe19b86bd5bd9063994d5c70d6692\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"b6e0431168d72e1a515bcef3e2c5aff0\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"8fff5b31fb765406bb7d2317ffbb0fcb\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"c28ea47141a75166431d5be478ba4abe\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"01819ff35cc92126522578aaf2cc74da\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5c94edca8dac2f7fb47dd8861e696391\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"716f781b1a8c5fad773880dc4d721389\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"a3c3718265bbd2e961fe7a7f542ef711\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"1ad7512fb461892f3312dc3ae67b2437\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"7cfc70d7142f3744c7bdd0e869b12c2f\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"ac897054d94f67f9479c68234e81be6c\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"8498ffb430e25aa09ccb05f2dbaa17af\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3f93760b048aaba21ee2a77f3bf4ea75\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"c6e8fd3b57f4b3a9dd77141eda1a02d4\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"ff007d211eef353b605d84e568f059a1\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"4d11c798e331d7a52ba6b8bb7fb06a30\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"2477281bccd4d151bd66a71ce55faee0\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"710629c6fe665da3a2bf63bf53b15bde\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"a672e349ced720c3416081125dd554eb\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"07913aa51ac0d59f9d99eb6fc5c07f19\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"013e5df6af577864ed9cd7a0ba7b0dcf\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"c2a5fd91517c85d4615fdb98563b4544\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/c5b37d8557cfd729e5f0e005517c1603/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"9f6e65617cb7b7a67185b05427d97feb\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6d05bed2a81cec4877db56c9f4bad25e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"d4b2f375b0222562462613f553a3257c\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"52d494798d4f6fc629a801fcd99c7fd5\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"4ecc9f6d08787a9e2d29dacf7aadd1ca\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"06ea84f36f261faf66e05e3ed9b16f2f\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"ce61a0e62031a160e057809fefe64aa2\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"42137930327ac2a2500f711352b35e25\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"d381db23d3c925eb81854c07b46776a5\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"78b87563d88943ab816a3463927b9b50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"174e06ff4578aa4e2cadf5434494d8dd\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"01b04b3f54f1e2e63fcf1df033d24519\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"f9a270e56f91d7b63e219306ff2b63ac\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"32e1e743ecec586536c25f2458cd3a43\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"80851f14b8286106618f11aa7ae8805f\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"91587bc16e3b642f40a25ff8d1c3d0f9\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f44c3fcc4a7b0890d4156eca0402cccc\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"0702c63b2aaee2d20306adcddaea7ccc\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"1a90a2b54a6f73d62e82772e1acbe8d0\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"fa2847ec6f6e75a95410aa9dc20b8127\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"0efd12fd7f0e123bb9423ad1ffe9e656\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"469fb636bc289ba77a097ab7adf16a34\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"10cfc3115c42dae5c021d650850ae99e\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"1209ecf16aa7598fe5342727c74a4d75\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"82f09fd89c36d86b3fef59329a613c65\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"f2ab92a7caa15d2161a17f58bd19e997\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"e8adfcede0ea90af8a5683042a01eda0\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"6793b6bed8a74a30d0b049b50d0516f2\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"1a66ce94e0a9fefbd9c55edc49abf6fa\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"ddcbbdc7230b1d7789002020ed34c01e\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c2a77b9e1f6d0b19dfc1e7bd40af2b42\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"dbd313e4994792f6dcd1b59c39c3da7f\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"3f5fa7dbec9d1f0c4fff0036b2dba0f8\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"e440cd11862b987985e4a0d2f5afb159\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"78f34343a4f57ca4ec7e7a2717b625b6\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"cc8f3026e5fd6a5c4eb4f2fb9b62ac10\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17bfab25490d15929c65bbe3442f0dd\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"86ec19a2e1447a469019e06b5b45ea58\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"9e23d17c9eb7a8d074336f267f7bd2f8\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b76dd5c357b3ff1dfcabaddeab376d65\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"280105c62f3261a784ab73952214dab2\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"229e8f9c3d84e4635561ba392c465d11\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"cd0159a46ef2c2bfb84bc6dad5a299cf\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"9caa404e086db1e4da1a011a99847847\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"44f8e230e471b112560a5ea979df1575\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"9f77f05421ef5818d84c070b1b372e2b\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"57cb8769a2fec369ee56969ecec2534a\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"a4376fafc38fda85318b032edbe9b5e4\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"b6e0431168d72e1a515bcef3e2c5aff0\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"eb679e14c6b437fd2b22ff67f3d169ee\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"ae3475b10f2824045fa7076f4584c085\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"d5ce120975a388c3440de40d8179a36f\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"d0c985f25e2924dd25bd540a82c3fd66\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"b38b898b99d78cd6dbc7c9d95c0b4297\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"5aed41ed91e16b0e77879e74c8843768\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"e70185bbb8fd9be659522ff2fa957ed3\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"bf62dbf0de6a754291a822fb0ac718f4\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a6b715115ec4be67fe24a4474d74801c\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"81470f91f04359c1b3b627515d71ef6f\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"9ae3be18b492a3f448bf771f520f7ab4\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"e217cba6058fe404745a91f5cd292245\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"55349be1ac0abd9d35c9029cc289c8b0\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"4147210236a771e3990faedd0fe6d496\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"397f4bcb46b5fb76cba6a06af33005b4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"1bbf900c6d0b810f8cc944baa003802a\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"5b3f8485623c0cbd22985c141e7f1c7f\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"8576286953704e5cdd6727eb3ec484f4\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"298ab192edb19a1ef363bfb1ed8f97e4\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f2fcdf5b619faf471bff3703fc0bf75f\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"421b4fae5b46499348d194e1f93558c3\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file