From 9581961c91e27faa01bf0628f4530b7a5396f355 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Mon, 9 Jul 2018 12:18:13 +0200 Subject: [PATCH] 8.9.3 release --- ChangeLog | 7 + VERSION | 2 +- etc/mxgraph/mxClient.js | 20 +- src/main/webapp/cache.manifest | 2 +- src/main/webapp/js/app.min.js | 1242 +++++------ src/main/webapp/js/atlas-viewer.min.js | 1152 +++++----- src/main/webapp/js/atlas.min.js | 1956 +++++++++-------- src/main/webapp/js/diagramly/App.js | 10 +- src/main/webapp/js/diagramly/Editor.js | 61 +- src/main/webapp/js/diagramly/Minimal.js | 4 +- src/main/webapp/js/embed-static.min.js | 12 +- src/main/webapp/js/mxgraph/Graph.js | 26 +- src/main/webapp/js/reader.min.js | 12 +- src/main/webapp/js/viewer.min.js | 1152 +++++----- .../plugins/webcola/mxWebColaAdaptor.js | 4 +- src/main/webapp/plugins/webcola/webcola.js | 20 +- 16 files changed, 2860 insertions(+), 2822 deletions(-) diff --git a/ChangeLog b/ChangeLog index 008337aee5..ad30e5fb6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +09-JUL-2018: 8.9.3 + +- Fixes rounded style option for containers +- Moves webcola plugin to layout menu +- Fixes minor errors in print preview +- Uses mxGraph 3.9.9 beta 1 + 06-JUL-2018: 8.9.2 - Enables tags dialog in read-only files diff --git a/VERSION b/VERSION index 214d4b7db8..675e45a4e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.9.2 \ No newline at end of file +8.9.3 \ No newline at end of file diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 0678beadb4..e0a542cd0f 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -1,4 +1,4 @@ -var mxClient={VERSION:"3.9.8",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +var mxClient={VERSION:"3.9.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -543,7 +543,7 @@ mxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!= mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),g=c?b[1]:b[e-2],k=c?b[0]:b[e-1];if(null!=f&&null!=g&&null!=k){for(d=1;d'):("CSS1Compat"===document.compatMode&&k.writeln(""),k.writeln(""));k.writeln("");this.writeHead(k,a);k.writeln("");k.writeln('')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-= q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),x=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*x;var y=mxUtils.bind(this,function(){if(this.pageSelector&&(1");a.writeln("");a.close();mxEvent.release(a.body)}}; +"always";if(g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE))k.writeln(a.outerHTML),a.parentNode.removeChild(a);else if(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE){var d=k.createElement("div");d.innerHTML=a.outerHTML;d=d.getElementsByTagName("div")[0];k.body.appendChild(d);a.parentNode.removeChild(a)}else a.parentNode.removeChild(a),k.body.appendChild(a);(c||b)&&this.addPageBreak(k)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var v= +0;v");a.writeln("");a.close();mxEvent.release(a.body)}}; mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln(""+this.title+"");mxClient.IS_VML&&a.writeln('');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('")};mxPrintPreview.prototype.writePostfix=function(a){}; mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;fnavigator.userAgent.indexOf("MSIE")&& +window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.9.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -649,7 +649,7 @@ mxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!= mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),g=c?b[1]:b[e-2],k=c?b[0]:b[e-1];if(null!=f&&null!=g&&null!=k){for(d=1;d'):("CSS1Compat"===document.compatMode&&k.writeln(""),k.writeln(""));k.writeln("");this.writeHead(k,a);k.writeln("");k.writeln('')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-= q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),x=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*x;var y=mxUtils.bind(this,function(){if(this.pageSelector&&(1");a.writeln("");a.close();mxEvent.release(a.body)}}; +"always";if(g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE))k.writeln(a.outerHTML),a.parentNode.removeChild(a);else if(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE){var d=k.createElement("div");d.innerHTML=a.outerHTML;d=d.getElementsByTagName("div")[0];k.body.appendChild(d);a.parentNode.removeChild(a)}else a.parentNode.removeChild(a),k.body.appendChild(a);(c||b)&&this.addPageBreak(k)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var v= +0;v");a.writeln("");a.close();mxEvent.release(a.body)}}; mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln(""+this.title+"");mxClient.IS_VML&&a.writeln('');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('")};mxPrintPreview.prototype.writePostfix=function(a){}; mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;f=c&&(mxUtils.br(m),h=0)}c=null!=c?c: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=c&&(mxUtils.br(m),k=0)}c=null!=c?c: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(n))},5E3);this.container= e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var c=null,c=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&&h.appendChild(g);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(n.checked)});h.appendChild(e);null!=k?(e.innerHTML=k+"
"+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);m?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),h.appendChild(k),f.appendChild(h),mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container= -f},ErrorDialog=function(a,b,c,d,e,g,k,l,m,f,h){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var t=document.createElement("div");t.style.padding="0px";t.style.margin="0px";t.style.fontSize="18px";t.style.paddingBottom="16px";t.style.marginBottom="16px";t.style.borderBottom="1px solid #c0c0c0";t.style.color="gray";mxUtils.write(t,b);n.appendChild(t)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=c;n.appendChild(b);c=document.createElement("div"); -c.style.marginTop="16px";c.style.textAlign="center";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",c.appendChild(b),c.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=h&&h()}),f.className="geBtn",c.appendChild(f));var u=mxUtils.button(d,function(){m&&a.hideDialog();null!=e&&e()});u.className="geBtn";c.appendChild(u);null!=k&&(d=mxUtils.button(k,function(){m&&a.hideDialog();null!=l&&l()}),d.className="geBtn gePrimaryBtn", -c.appendChild(d));this.init=function(){u.focus()};n.appendChild(c);this.container=n},EmbedDialog=function(a,b,c,d,e,g){d=document.createElement("div");var k=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>b.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);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));d.appendChild(g); +g.appendChild(e));b.appendChild(g);this.container=b},ConfirmDialog=function(a,b,c,d,e,g,h,l,m){var f=document.createElement("div");f.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);f.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox"); +g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(n.checked)});g.className="geBtn";null!=l&&(g.innerHTML=l+"
"+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!=c&&c(n.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(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),f.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container= +f},ErrorDialog=function(a,b,c,d,e,g,h,l,m,f,k){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var t=document.createElement("div");t.style.padding="0px";t.style.margin="0px";t.style.fontSize="18px";t.style.paddingBottom="16px";t.style.marginBottom="16px";t.style.borderBottom="1px solid #c0c0c0";t.style.color="gray";mxUtils.write(t,b);n.appendChild(t)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=c;n.appendChild(b);c=document.createElement("div"); +c.style.marginTop="16px";c.style.textAlign="center";null!=g&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();g()}),b.className="geBtn",c.appendChild(b),c.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=k&&k()}),f.className="geBtn",c.appendChild(f));var u=mxUtils.button(d,function(){m&&a.hideDialog();null!=e&&e()});u.className="geBtn";c.appendChild(u);null!=h&&(d=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),d.className="geBtn gePrimaryBtn", +c.appendChild(d));this.init=function(){u.focus()};n.appendChild(c);this.container=n},EmbedDialog=function(a,b,c,d,e,g){d=document.createElement("div");var h=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=g?mxUtils.write(d,g):mxUtils.write(d,mxResources.get(5E5>b.length?h?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);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));d.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");d.appendChild(l);mxUtils.br(d);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&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9 -b.length?"preview":"openInNewWindow"),function(){var d=5E5>b.length?l.value:b;if(null!=e)e(d);else if(k)try{var f=a.openLink(d);null!=f&&(null==c||0"+ -encodeURIComponent(mxResources.get("preview"))+''+b+"");h.close()}}),m.className="geBtn",g.appendChild(m));if(!k||7500b.length){var h=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");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(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",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(){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(h),h.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(m),f.className="geBtn",m.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(a,b){function c(){var a=null!=x.getTitle()?x.getTitle():this.defaultFilename;if(C.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 +b.length?"preview":"openInNewWindow"),function(){var d=5E5>b.length?l.value:b;if(null!=e)e(d);else if(h)try{var f=a.openLink(d);null!=f&&(null==c||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");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0; +var GoogleSitesDialog=function(a,b){function c(){var a=null!=w.getTitle()?w.getTitle():this.defaultFilename;if(A.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));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)},p=new XMLHttpRequest;p.open("GET",d+function(a){r="";for(k=0;kthis.status)if("plantUmlTxt"==c){a.spinner.stop();f.getModel().beginUpdate();try{cell=f.insertVertex(null, -null,"
"+this.response+"
",g.x,g.y,1,1,"text;html=1;overflow=fill;"),f.updateCellSize(cell,!0)}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var h=d.width,p=d.height;if(0==h&&0==p){var e=c.target.result,n=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(n+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg"); -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)},p=new XMLHttpRequest;p.open("GET",d+function(a){r="";for(h=0;hthis.status)if("plantUmlTxt"==c){a.spinner.stop();f.getModel().beginUpdate();try{cell=f.insertVertex(null, +null,"
"+this.response+"
",g.x,g.y,1,1,"text;html=1;overflow=fill;"),f.updateCellSize(cell,!0)}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var p=d.width,k=d.height;if(0==p&&0==k){var e=c.target.result,n=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(n+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg"); +0");2<=I.length&&(u=m(I[0]),l=m(I[I.length-1]),I=new mxCell(2");2<=I.length&&(u=m(I[0]),l=m(I[I.length-1]),I=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 k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height= -"354px";k.style.marginBottom="16px";var l=document.createElement("select");"formatSql"==c&&(l.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=c&&l.appendChild(m);null!=c&&"fromText"!=c||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==c&&(l.appendChild(m),m.setAttribute("selected","selected")); +"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"==c&&(l.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=c&&l.appendChild(m);null!=c&&"fromText"!=c||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==c&&(l.appendChild(m),m.setAttribute("selected","selected")); m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=c&&l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&m.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"==c&&(l.appendChild(m),l.appendChild(f),l.appendChild(h));var n=e();k.value=n;b.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation(); -a.preventDefault();if(0=a.getStatus()&&(A(n,a.getText(),b),g&&w())}))});mxEvent.addListener(n,"dblclick",function(a){g=!0})}else n.innerHTML='
'+ -mxResources.get(c)+"
",f&&A(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){A(n)}),mxEvent.addListener(n,"dblclick",function(a){w()}));J.appendChild(n)}function F(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in T){var c=document.createElement("div"),d=mxResources.get(b),h=T[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>h){var c=null!=c?c:x.value, -p="";c==App.MODE_GOOGLE?p=a.drive.extension:c==App.MODE_GITHUB?p=a.gitHub.extension:c==App.MODE_TRELLO?p=a.trello.extension:c==App.MODE_DROPBOX?p=a.dropbox.extension:c==App.MODE_ONEDRIVE?p=a.oneDrive.extension:c==App.MODE_DEVICE&&(p=".xml");0<=h&&(d=d.substring(0,h));F.value=d+p}}w(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!=h&&null==a[h]){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 A=window.setTimeout(function(){null==a[h]&&(t.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(A),mxUtils.setOpacity(u,100),g.style.visibility="",t.stop(),p())}))}else p();C.appendChild(e);++B==n&&(mxUtils.br(C),B=0)}function w(b){var d=F.value;if(null==b||null!=d&&0=a.getStatus()&&(B(n,a.getText(),b),g&&x())}))});mxEvent.addListener(n,"dblclick",function(a){g=!0})}else n.innerHTML='
'+ +mxResources.get(c)+"
",f&&B(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){B(n)}),mxEvent.addListener(n,"dblclick",function(a){x()}));J.appendChild(n)}function F(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in U){var c=document.createElement("div"),d=mxResources.get(b),p=U[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>p){var c=null!=c?c:w.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<=p&&(d=d.substring(0,p));F.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!=p&&null==a[p]){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[p]&&(t.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(q),mxUtils.setOpacity(u,100),g.style.visibility="",t.stop(),k())}))}else k();A.appendChild(e);++E==n&&(mxUtils.br(A),E=0)}function x(b){var d=F.value;if(null==b||null!=d&&0JGraph Ltd.
All Rights Reserved.'; b.appendChild(c);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b=document.createElement("div"),c=document.createElement("div");mxUtils.write(c,mxResources.get("sendYourFeedbackToDrawIo"));c.style.fontSize="18px";c.style.marginBottom="18px";b.appendChild(c);c=document.createElement("div");mxUtils.write(c,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(c);var d=document.createElement("input"); -d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(k.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(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+ +d.setAttribute("type","text");d.style.marginTop="6px";d.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(d.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(d,"change",function(){0':(g.innerHTML="
",mxUtils.write(g,mxResources.get("noPreview"))),null!=k&&(k.style.backgroundColor=""),k=c,k.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",p);mxEvent.addListener(c,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});l.push(function(){return h.checked? -b.id:null});0==f&&0==d&&p()})(b.entries[d])})(c[f]);d.style.padding="30px";d.appendChild(b);d.appendChild(e);d.appendChild(g);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=b.style.width,c.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"),c.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= -"geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c':(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",p);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked? +b.id:null});0==f&&0==d&&p()})(b.entries[d])})(c[f]);d.style.padding="30px";d.appendChild(b);d.appendChild(e);d.appendChild(g);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=b.style.width,c.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"),c.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= +"geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;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 k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.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(k),f.appendChild(m),f.appendChild(g),f.appendChild(l)):(f.appendChild(m),f.appendChild(g),f.appendChild(l),f.appendChild(k));c.appendChild(f);this.container=c},CropImageDialog=function(a,b,c){var d=document.createElement("div"),e=document.createElement("table"),g=document.createElement("tbody"), -k=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");k.appendChild(l);g.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus(); -h.select()};f.appendChild(h);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";f.appendChild(n);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=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);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=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);k.appendChild(m);k.appendChild(f);g.appendChild(k);k=document.createElement("tr"); -m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");f.appendChild(q);k.appendChild(f);g.appendChild(k);e.appendChild(g);d.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),d=b.getContext("2d"),f=v.width, -e=v.height,g=parseInt(h.value),k=parseInt(n.value),f=Math.max(1,f-g-parseInt(t.value)),e=Math.max(1,e-k-parseInt(u.value));b.width=f;b.height=e;q.checked&&(d.fillStyle="#000000",d.arc(f/2,e/2,Math.min(f/2,e/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(v,g,k,f,e,0,0,f,e);c(b.toDataURL())});w.setAttribute("disabled","disabled");v.onload=function(){w.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+ -": "+v.height)};v.src=b;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&w.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(w)):(b.appendChild(w),b.appendChild(e));d.appendChild(b);this.container=d},EditGeometryDialog=function(a,b){var c=a.editor.graph,d=1==b.length?c.getCellGeometry(b[0]):null,e=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"), -l=document.createElement("tr"),m=document.createElement("td"),f=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=d?d.x:"";this.init=function(){h.focus();h.select()};f.appendChild(h);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("top")+ -":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.y:"";f.appendChild(n);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d?d.width:"";f.appendChild(t);l.appendChild(m);l.appendChild(f);k.appendChild(l); -l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d?d.height:"";f.appendChild(u);l.appendChild(m);l.appendChild(f);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");f=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var q=document.createElement("input"); -q.setAttribute("type","text");q.style.width="100px";q.value=1==b.length?mxUtils.getValue(c.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";f.appendChild(q);l.appendChild(m);l.appendChild(f);k.appendChild(l);g.appendChild(k);e.appendChild(g);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;da.maxImageSize||n>a.maxImageSize){var x=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=x;n*=x}B>z?(z=Math.round(100* -z/B),B=100):(B=Math.round(100*B/z),z=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var y=document.createElement("img");y.setAttribute("src",F.convert(b));y.style.width=B+"px";y.style.height=z+"px";y.style.margin="10px";y.style.paddingBottom=Math.floor((100-z)/2)+"px";y.style.paddingLeft= -Math.floor((100-B)/2)+"px";G.appendChild(y)}else if(null!=g){var H=a.stringToCells(a.editor.graph.decompress(g.xml));0w?A-1:A,0,h.splice(w,1)[0]),u.insertBefore(u.children[w],u.children[A])):(h.push(h.splice(w,1)[0]),u.appendChild(u.children[w]));else if(0a.maxImageSize||n>a.maxImageSize){var B=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=B;n*=B}z>G?(G=Math.round(100* +G/z),z=100):(z=Math.round(100*z/G),G=100);var w=document.createElement("div");w.setAttribute("draggable","true");w.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";w.style.position="relative";w.style.cursor="move";mxUtils.setPrefixedStyle(w.style,"transition","transform .1s ease-in-out");if(null!=b){var y=document.createElement("img");y.setAttribute("src",F.convert(b));y.style.width=z+"px";y.style.height=G+"px";y.style.margin="10px";y.style.paddingBottom=Math.floor((100-G)/2)+"px";y.style.paddingLeft= +Math.floor((100-z)/2)+"px";w.appendChild(y)}else if(null!=g){var H=a.stringToCells(a.editor.graph.decompress(g.xml));0x?B-1:B,0,k.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[B])):(k.push(k.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0= -c.status&&(l(c.responseText,d,f,h,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,d,f,h,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.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);c.appendChild(u);d=document.createElement("div");d.style.textAlign="right"; -d.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(h),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")});n.setAttribute("id","btnDownload");n.className="geBtn";d.appendChild(n);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){C=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,c,d,f,h,p,e,n,g){B(b)(a,c,d,f,h,p,e,n,g);x.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=p&&(p(),p=null);x.click()}),n.setAttribute("id", -"btnAddImage"),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=p&&(p(),p=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){C=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0= +c.status&&(l(c.responseText,d,f,k,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,d,f,k,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.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);c.appendChild(u);d=document.createElement("div");d.style.textAlign="right"; +d.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);n=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")});n.setAttribute("id","btnDownload");n.className="geBtn";d.appendChild(n);var w=document.createElement("input");w.setAttribute("multiple","multiple");w.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(w,"change",function(b){A=!1;a.importFiles(w.files,0,0,a.maxImageSize,function(a,c,d,f,k,p,e,n,g){E(b)(a,c,d,f,k,p,e,n,g);w.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=p&&(p(),p=null);w.click()}),n.setAttribute("id", +"btnAddImage"),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=p&&(p(),p=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){A=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");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,h){var e=l.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,f,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=k;c.appendGraph(b,p,e,n,f,!0)}return c}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,h=u.value,e=l.value,n=!k.checked,g=null; -n&&(n=h==p&&e==p);if(!n&&null!=a.pages&&a.pages.length){var t=0,n=a.pages.length-1;k.checked||(t=parseInt(h)-1,n=parseInt(e)-1);for(var q=t;q<=n;q++){var v=a.pages[q],h=v==a.currentPage?f:null;if(null==h){var h=a.createTemporaryGraph(f.getStylesheet()),e=!0,t=!1,F=null,C=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(e=v.viewState.pageVisible,t=v.viewState.mathEnabled,F=v.viewState.background,C=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&& -(t="0"!=v.mapping.diagramMap.get("mathEnabled"),F=v.mapping.diagramMap.get("background"),C=v.mapping.diagramMap.get("backgroundImage"),C=null!=C&&0'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln('"HTML-CSS": {'),n.writeln("imageFont: null"),n.writeln("},"),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'), -n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('