From 6612ce8d07e2d1bcef8edab690754b33ecc04e01 Mon Sep 17 00:00:00 2001 From: "David Benson [draw.io]" Date: Tue, 31 Jul 2018 17:37:17 +0100 Subject: [PATCH] 9.0.1 release --- ChangeLog | 4 + VERSION | 2 +- etc/docker/Dockerfile | 13 + etc/docker/README.md | 9 + .../Controllers/ConverterController.cs | 2 +- src/main/webapp/cache.manifest | 2 +- src/main/webapp/index.html | 16 +- src/main/webapp/js/app.min.js | 1496 +++++++------- src/main/webapp/js/atlas-viewer.min.js | 1759 ++++++++--------- src/main/webapp/js/atlas.min.js | 560 +++--- src/main/webapp/js/diagramly/App.js | 137 +- src/main/webapp/js/diagramly/Dialogs.js | 340 ++-- src/main/webapp/js/diagramly/EditorUi.js | 25 +- src/main/webapp/js/diagramly/Minimal.js | 2 +- src/main/webapp/js/diagramly/Trees.js | 5 - src/main/webapp/js/embed-static.min.js | 21 +- src/main/webapp/js/mxgraph/Graph.js | 28 +- src/main/webapp/js/reader.min.js | 21 +- src/main/webapp/js/viewer.min.js | 1759 ++++++++--------- 19 files changed, 3133 insertions(+), 3068 deletions(-) create mode 100644 etc/docker/Dockerfile create mode 100644 etc/docker/README.md diff --git a/ChangeLog b/ChangeLog index 575bfc5f..7f70c113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +31-JUL-2018: 9.0.1 + +- Fixes insert to GitHub with URL parameter + 28-JUL-2018: 9.0.0 - Disables persisted default styles diff --git a/VERSION b/VERSION index c9277c5a..6768f7e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.0.0 \ No newline at end of file +9.0.1 \ No newline at end of file diff --git a/etc/docker/Dockerfile b/etc/docker/Dockerfile new file mode 100644 index 00000000..3e9442cf --- /dev/null +++ b/etc/docker/Dockerfile @@ -0,0 +1,13 @@ +FROM frekele/ant:1.10.3-jdk8 as BUILD +RUN mkdir /usr/build +COPY src /usr/build/src +COPY etc /usr/build/etc +COPY war /usr/build/war +COPY VERSION /usr/build +RUN cd /usr/build/etc/build/ +RUN ant -file /usr/build/etc/build/build.xml war + +FROM tomcat:9.0 as TARGET +COPY --from=BUILD /usr/build/build/draw.war /usr/local/tomcat/webapps/ +EXPOSE 8080 +CMD ["catalina.sh", "run"] \ No newline at end of file diff --git a/etc/docker/README.md b/etc/docker/README.md new file mode 100644 index 00000000..07814b97 --- /dev/null +++ b/etc/docker/README.md @@ -0,0 +1,9 @@ +Docker +------ +After successful checkout, from the project directory run, + +```bash +docker build -t draw . +docker run -d -p 8888:8080 draw +``` +Now the app will be accessible at `http://localhost:8888/draw/?https=0` diff --git a/etc/vsd/VsdConverter/VsdConverter/Controllers/ConverterController.cs b/etc/vsd/VsdConverter/VsdConverter/Controllers/ConverterController.cs index 23d08c08..d2c95099 100644 --- a/etc/vsd/VsdConverter/VsdConverter/Controllers/ConverterController.cs +++ b/etc/vsd/VsdConverter/VsdConverter/Controllers/ConverterController.cs @@ -72,7 +72,7 @@ namespace VsdConverter.Controllers //TODO is this secure or it only returns the header? String origin = Request.GetCorsRequestContext().Origin; - if (!origin.EndsWith("draw.io") && !origin.EndsWith("jgraph.com")) + if (!origin.EndsWith(".draw.io") && !origin.EndsWith(".jgraph.com") && !origin.EndsWith(".quipelements.com")) { throw new HttpResponseException(HttpStatusCode.Forbidden); } diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index b86808bc..f730e05f 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 07/28/2018 12:14 PM +# 07/31/2018 05:24 PM app.html index.html?offline=1 diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 32f5085d..604ccf54 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -391,16 +391,16 @@ - - diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index f4fccc93..87545dd6 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -2467,9 +2467,8 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE, mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)|| !mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,b){c=!1;var d=b.getEvent();if(this.isResetEvent(d))this.reset();else if(!this.isActive()){var e=this.getState(b.getState());null==e&&mxEvent.isTouchEvent(d)||this.update(e)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,b){var d=b.getEvent();this.isResetEvent(d)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(d)|| -this.update(this.getState(b.getState()),b.getGraphX(),b.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,function(a,b){var d=b.getEvent();this.isResetEvent(d)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(b.getGraphX()-this.mouseDownPoint.x)'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")"):(this.ui.editor.setStatus('
'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"
"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"), 0this.maxAutosaveRevisionDelay}; -DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var d=a.lastIndexOf("."),c=0=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 f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1this.maxAutosaveRevisionDelay}; +DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var c=a.lastIndexOf("."),d=0=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 f=a.addLanguageMenu(e,!0);null!=f&&(f.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 d=null,d=a.getServiceCount();if(!a.isOffline()&&1"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(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(f);g.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),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container= -g},EmbedDialog=function(a,b,d,c,e,f){c=document.createElement("div");var h=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=f?mxUtils.write(c,f):mxUtils.write(c,mxResources.get(5E5>b.length?h?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);f=document.createElement("div");f.style.position="absolute";f.style.top="30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(b.length));c.appendChild(f);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)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.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 g=a.openLink(c);null!=g&&(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+ -b+"");k.close()}}),m.className="geBtn",f.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")})}}), +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"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);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(f);g.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),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container= +g},EmbedDialog=function(a,b,c,d,e,f){d=document.createElement("div");var h=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);null!=f?mxUtils.write(d,f):mxUtils.write(d,mxResources.get(5E5>b.length?h?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);f=document.createElement("div");f.style.position="absolute";f.style.top="30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(b.length));d.appendChild(f);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)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.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 d=5E5>b.length? +l.value:b;if(null!=e)e(d);else if(h)try{var g=a.openLink(d);null!=g&&(null==c||0"+encodeURIComponent(mxResources.get("preview"))+''+ +b+"");k.close()}}),m.className="geBtn",f.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(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}), g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");k.appendChild(g);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";f.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")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px", +"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),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",f.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(g);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?g.className="geBtn gePrimaryBtn":(f.appendChild(k), -k.className="geBtn gePrimaryBtn",g.className="geBtn"):(f.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(f);this.container=c};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(a,b){function d(){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+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+= -k(c4&63)},p=new XMLHttpRequest;p.open("GET",c+function(a){r="";for(h=0;hthis.status)if("plantUmlTxt"==d){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null, -null,"
"+this.response+"
",f.x,f.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else c=new FileReader,c.readAsDataURL(this.response),c.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<=C.length&&(u=m(C[0]),l=m(C[C.length-1]),C=new mxCell(2a)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(),g.setSelectionCell(a.insertAsPreText(this.response, +f.x,f.y)),g.scrollCellToVisible(g.getSelectionCell());else{var p=new FileReader;p.readAsDataURL(this.response);p.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=p.result,n=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(n+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0");2<=C.length&&(t=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"==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 f=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 g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,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(g),l.appendChild(k));var n=e();h.value=n;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()&&(z(n,a.getText(),b),f&&x())}))});mxEvent.addListener(n,"dblclick",function(a){f=!0})}else n.innerHTML='
- + + Quick Start Video + width="24" height="24" src="images/glyphicons_github.png"/>Fork us on GitHub - - #1 Rated Confluence App + + + Download draw.io Desktop
'+ -mxResources.get(c)+"
",g&&z(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){z(n)}),mxEvent.addListener(n,"dblclick",function(a){x()}));N.appendChild(n)}function E(){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),p=P[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18=a.getStatus()&&(z(n,a.getText(),b),f&&x())}))});mxEvent.addListener(n,"dblclick",function(a){f=!0})}else n.innerHTML='
'+mxResources.get(c)+ +"
",g&&z(n),null!=e?mxEvent.addListener(n,"click",e):(mxEvent.addListener(n,"click",function(a){z(n)}),mxEvent.addListener(n,"dblclick",function(a){x()}));N.appendChild(n)}function E(){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),p=P[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>p){var c=null!=c?c:w.value, +"multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),q.className="geBtn",k.appendChild(q));k.appendChild(B);a.editor.cancelFirst||null!=d||e&&null==f||k.appendChild(D);A.appendChild(k);this.container=A},CreateDialog=function(a,b,c,d,e,f,h,l,m,g,k,n,u,t,q){function v(c,d,g,p){function k(){mxEvent.addListener(e,"click",function(){var c=g;if(h){var d=E.value,p=d.lastIndexOf(".");if(0>b.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));E.value=d+k}}x(g)})}var e=document.createElement("a");e.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.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(f);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var t=document.createElement("div");e.appendChild(t);mxUtils.write(t,d);if(null!=p&&null==a[p]){f.style.visibility="hidden";mxUtils.setOpacity(t,10);var u=new Spinner({lines:12, -length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(e);var q=window.setTimeout(function(){null==a[p]&&(u.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(q),mxUtils.setOpacity(t,100),f.style.visibility="",u.stop(),k())}))}else k();A.appendChild(e);++D==n&&(mxUtils.br(A),D=0)}function x(b){var c=E.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)+ +d(n.checked?u.value:m.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(c);h.appendChild(x);this.container=h},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var c=document.createElement("img");c.style.border="0px";mxClient.IS_SVG?(c.setAttribute("width","164"),c.setAttribute("height","221"),c.style.width="164px",c.style.height="221px",c.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")): +(c.setAttribute("width","176"),c.setAttribute("height","219"),c.style.width="170px",c.style.height="219px",c.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));b.appendChild(c);mxUtils.br(b);c=document.createElement("small");c.innerHTML="v "+EditorUi.VERSION;c.style.color="#505050";b.appendChild(c);mxUtils.br(b);mxUtils.br(b);c=document.createElement("small");c.style.color="#505050";c.innerHTML='© 2005-2018 JGraph 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=(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 f=/^(([^<>()[\]\\.,;:\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':(f.innerHTML="
",mxUtils.write(f,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==g&&0==d&&p()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);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 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")+ +b.id:null});0==g&&0==d&&p()})(b.entries[d])})(c[g]);d.style.padding="30px";d.appendChild(b);d.appendChild(e);d.appendChild(f);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()});f.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 g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(h),g.appendChild(m),g.appendChild(f),g.appendChild(l)):(g.appendChild(m),g.appendChild(f),g.appendChild(l),g.appendChild(h));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"), +m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(h),g.appendChild(m),g.appendChild(f),g.appendChild(l)):(g.appendChild(m),g.appendChild(f),g.appendChild(l),g.appendChild(h));c.appendChild(g);this.container=c},CropImageDialog=function(a,b,c){var d=document.createElement("div"),e=document.createElement("table"),f=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);f.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),g=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()};g.appendChild(k);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=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";g.appendChild(n);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=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";g.appendChild(t);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=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";g.appendChild(u);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr"); -m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");g.appendChild(q);h.appendChild(g);f.appendChild(h);e.appendChild(f);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"),g=v.width, -e=v.height,f=parseInt(k.value),h=parseInt(n.value),g=Math.max(1,g-f-parseInt(t.value)),e=Math.max(1,e-h-parseInt(u.value));b.width=g;b.height=e;q.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(v,f,h,g,e,0,0,g,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"),f=document.createElement("table"),h=document.createElement("tbody"), -l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.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()};g.appendChild(k);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); -mxUtils.write(m,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.x:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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:"";g.appendChild(t);l.appendChild(m); -l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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:"";g.appendChild(u);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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:"";g.appendChild(q);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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:"";g.appendChild(v);l.appendChild(m);l.appendChild(g); -h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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:"";g.appendChild(x);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var z=document.createElement("input"); -z.setAttribute("type","text");z.style.width="100px";z.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(z);l.appendChild(m);l.appendChild(g);h.appendChild(l);f.appendChild(h);e.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;ca.maxImageSize||n>a.maxImageSize){var z=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=z;n*=z}y>H?(H=Math.round(100*H/y),y=100):(y=Math.round(100*y/H),H=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"; +":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";g.appendChild(u);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr"); +m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var q=document.createElement("input");q.setAttribute("type","checkbox");g.appendChild(q);h.appendChild(g);f.appendChild(h);e.appendChild(f);d.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"),d=b.getContext("2d"),g=v.width, +e=v.height,f=parseInt(k.value),h=parseInt(n.value),g=Math.max(1,g-f-parseInt(u.value)),e=Math.max(1,e-h-parseInt(t.value));b.width=g;b.height=e;q.checked&&(d.fillStyle="#000000",d.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),d.fill(),d.globalCompositeOperation="source-in");d.drawImage(v,f,h,g,e,0,0,g,e);c(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(d,"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));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"),f=document.createElement("table"),h=document.createElement("tbody"), +l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};g.appendChild(k);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); +mxUtils.write(m,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.x:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d?d.y:"";g.appendChild(u);l.appendChild(m); +l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(t);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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!=d&&null!=d.offset?d.offset.y:"";g.appendChild(q);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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!=d?d.width:"";g.appendChild(v);l.appendChild(m);l.appendChild(g); +h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=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!=d?d.height:"";g.appendChild(x);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var z=document.createElement("input"); +z.setAttribute("type","text");z.style.width="100px";z.value=1==b.length?mxUtils.getValue(c.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(z);l.appendChild(m);l.appendChild(g);h.appendChild(l);f.appendChild(h);e.appendChild(f);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;da.maxImageSize||n>a.maxImageSize){var z=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=z;n*=z}y>H?(H=Math.round(100*H/y),y=100):(y=Math.round(100*y/H),H=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 F=document.createElement("img");F.setAttribute("src",E.convert(b));F.style.width=y+"px";F.style.height=H+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-H)/2)+"px";F.style.paddingLeft=Math.floor((100-y)/2)+"px";w.appendChild(F)}else if(null!=f){var I=a.stringToCells(a.editor.graph.decompress(f.xml));0x?z-1:z,0,k.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[z])):(k.push(k.splice(x,1)[0]),u.appendChild(u.children[x])); -else if(0=c.status&&(l(c.responseText,d,g,k,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,d,g,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",g);mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",g);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);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";c.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,g,k,p,e,n,f){D(b)(a,c,d,g,k,p,e,n,f);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",c.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(",");0x?z-1:z,0,k.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[z])):(k.push(k.splice(x,1)[0]),t.appendChild(t.children[x])); +else if(0=c.status&&(l(c.responseText,d,g,k,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,g,k,p,e,n,"fixed",mxEvent.isAltDown(b)?null:n.substring(0, +n.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",m);mxEvent.addListener(t,"drop",g);mxEvent.addListener(q,"dragover",m);mxEvent.addListener(q,"drop",g);c.appendChild(t);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=u.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,g,k,p,e,n,f){D(b)(a,c,d,g,k,p,e,n,f);w.value=""});t.scrollTop=t.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(",");0'),b.writeln(a.editor.fontCss),b.writeln(""))};if("undefined"!==typeof MathJax){var l=c.renderPage;c.renderPage= +Math.min(n,Math.max(parseInt(l.value),parseInt(t.value))));t.value=Math.max(1,Math.min(n,Math.min(parseInt(l.value),parseInt(t.value))))}function d(b){function c(b,c,g){var k=b.getGraphBounds(),e=0,n=0,f=ga.get(),p=1/b.pageScale,h=E.checked;if(h)var p=parseInt(W.value),u=parseInt(R.value),p=Math.min(f.height*u/(k.height/b.view.scale),f.width*p/(k.width/b.view.scale));else p=parseInt(m.value)/(100*b.pageScale),isNaN(p)&&(d=1/b.pageScale,m.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width* +d);f.height=Math.ceil(f.height*d);p*=d;!h&&b.pageVisible?(k=b.getPageLayout(),e-=k.x*f.width,n-=k.y*f.height):h=!0;if(null==c){c=PrintDialog.createPrintPreview(b,p,f,0,e,n,h);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var t=c.writeHead;c.writeHead=function(b){t.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('"))};if("undefined"!==typeof MathJax){var l=c.renderPage;c.renderPage= function(a,b,c,d,g,k){var e=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var n=l.apply(this,arguments);mxClient.NO_FO=e;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=h;c.appendGraph(b,p,e,n,g,!0)}return c}var d=parseInt(Y.value)/100;isNaN(d)&&(d=1, -Y.value="100 %");var d=.75*d,k=u.value,e=l.value,n=!h.checked,f=null;n&&(n=k==p&&e==p);if(!n&&null!=a.pages&&a.pages.length){var t=0,n=a.pages.length-1;h.checked||(t=parseInt(k)-1,n=parseInt(e)-1);for(var q=t;q<=n;q++){var v=a.pages[q],k=v==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),e=!0,t=!1,x=null,A=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, -A=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(t="0"!=v.mapping.diagramMap.get("mathEnabled"),x=v.mapping.diagramMap.get("background"),A=v.mapping.diagramMap.get("backgroundImage"),A=null!=A&&0'),n.writeln("MathJax.Hub.Config({"),n.writeln("showMathMenu: false,"),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('