From e2e661b9937adc189e89cee711c06ce0fc59e711 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Fri, 5 Oct 2018 13:58:58 +0200 Subject: [PATCH] 9.2.2 release --- ChangeLog | 8 +- VERSION | 2 +- etc/mxgraph/mxClient.js | 17 +- src/main/webapp/cache.manifest | 2 +- src/main/webapp/js/app.min.js | 1553 ++++++++++----------- src/main/webapp/js/atlas-viewer.min.js | 1499 ++++++++++---------- src/main/webapp/js/atlas.min.js | 1581 +++++++++++----------- src/main/webapp/js/diagramly/Editor.js | 35 + src/main/webapp/js/diagramly/EditorUi.js | 188 +-- src/main/webapp/js/embed-static.min.js | 19 +- src/main/webapp/js/reader.min.js | 19 +- src/main/webapp/js/viewer.min.js | 1499 ++++++++++---------- 12 files changed, 3255 insertions(+), 3167 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76fa556f..77c63910 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +05-OCT-2018: 9.2.2 + +- Embed mode loads all supported formats +- Uses mxGraph 3.9.10 beta 2 +- Adds vars URL parameter + 03-OCT-2018: 9.2.1 - Ignores mode in Google Drive fallback @@ -13,7 +19,7 @@ 21-SEP-2018: 9.1.8 - Fixes minor constraint check bug for new connections -- Uses mxGraph 3.9.10 +- Uses mxGraph 3.9.10 beta 1 21-SEP-2018: 9.1.7 diff --git a/VERSION b/VERSION index 4ae7a720..4f22ce36 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.2.1 \ No newline at end of file +9.2.2 \ No newline at end of file diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 5ee8bfff..fc0e5181 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -546,14 +546,15 @@ mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBo mxSwimlane.prototype.getLabelBounds=function(a){var b=this.getTitleSize();a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH|| this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=this.getTitleSize();if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)}; mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)}; -mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=this.getTitleSize(),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),k=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),l=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(l=this.getArcSize(d,e,f),this.paintRoundedSwimlane(a,b,c,d,e,f,l,g,k)):this.paintSwimlane(a,b,c,d,e,f,g,k);g=mxUtils.getValue(this.style,mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE); -this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,l))}; -mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,k){g!=mxConstants.NONE&&(a.save(),a.setFillColor(g),mxRectangleShape.prototype.paintBackground.call(this,a,0,0,d,e),a.restore(),a.setShadow(!1));a.begin();0==f&&(f=e);this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),(k||f>=e)&&a.close(),a.fillAndStroke(),f=d)&&a.close(),a.fillAndStroke(),f=e)&&a.close(),a.fillAndStroke(),f=d)&&a.close(),a.fillAndStroke(),f=e)&&a.close(),a.fillAndStroke(),f=d)&&a.close(),a.fillAndStroke(),f=e)&&a.close(),a.fillAndStroke(),f=d)&&a.close(),a.fillAndStroke(),f=d&&(mxUtils.br(m),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1=d&&(mxUtils.br(n),h=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var g=a.addLanguageMenu(e,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1 '+mxResources.get("googleDriveMissingClickHere")+"",e.appendChild(p))},5E3);this.container= +mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(n);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(f);l=document.createElement("span");l.style.color="gray";l.style.fontSize="12px";mxUtils.write(l," "+mxResources.get("rememberThisSetting"));g.appendChild(l);mxUtils.br(g);var q=a.getRecent();if(null!=q&& +0 '+mxResources.get("googleDriveMissingClickHere")+"",e.appendChild(k))},5E3);this.container= e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&k.appendChild(g);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(p.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"
"+e.innerHTML+"
",e.style.paddingBottom="8px",e.style.paddingTop= -"8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(p),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),f.appendChild(k),mxEvent.addListener(h,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container= -f},EmbedDialog=function(a,b,d,c,e,g){c=document.createElement("div");var h=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=g?mxUtils.write(c,g):mxUtils.write(c,mxResources.get(5E5>b.length?h?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,a.formatFileSize(b.length));c.appendChild(g);var l=document.createElement("textarea");l.setAttribute("autocomplete", -"off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll", -!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!h||navigator.standalone||!(h||mxClient.IS_SVG&&(null==document.documentMode||9b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length? -l.value:b;if(null!=e)e(c);else if(h)try{var f=a.openLink(c);null!=f&&(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+ -b+"");k.close()}}),m.className="geBtn",g.appendChild(m));if(!h||7500b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}), -f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");k.appendChild(f);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";g.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+ -"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom="5px",k.appendChild(f),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px", -k.className="geBtn",g.appendChild(k))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(f);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(k), -k.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(m),f.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(g);this.container=c};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(a,b){function d(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(B.checked&&""!=t.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(b+="&title="+encodeURIComponent(a));0"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&h.appendChild(g);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(k.checked)});h.appendChild(e);null!=l?(e.innerHTML=l+"
"+e.innerHTML+"
",e.style.paddingBottom="8px",e.style.paddingTop= +"8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(g);f.appendChild(h);n?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),h.appendChild(l),f.appendChild(h),mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container= +f},EmbedDialog=function(a,b,d,c,e,g){c=document.createElement("div");var l=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=g?mxUtils.write(c,g):mxUtils.write(c,mxResources.get(5E5>b.length?l?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,a.formatFileSize(b.length));c.appendChild(g);var m=document.createElement("textarea");m.setAttribute("autocomplete", +"off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");c.appendChild(m);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(m.value=b,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll", +!1,null)):(m.setAttribute("readonly","true"),m.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var n=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!l||navigator.standalone||!(l||mxClient.IS_SVG&&(null==document.documentMode||9b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length? +m.value:b;if(null!=e)e(c);else if(l)try{var f=a.openLink(c);null!=f&&(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+ +b+"");h.close()}}),n.className="geBtn",g.appendChild(n));if(!l||7500b.length){var h=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}), +f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");h.appendChild(f);h.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");h.style.verticalAlign="bottom";h.style.paddingTop="4px";h.style.minWidth="46px";h.className="geBtn";g.appendChild(h)}7168>b.length&&(h=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+ +"&url="+encodeURIComponent(m.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom="5px",h.appendChild(f),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign="bottom",h.style.paddingTop="4px",h.style.minWidth="46px", +h.className="geBtn",g.appendChild(h))}f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(f);h=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(h), +h.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(n),f.className="geBtn",n.className="geBtn gePrimaryBtn");c.appendChild(g);this.container=c};EmbedDialog.showPreviewOption=!0; +var GoogleSitesDialog=function(a,b){function d(){var a=null!=x.getTitle()?x.getTitle():this.defaultFilename;if(y.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+= -k(c4&63)},n=new XMLHttpRequest;n.open("GET",d+function(a){r="";for(h=0;hthis.status)if("plantUmlTxt"==c)a.spinner.stop(),f.setSelectionCell(a.insertAsPreText(this.response, -g.x,g.y)),f.scrollCellToVisible(f.getSelectionCell());else{var n=new FileReader;n.readAsDataURL(this.response);n.onloadend=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var c=d.width,k=d.height;if(0==c&&0==k){var e=n.result,p=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(p+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0");2<=E.length&&(t=m(E[0]),l=m(E[E.length-1]),E=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml": -"plantUmlSvg"==l.value||"plantUmlTxt"==l.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var g=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height= -"354px";h.style.marginBottom="16px";var l=document.createElement("select");"formatSql"==d&&(l.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=d&&l.appendChild(m);null!=d&&"fromText"!=d||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==d&&(l.appendChild(m),m.setAttribute("selected","selected")); -m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=d&&l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&m.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+ -")");var k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(l.appendChild(m),l.appendChild(f),l.appendChild(k));var p=e();h.value=p;b.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.addEventListener("drop",function(a){a.stopPropagation(); -a.preventDefault();if(0=a.getStatus()&&(y(p,a.getText(),b),g&&x())}))});mxEvent.addListener(p,"dblclick",function(a){g=!0})}else p.innerHTML='
'+mxResources.get(c)+ -"
",f&&y(p),null!=e?mxEvent.addListener(p,"click",e):(mxEvent.addListener(p,"click",function(a){y(p)}),mxEvent.addListener(p,"dblclick",function(a){x()}));N.appendChild(p)}function w(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in P){var c=document.createElement("div"),d=mxResources.get(b),n=P[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>n){var c=null!=c?c:A.value, -k="";c==App.MODE_GOOGLE?k=a.drive.extension:c==App.MODE_GITHUB?k=a.gitHub.extension:c==App.MODE_TRELLO?k=a.trello.extension:c==App.MODE_DROPBOX?k=a.dropbox.extension:c==App.MODE_ONEDRIVE?k=a.oneDrive.extension:c==App.MODE_DEVICE&&(k=".xml");0<=n&&(d=d.substring(0,n));w.value=d+k}}x(f)})}var e=document.createElement("a");e.style.overflow="hidden";var g=document.createElement("img");g.src=c;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom= -"6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(g);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,d);if(null!=n&&null==a[n]){g.style.visibility="hidden";mxUtils.setOpacity(u,10);var t=new Spinner({lines:12, -length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(e);var q=window.setTimeout(function(){null==a[n]&&(t.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[n]&&(window.clearTimeout(q),mxUtils.setOpacity(u,100),g.style.visibility="",t.stop(),k())}))}else k();B.appendChild(e);++z==p&&(mxUtils.br(B),z=0)}function x(b){var c=w.value;if(null==b||null!=c&&0a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+= +h(c4&63)},k=new XMLHttpRequest;k.open("GET",d+function(a){r="";for(t=0;tthis.status)if("plantUmlTxt"==c)a.spinner.stop(),f.setSelectionCell(a.insertAsPreText(this.response, +g.x,g.y)),f.scrollCellToVisible(f.getSelectionCell());else{var h=new FileReader;h.readAsDataURL(this.response);h.onloadend=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var c=d.width,k=d.height;if(0==c&&0==k){var e=h.result,w=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(w+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0");2<=C.length&&(q=m(C[0]),l=m(C[C.length-1]),C=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml": +"plantUmlSvg"==m.value||"plantUmlTxt"==m.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var g=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height= +"354px";l.style.marginBottom="16px";var m=document.createElement("select");"formatSql"==d&&(m.style.display="none");var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=d&&m.appendChild(n);null!=d&&"fromText"!=d||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==d&&(m.appendChild(n),n.setAttribute("selected","selected")); +n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=d&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&n.setAttribute("selected","selected");var f=document.createElement("option");f.setAttribute("value","plantUmlPng");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+ +")");var h=document.createElement("option");h.setAttribute("value","plantUmlTxt");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(m.appendChild(n),m.appendChild(f),m.appendChild(h));var k=e();l.value=k;b.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation(); +a.preventDefault();if(0=a.getStatus()&&(z(w,a.getText(),b),g&&A())}))});mxEvent.addListener(w,"dblclick",function(a){g=!0})}else w.innerHTML='
'+mxResources.get(c)+ +"
",f&&z(w),null!=e?mxEvent.addListener(w,"click",e):(mxEvent.addListener(w,"click",function(a){z(w)}),mxEvent.addListener(w,"dblclick",function(a){A()}));M.appendChild(w)}function w(){mxEvent.addListener(M,"scroll",function(a){M.scrollTop+M.clientHeight>=M.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in N){var c=document.createElement("div"),d=mxResources.get(b),h=N[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>h){var c=null!=c?c:x.value, +k="";c==App.MODE_GOOGLE?k=a.drive.extension:c==App.MODE_GITHUB?k=a.gitHub.extension:c==App.MODE_TRELLO?k=a.trello.extension:c==App.MODE_DROPBOX?k=a.dropbox.extension:c==App.MODE_ONEDRIVE?k=a.oneDrive.extension:c==App.MODE_DEVICE&&(k=".xml");0<=h&&(d=d.substring(0,h));w.value=d+k}}A(f)})}var g=document.createElement("a");g.style.overflow="hidden";var u=document.createElement("img");u.src=c;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom= +"6px";g.style.display=mxClient.IS_QUIRKS?"inline":"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(u);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var t=document.createElement("div");g.appendChild(t);mxUtils.write(t,d);if(null!=h&&null==a[h]){u.style.visibility="hidden";mxUtils.setOpacity(t,10);var q=new Spinner({lines:12, +length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(g);var m=window.setTimeout(function(){null==a[h]&&(q.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(m),mxUtils.setOpacity(t,100),u.style.visibility="",q.stop(),e())}))}else e();y.appendChild(g);++B==k&&(mxUtils.br(y),B=0)}function A(b){var c=w.value;if(null==b||null!=c&&0JGraph Ltd.
All Rights Reserved.'; b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input"); -c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+ -"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; -mxEvent.addListener(c,"change",function(){0FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+ +"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+n.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +mxEvent.addListener(c,"change",function(){0':(g.innerHTML="
",mxUtils.write(g,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",k);mxEvent.addListener(c,"dblclick",function(a){n.checked=!n.checked;mxEvent.consume(a)});l.push(function(){return n.checked? -b.id:null});0==f&&0==d&&k()})(b.entries[d])})(d[f]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(g);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type", -"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= -"geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c':(g.innerHTML="
",mxUtils.write(g,mxResources.get("noPreview"))),null!=l&&(l.style.backgroundColor=""),l=c,l.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",k);mxEvent.addListener(c,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});m.push(function(){return h.checked? +b.id:null});0==f&&0==d&&k()})(b.entries[d])})(d[f]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(g);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var h=document.createElement("input");h.setAttribute("type", +"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(h),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),h.checked=!0,h.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=h&&(h.checked=!h.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= +"geBtn";var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;cmxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+ -" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});g.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")}); -m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(h),f.appendChild(m),f.appendChild(g),f.appendChild(l)):(f.appendChild(m),f.appendChild(g),f.appendChild(l),f.appendChild(h));d.appendChild(f);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"), -h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);g.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus(); -k.select()};f.appendChild(k);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";f.appendChild(p);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("right")+ -":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";f.appendChild(t);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";f.appendChild(u);h.appendChild(m);h.appendChild(f);g.appendChild(h);h=document.createElement("tr"); -m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");f.appendChild(q);h.appendChild(f);g.appendChild(h);e.appendChild(g);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),f=v.width, -e=v.height,g=parseInt(k.value),h=parseInt(p.value),f=Math.max(1,f-g-parseInt(t.value)),e=Math.max(1,e-h-parseInt(u.value));b.width=f;b.height=e;q.checked&&(c.fillStyle="#000000",c.arc(f/2,e/2,Math.min(f/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(v,g,h,f,e,0,0,f,e);d(b.toDataURL())});x.setAttribute("disabled","disabled");v.onload=function(){x.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+ -": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&x.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(x)):(b.appendChild(x),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),g=document.createElement("table"),h=document.createElement("tbody"), -l=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=c&&c.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};f.appendChild(k);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td"); -mxUtils.write(m,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.x:"";f.appendChild(p);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";f.appendChild(t);l.appendChild(m); -l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.x:"";f.appendChild(u);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("dy")+ -":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.y:"";f.appendChild(q);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";f.appendChild(v);l.appendChild(m);l.appendChild(f); -h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.height:"";f.appendChild(x);l.appendChild(m);l.appendChild(f);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var y=document.createElement("input"); -y.setAttribute("type","text");y.style.width="100px";y.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";f.appendChild(y);l.appendChild(m);l.appendChild(f);h.appendChild(l);g.appendChild(h);e.appendChild(g);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;ca.maxImageSize||p>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,p));e*=A;p*=A}H>C?(C=Math.round(100*C/H),H=100):(H=Math.round(100*H/C),C=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";y.style.cursor="move"; -mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",w.convert(b));F.style.width=H+"px";F.style.height=C+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-C)/2)+"px";F.style.paddingLeft=Math.floor((100-H)/2)+"px";y.appendChild(F)}else if(null!=g){var M=a.stringToCells(a.editor.graph.decompress(g.xml));0x?y-1:y,0,k.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(k.push(k.splice(x,1)[0]),u.appendChild(u.children[x])); -else if(0=c.status&&(l(c.responseText,d,f,n,k,e,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,d,f,n,k,e,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0, -p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,"drop",f);mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",f);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);p=mxUtils.button(mxResources.get("export"), -function(){var b=a.createLibraryDataFromImages(k),c=t.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A, -"change",function(b){B=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,c,d,f,n,k,e,p,g){z(b)(a,c,d,f,n,k,e,p,g);A.value=""});u.scrollTop=u.scrollHeight}),p=mxUtils.button(mxResources.get("import"),function(){null!=n&&(n(),n=null);A.click()}),p.setAttribute("id","btnAddImage"),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=n&&(n(),n=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"== -a.substring(0,11)){var d=a.indexOf(",");0a.maxImageSize||e>a.maxImageSize){var H=Math.min(1,Math.min(a.maxImageSize/Math.max(1,k)),a.maxImageSize/Math.max(1,e));k*=H;e*=H}z>x?(x=Math.round(100*x/z),z=100):(z=Math.round(100*z/x),x=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move"; +mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",w.convert(b));E.style.width=z+"px";E.style.height=x+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-x)/2)+"px";E.style.paddingLeft=Math.floor((100-z)/2)+"px";F.appendChild(E)}else if(null!=g){var G=a.stringToCells(a.editor.graph.decompress(g.xml));0A?z-1:z,0,h.splice(A,1)[0]),t.insertBefore(t.children[A],t.children[z])):(h.push(h.splice(A,1)[0]),t.appendChild(t.children[A])); +else if(0=c.status&&(m(c.responseText,d,f,h,k,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(m(c,d,f,h,k,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0, +g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",f);mxEvent.addListener(p,"dragover",n);mxEvent.addListener(p,"drop",f);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);k=mxUtils.button(mxResources.get("export"), +function(){var b=a.createLibraryDataFromImages(h),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x, +"change",function(b){y=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,c,d,f,h,k,e,g,w){B(b)(a,c,d,f,h,k,e,g,w);x.value=""});t.scrollTop=t.scrollHeight}),k=mxUtils.button(mxResources.get("import"),function(){null!=u&&(u(),u=null);x.click()}),k.setAttribute("id","btnAddImage"),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=u&&(u(),u=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){y=!1;if(null!=a){if("data:image/"== +a.substring(0,11)){var d=a.indexOf(",");0
'+mxResources.get("newDiagram",null,"New Diagram")+'
'+mxResources.get("templates",null,"Templates")+'
'+mxResources.get("newDiagram", null,"New Diagram")+'
'+mxResources.get("showAll",null,"+ Show all")+'
'+mxResources.get("myDiagrams",null,"My diagrams")+'
'+ mxResources.get("allDiagrams",null,"All diagrams")+'

🛈 '+mxResources.get("linkToDiagramHint", null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'
'+mxResources.get("create",null,"Create")+'
'+mxResources.get("cancel",null,"Cancel")+"
",b=document.createElement("div");b.innerHTML=a;b.className="templateDlg";var a=window.innerWidth,d=window.innerHeight,c=987,e=712;.9* a=c.getStatus()&&(b(c.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){var b=a?"":"none";z.querySelectorAll(".linkToDiagram").forEach(function(a){a.style.display=b})}function x(a,b,c){function d(){T.innerHTML=b?mxResources.get("create"):mxResources.get("copy");v(!b)}Q.innerHTML="";u();M=a;var f=null;if(c){f=document.createElement("table"); -f.className="diagramsListGrid";var n=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxResources.get("diagram",null,"Diagram");n.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("changedBy",null,"Changed By");n.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");n.appendChild(k);f.appendChild(n);Q.appendChild(f)}for(n=0;ne&&(k=k.substring(0,e)+"…");if(c){var l=document.createElement("tr"),g=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="diagramListPreviewBtn";B.setAttribute("title", -mxResources.get("preview"));g.appendChild(B);p=document.createElement("span");p.className="diagramTitle";p.innerHTML=k;g.appendChild(p);l.appendChild(g);g=document.createElement("td");g.innerHTML=w;l.appendChild(g);g=document.createElement("td");g.innerHTML=h;l.appendChild(g);f.appendChild(l);null==D&&(d(),u(l,"diagramsListGridActive",a[n]));(function(a,b){mxEvent.addListener(l,"click",function(){D!=b&&(d(),u(b,"diagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",q);mxEvent.addListener(B, -"click",function(){t(a)})})(a[n],l)}else{var m=document.createElement("div");m.className="diagramTile";m.setAttribute("title",p);null==D&&(d(),u(m,"diagramTileActive",a[n]));w=document.createElement("div");w.className="diagramTileImg diagramTileImgLoading";var z=document.createElement("img");z.style.display="none";(function(a,b){z.onload=function(){b.className="diagramTileImg";a.style.display=""};z.onerror=function(){b.className="diagramTileImg diagramTileImgError"}})(z,w);z.src=g;w.appendChild(z); -m.appendChild(w);w=document.createElement("div");w.className="diagramTileLbl";w.innerHTML=null!=k?k:"";m.appendChild(w);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="diagramPreviewBtn";B.setAttribute("title",mxResources.get("preview"));m.appendChild(B);(function(a,b){mxEvent.addListener(m,"click",function(){D!=b&&(d(),u(b,"diagramTileActive",a))});mxEvent.addListener(m,"dblclick",q);mxEvent.addListener(B,"click",function(){t(a)})})(a[n],m);Q.appendChild(m)}}}function y(a, -b){L.innerHTML="";u();for(var c=!b&&5a.length?"none":""}function n(a){var b=z.querySelector(".templatesList"),c;for(c in a){var d= -document.createElement("div"),f=mxResources.get(c),n=a[c];null==f&&(f=c.substring(0,1).toUpperCase()+c.substring(1));d.className="templateCatLink";d.setAttribute("title",f+" ("+n.length+")");f=mxUtils.htmlEntities(f);15=c.getStatus()&&(b(c.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){var b=a?"":"none";B.querySelectorAll(".linkToDiagram").forEach(function(a){a.style.display=b})}function A(a,b,c){function d(){T.innerHTML=b?mxResources.get("create"):mxResources.get("copy");v(!b)}R.innerHTML="";t();L=a;var f=null;if(c){f=document.createElement("table"); +f.className="diagramsListGrid";var h=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxResources.get("diagram",null,"Diagram");h.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("changedBy",null,"Changed By");h.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");h.appendChild(k);f.appendChild(h);R.appendChild(f)}for(h=0;he&&(k=k.substring(0,e)+"…");if(c){var y=document.createElement("tr"),w=document.createElement("td"),l=document.createElement("img");l.src="/images/icon-search.svg";l.className="diagramListPreviewBtn";l.setAttribute("title", +mxResources.get("preview"));w.appendChild(l);g=document.createElement("span");g.className="diagramTitle";g.innerHTML=k;w.appendChild(g);y.appendChild(w);w=document.createElement("td");w.innerHTML=u;y.appendChild(w);w=document.createElement("td");w.innerHTML=m;y.appendChild(w);f.appendChild(y);null==G&&(d(),t(y,"diagramsListGridActive",a[h]));(function(a,b){mxEvent.addListener(y,"click",function(){G!=b&&(d(),t(b,"diagramsListGridActive",a))});mxEvent.addListener(y,"dblclick",p);mxEvent.addListener(l, +"click",function(){q(a)})})(a[h],y)}else{var n=document.createElement("div");n.className="diagramTile";n.setAttribute("title",g);null==G&&(d(),t(n,"diagramTileActive",a[h]));u=document.createElement("div");u.className="diagramTileImg diagramTileImgLoading";var B=document.createElement("img");B.style.display="none";(function(a,b){B.onload=function(){b.className="diagramTileImg";a.style.display=""};B.onerror=function(){b.className="diagramTileImg diagramTileImgError"}})(B,u);B.src=w;u.appendChild(B); +n.appendChild(u);u=document.createElement("div");u.className="diagramTileLbl";u.innerHTML=null!=k?k:"";n.appendChild(u);l=document.createElement("img");l.src="/images/icon-search.svg";l.className="diagramPreviewBtn";l.setAttribute("title",mxResources.get("preview"));n.appendChild(l);(function(a,b){mxEvent.addListener(n,"click",function(){G!=b&&(d(),t(b,"diagramTileActive",a))});mxEvent.addListener(n,"dblclick",p);mxEvent.addListener(l,"click",function(){q(a)})})(a[h],n);R.appendChild(n)}}}function z(a, +b){O.innerHTML="";t();for(var c=!b&&5a.length?"none":""}function u(a){var b=B.querySelector(".templatesList"),c;for(c in a){var d= +document.createElement("div"),f=mxResources.get(c),h=a[c];null==f&&(f=c.substring(0,1).toUpperCase()+c.substring(1));d.className="templateCatLink";d.setAttribute("title",f+" ("+h.length+")");f=mxUtils.htmlEntities(f);15c.size&&(n=n.slice(0,c.size));b=n.join(",");null!=c.countProperty&&(t.setCellStyles(c.countProperty,n.length,t.getSelectionCells()),f.push(c.countProperty),k.push(n.length))}t.setCellStyles(a,b,t.getSelectionCells());f.push(a);k.push(b);if(null!=c.dependentProps)for(a=0;ab)g=g.slice(0,b);else for(var u= -g.length;uc.max&&(b=c.max);b=mxUtils.htmlEntities(("int"==w?parseInt(b):b)+"");d(a,b,c);q.innerHTML=b}}var n=document.createElement("input");f(q,n,!0);n.value=b;n.className="propEditor";if("int"==w||"float"==w)n.type="number",n.step="int"==w?"1":"any",null!=c.min&&(n.min=parseFloat(c.min)),null!=c.max&&(n.max=parseFloat(c.max));document.body.appendChild(n);mxEvent.addListener(n,"blur",function(){document.body.removeChild(n)});var e=!1;mxEvent.addListener(n, -"change",k);mxEvent.addListener(n,"keypress",function(a){if(13==a.keyCode){k();try{e=!0,document.body.removeChild(n)}catch(ga){}}});n.focus()})));c.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(h,function(b){d(a,"",c,c.index);mxEvent.consume(b)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",q.appendChild(t));l.appendChild(q);return l}var h=this,t=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var l=document.createElement("table"); -l.style.whiteSpace="nowrap";l.style.width="100%";var w=document.createElement("tr");w.className="propHeader";var q=document.createElement("th");q.className="propHeaderCell";q.innerHTML=mxResources.get("property",null,"Property");w.appendChild(q);q=document.createElement("th");q.className="propHeaderCell";q.innerHTML=mxResources.get("value",null,"Value");w.appendChild(q);l.appendChild(w);var v=!1,m=!1,B;for(B in b){var w=b[B],x=null!=c.style[B]?mxUtils.htmlEntities(c.style[B]+""):w.defVal;if("separator"== -w.type)m=!m;else{if("staticArr"==w.type)w.size=parseInt(c.style[w.sizeProperty]||b[w.sizeProperty].defVal)||0;else if(null!=w.dependentProps){for(var y=w.dependentProps,L=[],T=[],q=0;qc.size&&(k=k.slice(0,c.size));b=k.join(",");null!=c.countProperty&&(q.setCellStyles(c.countProperty,k.length,q.getSelectionCells()),f.push(c.countProperty),h.push(k.length))}q.setCellStyles(a,b,q.getSelectionCells());f.push(a);h.push(b);if(null!=c.dependentProps)for(a=0;ab)u=u.slice(0,b);else for(var t= +u.length;tc.max&&(b=c.max);b=mxUtils.htmlEntities(("int"==l?parseInt(b):b)+"");d(a,b,c);p.innerHTML=b}}var k=document.createElement("input");f(p,k,!0);k.value=b;k.className="propEditor";if("int"==l||"float"==l)k.type="number",k.step="int"==l?"1":"any",null!=c.min&&(k.min=parseFloat(c.min)),null!=c.max&&(k.max=parseFloat(c.max));document.body.appendChild(k);mxEvent.addListener(k,"blur",function(){document.body.removeChild(k)});var e=!1;mxEvent.addListener(k, +"change",h);mxEvent.addListener(k,"keypress",function(a){if(13==a.keyCode){h();try{e=!0,document.body.removeChild(k)}catch(na){}}});k.focus()})));c.isDeletable&&(q=mxUtils.button("-",mxUtils.bind(w,function(b){d(a,"",c,c.index);mxEvent.consume(b)})),q.style.height="16px",q.style.width="25px",q.style["float"]="right",q.className="geColorBtn",p.appendChild(q));m.appendChild(p);return m}var w=this,q=this.editorUi.editor.graph,t=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table"); +m.style.whiteSpace="nowrap";m.style.width="100%";var l=document.createElement("tr");l.className="propHeader";var p=document.createElement("th");p.className="propHeaderCell";p.innerHTML=mxResources.get("property",null,"Property");l.appendChild(p);p=document.createElement("th");p.className="propHeaderCell";p.innerHTML=mxResources.get("value",null,"Value");l.appendChild(p);m.appendChild(l);var v=!1,y=!1,n;for(n in b){var l=b[n],z=null!=c.style[n]?mxUtils.htmlEntities(c.style[n]+""):l.defVal;if("separator"== +l.type)y=!y;else{if("staticArr"==l.type)l.size=parseInt(c.style[l.sizeProperty]||b[l.sizeProperty].defVal)||0;else if(null!=l.dependentProps){for(var A=l.dependentProps,B=[],N=[],p=0;pdocument.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000"); f.appendChild(b)}f.innerHTML="";for(var c=0;c'),b.writeln(a.editor.fontCss), -b.writeln(""))};if("undefined"!==typeof MathJax){var l=c.renderPage;c.renderPage=function(a,b,c,d,f,k){var e=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var p=l.apply(this,arguments);mxClient.NO_FO=e;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:p.className="geDisableMathJax";return p}}c.open(null,null,f,!0)}else{n=b.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";c.backgroundColor=n;c.autoOrigin= -h;c.appendGraph(b,g,e,p,f,!0)}return c}var d=parseInt(Z.value)/100;isNaN(d)&&(d=1,Z.value="100 %");var d=.75*d,k=u.value,e=l.value,p=!h.checked,g=null;p&&(p=k==n&&e==n);if(!p&&null!=a.pages&&a.pages.length){var t=0,p=a.pages.length-1;h.checked||(t=parseInt(k)-1,p=parseInt(e)-1);for(var q=t;q<=p;q++){var v=a.pages[q],k=v==a.currentPage?f:null;if(null==k){var k=a.createTemporaryGraph(f.getStylesheet()),e=!0,t=!1,x=null,B=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!= -v.viewState?(e=v.viewState.pageVisible,t=v.viewState.mathEnabled,x=v.viewState.background,B=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(t="0"!=v.mapping.diagramMap.get("mathEnabled"),x=v.mapping.diagramMap.get("background"),B=v.mapping.diagramMap.get("backgroundImage"),B=null!=B&&0'),p.writeln("MathJax.Hub.Config({"),p.writeln("showMathMenu: false,"),p.writeln('messageStyle: "none",'),p.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'), -p.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),p.writeln('"HTML-CSS": {'),p.writeln("imageFont: null"),p.writeln("},"),p.writeln("TeX: {"),p.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),p.writeln("},"),p.writeln("tex2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("},"),p.writeln("asciimath2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("}"),p.writeln("});"),b&&(p.writeln("MathJax.Hub.Queue(function () {"), -p.writeln("window.print();"),p.writeln("});")),p.writeln("\x3c/script>"),p.writeln('