Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson [draw.io] <david@jgraph.com>2021-03-23 21:01:21 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-03-23 21:01:21 +0300
commit878bf1c267092130d1531bf021f10bf4e51e12c8 (patch)
tree2c89846414871e03648fef750399795296fde4aa
parentd50898ee7ed4c6c178d1e64e52ac1722837df540 (diff)
14.5.1 releasev14.5.1
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/electron.js9
-rw-r--r--src/main/webapp/js/app.min.js567
-rw-r--r--src/main/webapp/js/diagramly/App.js72
-rw-r--r--src/main/webapp/js/viewer-static.min.js2
-rw-r--r--src/main/webapp/js/viewer.min.js2
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/package.json12
-rw-r--r--src/main/webapp/service-worker.js4
10 files changed, 359 insertions, 317 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c2396a0..2a41c9c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+23-MAR-2021: 14.5.1
+
+- Fixes for Electron 12
+
22-MAR-2021: 14.5.0
- Improves Lucidchart import
diff --git a/VERSION b/VERSION
index d3be72cb..afd36b76 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-14.5.0 \ No newline at end of file
+14.5.1 \ No newline at end of file
diff --git a/src/main/webapp/electron.js b/src/main/webapp/electron.js
index 7be9da50..d107429a 100644
--- a/src/main/webapp/electron.js
+++ b/src/main/webapp/electron.js
@@ -77,7 +77,8 @@ function createWindow (opt = {})
nodeIntegration: true,
enableRemoteModule: true,
nodeIntegrationInWorker: true,
- spellcheck: (os.platform() == "darwin" ? true : false)
+ spellcheck: (os.platform() == "darwin" ? true : false),
+ contextIsolation: false
}
}, opt)
@@ -271,7 +272,8 @@ app.on('ready', e =>
var dummyWin = new BrowserWindow({
show : false,
webPreferences: {
- nodeIntegration: true
+ nodeIntegration: true,
+ contextIsolation: false
}
});
@@ -1212,7 +1214,8 @@ function exportDiagram(event, args, directFinalize)
browser = new BrowserWindow({
webPreferences: {
backgroundThrottling: false,
- nodeIntegration: true
+ nodeIntegration: true,
+ contextIsolation: false
},
show : false,
frame: false,
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 6113d920..daac96d8 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -9452,7 +9452,7 @@ DrawioFile.prototype.updateFile=function(a,d,b,c){null!=b&&b()||(this.ui.getCurr
DrawioFile.prototype.mergeFile=function(a,d,b,c){var g=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),m=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=m&&0<m.length){this.shadowPages=m;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var n=[this.ui.diffPages(null!=c?c:f,this.shadowPages)];if(!this.ignorePatches(n)){var e=this.ui.patchPages(f,
n[0]);c={};var k=this.ui.getHashValueForPages(e,c),f={},l=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",l==k,k);if(null!=k&&k!=l){var p=this.compressReportData(this.getAnonymizedXmlForPages(m)),t=this.compressReportData(this.getAnonymizedXmlForPages(e)),u=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(b,n,"Shadow Details: "+JSON.stringify(c)+
"\nChecksum: "+k+"\nCurrent: "+l+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=b&&b(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var v=this.getCurrentUser(),z=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,x)}}catch(B){}}};
+null!=b&&b(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var v=this.getCurrentUser(),y=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,x)}}catch(B){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),b=d.document.createElement("mxfile");if(null!=a)for(var c=0;c<a.length;c++){var g=d.encode(new mxGraphModel(a[c].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[c].getId());a[c].viewState&&this.ui.editor.graph.saveViewState(a[c].viewState,g,!0);b.appendChild(g)}return mxUtils.getPrettyXml(b)};
DrawioFile.prototype.compressReportData=function(a,d,b){d=null!=d?d:1E4;null!=b&&null!=a&&a.length>b?a=a.substring(0,b)+"[...]":null!=a&&a.length>d&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,d,b,c,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var f=mxUtils.bind(this,function(a){var e=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -9472,7 +9472,7 @@ DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(
DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,d,b){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();if(null!=a){var d=function(a){for(var b=0;null!=a&&b<a.length;b++){var d=a[b];null!=d.id&&0==d.id.indexOf("extFont_")&&d.parentNode.removeChild(d)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(a);this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null)}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();if(null!=a){var d=function(a){for(var c=0;null!=a&&c<a.length;c++){var b=a[c];null!=b.id&&0==b.id.indexOf("extFont_")&&b.parentNode.removeChild(b)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(a);this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null)}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(a,d){a(null)};DrawioFile.prototype.loadDescriptor=function(a,d){a(null)};DrawioFile.prototype.loadPatchDescriptor=function(a,d){this.loadDescriptor(mxUtils.bind(this,function(b){a(b)}),d)};DrawioFile.prototype.patchDescriptor=function(a,d){this.setDescriptorEtag(a,this.getDescriptorEtag(d))};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(a){return null};DrawioFile.prototype.getCurrentUser=function(){return null};
DrawioFile.prototype.getLatestVersion=function(a,d){a(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(a){this.setDescriptorRevisionId(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
@@ -9560,15 +9560,15 @@ mxClient.IS_CHROMEAPP)){if(51200>d.length){var p=mxUtils.button("",function(){tr
" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>d.length&&(p=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent(m)+"&url="+encodeURIComponent(e.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),l=document.createElement("img"),l.setAttribute("src",Editor.tweetImage),l.setAttribute("width","18"),l.setAttribute("height",
"18"),l.setAttribute("border","0"),l.style.marginBottom="5px",p.appendChild(l),p.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",f.appendChild(p))}l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(l);p=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():
document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?l.className="geBtn gePrimaryBtn":(f.appendChild(p),p.className="geBtn gePrimaryBtn",l.className="geBtn"):(f.appendChild(k),l.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(f);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,d){function b(){var a=null!=F&&null!=F.getTitle()?F.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<A.length&&(b+="&s="+A);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=p.value&&(b+="&height="+p.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(y.checked?"1":"0");
-b+="&resize="+(B.checked?"1":"0");b+="&x0="+Number(l.value);b+="&y0="+e;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=b}else F.constructor==DriveFile||F.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?b+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(b+=F.getHash().substring(1),b=F.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+var GoogleSitesDialog=function(a,d){function b(){var a=null!=F&&null!=F.getTitle()?F.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<A.length&&(b+="&s="+A);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=p.value&&(b+="&height="+p.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(z.checked?"1":"0");
+b+="&resize="+(B.checked?"1":"0");b+="&x0="+Number(l.value);b+="&y0="+e;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=b}else F.constructor==DriveFile||F.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?b+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(b+=F.getHash().substring(1),b=F.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
a&&(b+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(l.value),b+="&height="+a),k.value=b):k.value=""}var c=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),m=g.view.scale,n=Math.floor(f.x/m-g.view.translate.x),e=Math.floor(f.y/m-g.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
c.appendChild(k);mxUtils.br(c);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginRight="16px";l.style.marginLeft="4px";l.value=n;c.appendChild(l);mxUtils.write(c,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");
p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/m);c.appendChild(p);mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=d||"";c.appendChild(t);
mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";c.appendChild(q);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);c.appendChild(z);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var A=a.getBasenames().join(";"),F=a.getCurrentFile();mxEvent.addListener(q,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(p,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(t,"change",b);b();
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);c.appendChild(y);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
+"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var A=a.getBasenames().join(";"),F=a.getCurrentFile();mxEvent.addListener(q,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(p,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(t,"change",b);b();
mxEvent.addListener(k,"click",function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";f.appendChild(m);c.appendChild(f);this.container=c},CreateGraphDialog=function(a,d,b){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);c.appendChild(d);var f=new Graph(d);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";f.cellRenderer.installCellOverlayListeners=
function(a,e,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
@@ -9608,14 +9608,14 @@ null!=b&&"fromText"!=b||e.setAttribute("selected","selected");e=document.createE
mxUtils.write(e,mxResources.get("diagram"));"plantUml"!=b&&n.appendChild(e);e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&e.setAttribute("selected","selected");var k=document.createElement("option");k.setAttribute("value","plantUmlPng");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var l=document.createElement("option");l.setAttribute("value",
"plantUmlTxt");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(n.appendChild(e),n.appendChild(k),n.appendChild(l));var p=g();m.value=p;d.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));d.appendChild(n);mxEvent.addListener(n,"change",function(){var a=g();if(0==m.value.length||m.value==p)p=a,m.value=p});a.isOffline()||"mermaid"!=b&&"plantUml"!=b||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==b?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("close"),
-function(){m.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);k=mxUtils.button(mxResources.get("insert"),function(b){a.hideDialog();c(m.value,n.value,b)});d.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(e);this.container=d},NewDialog=function(a,d,b,c,g,f,m,n,e,k,l,p,t,u,q,v,z){function x(){var a=!0;if(null!=ha)for(;I<ha.length&&(a||0!=mxUtils.mod(I,30));){var b=
+function(){m.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);k=mxUtils.button(mxResources.get("insert"),function(b){a.hideDialog();c(m.value,n.value,b)});d.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(e);this.container=d},NewDialog=function(a,d,b,c,g,f,m,n,e,k,l,p,t,u,q,v,y){function x(){var a=!0;if(null!=ha)for(;I<ha.length&&(a||0!=mxUtils.mod(I,30));){var b=
ha[I++],b=C(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function B(){if(V)b||a.hideDialog(),u(V,ea,E.value);else if(c)b||a.hideDialog(),c(ca,E.value,fa,X);else{var e=E.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,ca,null!=X&&0<X.length?X:null,null,function(){a.hideDialog()},null,b,null,null!=aa&&0<aa.length?aa:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}
-function y(a,b,c,d,k,l,f){null!=W&&(W.style.backgroundColor="transparent",W.style.border="1px solid transparent");H.removeAttribute("disabled");ca=b;X=c;aa=l;W=a;V=d;fa=f;ea=k;W.style.backgroundColor=n;W.style.border=e}function C(b,e,c,d,k,l,f,g,p,t,q){var u=document.createElement("div");u.className="geTemplate";u.style.height=R+"px";u.style.width=P+"px";"dark"==uiTheme&&(u.style.filter="invert(100%)");null!=c?u.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&u.setAttribute("title",
-d);if(null!=l){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";c=document.createElement("img");c.setAttribute("src",l);c.setAttribute("alt",d);c.style.maxWidth=R+"px";c.style.maxHeight=P+"px";var m=l.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");u.appendChild(c);c.onerror=function(){this.src!=m?this.src=m:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addListener(u,"click",function(a){y(u,null,null,b,f,q)});mxEvent.addListener(u,
+function z(a,b,c,d,k,l,f){null!=W&&(W.style.backgroundColor="transparent",W.style.border="1px solid transparent");H.removeAttribute("disabled");ca=b;X=c;aa=l;W=a;V=d;fa=f;ea=k;W.style.backgroundColor=n;W.style.border=e}function C(b,e,c,d,k,l,f,g,p,t,q){var u=document.createElement("div");u.className="geTemplate";u.style.height=R+"px";u.style.width=P+"px";"dark"==uiTheme&&(u.style.filter="invert(100%)");null!=c?u.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&u.setAttribute("title",
+d);if(null!=l){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";c=document.createElement("img");c.setAttribute("src",l);c.setAttribute("alt",d);c.style.maxWidth=R+"px";c.style.maxHeight=P+"px";var m=l.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");u.appendChild(c);c.onerror=function(){this.src!=m?this.src=m:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addListener(u,"click",function(a){z(u,null,null,b,f,q)});mxEvent.addListener(u,
"dblclick",function(a){B()})}else if(!t&&null!=b&&0<b.length){d=p||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+d+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=c&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(R-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>");var K=!1;mxEvent.addListener(u,"click",function(c){H.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";var d=b,d=/^https?:\/\//.test(d)&&!a.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;J.spin(O);mxUtils.get(d,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&299>=a.getStatus()&&(y(u,a.getText(),
-e,null,null,q,d),K&&B())}))});mxEvent.addListener(u,"dblclick",function(a){K=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(R-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>",k&&y(u),null!=g?mxEvent.addListener(u,"click",g):
-(mxEvent.addListener(u,"click",function(a){y(u,null,null,b,f)}),mxEvent.addListener(u,"dblclick",function(a){B()}));O.appendChild(u);return u}function A(){ja&&(ja=!1,mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<ga){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));Z.appendChild(b);for(var e in S){var c=
+(R-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>");var K=!1;mxEvent.addListener(u,"click",function(c){H.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";var d=b,d=/^https?:\/\//.test(d)&&!a.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;J.spin(O);mxUtils.get(d,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(u,a.getText(),
+e,null,null,q,d),K&&B())}))});mxEvent.addListener(u,"dblclick",function(a){K=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(R-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(c,null,c))+"</span></td></tr></table>",k&&z(u),null!=g?mxEvent.addListener(u,"click",g):
+(mxEvent.addListener(u,"click",function(a){z(u,null,null,b,f)}),mxEvent.addListener(u,"dblclick",function(a){B()}));O.appendChild(u);return u}function A(){ja&&(ja=!1,mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<ga){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));Z.appendChild(b);for(var e in S){var c=
document.createElement("div"),b=e,d=S[e];18<b.length&&(b=b.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=k&&(c.style.padding=k);Z.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=m,O.scrollTop=
0,O.innerHTML="",I=0,ha=S[b],M=null,x())})})(e,c)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");Z.appendChild(b)}for(e in da)c=document.createElement("div"),b=mxResources.get(e),d=da[e],null==b&&(b=e.substring(0,1).toUpperCase()+e.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=k&&(c.style.padding=k),Z.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=m,ha=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",I=0,ha=da[b],M=null,x())})}(e,c);x()}b=null!=b?b:!0;g=null!=g?g:!1;m=null!=m?m:"#ebf2f9";n=null!=n?n:"dark"==uiTheme?"#a2a2a2":"#e6eff8";e=null!=e?e:"dark"==uiTheme?
@@ -9629,15 +9629,15 @@ e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)O.innerHTML=b;else if(0==a.leng
"10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(G);var U=document.createElement("input");U.style.marginRight="10px";U.style.marginLeft="10px";U.style.width="220px";mxEvent.addListener(U,"keypress",function(a){13==a.keyCode&&T(!0)});v.appendChild(U);G=mxUtils.button(mxResources.get("search"),function(){T(!0)});G.className="geBtn";v.appendChild(G)}L(0)}var X=null,aa=null,ca=null,W=null,V=null,fa=null,ea=null,O=document.createElement("div");O.style.border="1px solid #d3d3d3";
O.style.position="absolute";O.style.left="160px";O.style.right="34px";v=(b?72:40)+(D?30:0);O.style.top=v+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var Z=document.createElement("div");Z.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var R=140,P=140,da={},S={},ga=0,ja=!0;da.basic=[{title:"blankDiagram",select:!0}];var ha=da.basic;if(!d){var Q=function(){mxUtils.get(ba,
function(a){if(!ka){ka=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],k=0;k<c.length;k++)d.push(encodeURIComponent(mxUtils.getTextContent(c[k])));null!=e&&0<d.length&&(b[e]=d.join(";"))}else e=a.getAttribute("url"),null!=e&&(c=a.getAttribute("section"),null==c&&(c=e.indexOf("/"),c=e.substring(0,c)),e=da[c],null==e&&(e=[],da[c]=e),c=a.getAttribute("clibs"),
-null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}J.stop();A()}})};F.appendChild(Z);F.appendChild(O);var ka=!1,ba=l;/^https?:\/\//.test(ba)&&!a.editor.isCorsEnabledForUrl(ba)&&(ba=PROXY_URL+"?url="+encodeURIComponent(ba));J.spin(O);null!=z?z(function(a,b){S=a;Y=ga=b;Q()},Q):Q();N=da}mxEvent.addListener(E,"keypress",function(b){a.dialog.container.firstChild==
-F&&13==b.keyCode&&B()});l=document.createElement("div");l.style.marginTop=d?"4px":"16px";l.style.textAlign="right";l.style.position="absolute";l.style.left="40px";l.style.bottom="24px";l.style.right="40px";d||a.isOffline()||!b||null!=c||g||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",l.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});z.className=
-"geBtn";!a.editor.cancelFirst||g&&null==f||l.appendChild(z);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),
+null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}J.stop();A()}})};F.appendChild(Z);F.appendChild(O);var ka=!1,ba=l;/^https?:\/\//.test(ba)&&!a.editor.isCorsEnabledForUrl(ba)&&(ba=PROXY_URL+"?url="+encodeURIComponent(ba));J.spin(O);null!=y?y(function(a,b){S=a;Y=ga=b;Q()},Q):Q();N=da}mxEvent.addListener(E,"keypress",function(b){a.dialog.container.firstChild==
+F&&13==b.keyCode&&B()});l=document.createElement("div");l.style.marginTop=d?"4px":"16px";l.style.textAlign="right";l.style.position="absolute";l.style.left="40px";l.style.bottom="24px";l.style.right="40px";d||a.isOffline()||!b||null!=c||g||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",l.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});y.className=
+"geBtn";!a.editor.cancelFirst||g&&null==f||l.appendChild(y);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),
d.className="geBtn",l.appendChild(d));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),q.className="geBtn",l.appendChild(q));l.appendChild(H);a.editor.cancelFirst||
-null!=c||g&&null==f||l.appendChild(z);F.appendChild(l);this.container=F},CreateDialog=function(a,d,b,c,g,f,m,n,e,k,l,p,t,u,q,v,z){function x(b,e,c,k){function l(){mxEvent.addListener(f,"click",function(){var b=c;if(m){var e=C.value,k=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>k){var b=null!=b?b:G.value,l="";b==App.MODE_GOOGLE?l=a.drive.extension:b==App.MODE_GITHUB?l=a.gitHub.extension:b==App.MODE_GITLAB?l=a.gitLab.extension:b==App.MODE_TRELLO?l=a.trello.extension:b==App.MODE_DROPBOX?l=a.dropbox.extension:
+null!=c||g&&null==f||l.appendChild(y);F.appendChild(l);this.container=F},CreateDialog=function(a,d,b,c,g,f,m,n,e,k,l,p,t,u,q,v,y){function x(b,e,c,k){function l(){mxEvent.addListener(f,"click",function(){var b=c;if(m){var e=C.value,k=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>k){var b=null!=b?b:G.value,l="";b==App.MODE_GOOGLE?l=a.drive.extension:b==App.MODE_GITHUB?l=a.gitHub.extension:b==App.MODE_GITLAB?l=a.gitLab.extension:b==App.MODE_TRELLO?l=a.trello.extension:b==App.MODE_DROPBOX?l=a.dropbox.extension:
b==App.MODE_ONEDRIVE?l=a.oneDrive.extension:b==App.MODE_DEVICE&&(l=".drawio");0<=k&&(e=e.substring(0,k));C.value=e+l}}B(c)})}var f=document.createElement("a");f.style.overflow="hidden";var g=document.createElement("img");g.src=b;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";f.style.display="inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";
f.style.whiteSpace="nowrap";f.appendChild(g);f.style.color="gray";f.style.fontSize="11px";var t=document.createElement("div");f.appendChild(t);mxUtils.write(t,e);if(null!=k&&null==a[k]){g.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(f);var q=window.setTimeout(function(){null==a[k]&&(u.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",
-mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(q),mxUtils.setOpacity(t,100),g.style.visibility="",u.stop(),l())}))}else l();F.appendChild(f);++D==p&&(mxUtils.br(F),D=0)}function B(e){var c=C.value;if(null==e||null!=c&&0<c.length)z&&a.hideDialog(),b(c,e,C)}m=null!=m?m:!0;n=null!=n?n:!0;p=null!=p?p:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==c&&a.addLanguageMenu(f);var y=document.createElement("h2");mxUtils.write(y,g||mxResources.get("create"));
-y.style.marginTop="0px";y.style.marginBottom="24px";f.appendChild(y);mxUtils.write(f,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",d);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};f.appendChild(C);null!=v&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,
+mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(q),mxUtils.setOpacity(t,100),g.style.visibility="",u.stop(),l())}))}else l();F.appendChild(f);++D==p&&(mxUtils.br(F),D=0)}function B(e){var c=C.value;if(null==e||null!=c&&0<c.length)y&&a.hideDialog(),b(c,e,C)}m=null!=m?m:!0;n=null!=n?n:!0;p=null!=p?p:4;y=null!=y?y:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==c&&a.addLanguageMenu(f);var z=document.createElement("h2");mxUtils.write(z,g||mxResources.get("create"));
+z.style.marginTop="0px";z.style.marginBottom="24px";f.appendChild(z);mxUtils.write(f,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",d);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};f.appendChild(C);null!=v&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,
C,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",f.appendChild(g)),f.appendChild(FilenameDialog.createTypeHint(a,C,v)));v=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";g=document.createElement("img");var A=q?t:btoa(unescape(encodeURIComponent(t)));g.setAttribute("src","data:"+u+";base64,"+A);g.style.position="absolute";g.style.top="70px";g.style.right="100px";g.style.maxWidth="120px";g.style.maxHeight=
"80px";mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)");f.appendChild(g);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(v=mxUtils.button(mxResources.get("copy"),function(b){"image/png"!=u||mxEvent.isShiftDown(b)?(b=new ClipboardItem({"text/html":new Blob(['<img src="data:'+u+";base64,"+A+'">'],{type:"text/html"})}),navigator.clipboard.write([b]).then(mxUtils.bind(this,function(){a.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(b){a.handleError(b)}))):
(b=a.base64ToBlob(A,"image/png"),b=new ClipboardItem({"image/png":b}),navigator.clipboard.write([b]).then(mxUtils.bind(this,function(){a.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(b){a.handleError(b)})))}),v.style.marginTop="6px",v.className="geBtn");e&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(a){mxEvent.isPopupTrigger(a)||B("_blank")}))}mxUtils.br(f);var F=document.createElement("div");F.style.textAlign=
@@ -9666,7 +9666,7 @@ mxResources.get("dragUrlsHere"));l.setAttribute("type","text");l.style.marginTop
p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(p,"click",function(){l.value="";l.focus()});var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","current-linkdialog");var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","url");u.setAttribute("type",
"radio");u.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="100%";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.margin="0 6p 0 6px";null!=m&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);m=null!=m?m:"_blank";v.setAttribute("title",m);f&&(l.style.width="340px");if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(l.setAttribute("value",
d),t.setAttribute("checked","checked"),t.defaultChecked=!0);k.appendChild(t);k.appendChild(l);k.appendChild(p);f&&(k.appendChild(v),mxUtils.write(k,mxResources.get("openInNewWindow")));mxUtils.br(k);k.appendChild(u);g=!1;for(f=0;f<a.pages.length;f++)p=document.createElement("option"),mxUtils.write(p,a.pages[f].getName()||mxResources.get("pageWithNumber",[f+1])),p.setAttribute("value","data:page/id,"+a.pages[f].getId()),d==p.getAttribute("value")&&(p.setAttribute("selected","selected"),g=!0),q.appendChild(p);
-if(!g&&u.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");q.appendChild(z);mxEvent.addListener(q,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}k.appendChild(q)}else l.setAttribute("value",d),k.appendChild(l),k.appendChild(p);e.appendChild(k);var x=mxUtils.button(b,function(){a.hideDialog();c(u.checked?
+if(!g&&u.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");q.appendChild(y);mxEvent.addListener(q,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}k.appendChild(q)}else l.setAttribute("value",d),k.appendChild(l),k.appendChild(p);e.appendChild(k);var x=mxUtils.button(b,function(){a.hideDialog();c(u.checked?
"pageNotFound"!==q.value?q.value:d:l.value,LinkDialog.selectedDocs,v.checked?m:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){u.checked?q.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(l,"focus",function(){u.removeAttribute("checked");
t.setAttribute("checked","checked");t.checked=!0});if(Graph.fileSupport){var b=e.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),
c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),t.setAttribute("checked","checked"),t.checked=!0,x.click());a.stopPropagation();a.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="20px";B.style.textAlign="center";b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/doc/faq/custom-links")});b.style.verticalAlign="middle";b.className="geBtn";B.appendChild(b);
@@ -9684,53 +9684,53 @@ n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")});mxEvent.ad
var RevisionDialog=function(a,d,b){var c=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));c.appendChild(g);g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";c.appendChild(g);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.left="199px";f.style.width="470px";f.style.height="376px";
f.style.overflow="hidden";var m=document.createElement("div");m.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";f.appendChild(m);mxEvent.disableContextMenu(f);c.appendChild(f);var n=new Graph(f);n.setTooltips(!1);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var e=0,k=null,l=0,p=n.getGlobalVariable;
n.getGlobalVariable=function(a){return"page"==a&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==a?l+1:"pagecount"==a?null!=k?k.length:1:p.apply(this,arguments)};n.getLinkForCell=function(){return null};Editor.MathJaxRender&&n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));for(var t=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.4,
-trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),q=a.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},z=0;z<q.length;z++)v[q[z].getAttribute("id")]=q[z];var x=null,B=null,y=null,C=null,A=mxUtils.button("",function(){null!=y&&n.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,
-20);var F=mxUtils.button("",function(){null!=y&&n.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var D=mxUtils.button("",function(){null!=y&&(n.maxFitScale=8,n.fit(8),n.center())});D.className="geSprite geSprite-fit";D.setAttribute("title",mxResources.get("fit"));D.style.outline="none";D.style.border="none";D.style.margin=
-"2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var G=mxUtils.button("",function(){null!=y&&(n.zoomActual(),n.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var E=mxUtils.button("",function(){});E.className="geSprite geSprite-middle";E.setAttribute("title",mxResources.get("compare"));E.style.outline=
+trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),q=a.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},y=0;y<q.length;y++)v[q[y].getAttribute("id")]=q[y];var x=null,B=null,z=null,C=null,A=mxUtils.button("",function(){null!=z&&n.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,
+20);var F=mxUtils.button("",function(){null!=z&&n.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var D=mxUtils.button("",function(){null!=z&&(n.maxFitScale=8,n.fit(8),n.center())});D.className="geSprite geSprite-fit";D.setAttribute("title",mxResources.get("fit"));D.style.outline="none";D.style.border="none";D.style.margin=
+"2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var G=mxUtils.button("",function(){null!=z&&(n.zoomActual(),n.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var E=mxUtils.button("",function(){});E.className="geSprite geSprite-middle";E.setAttribute("title",mxResources.get("compare"));E.style.outline=
"none";E.style.border="none";E.style.margin="2px";mxUtils.setOpacity(E,60);var I=f.cloneNode(!1);I.style.pointerEvent="none";f.parentNode.appendChild(I);var J=new Graph(I);J.setTooltips(!1);J.setEnabled(!1);J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;mxEvent.addGestureListeners(E,function(a){a=v[k[e].getAttribute("id")];mxUtils.setOpacity(E,20);m.innerHTML="";null==a?mxUtils.write(m,mxResources.get("pageNotFound")):
(H.style.display="none",f.style.display="none",I.style.display="",I.style.backgroundColor=f.style.backgroundColor,a=Editor.parseDiagramNode(a),(new mxCodec(a.ownerDocument)).decode(a,J.getModel()),J.view.scaleAndTranslate(n.view.scale,n.view.translate.x,n.view.translate.y))},null,function(){mxUtils.setOpacity(E,60);m.innerHTML="";"none"==f.style.display&&(H.style.display="",f.style.display="",I.style.display="none")});var H=document.createElement("div");H.style.position="absolute";H.style.textAlign=
-"right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var K=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=mxUtils.getXml(y.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});K.className="geBtn";K.setAttribute("disabled","disabled");var M=mxUtils.button(mxResources.get("restore"),function(e){null!=y&&null!=C&&(mxEvent.isShiftDown(e)?null!=y&&(e=a.getPagesForNode(y.documentElement),e=a.diffPages(a.pages,e),e=new TextareaDialog(a,mxResources.get("compare"),JSON.stringify(e,null,2),function(b){if(0<b.length)try{a.confirm(mxResources.get("areYouSure"),function(){u.patch([JSON.parse(b)],null,
+"right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var K=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,
+"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});K.className="geBtn";K.setAttribute("disabled","disabled");var M=mxUtils.button(mxResources.get("restore"),function(e){null!=z&&null!=C&&(mxEvent.isShiftDown(e)?null!=z&&(e=a.getPagesForNode(z.documentElement),e=a.diffPages(a.pages,e),e=new TextareaDialog(a,mxResources.get("compare"),JSON.stringify(e,null,2),function(b){if(0<b.length)try{a.confirm(mxResources.get("areYouSure"),function(){u.patch([JSON.parse(b)],null,
!0);a.hideDialog();a.hideDialog()})}catch(O){a.handleError(O)}},null,null,null,null,null,!0,null,mxResources.get("merge")),e.textarea.style.width="600px",e.textarea.style.height="380px",a.showDialog(e.container,620,460,!0,!0),e.init()):a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(C):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();a.replaceFileData(C);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,
-null!=b?mxResources.get("errorSavingFile"):null)})}))});M.className="geBtn";M.setAttribute("disabled","disabled");var N=document.createElement("select");N.setAttribute("disabled","disabled");N.style.maxWidth="80px";N.style.position="relative";N.style.top="-2px";N.style.verticalAlign="bottom";N.style.marginRight="6px";N.style.display="none";var Y=null;mxEvent.addListener(N,"change",function(a){null!=Y&&(Y(a),mxEvent.consume(a))});var L=mxUtils.button(mxResources.get("edit"),function(){null!=y&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});L.className="geBtn";L.setAttribute("disabled","disabled");null!=b&&(L.style.display="none");var T=mxUtils.button(mxResources.get("show"),function(){null!=B&&a.openLink(B.getUrl(N.selectedIndex))});T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");null!=b&&(T.style.display="none",M.className="geBtn gePrimaryBtn");q=document.createElement("div");
+null!=b?mxResources.get("errorSavingFile"):null)})}))});M.className="geBtn";M.setAttribute("disabled","disabled");var N=document.createElement("select");N.setAttribute("disabled","disabled");N.style.maxWidth="80px";N.style.position="relative";N.style.top="-2px";N.style.verticalAlign="bottom";N.style.marginRight="6px";N.style.display="none";var Y=null;mxEvent.addListener(N,"change",function(a){null!=Y&&(Y(a),mxEvent.consume(a))});var L=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});L.className="geBtn";L.setAttribute("disabled","disabled");null!=b&&(L.style.display="none");var T=mxUtils.button(mxResources.get("show"),function(){null!=B&&a.openLink(B.getUrl(N.selectedIndex))});T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");null!=b&&(T.style.display="none",M.className="geBtn gePrimaryBtn");q=document.createElement("div");
q.style.position="absolute";q.style.top="482px";q.style.width="640px";q.style.textAlign="right";var U=document.createElement("div");U.className="geToolbarContainer";U.style.backgroundColor="transparent";U.style.padding="2px";U.style.border="none";U.style.left="199px";U.style.top="442px";var X=null;if(null!=d&&0<d.length){f.style.cursor="move";var aa=document.createElement("table");aa.style.border="1px solid lightGray";aa.style.borderCollapse="collapse";aa.style.borderSpacing="0px";aa.style.width=
-"100%";var ca=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(e=mxUtils.indexOf(a.pages,a.currentPage));for(z=d.length-1;0<=z;z--){var V=function(b){var c=new Date(b.modifiedDate),g=null;if(0<=c.getTime()){var p=function(d){t.stop();m.innerHTML="";var p=mxUtils.parseXml(d),q=a.editor.extractGraphModel(p.documentElement,!0);if(null!=q){var v=function(a){null!=a&&(a=x(Editor.parseDiagramNode(a)));return a},x=function(a){var b=a.getAttribute("background");
-if(null==b||""==b||b==mxConstants.NONE)b=n.defaultPageBackgroundColor;f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};N.style.display="none";N.innerHTML="";y=p;C=d;k=parseSelectFunction=null;l=0;if("mxfile"==q.nodeName){p=q.getElementsByTagName("diagram");k=[];for(d=0;d<p.length;d++)k.push(p[d]);l=Math.min(e,k.length-1);0<k.length&&v(k[l]);if(1<k.length)for(N.removeAttribute("disabled"),N.style.display="",d=0;d<k.length;d++)p=
+"100%";var ca=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(e=mxUtils.indexOf(a.pages,a.currentPage));for(y=d.length-1;0<=y;y--){var V=function(b){var c=new Date(b.modifiedDate),g=null;if(0<=c.getTime()){var p=function(d){t.stop();m.innerHTML="";var p=mxUtils.parseXml(d),q=a.editor.extractGraphModel(p.documentElement,!0);if(null!=q){var v=function(a){null!=a&&(a=x(Editor.parseDiagramNode(a)));return a},x=function(a){var b=a.getAttribute("background");
+if(null==b||""==b||b==mxConstants.NONE)b=n.defaultPageBackgroundColor;f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};N.style.display="none";N.innerHTML="";z=p;C=d;k=parseSelectFunction=null;l=0;if("mxfile"==q.nodeName){p=q.getElementsByTagName("diagram");k=[];for(d=0;d<p.length;d++)k.push(p[d]);l=Math.min(e,k.length-1);0<k.length&&v(k[l]);if(1<k.length)for(N.removeAttribute("disabled"),N.style.display="",d=0;d<k.length;d++)p=
document.createElement("option"),mxUtils.write(p,k[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),p.setAttribute("value",d),d==l&&p.setAttribute("selected","selected"),N.appendChild(p);Y=function(){try{var b=parseInt(N.value);l=e=b;v(k[b])}catch(Q){N.value=e,a.handleError(Q)}}}else x(q);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());H.setAttribute("title",
g.getAttribute("title"));A.removeAttribute("disabled");F.removeAttribute("disabled");D.removeAttribute("disabled");G.removeAttribute("disabled");E.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&M.removeAttribute("disabled"),K.removeAttribute("disabled"),T.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(E,60)}else N.style.display="none",
N.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(m,mxResources.get("errorLoadingFile"))},g=document.createElement("tr");g.style.borderBottom="1px solid lightGray";g.style.fontSize="12px";g.style.cursor="pointer";var q=document.createElement("td");q.style.padding="6px";q.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(q,mxResources.get("current")):c.toDateString()===W?mxUtils.write(q,c.toLocaleTimeString()):mxUtils.write(q,c.toLocaleDateString()+
-" "+c.toLocaleTimeString());g.appendChild(q);g.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(a){B!=b&&(t.stop(),null!=x&&(x.style.backgroundColor=""),B=b,x=g,x.style.backgroundColor="dark"==uiTheme?"#000000":"#ebf2f9",C=y=null,H.removeAttribute("title"),H.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
+" "+c.toLocaleTimeString());g.appendChild(q);g.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(a){B!=b&&(t.stop(),null!=x&&(x.style.backgroundColor=""),B=b,x=g,x.style.backgroundColor="dark"==uiTheme?"#000000":"#ebf2f9",C=z=null,H.removeAttribute("title"),H.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
"..."),f.style.backgroundColor=n.defaultPageBackgroundColor,m.innerHTML="",n.getModel().clear(),M.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),
mxUtils.setOpacity(F,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(E,20),t.spin(f),b.getXml(function(a){if(B==b)try{p(a)}catch(S){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+S.message)}},function(a){t.stop();N.style.display="none";N.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(m,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(g,"dblclick",function(a){T.click();window.getSelection?
-window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);ca.appendChild(g)}return g}(d[z]);null!=V&&z==d.length-1&&(X=V)}aa.appendChild(ca);g.appendChild(aa)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(f.style.display="none",U.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(f.style.display="none",U.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
+window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);ca.appendChild(g)}return g}(d[y]);null!=V&&y==d.length-1&&(X=V)}aa.appendChild(ca);g.appendChild(aa)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(f.style.display="none",U.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(f.style.display="none",U.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
this.init=function(){null!=X&&X.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";U.appendChild(N);U.appendChild(A);U.appendChild(F);U.appendChild(G);U.appendChild(D);U.appendChild(E);a.editor.cancelFirst?(q.appendChild(g),q.appendChild(K),q.appendChild(L),q.appendChild(M),q.appendChild(T)):(q.appendChild(K),q.appendChild(L),q.appendChild(M),q.appendChild(T),q.appendChild(g));c.appendChild(q);c.appendChild(U);c.appendChild(H);this.container=c},DraftDialog=
-function(a,d,b,c,g,f,m,n,e){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,d);k.appendChild(l);var p=document.createElement("select"),t=mxUtils.bind(this,function(){B=mxUtils.parseXml(e[p.value].data);y=a.editor.extractGraphModel(B.documentElement,!0);C=0;this.init()});if(null!=e){p.style.marginLeft="4px";for(d=0;d<e.length;d++){var u=document.createElement("option");
-u.setAttribute("value",d);var q=new Date(e[d].created),v=new Date(e[d].modified);mxUtils.write(u,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}l.appendChild(p);mxEvent.addListener(p,"change",t)}null==b&&(b=e[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.left="40px";z.style.right="40px";z.style.top=
-"46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);k.appendChild(z);var x=new Graph(z);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var B=mxUtils.parseXml(b),y=a.editor.extractGraphModel(B.documentElement,!0),C=0,A=null,F=x.getGlobalVariable;x.getGlobalVariable=function(a){return"page"==a&&null!=A&&null!=A[C]?A[C].getAttribute("name"):"pagenumber"==
+function(a,d,b,c,g,f,m,n,e){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,d);k.appendChild(l);var p=document.createElement("select"),t=mxUtils.bind(this,function(){B=mxUtils.parseXml(e[p.value].data);z=a.editor.extractGraphModel(B.documentElement,!0);C=0;this.init()});if(null!=e){p.style.marginLeft="4px";for(d=0;d<e.length;d++){var u=document.createElement("option");
+u.setAttribute("value",d);var q=new Date(e[d].created),v=new Date(e[d].modified);mxUtils.write(u,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}l.appendChild(p);mxEvent.addListener(p,"change",t)}null==b&&(b=e[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";y.style.marginTop="10px";y.style.left="40px";y.style.right="40px";y.style.top=
+"46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);k.appendChild(y);var x=new Graph(y);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var B=mxUtils.parseXml(b),z=a.editor.extractGraphModel(B.documentElement,!0),C=0,A=null,F=x.getGlobalVariable;x.getGlobalVariable=function(a){return"page"==a&&null!=A&&null!=A[C]?A[C].getAttribute("name"):"pagenumber"==
a?C+1:"pagecount"==a?null!=A?A.length:1:F.apply(this,arguments)};x.getLinkForCell=function(){return null};b=mxUtils.button("",function(){x.zoomIn()});b.className="geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);l=mxUtils.button("",function(){x.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",mxResources.get("zoomOut"));l.style.outline="none";l.style.border=
"none";l.style.margin="2px";mxUtils.setOpacity(l,60);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);u=mxUtils.button("",function(){x.zoomActual();x.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin=
"2px";mxUtils.setOpacity(u,60);m=mxUtils.button(m||mxResources.get("discard"),function(){g.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,t()):a.hideDialog(!0))})])});m.className="geBtn";var D=document.createElement("select");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";
D.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){c.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.right="40px";q.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=
-a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="dark"==uiTheme?"transparent":"#ffffff";z.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return a}function b(b){null!=b&&(b=a(Editor.parseDiagramNode(b)));return b}mxEvent.addListener(D,"change",function(a){C=parseInt(D.value);b(A[C]);mxEvent.consume(a)});if("mxfile"==y.nodeName){var e=y.getElementsByTagName("diagram");A=[];for(var c=0;c<e.length;c++)A.push(e[c]);
-0<A.length&&b(A[C]);D.innerHTML="";if(1<A.length)for(D.style.display="",c=0;c<A.length;c++)e=document.createElement("option"),mxUtils.write(e,A[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==C&&e.setAttribute("selected","selected"),D.appendChild(e);else D.style.display="none"}else a(y)};v.appendChild(D);v.appendChild(b);v.appendChild(l);v.appendChild(u);v.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
+a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="dark"==uiTheme?"transparent":"#ffffff";y.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return a}function b(b){null!=b&&(b=a(Editor.parseDiagramNode(b)));return b}mxEvent.addListener(D,"change",function(a){C=parseInt(D.value);b(A[C]);mxEvent.consume(a)});if("mxfile"==z.nodeName){var e=z.getElementsByTagName("diagram");A=[];for(var c=0;c<e.length;c++)A.push(e[c]);
+0<A.length&&b(A[C]);D.innerHTML="";if(1<A.length)for(D.style.display="",c=0;c<A.length;c++)e=document.createElement("option"),mxUtils.write(e,A[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==C&&e.setAttribute("selected","selected"),D.appendChild(e);else D.style.display="none"}else a(z)};v.appendChild(D);v.appendChild(b);v.appendChild(l);v.appendChild(u);v.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
"geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(q.appendChild(b),null!=n&&q.appendChild(n),q.appendChild(m),q.appendChild(f)):(q.appendChild(f),q.appendChild(m),null!=n&&q.appendChild(n),q.appendChild(b));k.appendChild(q);k.appendChild(v);this.container=k},FindWindow=function(a,d,b,c,g,f){function m(a,b,e){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var d=
mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,e.length)===e||null!=a&&a.test(d))return!0}}return!1}function n(){u&&A.value?(K.removeAttribute("disabled"),M.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));A.value&&C.value?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}function e(b,c,d){J.innerHTML="";var k=l.model.getDescendants(l.model.getRoot()),g=C.value.toLowerCase(),
-y=F.checked?new RegExp(g):null,K=null;v=null;p!=g&&(p=g,t=null,q=!1);var x=null==t;if(0<g.length){if(q){q=!1;for(var A,M=0;M<a.pages.length;M++)if(a.currentPage==a.pages[M]){A=M;break}b=(A+1)%a.pages.length;t=null;do q=!1,k=a.pages[b],l=a.createTemporaryGraph(l.getStylesheet()),a.updatePageRoot(k),l.model.setRoot(k.root),b=(b+1)%a.pages.length;while(!e(!0,c,d)&&b!=A);t&&(t=null,d?a.editor.graph.model.execute(new SelectPage(a,k)):a.selectPage(k));q=!1;l=a.editor.graph;return e(!0,c,d)}for(M=0;M<k.length;M++){A=
-l.view.getState(k[M]);c&&null!=y&&(x=x||A==t);if(null!=A&&null!=A.cell.value&&(x||null==K)&&(l.model.isVertex(A.cell)||l.model.isEdge(A.cell))){null!=A.style&&"1"==A.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(A.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(A.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var N=0;c&&f&&null!=y&&A==t&&(label=label.substr(z),N=z);if(null==y&&(label.substring(0,g.length)===g||!f&&m(y,A.cell,g))||null!=
-y&&(y.test(label)||!f&&m(y,A.cell,g))){if(f)if(null!=y){var L=label.match(y);v=L[0].toLowerCase();z=N+L.index+v.length}else v=g,z=v.length;if(x){K=A;break}else null==K&&(K=A)}}x=x||A==t}}if(null!=K){if(M==k.length&&D.checked)return t=null,q=!0,e(!0,c,d);t=K;l.scrollCellToVisible(t.cell);l.isEnabled()?d||l.getSelectionCell()==t.cell&&1==l.getSelectionCount()||l.setSelectionCell(t.cell):l.highlightCell(t.cell)}else{if(!b&&D.checked)return q=!0,e(!0,c,d);l.isEnabled()&&!d&&l.clearSelection()}u=null!=
-K;f&&!b&&n();return 0==g.length||null!=K}var k=a.actions.get("findReplace"),l=a.editor.graph,p=null,t=null,u=!1,q=!1,v=null,z=0,x=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var y=f?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=y;C.style.fontSize="12px";C.style.borderRadius=
-"4px";C.style.padding="6px";B.appendChild(C);mxUtils.br(B);var A;f&&(A=document.createElement("input"),A.setAttribute("placeholder",mxResources.get("replaceWith")),A.setAttribute("type","text"),A.style.marginTop="4px",A.style.marginBottom="6px",A.style.width=y,A.style.fontSize="12px",A.style.borderRadius="4px",A.style.padding="6px",B.appendChild(A),mxUtils.br(B),mxEvent.addListener(A,"input",n));var F=document.createElement("input");F.setAttribute("id","geFindWinRegExChck");F.setAttribute("type",
-"checkbox");F.style.marginRight="4px";B.appendChild(F);y=document.createElement("label");y.setAttribute("for","geFindWinRegExChck");B.appendChild(y);mxUtils.write(y,mxResources.get("regularExpression"));B.appendChild(y);y=a.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");y.style.position="relative";y.style.marginLeft="6px";y.style.top="-1px";B.appendChild(y);mxUtils.br(B);var D=document.createElement("input");D.setAttribute("id","geFindWinAllPagesChck");D.setAttribute("type",
-"checkbox");D.style.marginRight="4px";B.appendChild(D);y=document.createElement("label");y.setAttribute("for","geFindWinAllPagesChck");B.appendChild(y);mxUtils.write(y,mxResources.get("allPages"));B.appendChild(y);var G=document.createElement("div");mxUtils.br(B);y=document.createElement("div");y.style.left="0px";y.style.right="0px";y.style.marginTop="6px";y.style.padding="0 6px 0 6px";y.style.textAlign="center";B.appendChild(y);var E=mxUtils.button(mxResources.get("reset"),function(){J.innerHTML=
-"";C.value="";C.style.backgroundColor="";f&&(A.value="",n());p=t=null;q=!1;C.focus()});E.setAttribute("title",mxResources.get("reset"));E.style["float"]="none";E.style.width="120px";E.style.marginTop="6px";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.className="geBtn";f||y.appendChild(E);var I=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=e()?"":"dark"==uiTheme?"#ff0000":"#ffcfcf"}catch(L){a.handleError(L)}});I.setAttribute("title",mxResources.get("find")+
-" (Enter)");I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";y.appendChild(I);var J=document.createElement("div");J.style.marginTop="10px";if(f){var H=function(a,b,e,c,d){if(null==d||"1"!=d.html)return c=a.toLowerCase().indexOf(b,c),0>c?a:a.substr(0,c)+e+a.substr(c+b.length);var k=a;b=mxUtils.htmlEntities(b);d=[];for(var l=-1;-1<(l=a.indexOf("<",l+1));)d.push(l);l=a.match(/<[^>]*>/g);a=
-a.replace(/<[^>]*>/g,"");c=a.toLowerCase().indexOf(b,c);if(0>c)return k;k=c+b.length;e=mxUtils.htmlEntities(e);a=a.substr(0,c)+e+a.substr(k);for(var f=0,g=0;g<d.length;g++){if(d[g]-f<c)a=a.substr(0,d[g])+l[g]+a.substr(d[g]);else{var p=d[g]-f<k?c+f:d[g]+(e.length-b.length);a=a.substr(0,p)+l[g]+a.substr(p)}f+=l[g].length}return a},K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=t&&A.value){var b=t.cell,c=l.getLabel(b);l.model.setValue(b,H(c,v,A.value,z-v.length,l.getCurrentCellStyle(b)));
-C.style.backgroundColor=e(!1,!0)?"":"dark"==uiTheme?"#ff0000":"#ffcfcf"}}catch(U){a.handleError(U)}});K.setAttribute("title",mxResources.get("replFind"));K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");y.appendChild(K);mxUtils.br(y);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=t&&A.value){var b=t.cell,e=l.getLabel(b);
-l.model.setValue(b,H(e,v,A.value,z-v.length,l.getCurrentCellStyle(b)));K.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(U){a.handleError(U)}});M.setAttribute("title",mxResources.get("replace"));M.style["float"]="none";M.style.width="120px";M.style.marginTop="6px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");y.appendChild(M);var N=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerHTML=
-"";if(A.value){var b=a.currentPage,c=a.editor.graph.getSelectionCells();a.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var d=0,k={};e(!1,!0,!0)&&100>d;){var f=t.cell,g=l.getLabel(f),p=k[f.id];if(p&&p.replAllMrk==x&&p.replAllPos>=z)break;k[f.id]={replAllMrk:x,replAllPos:z};l.model.setValue(f,H(g,v,A.value,z-v.length,l.getCurrentCellStyle(f)));d++}b!=a.currentPage&&a.editor.graph.model.execute(new SelectPage(a,b));mxUtils.write(J,mxResources.get("matchesRepl",[d]))}catch(V){a.handleError(V)}finally{l.getModel().endUpdate(),
-a.editor.graph.setSelectionCells(c),a.editor.graph.rendering=!0}x++}});N.setAttribute("title",mxResources.get("replaceAll"));N.style["float"]="none";N.style.width="120px";N.style.marginTop="6px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");y.appendChild(N);mxUtils.br(y);y.appendChild(E);E=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));E.setAttribute("title",mxResources.get("close"));
-E.style["float"]="none";E.style.width="120px";E.style.marginTop="6px";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.className="geBtn";y.appendChild(E);mxUtils.br(y);y.appendChild(J)}else E.style.width="90px",I.style.width="90px";mxEvent.addListener(C,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)k.funct();else if(p!=C.value.toLowerCase()||13==a.keyCode)try{C.style.backgroundColor=e()?"":"dark"==uiTheme?"#ff0000":"#ffcfcf"}catch(T){C.style.backgroundColor=
+z=F.checked?new RegExp(g):null,K=null;v=null;p!=g&&(p=g,t=null,q=!1);var x=null==t;if(0<g.length){if(q){q=!1;for(var A,M=0;M<a.pages.length;M++)if(a.currentPage==a.pages[M]){A=M;break}b=(A+1)%a.pages.length;t=null;do q=!1,k=a.pages[b],l=a.createTemporaryGraph(l.getStylesheet()),a.updatePageRoot(k),l.model.setRoot(k.root),b=(b+1)%a.pages.length;while(!e(!0,c,d)&&b!=A);t&&(t=null,d?a.editor.graph.model.execute(new SelectPage(a,k)):a.selectPage(k));q=!1;l=a.editor.graph;return e(!0,c,d)}for(M=0;M<k.length;M++){A=
+l.view.getState(k[M]);c&&null!=z&&(x=x||A==t);if(null!=A&&null!=A.cell.value&&(x||null==K)&&(l.model.isVertex(A.cell)||l.model.isEdge(A.cell))){null!=A.style&&"1"==A.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(A.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(A.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var N=0;c&&f&&null!=z&&A==t&&(label=label.substr(y),N=y);if(null==z&&(label.substring(0,g.length)===g||!f&&m(z,A.cell,g))||null!=
+z&&(z.test(label)||!f&&m(z,A.cell,g))){if(f)if(null!=z){var L=label.match(z);v=L[0].toLowerCase();y=N+L.index+v.length}else v=g,y=v.length;if(x){K=A;break}else null==K&&(K=A)}}x=x||A==t}}if(null!=K){if(M==k.length&&D.checked)return t=null,q=!0,e(!0,c,d);t=K;l.scrollCellToVisible(t.cell);l.isEnabled()?d||l.getSelectionCell()==t.cell&&1==l.getSelectionCount()||l.setSelectionCell(t.cell):l.highlightCell(t.cell)}else{if(!b&&D.checked)return q=!0,e(!0,c,d);l.isEnabled()&&!d&&l.clearSelection()}u=null!=
+K;f&&!b&&n();return 0==g.length||null!=K}var k=a.actions.get("findReplace"),l=a.editor.graph,p=null,t=null,u=!1,q=!1,v=null,y=0,x=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var z=f?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=z;C.style.fontSize="12px";C.style.borderRadius=
+"4px";C.style.padding="6px";B.appendChild(C);mxUtils.br(B);var A;f&&(A=document.createElement("input"),A.setAttribute("placeholder",mxResources.get("replaceWith")),A.setAttribute("type","text"),A.style.marginTop="4px",A.style.marginBottom="6px",A.style.width=z,A.style.fontSize="12px",A.style.borderRadius="4px",A.style.padding="6px",B.appendChild(A),mxUtils.br(B),mxEvent.addListener(A,"input",n));var F=document.createElement("input");F.setAttribute("id","geFindWinRegExChck");F.setAttribute("type",
+"checkbox");F.style.marginRight="4px";B.appendChild(F);z=document.createElement("label");z.setAttribute("for","geFindWinRegExChck");B.appendChild(z);mxUtils.write(z,mxResources.get("regularExpression"));B.appendChild(z);z=a.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");z.style.position="relative";z.style.marginLeft="6px";z.style.top="-1px";B.appendChild(z);mxUtils.br(B);var D=document.createElement("input");D.setAttribute("id","geFindWinAllPagesChck");D.setAttribute("type",
+"checkbox");D.style.marginRight="4px";B.appendChild(D);z=document.createElement("label");z.setAttribute("for","geFindWinAllPagesChck");B.appendChild(z);mxUtils.write(z,mxResources.get("allPages"));B.appendChild(z);var G=document.createElement("div");mxUtils.br(B);z=document.createElement("div");z.style.left="0px";z.style.right="0px";z.style.marginTop="6px";z.style.padding="0 6px 0 6px";z.style.textAlign="center";B.appendChild(z);var E=mxUtils.button(mxResources.get("reset"),function(){J.innerHTML=
+"";C.value="";C.style.backgroundColor="";f&&(A.value="",n());p=t=null;q=!1;C.focus()});E.setAttribute("title",mxResources.get("reset"));E.style["float"]="none";E.style.width="120px";E.style.marginTop="6px";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.className="geBtn";f||z.appendChild(E);var I=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=e()?"":"dark"==uiTheme?"#ff0000":"#ffcfcf"}catch(L){a.handleError(L)}});I.setAttribute("title",mxResources.get("find")+
+" (Enter)");I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";z.appendChild(I);var J=document.createElement("div");J.style.marginTop="10px";if(f){var H=function(a,b,e,c,d){if(null==d||"1"!=d.html)return c=a.toLowerCase().indexOf(b,c),0>c?a:a.substr(0,c)+e+a.substr(c+b.length);var k=a;b=mxUtils.htmlEntities(b);d=[];for(var l=-1;-1<(l=a.indexOf("<",l+1));)d.push(l);l=a.match(/<[^>]*>/g);a=
+a.replace(/<[^>]*>/g,"");c=a.toLowerCase().indexOf(b,c);if(0>c)return k;k=c+b.length;e=mxUtils.htmlEntities(e);a=a.substr(0,c)+e+a.substr(k);for(var f=0,g=0;g<d.length;g++){if(d[g]-f<c)a=a.substr(0,d[g])+l[g]+a.substr(d[g]);else{var p=d[g]-f<k?c+f:d[g]+(e.length-b.length);a=a.substr(0,p)+l[g]+a.substr(p)}f+=l[g].length}return a},K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=t&&A.value){var b=t.cell,c=l.getLabel(b);l.model.setValue(b,H(c,v,A.value,y-v.length,l.getCurrentCellStyle(b)));
+C.style.backgroundColor=e(!1,!0)?"":"dark"==uiTheme?"#ff0000":"#ffcfcf"}}catch(U){a.handleError(U)}});K.setAttribute("title",mxResources.get("replFind"));K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");z.appendChild(K);mxUtils.br(z);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=t&&A.value){var b=t.cell,e=l.getLabel(b);
+l.model.setValue(b,H(e,v,A.value,y-v.length,l.getCurrentCellStyle(b)));K.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(U){a.handleError(U)}});M.setAttribute("title",mxResources.get("replace"));M.style["float"]="none";M.style.width="120px";M.style.marginTop="6px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");z.appendChild(M);var N=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerHTML=
+"";if(A.value){var b=a.currentPage,c=a.editor.graph.getSelectionCells();a.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var d=0,k={};e(!1,!0,!0)&&100>d;){var f=t.cell,g=l.getLabel(f),p=k[f.id];if(p&&p.replAllMrk==x&&p.replAllPos>=y)break;k[f.id]={replAllMrk:x,replAllPos:y};l.model.setValue(f,H(g,v,A.value,y-v.length,l.getCurrentCellStyle(f)));d++}b!=a.currentPage&&a.editor.graph.model.execute(new SelectPage(a,b));mxUtils.write(J,mxResources.get("matchesRepl",[d]))}catch(V){a.handleError(V)}finally{l.getModel().endUpdate(),
+a.editor.graph.setSelectionCells(c),a.editor.graph.rendering=!0}x++}});N.setAttribute("title",mxResources.get("replaceAll"));N.style["float"]="none";N.style.width="120px";N.style.marginTop="6px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");z.appendChild(N);mxUtils.br(z);z.appendChild(E);E=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));E.setAttribute("title",mxResources.get("close"));
+E.style["float"]="none";E.style.width="120px";E.style.marginTop="6px";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.className="geBtn";z.appendChild(E);mxUtils.br(z);z.appendChild(J)}else E.style.width="90px",I.style.width="90px";mxEvent.addListener(C,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)k.funct();else if(p!=C.value.toLowerCase()||13==a.keyCode)try{C.style.backgroundColor=e()?"":"dark"==uiTheme?"#ff0000":"#ffcfcf"}catch(T){C.style.backgroundColor=
"dark"==uiTheme?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(k.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find")+(f?"/"+mxResources.get("replace"):""),B,d,b,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?
(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?D.removeAttribute("disabled"):(D.checked=!1,D.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));
b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var Y=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",Y);this.destroy=function(){mxEvent.removeListener(window,"resize",Y);this.window.destroy()}},FreehandWindow=function(a,d,b,c,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow=
@@ -9755,9 +9755,9 @@ c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.style.whiteSpace="
e.style.height="40px";e.style.right="0px";var l=document.createElement("div"),p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var t=null,u=[],q=document.createElement("div");
q.style.position="relative";q.style.left="0px";q.style.right="0px";f(b);c.style.padding="30px";c.appendChild(e);c.appendChild(l);c.appendChild(p);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=
document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),b.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<u.length;e++){var c=u[e].apply(this,
-arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});e.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";e=document.createElement("tr");z.style.width="100%";d=document.createElement("td");var g=document.createElement("td"),m=document.createElement("td"),x=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";z.appendChild(d);d.checked=
-a.sidebar.isEntryVisible(c);var k=document.createElement("span");mxUtils.write(k,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(k);mxEvent.addListener(k,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});e.appendChild(d);e.appendChild(g);e.appendChild(m);f.appendChild(e);z.appendChild(f);for(var u=[],B=0,f=0;f<b.length;f++)for(e=0;e<b[f].entries.length;e++)B++;for(var y=[d,g,m],C=0,
-f=0;f<b.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(x(y[Math.floor(C/(B/3))],e.title,e.id));C++}})(b[f]);c.appendChild(z);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,b.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),b.appendChild(f),mxEvent.addListener(f,
+arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});e.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),f=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";e=document.createElement("tr");y.style.width="100%";d=document.createElement("td");var g=document.createElement("td"),m=document.createElement("td"),x=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";y.appendChild(d);d.checked=
+a.sidebar.isEntryVisible(c);var k=document.createElement("span");mxUtils.write(k,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(k);mxEvent.addListener(k,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});e.appendChild(d);e.appendChild(g);e.appendChild(m);f.appendChild(e);y.appendChild(f);for(var u=[],B=0,f=0;f<b.length;f++)for(e=0;e<b[f].entries.length;e++)B++;for(var z=[d,g,m],C=0,
+f=0;f<b.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(x(z[Math.floor(C/(B/3))],e.title,e.id));C++}})(b[f]);c.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,b.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),b.appendChild(f),mxEvent.addListener(f,
"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));c.appendChild(b);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});e.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign=
"right"}a.editor.cancelFirst?(b.appendChild(f),b.appendChild(e)):(b.appendChild(e),b.appendChild(f));c.appendChild(b);this.container=c},PluginsDialog=function(a,d,b){function c(){if(0==m.length)f.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{f.innerHTML="";for(var e=0;e<m.length;e++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var k=document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor="pointer";k.style.top=
"5px";k.style.marginRight="4px";k.style.display="inline-block";d.appendChild(k);mxUtils.write(d,m[e]);f.appendChild(d);mxUtils.br(f);mxEvent.addListener(k,"click",function(e){return function(){a.confirm(mxResources.get("delete")+' "'+m[e]+'"?',function(){null!=b&&b(m[e]);m.splice(e,1);c()})}}(e))}}}var g=document.createElement("div"),f=document.createElement("div");f.style.height="120px";f.style.overflow="auto";var m=mxSettings.getPlugins().slice();g.appendChild(f);c();var n=mxUtils.button(mxResources.get("add")+
@@ -9773,25 +9773,25 @@ mxResources.get("relative")+":");var l=document.createElement("input");l.setAttr
"100px";p.value=null!=c?c.x:"";k.appendChild(p);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";k.appendChild(t);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");
mxUtils.write(e,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:"";k.appendChild(u);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,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:"";k.appendChild(q);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";k.appendChild(v);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,
-mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.height:"";k.appendChild(z);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=1==d.length?mxUtils.getValue(b.getCellStyle(d[0]),
+mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=c?c.height:"";k.appendChild(y);n.appendChild(e);n.appendChild(k);m.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=1==d.length?mxUtils.getValue(b.getCellStyle(d[0]),
mxConstants.STYLE_ROTATION,0):"";k.appendChild(x);n.appendChild(e);n.appendChild(k);m.appendChild(n);f.appendChild(m);g.appendChild(f);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var e=0;e<d.length;e++){var c=b.getCellGeometry(d[e]);null!=c&&(c=c.clone(),b.isCellMovable(d[e])&&(c.relative=l.checked,0<mxUtils.trim(p.value).length&&(c.x=Number(p.value)),
-0<mxUtils.trim(t.value).length&&(c.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.y=Number(q.value))),b.isCellResizable(d[e])&&(0<mxUtils.trim(v.value).length&&(c.width=Number(v.value)),0<mxUtils.trim(z.value).length&&(c.height=Number(z.value))),b.getModel().setGeometry(d[e],c));0<mxUtils.trim(x.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,
+0<mxUtils.trim(t.value).length&&(c.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==c.offset&&(c.offset=new mxPoint),c.offset.y=Number(q.value))),b.isCellResizable(d[e])&&(0<mxUtils.trim(v.value).length&&(c.width=Number(v.value)),0<mxUtils.trim(y.value).length&&(c.height=Number(y.value))),b.getModel().setGeometry(d[e],c));0<mxUtils.trim(x.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,
Number(x.value),[d[e]])}}finally{b.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&B.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(B)):(f.appendChild(B),f.appendChild(c));g.appendChild(f);this.container=g},LibraryDialog=function(a,d,b,c,g,f){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=
u;)a=a.parentNode;var b=null;if(null!=a)for(var e=u.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function n(b,e,c,d,k,f,g,p,t){try{if(a.spinner.stop(),null==e||"image/"==e.substring(0,6))if(null==b&&null!=g||null==v[b]){var K=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=G.title&&0<G.title.length?G.title:mxResources.get("untitled"));I.style.color=null==G.title||0==G.title.length?"#d0d0d0":""};u.style.backgroundImage=
"";q.style.display="none";var x=k,A=f;if(k>a.maxImageSize||f>a.maxImageSize){var M=Math.min(1,Math.min(a.maxImageSize/Math.max(1,k)),a.maxImageSize/Math.max(1,f));k*=M;f*=M}x>A?(A=Math.round(100*A/x),x=100):(x=Math.round(100*x/A),A=100);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display="inline-block";N.style.position="relative";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");
-F.setAttribute("src",y.convert(b));F.style.width=x+"px";F.style.height=A+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-A)/2)+"px";F.style.paddingLeft=Math.floor((100-x)/2)+"px";N.appendChild(F)}else if(null!=g){var D=a.stringToCells(Graph.decompress(g.xml));0<D.length&&(a.sidebar.createThumb(D,100,100,N,null,!0,!1),N.firstChild.style.display="inline-block",N.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border",
+F.setAttribute("src",z.convert(b));F.style.width=x+"px";F.style.height=A+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-A)/2)+"px";F.style.paddingLeft=Math.floor((100-x)/2)+"px";N.appendChild(F)}else if(null!=g){var D=a.stringToCells(Graph.decompress(g.xml));0<D.length&&(a.sidebar.createThumb(D,100,100,N,null,!0,!1),N.firstChild.style.display="inline-block",N.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border",
"0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.position="absolute";H.style.marginLeft="-12px";H.style.zIndex="1";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,e){mxEvent.addListener(H,"click",function(c){v[b]=null;for(var d=0;d<l.length;d++)if(null!=l[d].data&&l[d].data==b||null!=l[d].xml&&null!=e&&l[d].xml==e.xml){l.splice(d,1);break}N.parentNode.removeChild(a);0==l.length&&
(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(N,b,g);N.appendChild(H);N.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var G=
null;null!=b?(G={data:b,w:k,h:f,title:t},null!=p&&(G.aspect=p),v[b]=F,l.push(G)):null!=g&&(g.aspect="fixed",l.push(g),G=g);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(a))});K();N.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});D=function(b){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,G.title||"",
mxResources.get("ok"),function(a){null!=a&&(G.title=a,K())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==G.title||0==G.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(I.style,"user-select","text");I.focus();document.execCommand("selectAll",
-!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";G.title=I.innerHTML;K()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",D);mxEvent.addListener(N,"dblclick",D);u.appendChild(N);mxEvent.addListener(N,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);z=m(a);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,
-"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");z=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else C||(C=!0,a.handleError({message:mxResources.get("fileExists")}));else{k=!1;try{if(x=mxUtils.parseXml(b),"mxlibrary"==x.documentElement.nodeName){A=JSON.parse(mxUtils.getTextContent(x.documentElement));
+!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";G.title=I.innerHTML;K()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",D);mxEvent.addListener(N,"dblclick",D);u.appendChild(N);mxEvent.addListener(N,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);y=m(a);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,
+"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");y=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else C||(C=!0,a.handleError({message:mxResources.get("fileExists")}));else{k=!1;try{if(x=mxUtils.parseXml(b),"mxlibrary"==x.documentElement.nodeName){A=JSON.parse(mxUtils.getTextContent(x.documentElement));
if(null!=A&&0<A.length)for(var E=0;E<A.length;E++)null!=A[E].xml?n(null,null,0,0,0,0,A[E]):n(A[E].data,null,0,0,A[E].w,A[E].h,null,"fixed",A[E].title);k=!0}else if("mxfile"==x.documentElement.nodeName){for(var J=x.documentElement.getElementsByTagName("diagram"),E=0;E<J.length;E++){var A=mxUtils.getTextContent(J[E]),D=a.stringToCells(Graph.decompress(A)),Z=a.editor.graph.getBoundingBoxFromGeometry(D);n(null,null,0,0,0,0,{xml:A,w:Z.width,h:Z.height})}k=!0}}catch(R){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}return null}
-function e(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function k(b){b.stopPropagation();b.preventDefault();C=!1;x=m(b);if(null!=z)null!=x&&x<u.children.length?(l.splice(x>z?x-1:x,0,l.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[x])):(l.push(l.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,A(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var e=
+function e(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function k(b){b.stopPropagation();b.preventDefault();C=!1;x=m(b);if(null!=y)null!=x&&x<u.children.length?(l.splice(x>y?x-1:x,0,l.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[x])):(l.push(l.splice(y,1)[0]),u.appendChild(u.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,A(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var e=
decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(e)||/(\.png)($|\?)/i.test(e)||/(\.gif)($|\?)/i.test(e)||/(\.svg)($|\?)/i.test(e))&&a.loadImage(e,function(a){n(e,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var l=[];b=document.createElement("div");b.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";b.appendChild(p);mxUtils.write(p,mxResources.get("filename")+
":");null==d&&(d=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",d);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==g||g.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)};p.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";
u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,
-mxResources.get("dragImagesHere"));b.appendChild(q);var v={},z=null,x=null,B=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",d);var y=new mxUrlConverter,C=!1;if(null!=c)for(d=0;d<c.length;d++)p=c[d],n(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor="";for(var b=
+mxResources.get("dragImagesHere"));b.appendChild(q);var v={},y=null,x=null,B=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",d);var z=new mxUrlConverter,C=!1;if(null!=c)for(d=0;d<c.length;d++)p=c[d],n(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor="";for(var b=
mxEvent.getSource(a);null!=b;){if(b==u||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var A=function(b){return function(e,c,d,k,l,f,g,p,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(a){n(a,c,d,k,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,t.name)?a.parseFile(t,mxUtils.bind(this,
function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(n(e.responseText,c,d,k,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(n(e,c,d,k,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",e);mxEvent.addListener(u,"drop",k);mxEvent.addListener(q,"dragover",e);mxEvent.addListener(q,"drop",k);b.appendChild(u);
c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);"draw.io"!=a.getServiceName()||null==g||g.constructor!=DriveLibrary&&g.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&g.getPublicUrl(function(b){a.spinner.stop();
@@ -9816,23 +9816,23 @@ TemplatesDialog.prototype.init=function(a,d,b,c,g,f,m,n,e,k){function l(){null!=
k+".svg";return!0}function t(a){function b(a){X.removeChild(c);A.removeChild(e);X.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var e=document.createElement("div");e.className="geTempDlgDialogMask";A.appendChild(e);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;c.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var k=X.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(e,"click",b);X.appendChild(c);X.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,b,e){if(null!=E){for(var c=E.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}E.className=c.join(" ")}null!=a?(E=a,E.className+=" "+b,I=e,V.className="geTempDlgCreateBtn"):(I=E=null,V.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
function q(b){if(null!=I){var c=I;I=null;V.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";c.isExternal?(1==b?k(c.url,c,"nameInput.value"):e(c.url,c,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+c.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(d(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=A.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display=
-a}function z(a,b,e){function c(){V.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!b)}L.innerHTML="";u();M=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),l=document.createElement("th");l.style.width="50%";l.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));k.appendChild(l);l=document.createElement("th");l.style.width="25%";l.innerHTML=
-mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));k.appendChild(l);l=document.createElement("th");l.style.width="25%";l.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));k.appendChild(l);d.appendChild(k);L.appendChild(d)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var f=a[k].url,l=mxUtils.htmlEntities(a[k].title),g=a[k].tooltip||a[k].title,p=a[k].imgUrl,m=mxUtils.htmlEntities(a[k].changedBy||""),y=mxUtils.htmlEntities(a[k].lastModifiedOn||
+a}function y(a,b,e){function c(){V.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!b)}L.innerHTML="";u();M=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),l=document.createElement("th");l.style.width="50%";l.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));k.appendChild(l);l=document.createElement("th");l.style.width="25%";l.innerHTML=
+mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));k.appendChild(l);l=document.createElement("th");l.style.width="25%";l.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));k.appendChild(l);d.appendChild(k);L.appendChild(d)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var f=a[k].url,l=mxUtils.htmlEntities(a[k].title),g=a[k].tooltip||a[k].title,p=a[k].imgUrl,m=mxUtils.htmlEntities(a[k].changedBy||""),z=mxUtils.htmlEntities(a[k].lastModifiedOn||
"");p||(p=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=e?50:15;null!=l&&l.length>f&&(l=l.substring(0,f)+"&hellip;");if(e){var K=document.createElement("tr"),p=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));p.appendChild(n);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=l;p.appendChild(g);K.appendChild(p);p=document.createElement("td");
-p.innerHTML=m;K.appendChild(p);p=document.createElement("td");p.innerHTML=y;K.appendChild(p);d.appendChild(K);null==E&&(c(),u(K,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(K,"click",function(){E!=b&&(c(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(K,"dblclick",q);mxEvent.addListener(n,"click",function(){t(a)})})(a[k],K)}else{var C=document.createElement("div");C.className="geTempDlgDiagramTile";C.setAttribute("title",g);null==E&&(c(),u(C,"geTempDlgDiagramTileActive",
+p.innerHTML=m;K.appendChild(p);p=document.createElement("td");p.innerHTML=z;K.appendChild(p);d.appendChild(K);null==E&&(c(),u(K,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(K,"click",function(){E!=b&&(c(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(K,"dblclick",q);mxEvent.addListener(n,"click",function(){t(a)})})(a[k],K)}else{var C=document.createElement("div");C.className="geTempDlgDiagramTile";C.setAttribute("title",g);null==E&&(c(),u(C,"geTempDlgDiagramTileActive",
a[k]));m=document.createElement("div");m.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(a,b){A.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};A.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,m);A.src=p;m.appendChild(A);C.appendChild(m);m=document.createElement("div");m.className="geTempDlgDiagramTileLbl";m.innerHTML=null!=l?l:"";C.appendChild(m);
n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));C.appendChild(n);(function(a,b){mxEvent.addListener(C,"click",function(){E!=b&&(c(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(C,"dblclick",q);mxEvent.addListener(n,"click",function(){t(a)})})(a[k],C);L.appendChild(C)}}}function x(a,b){W.innerHTML="";u();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory=!0;
var k=document.createElement("div"),l=mxResources.get(d.title);null==l&&(l=d.title.substring(0,1).toUpperCase()+d.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",l);l=mxUtils.htmlEntities(l);15<l.length&&(l=l.substring(0,15)+"&hellip;");null==E&&(V.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(k,"geTempDlgNewDiagramCatItemActive",d));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;f.appendChild(g);k.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=l;k.appendChild(f);W.appendChild(k);(function(a,b){mxEvent.addListener(k,"click",function(){E!=b&&(V.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",q)})(d,k)}Y.style.display=5>a.length?"none":""}function B(a){var b=A.querySelector(".geTemplatesList"),
e;for(e in a){var c=document.createElement("div"),d=mxResources.get(e),k=a[e];null==d&&(d=e.substring(0,1).toUpperCase()+e.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+k.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");c.innerHTML=d+" ("+k.length+")";b.appendChild(c);(function(b,e,d){mxEvent.addListener(c,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(ca.style.display="none",aa.style.minHeight=
-"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",X.scrollTop=0,F&&(D=!0),T.innerHTML=e,U.style.display="none",z(a[b],!0))})})(e,d,c)}}function y(a){m&&(X.scrollTop=0,L.innerHTML="",fa.spin(L),D=!1,F=!0,T.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),N=null,m(da,a?null:f))}function C(a){l();X.scrollTop=0;L.innerHTML="";fa.spin(L);D=!1;F=!0;S=null;T.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
+"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",X.scrollTop=0,F&&(D=!0),T.innerHTML=e,U.style.display="none",y(a[b],!0))})})(e,d,c)}}function z(a){m&&(X.scrollTop=0,L.innerHTML="",fa.spin(L),D=!1,F=!0,T.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),N=null,m(da,a?null:f))}function C(a){l();X.scrollTop=0;L.innerHTML="";fa.spin(L);D=!1;F=!0;S=null;T.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
mxUtils.htmlEntities(a)+'"';n(a,da,H?null:f);N=a}c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var A=this.container,F=!1,D=!1,G=null,E=null,I=null,J=!1,H=!0,K=!1,M=[],N,Y=A.querySelector(".geTempDlgShowAllBtn"),L=A.querySelector(".geTempDlgDiagramsTiles"),T=A.querySelector(".geTempDlgDiagramsListTitle"),U=A.querySelector(".geTempDlgDiagramsListBtns"),X=A.querySelector(".geTempDlgContent"),aa=A.querySelector(".geTempDlgDiagramsList"),ca=A.querySelector(".geTempDlgNewDiagramCat"),
-W=A.querySelector(".geTempDlgNewDiagramCatList"),V=A.querySelector(".geTempDlgCreateBtn"),fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(A.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){l();ca.style.display="";aa.style.minHeight="calc(100% - 280px)";y(H)});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
-"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(H=!0,null==N?y(H):C(N))});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(H=!1,null==N?y(H):C(N))});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
-"tiles",!1)&&(K=!0,z(M,!1,K))});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){p(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,z(M,!1,K))});mxEvent.addListener(Y,"click",function(){J?(ca.style.height="280px",W.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(R)):(ca.style.height="440px",W.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
+W=A.querySelector(".geTempDlgNewDiagramCatList"),V=A.querySelector(".geTempDlgCreateBtn"),fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(A.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){l();ca.style.display="";aa.style.minHeight="calc(100% - 280px)";z(H)});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
+"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(H=!0,null==N?z(H):C(N))});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(H=!1,null==N?z(H):C(N))});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
+"tiles",!1)&&(K=!0,y(M,!1,K))});mxEvent.addListener(A.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){p(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,y(M,!1,K))});mxEvent.addListener(Y,"click",function(){J?(ca.style.height="280px",W.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(R)):(ca.style.height="440px",W.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
null,"- Show less")),x(R,!0));J=!J});var ea=!1,O=!1,Z={},R=[],P=1;mxUtils.get(c,function(a){if(!ea){ea=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(P++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
a.nextSibling}B(Z)}});mxUtils.get(g,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&R.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;x(R)}});var da=function(a,b){U.style.display="";fa.stop();F=!1;D?D=!1:b?L.innerHTML=b:0==a.length?L.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-z(a,!1,K)};y(H);var S=null;n&&mxEvent.addListener(A.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=S&&clearTimeout(S);13==a.keyCode?C(b.value):S=setTimeout(function(){C(b.value)},500)});mxEvent.addListener(V,"click",q);mxEvent.addListener(A.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(A.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
+y(a,!1,K)};z(H);var S=null;n&&mxEvent.addListener(A.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=S&&clearTimeout(S);13==a.keyCode?C(b.value):S=setTimeout(function(){C(b.value)},500)});mxEvent.addListener(V,"click",q);mxEvent.addListener(A.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(A.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
var BtnDialog=function(a,d,b,c){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var m="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";d==a.drive?(m=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?
(m=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(m=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(m=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(m=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg"):d==a.trello&&(m=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[m],"You are now authorized in {1}"));
b=mxUtils.button(b,c);b.insertBefore(n,b.firstChild);b.style.marginTop="6px";b.className="geBigButton";b.style.fontSize="18px";b.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(b);this.container=g},FontDialog=function(a,d,b,c,g){function f(a){this.style.border="";13==a.keyCode&&B.click()}var m,n,e,k=document.createElement("table"),l=document.createElement("tbody");k.style.marginTop="8px";m=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace=
@@ -9842,11 +9842,11 @@ n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.f
null,"Google Fonts"));n.appendChild(e);mxClient.IS_CHROMEAPP||a.isOffline()&&!EditorUi.isElectronApp||(e=a.menus.createHelpLink("https://fonts.google.com/"),e.getElementsByTagName("img")[0].setAttribute("valign","middle"),n.appendChild(e));m.appendChild(n);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");
m.appendChild(n);var q=document.createElement("input");"g"==c&&q.setAttribute("value",d);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";n=document.createElement("td");n.appendChild(q);m.appendChild(n);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value",
"webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");n.appendChild(v);e=document.createElement("label");e.setAttribute("for","fontdialog-webfonts");mxUtils.write(e,mxResources.get("webfonts",null,"Web Fonts"));n.appendChild(e);m.appendChild(n);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";
-mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(n);var z=document.createElement("input");"w"==c&&z.setAttribute("value",d);z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontName_w";n=document.createElement("td");n.appendChild(z);m.appendChild(n);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontUrl",
-null,"Font URL")+":");m.appendChild(n);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";n=document.createElement("td");n.appendChild(x);m.appendChild(n);l.appendChild(m);this.init=function(){var a=t;"g"==c?a=q:"w"==c&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?a.select():document.execCommand("selectAll",!1,null)};m=document.createElement("tr");n=document.createElement("td");n.colSpan=
+mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(n);var y=document.createElement("input");"w"==c&&y.setAttribute("value",d);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";n=document.createElement("td");n.appendChild(y);m.appendChild(n);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontUrl",
+null,"Font URL")+":");m.appendChild(n);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";n=document.createElement("td");n.appendChild(x);m.appendChild(n);l.appendChild(m);this.init=function(){var a=t;"g"==c?a=q:"w"==c&&(a=y);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?a.select():document.execCommand("selectAll",!1,null)};m=document.createElement("tr");n=document.createElement("td");n.colSpan=
2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",n.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();g()});d.className="geBtn";a.editor.cancelFirst&&n.appendChild(d);var B=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;p.checked?(b=t.value,c="s"):u.checked?(b=q.value,
-e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=z.value,e=x.value,c="w");var d;d=e;var l=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(k.querySelector(".dlg_fontName_"+l).style.border="1px solid red",d=!1):"w"!=l||f.test(d)?d=!0:(k.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",f);mxEvent.addListener(q,
-"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(z,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});n.appendChild(B);a.editor.cancelFirst||n.appendChild(d);
+e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=y.value,e=x.value,c="w");var d;d=e;var l=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(k.querySelector(".dlg_fontName_"+l).style.border="1px solid red",d=!1):"w"!=l||f.test(d)?d=!0:(k.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",f);mxEvent.addListener(q,
+"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});n.appendChild(B);a.editor.cancelFirst||n.appendChild(d);
m.appendChild(n);l.appendChild(m);k.appendChild(l);this.container=k};
function AspectDialog(a,d,b,c,g){this.aspect={pageId:d||(a.pages?a.pages[0].getId():null),layerIds:b||[]};d=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));d.appendChild(f);b=document.createElement("div");b.className="geAspectDlgList";d.appendChild(b);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));d.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
d.appendChild(f);this.pagesContainer=b;this.layersContainer=f;this.ui=a;b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});f.className="geBtn";a.editor.cancelFirst&&b.appendChild(f);var m=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));b.appendChild(m);m.className="geBtn gePrimaryBtn";
@@ -9967,9 +9967,9 @@ else if("eot"==f||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";els
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(b){this.resolvedFontCss=b;a()})):a()};Editor.prototype.embedExtFonts=function(a){var b=this.graph.getCustomFonts();if(0<b.length){var e="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(e,a)}),k=0;k<b.length;k++)mxUtils.bind(this,function(a,b){Graph.isCssFontUrl(b)?null==this.cachedGoogleFonts[b]?(c++,this.loadUrl(b,
mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;e+=a;c--;d()}),mxUtils.bind(this,function(a){c--;e+="@import url("+b+");";d()}))):e+=this.cachedGoogleFonts[b]:e+='@font-face {font-family: "'+a+'";src: url("'+b+'")}'})(b[k].name,b[k].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&a[0].appendChild(b[e].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.absoluteCssFonts(this.fontCss);if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,b);e.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,b,e){var c=mxClient.IS_FF?8192:16384;return Math.min(e,Math.min(c/a,c/b))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,k,l,f,g,p,t,q,u,m,y,n,v,C){try{k=null!=k?k:!0;l=null!=l?l:!0;q=null!=q?q:this.graph;u=null!=u?u:0;var A=g?null:q.background;A==mxConstants.NONE&&(A=null);null==A&&(A=c);null==A&&0==g&&(A=n?this.graph.defaultPageBackgroundColor:"#ffffff");
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(a,b,e){var c=mxClient.IS_FF?8192:16384;return Math.min(e,Math.min(c/a,c/b))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,k,l,f,g,p,t,q,u,m,z,n,v,C){try{k=null!=k?k:!0;l=null!=l?l:!0;q=null!=q?q:this.graph;u=null!=u?u:0;var A=g?null:q.background;A==mxConstants.NONE&&(A=null);null==A&&(A=c);null==A&&0==g&&(A=n?this.graph.defaultPageBackgroundColor:"#ffffff");
this.convertImages(q.getSvg(null,null,u,m,null,l,null,null,null,p,null,n,v,C),mxUtils.bind(this,function(e){try{var c=new Image;c.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){m.drawImage(c,0,0);a(g,e)},0):(m.drawImage(c,0,0),a(g,e))},g=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));f=null!=f?f:1;null!=b&&(f=k?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);f=this.getMaxCanvasScale(p,t,f);p=
-Math.ceil(f*p);t=Math.ceil(f*t);g.setAttribute("width",p);g.setAttribute("height",t);var m=g.getContext("2d");null!=A&&(m.beginPath(),m.rect(0,0,p,t),m.fillStyle=A,m.fill());1!=f&&m.scale(f,f);if(y){var n=q.view,v=n.scale;n.scale=1;var C=btoa(unescape(encodeURIComponent(n.createSvgGrid(n.gridColor))));n.scale=v;var C="data:image/svg+xml;base64,"+C,x=q.gridSize*n.gridSteps*f,z=q.getGraphBounds(),F=n.translate.x*v,K=n.translate.y*v,B=F+(z.x-F)/v-u,H=K+(z.y-K)/v-u,M=new Image;M.onload=function(){try{for(var a=
+Math.ceil(f*p);t=Math.ceil(f*t);g.setAttribute("width",p);g.setAttribute("height",t);var m=g.getContext("2d");null!=A&&(m.beginPath(),m.rect(0,0,p,t),m.fillStyle=A,m.fill());1!=f&&m.scale(f,f);if(z){var n=q.view,v=n.scale;n.scale=1;var C=btoa(unescape(encodeURIComponent(n.createSvgGrid(n.gridColor))));n.scale=v;var C="data:image/svg+xml;base64,"+C,x=q.gridSize*n.gridSteps*f,y=q.getGraphBounds(),F=n.translate.x*v,K=n.translate.y*v,B=F+(y.x-F)/v-u,H=K+(y.y-K)/v-u,M=new Image;M.onload=function(){try{for(var a=
-Math.round(x-mxUtils.mod((F-B)*f,x)),b=-Math.round(x-mxUtils.mod((K-H)*f,x));a<p;a+=x)for(var e=b;e<t;e+=x)m.drawImage(M,a/f,e/f);l()}catch(na){null!=d&&d(na)}};M.onerror=function(a){null!=d&&d(a)};M.src=C}else l()}catch(ma){null!=d&&d(ma)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(ha){null!=
d&&d(ha)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(l)}catch(Q){null!=d&&d(Q)}}))}catch(ha){null!=d&&d(ha)}}),e,t)}catch(S){null!=d&&d(S)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var f=g,m=0;8>m;m++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[g]=f;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^
a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function k(a,b){var e=g;g+=b;return a.substring(e,g)}function l(a){a=k(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,
@@ -10011,16 +10011,16 @@ b,q.getSelectionCells());d.push(a);k.push(b);if(null!=e.dependentProps)for(a=0;a
function d(b,e,c){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=k.x-d.x+"px";e.style.top=k.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function k(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
function(k){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function l(a,b,e,d,k,l,f){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:e,defVal:d,countProperty:k,parentRow:l,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var g=l,t=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==
a)g=g.nextSibling,t++;else break;var q={type:e,parentRow:l,index:t,isDeletable:!0,defVal:d,countProperty:k},t=p(a,"",q,0==t%2,f);c(a,d,q);g.parentNode.insertBefore(t,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,b,e,c,d,k,l){if(0<d){var f=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)f[g]=null!=b[g]?b[g]:null!=c?c:"";u.push({name:a,values:f,type:e,defVal:c,parentRow:k,flipBkg:l,size:d})}return document.createElement("div")}
-function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,q,u){var m=p.dispName,y=p.type,n=document.createElement("tr");n.className="gePropRow"+(u?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";n.setAttribute("data-pName",b);n.setAttribute("data-pValue",e);q=!1;null!=p.index&&(n.setAttribute("data-index",p.index),m=(null!=m?m:"")+"["+p.index+"]",q=!0);var v=document.createElement("td");
-v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(m,null,m));q&&(v.style.textAlign="right");n.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==y)v.appendChild(k(b,e,p));else if("bool"==y||"boolean"==y)v.appendChild(g(b,e,p));else if("enum"==y){var C=p.enumList;for(u=0;u<C.length;u++)if(m=C[u],m.val==e){v.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(t,function(){var k=
-document.createElement("select");d(v,k);for(var l=0;l<C.length;l++){var f=C[l],g=document.createElement("option");g.value=mxUtils.htmlEntities(f.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(g)}k.value=e;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);c(b,a,p)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==y?v.appendChild(l(b,e,p.subType,p.subDefVal,p.countProperty,
-n,u)):"staticArr"==y?v.appendChild(f(b,e,p.subType,p.subDefVal,p.size,n,u)):"readOnly"==y?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=e,u.style.width="96px",u.style.borderWidth="0px",v.appendChild(u)):(v.innerHTML=e,mxEvent.addListener(v,"click",mxUtils.bind(t,function(){function k(){var a=l.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:
-null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var l=document.createElement("input");d(v,l,!0);l.value=e;l.className="gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(l.type="number",l.step="int"==y?"1":"any",null!=p.min&&(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));a.appendChild(l);mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&k()});l.focus();mxEvent.addListener(l,"blur",function(){k()})})));p.isDeletable&&(u=mxUtils.button("-",
-mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",v.appendChild(u));n.appendChild(v);return n}var t=this,q=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.className="geProperties";m.style.whiteSpace="nowrap";m.style.width="100%";var y=document.createElement("tr");y.className="gePropHeader";var n=document.createElement("th");
-n.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;n.appendChild(v);mxUtils.write(n,mxResources.get("property"));y.style.cursor="pointer";var C=function(){var b=m.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(la){}}else v.src=
-Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(y,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;C()});y.appendChild(n);n=document.createElement("th");n.className="gePropHeaderCell";n.innerHTML=mxResources.get("value");y.appendChild(n);m.appendChild(y);var A=!1,x=!1,y=null;1==e.vertices.length&&0==e.edges.length?y=e.vertices[0].id:0==e.vertices.length&&1==e.edges.length&&(y=e.edges[0].id);null!=y&&m.appendChild(p("id",
-mxUtils.htmlEntities(y),{dispName:"ID",type:"readOnly"},!0,!1));for(var z in b)if(y=b[z],"function"!=typeof y.isVisible||y.isVisible(e,this)){var F=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=y.getDefaultValue?y.getDefaultValue(e,this):y.defVal;if("separator"==y.type)x=!x;else{if("staticArr"==y.type)y.size=parseInt(e.style[y.sizeProperty]||b[y.sizeProperty].defVal)||0;else if(null!=y.dependentProps){for(var K=y.dependentProps,B=[],H=[],n=0;n<K.length;n++){var D=e.style[K[n]];H.push(b[K[n]].subDefVal);
-B.push(null!=D?D.split(","):[])}y.dependentPropsDefVal=H;y.dependentPropsVals=B}m.appendChild(p(z,F,y,A,x));A=!A}}for(n=0;n<u.length;n++)for(y=u[n],b=y.parentRow,e=0;e<y.values.length;e++)z=p(y.name,y.values[e],{type:y.type,parentRow:y.parentRow,isDeletable:y.isDeletable,index:e,defVal:y.defVal,countProperty:y.countProperty,size:y.size},0==e%2,y.flipBkg),b.parentNode.insertBefore(z,b.nextSibling),b=z;a.appendChild(m);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,
+function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,q,u){var m=p.dispName,n=p.type,z=document.createElement("tr");z.className="gePropRow"+(u?"Dark":"")+(q?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",b);z.setAttribute("data-pValue",e);q=!1;null!=p.index&&(z.setAttribute("data-index",p.index),m=(null!=m?m:"")+"["+p.index+"]",q=!0);var v=document.createElement("td");
+v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(m,null,m));q&&(v.style.textAlign="right");z.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==n)v.appendChild(k(b,e,p));else if("bool"==n||"boolean"==n)v.appendChild(g(b,e,p));else if("enum"==n){var C=p.enumList;for(u=0;u<C.length;u++)if(m=C[u],m.val==e){v.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(t,function(){var k=
+document.createElement("select");d(v,k);for(var l=0;l<C.length;l++){var f=C[l],g=document.createElement("option");g.value=mxUtils.htmlEntities(f.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(g)}k.value=e;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);c(b,a,p)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==n?v.appendChild(l(b,e,p.subType,p.subDefVal,p.countProperty,
+z,u)):"staticArr"==n?v.appendChild(f(b,e,p.subType,p.subDefVal,p.size,z,u)):"readOnly"==n?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=e,u.style.width="96px",u.style.borderWidth="0px",v.appendChild(u)):(v.innerHTML=e,mxEvent.addListener(v,"click",mxUtils.bind(t,function(){function k(){var a=l.value,a=0==a.length&&"string"!=n?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",n="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:
+null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==n?parseInt(a):a)+"");c(b,a,p)}var l=document.createElement("input");d(v,l,!0);l.value=e;l.className="gePropEditor";"int"!=n&&"float"!=n||p.allowAuto||(l.type="number",l.step="int"==n?"1":"any",null!=p.min&&(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));a.appendChild(l);mxEvent.addListener(l,"keypress",function(a){13==a.keyCode&&k()});l.focus();mxEvent.addListener(l,"blur",function(){k()})})));p.isDeletable&&(u=mxUtils.button("-",
+mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",v.appendChild(u));z.appendChild(v);return z}var t=this,q=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.className="geProperties";m.style.whiteSpace="nowrap";m.style.width="100%";var n=document.createElement("tr");n.className="gePropHeader";var z=document.createElement("th");
+z.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;z.appendChild(v);mxUtils.write(z,mxResources.get("property"));n.style.cursor="pointer";var C=function(){var b=m.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(la){}}else v.src=
+Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(n,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;C()});n.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");n.appendChild(z);m.appendChild(n);var A=!1,x=!1,n=null;1==e.vertices.length&&0==e.edges.length?n=e.vertices[0].id:0==e.vertices.length&&1==e.edges.length&&(n=e.edges[0].id);null!=n&&m.appendChild(p("id",
+mxUtils.htmlEntities(n),{dispName:"ID",type:"readOnly"},!0,!1));for(var y in b)if(n=b[y],"function"!=typeof n.isVisible||n.isVisible(e,this)){var F=null!=e.style[y]?mxUtils.htmlEntities(e.style[y]+""):null!=n.getDefaultValue?n.getDefaultValue(e,this):n.defVal;if("separator"==n.type)x=!x;else{if("staticArr"==n.type)n.size=parseInt(e.style[n.sizeProperty]||b[n.sizeProperty].defVal)||0;else if(null!=n.dependentProps){for(var K=n.dependentProps,B=[],H=[],z=0;z<K.length;z++){var D=e.style[K[z]];H.push(b[K[z]].subDefVal);
+B.push(null!=D?D.split(","):[])}n.dependentPropsDefVal=H;n.dependentPropsVals=B}m.appendChild(p(y,F,n,A,x));A=!A}}for(z=0;z<u.length;z++)for(n=u[z],b=n.parentRow,e=0;e<n.values.length;e++)y=p(n.name,n.values[e],{type:n.type,parentRow:n.parentRow,isDeletable:n.isDeletable,index:e,defVal:n.defVal,countProperty:n.countProperty,size:n.size},0==e%2,n.flipBkg),b.parentNode.insertBefore(y,b.nextSibling),b=y;a.appendChild(m);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,
"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var f=[],g=0;g<this.defaultColorSchemes.length;g++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,
"click",mxUtils.bind(this,function(){t(a)}))})(g);f.push(p);l.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(f[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;u(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background="#84d7ff"}),u=mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{for(var d=c.getSelectionCells(),
@@ -10043,12 +10043,12 @@ Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";
"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:
20;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.horizontal="1"==mxUtils.getValue(b,"horizontalRack","0");e.resizeParent=!1;e.fill=!0;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,
"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||
-"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var z=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(a){return Graph.processFontStyle(z.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(a,b,e,c,d,k,l,f,g,p,t){x.apply(this,arguments);Graph.processFontAttributes(t)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==
+"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(a){return Graph.processFontStyle(y.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(a,b,e,c,d,k,l,f,g,p,t){x.apply(this,arguments);Graph.processFontAttributes(t)};var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==
this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var a=this.extFonts,a=null!=a?a.slice():[],b;for(b in Graph.customFontElements){var e=Graph.customFontElements[b];a.push({name:e.name,url:e.url})}return a};Graph.prototype.setFont=function(a,b){Graph.addFont(a,b);document.execCommand("fontname",!1,a);if(null!=b){var e=this.cellEditor.textarea.getElementsByTagName("font");b=Graph.getFontUrl(a,b);for(var c=0;c<e.length;c++)e[c].getAttribute("face")==
-a&&e[c].getAttribute("data-font-src")!=b&&e[c].setAttribute("data-font-src",b)}};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=
+a&&e[c].getAttribute("data-font-src")!=b&&e[c].setAttribute("data-font-src",b)}};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=
a[b]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=C.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,k,l,f,g,p,t,q,u,m){var y=null;q||null==this.themes||"darkTheme"!=this.defaultThemeName||(y=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var n=A.apply(this,arguments),v=this.getCustomFonts();if(t&&0<v.length){var C=n.ownerDocument,x=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,
-"style"):C.createElement("style");null!=C.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var z="",F="",B=0;B<v.length;B++){var H=v[B].name,D=v[B].url;Graph.isCssFontUrl(D)?z+="@import url("+D+");\n":F+='@font-face {\nfont-family: "'+H+'";\nsrc: url("'+D+'");\n}\n'}x.appendChild(C.createTextNode(z+F));n.getElementsByTagName("defs")[0].appendChild(x)}null!=y&&(this.stylesheet=y,this.refresh());return n};var F=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,k,l,f,g,p,t,q,u,m){var n=null;q||null==this.themes||"darkTheme"!=this.defaultThemeName||(n=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var z=A.apply(this,arguments),v=this.getCustomFonts();if(t&&0<v.length){var C=z.ownerDocument,x=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,
+"style"):C.createElement("style");null!=C.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var y="",F="",B=0;B<v.length;B++){var H=v[B].name,D=v[B].url;Graph.isCssFontUrl(D)?y+="@import url("+D+");\n":F+='@font-face {\nfont-family: "'+H+'";\nsrc: url("'+D+'");\n}\n'}x.appendChild(C.createTextNode(y+F));z.getElementsByTagName("defs")[0].appendChild(x)}null!=n&&(this.stylesheet=n,this.refresh());return z};var F=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var a=F.apply(this,arguments);if(this.mathEnabled){var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=
c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){D.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};
@@ -10078,35 +10078,35 @@ STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,
5)&&(b="mxgraph.sysml"));return b};var E=mxMarker.createMarker;mxMarker.createMarker=function(a,b,e,c,d,k,l,f,g,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return E.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){m.value=Math.max(1,Math.min(f,Math.max(parseInt(m.value),parseInt(u.value))));u.value=Math.max(1,Math.min(f,Math.min(parseInt(m.value),parseInt(u.value))))}function c(b){function e(b,e,k){var l=
-b.useCssTransforms,f=b.currentTranslate,g=b.currentScale,p=b.view.translate,t=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var q=b.getGraphBounds(),u=0,m=0,y=J.get(),n=1/b.pageScale,A=C.checked;if(A)var n=parseInt(E.value),x=parseInt(K.value),n=Math.min(y.height*x/(q.height/b.view.scale),y.width*n/(q.width/b.view.scale));else n=parseInt(v.value)/(100*b.pageScale),isNaN(n)&&(c=1/b.pageScale,
-v.value="100 %");y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*c);y.height=Math.ceil(y.height*c);n*=c;!A&&b.pageVisible?(q=b.getPageLayout(),u-=q.x*y.width,m-=q.y*y.height):A=!0;if(null==e){e=PrintDialog.createPrintPreview(b,n,y,0,u,m,A);e.pageSelector=!1;e.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(e.title=u.getTitle());var z=e.writeHead;e.writeHead=function(e){z.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)e.writeln('<style type="text/css">'),e.writeln(Editor.mathJaxWebkitCss),
+b.useCssTransforms,f=b.currentTranslate,g=b.currentScale,p=b.view.translate,t=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var q=b.getGraphBounds(),u=0,m=0,n=J.get(),z=1/b.pageScale,A=C.checked;if(A)var z=parseInt(E.value),x=parseInt(K.value),z=Math.min(n.height*x/(q.height/b.view.scale),n.width*z/(q.width/b.view.scale));else z=parseInt(v.value)/(100*b.pageScale),isNaN(z)&&(c=1/b.pageScale,
+v.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*c);n.height=Math.ceil(n.height*c);z*=c;!A&&b.pageVisible?(q=b.getPageLayout(),u-=q.x*n.width,m-=q.y*n.height):A=!0;if(null==e){e=PrintDialog.createPrintPreview(b,z,n,0,u,m,A);e.pageSelector=!1;e.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(e.title=u.getTitle());var y=e.writeHead;e.writeHead=function(e){y.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)e.writeln('<style type="text/css">'),e.writeln(Editor.mathJaxWebkitCss),
e.writeln("</style>");mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));for(var c=b.getCustomFonts(),d=0;d<c.length;d++){var k=c[d].name,l=c[d].url;Graph.isCssFontUrl(l)?e.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):
(e.writeln('<style type="text/css">'),e.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(k)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var F=e.renderPage;e.renderPage=function(b,e,c,d,k,l){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var g=F.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||
-!0:g.className="geDisableMathJax";return g}}u=null;m=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,k,!0);d.enableFlowAnimation=m;null!=u&&(d.stylesheet=u,d.refresh())}else{y=b.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";e.backgroundColor=y;e.autoOrigin=A;e.appendGraph(b,n,u,m,k,!0);k=b.getCustomFonts();if(null!=e.wnd)for(u=0;u<k.length;u++)m=k[u].name,
+!0:g.className="geDisableMathJax";return g}}u=null;m=d.enableFlowAnimation;d.enableFlowAnimation=!1;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,k,!0);d.enableFlowAnimation=m;null!=u&&(d.stylesheet=u,d.refresh())}else{n=b.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";e.backgroundColor=n;e.autoOrigin=A;e.appendGraph(b,z,u,m,k,!0);k=b.getCustomFonts();if(null!=e.wnd)for(u=0;u<k.length;u++)m=k[u].name,
A=k[u].url,Graph.isCssFontUrl(A)?e.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(m)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),e.wnd.document.writeln("</style>"))}l&&(b.useCssTransforms=l,b.currentTranslate=f,b.currentScale=g,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(M.value)/100;
-isNaN(c)&&(c=1,M.value="100 %");var c=.75*c,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var l=u.value,f=m.value,p=!t.checked,q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,t.checked,l,f,C.checked,E.value,K.value,parseInt(v.value)/100,parseInt(M.value)/100,J.get());else{p&&(p=l==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(l)-1,p=parseInt(f)-1);for(var n=
-y;n<=p;n++){var A=a.pages[n],l=A==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.stylesheet),f=!0,y=!1,x=null,z=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(f=A.viewState.pageVisible,y=A.viewState.mathEnabled,x=A.viewState.background,z=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=x;l.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;l.pageVisible=f;l.mathEnabled=y;var F=l.getGlobalVariable;l.getGlobalVariable=
-function(b){return"page"==b?A.getName():"pagenumber"==b?n+1:"pagecount"==b?null!=a.pages?a.pages.length:1:F.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(A);l.model.setRoot(A.root)}q=e(l,q,n!=p);l!=d&&l.container.parentNode.removeChild(l.container)}}else q=e(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(p=q.wnd.document,b&&(q.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
+isNaN(c)&&(c=1,M.value="100 %");var c=.75*c,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var l=u.value,f=m.value,p=!t.checked,q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,t.checked,l,f,C.checked,E.value,K.value,parseInt(v.value)/100,parseInt(M.value)/100,J.get());else{p&&(p=l==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var n=0,p=a.pages.length-1;t.checked||(n=parseInt(l)-1,p=parseInt(f)-1);for(var z=
+n;z<=p;z++){var A=a.pages[z],l=A==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.stylesheet),f=!0,n=!1,x=null,y=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(f=A.viewState.pageVisible,n=A.viewState.mathEnabled,x=A.viewState.background,y=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=x;l.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;l.pageVisible=f;l.mathEnabled=n;var F=l.getGlobalVariable;l.getGlobalVariable=
+function(b){return"page"==b?A.getName():"pagenumber"==b?z+1:"pagecount"==b?null!=a.pages?a.pages.length:1:F.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(A);l.model.setRoot(A.root)}q=e(l,q,z!=p);l!=d&&l.container.parentNode.removeChild(l.container)}}else q=e(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(p=q.wnd.document,b&&(q.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
q.closeDocument(),!q.mathEnabled&&b&&PrintDialog.printPreview(q));null!=k&&(d.stylesheet=k,d.refresh())}}var d=a.editor.graph,k=document.createElement("div"),l=document.createElement("h3");l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,b||mxResources.get("print"));k.appendChild(l);var f=1,g=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var q=t.cloneNode(!0);t.setAttribute("checked","checked");q.setAttribute("value","range");p.appendChild(q);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);var u=document.createElement("input");
u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";p.appendChild(u);l=document.createElement("span");mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var m=u.cloneNode(!0);p.appendChild(m);mxEvent.addListener(u,"focus",function(){q.checked=!0});mxEvent.addListener(m,"focus",function(){q.checked=!0});mxEvent.addListener(u,"change",e);mxEvent.addListener(m,"change",e);if(null!=a.pages&&(f=a.pages.length,
-null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){g=l+1;u.value=g;m.value=g;break}u.setAttribute("max",f);m.setAttribute("max",f);a.isPagesEnabled()?1<f&&(k.appendChild(p),q.checked=!0):q.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");y.appendChild(n);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("adjustTo"));y.appendChild(l);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";y.appendChild(v);mxEvent.addListener(v,"focus",function(){n.checked=!0});k.appendChild(y);var p=p.cloneNode(!1),C=n.cloneNode(!0);C.setAttribute("value","fit");n.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-l.appendChild(C);p.appendChild(l);y=document.createElement("table");y.style.display="inline-block";var x=document.createElement("tbody"),A=document.createElement("tr"),z=A.cloneNode(!0),F=document.createElement("td"),B=F.cloneNode(!0),H=F.cloneNode(!0),D=F.cloneNode(!0),I=F.cloneNode(!0),G=F.cloneNode(!0);F.style.textAlign="right";D.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var E=document.createElement("input");E.style.cssText="margin:0 8px 0 8px;";E.setAttribute("value","1");
+null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){g=l+1;u.value=g;m.value=g;break}u.setAttribute("max",f);m.setAttribute("max",f);a.isPagesEnabled()?1<f&&(k.appendChild(p),q.checked=!0):q.checked=!0;var n=document.createElement("div");n.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");n.appendChild(z);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("adjustTo"));n.appendChild(l);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";n.appendChild(v);mxEvent.addListener(v,"focus",function(){z.checked=!0});k.appendChild(n);var p=p.cloneNode(!1),C=z.cloneNode(!0);C.setAttribute("value","fit");z.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+l.appendChild(C);p.appendChild(l);n=document.createElement("table");n.style.display="inline-block";var x=document.createElement("tbody"),A=document.createElement("tr"),y=A.cloneNode(!0),F=document.createElement("td"),B=F.cloneNode(!0),H=F.cloneNode(!0),D=F.cloneNode(!0),I=F.cloneNode(!0),G=F.cloneNode(!0);F.style.textAlign="right";D.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var E=document.createElement("input");E.style.cssText="margin:0 8px 0 8px;";E.setAttribute("value","1");
E.setAttribute("min","1");E.setAttribute("type","number");E.style.width="40px";B.appendChild(E);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));H.appendChild(l);mxUtils.write(D,mxResources.get("fitToBy"));var K=E.cloneNode(!0);I.appendChild(K);mxEvent.addListener(E,"focus",function(){C.checked=!0});mxEvent.addListener(K,"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));G.appendChild(l);A.appendChild(F);
-A.appendChild(B);A.appendChild(H);z.appendChild(D);z.appendChild(I);z.appendChild(G);x.appendChild(A);x.appendChild(z);y.appendChild(x);p.appendChild(y);k.appendChild(p);p=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var J=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+A.appendChild(B);A.appendChild(H);y.appendChild(D);y.appendChild(I);y.appendChild(G);x.appendChild(A);x.appendChild(y);n.appendChild(x);p.appendChild(n);k.appendChild(p);p=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var J=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";p.appendChild(M);k.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&l.appendChild(p);a.isOffline()||
-(y=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),y.className="geBtn",l.appendChild(y));PrintDialog.previewEnabled&&(y=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),y.className="geBtn",l.appendChild(y));y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});y.className="geBtn gePrimaryBtn";l.appendChild(y);a.editor.cancelFirst||l.appendChild(p);k.appendChild(l);
+(n=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),n.className="geBtn",l.appendChild(n));PrintDialog.previewEnabled&&(n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),n.className="geBtn",l.appendChild(n));n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";l.appendChild(n);a.editor.cancelFirst||l.appendChild(p);k.appendChild(l);
this.container=k};var I=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&
(this.page.viewState.shadowVisible=this.shadowVisible)):(I.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var J=document.createElement("canvas"),H=new Image;
H.onload=function(){try{J.getContext("2d").drawImage(H,0,0);var a=J.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(M){}};H.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(K){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,c){c.ui=a.ui;return b};a.afterDecode=function(a,b,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,b,c){c.ui=a.ui;return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.5.0";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,b,c){c.ui=a.ui;return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.5.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,d,f,g,q){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
--1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(z){}try{q||
-null==window.console||console.error(g,a,b,c,d,f)}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(l){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{q||
+null==window.console||console.error(g,a,b,c,d,f)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(l){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(l){}};EditorUi.parsePng=function(a,b,c){function e(a,b){var e=
k;k+=b;return a.substring(e,k)}function d(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(a,4),"IHDR"!=e(a,4))null!=c&&c();else{e(a,17);do{c=d(a);var l=e(a,4);if(null!=b&&b(k-8,l,c))break;value=e(a,c);e(a,4);if("IEND"==l)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
@@ -10137,8 +10137,8 @@ mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var e in b)null!=
Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var e=0;e<a.attributes.length;e++)"as"!=a.attributes[e].name&&a.setAttribute(a.attributes[e].name,this.anonymizeString(a.attributes[e].value,b));if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)this.anonymizeAttributes(a.childNodes[e],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var e=a.getElementsByTagName("mxCell"),
c=0;c<e.length;c++)null!=e[c].getAttribute("value")&&e[c].setAttribute("value","["+e[c].getAttribute("value").length+"]"),null!=e[c].getAttribute("xmlValue")&&e[c].setAttribute("xmlValue","["+e[c].getAttribute("xmlValue").length+"]"),null!=e[c].getAttribute("style")&&e[c].setAttribute("style","["+e[c].getAttribute("style").length+"]"),null!=e[c].parentNode&&"root"!=e[c].parentNode.nodeName&&null!=e[c].parentNode.parentNode&&(e[c].setAttribute("id",e[c].parentNode.getAttribute("id")),e[c].parentNode.parentNode.replaceChild(e[c],
e[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,
-function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,m,n,z,x){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=z&&/(\.svg)$/i.test(z.getTitle()))if(x=!1,null!=e.themes&&"darkTheme"==e.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var k=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),l=this.pages[0];e.getGlobalVariable=
-function(a){return"page"==a?l.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(l.root)}m=null!=m?m:this.getXmlFileData(f,g,x);z=null!=z?z:this.getCurrentFile();a=this.createFileData(m,e,z,window.location.href,a,b,c,d,f,n,x);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,k=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=
+function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,m,n,y,x){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=y&&/(\.svg)$/i.test(y.getTitle()))if(x=!1,null!=e.themes&&"darkTheme"==e.defaultThemeName||null!=this.pages&&this.currentPage!=this.pages[0]){var k=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),l=this.pages[0];e.getGlobalVariable=
+function(a){return"page"==a?l.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(l.root)}m=null!=m?m:this.getXmlFileData(f,g,x);y=null!=y?y:this.getCurrentFile();a=this.createFileData(m,e,y,window.location.href,a,b,c,d,f,n,x);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,k=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=
g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;g=Math.floor(e.x/l-b.view.translate.x);l=Math.floor(e.y/l-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(k=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",l)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",
d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+
f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=e&&e!=mxConstants.NONE?' style="background-color:'+e+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
@@ -10147,18 +10147,18 @@ f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=e&&e!=mxConstants.NONE?' style=
b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+
" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var e=null;this.fileNode=a;this.pages=[];for(var c=0;c<b.length;c++)null==b[c].getAttribute("id")&&b[c].setAttribute("id",c),a=new DiagramPage(b[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==
urlParams["page-id"]&&(e=a);this.currentPage=null!=e?e:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(c=0;c<d.length;c++)a[d[c]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),c=0;c<g.length;c++){var m=g[c];f.setVisible(m,a[m.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||
-/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,m,n,z,x,B){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),k=e+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,
-null,null,d,f,null,null,null,b);this.saveData(k,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(k,a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=e+".png":"jpeg"==a&&(k=e+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var k=this.createDownloadRequest(b,a,d,e,m,f,n,z,x,B);
+this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(c=0;c<d.length;c++)a[d[c]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),c=0;c<g.length;c++){var m=g[c];f.setVisible(m,a[m.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||
+/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,m,n,y,x,B){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),k=e+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,
+null,null,d,f,null,null,null,b);this.saveData(k,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(k,a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=e+".png":"jpeg"==a&&(k=e+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var k=this.createDownloadRequest(b,a,d,e,m,f,n,y,x,B);
this.editor.graph.pageVisible=c;return k}catch(M){this.handleError(M)}}));else{var p=null,t=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var u=this.editor.graph.background;if(m||u==mxConstants.NONE)u=null;var q=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);
-this.editor.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else k=e+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),d)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,m,n,z,x){var e=this.editor.graph,k=e.getGraphBounds();
+this.editor.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else k=e+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),d)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,m,n,y,x){var e=this.editor.graph,k=e.getGraphBounds();
c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var l="",p="";if(k.width*k.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==g&&(p="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){l="&from="+g;break}g=e.background;"png"!=b&&"pdf"!=b||!f?f||null!=g&&g!=mxConstants.NONE||(g="#ffffff"):g=mxConstants.NONE;f={globalVars:e.getExportVariables()};
-z&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});Graph.translateDiagram&&(f.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+b+l+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=m?"&scale="+m:"")+(null!=n?"&border="+n:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=
+y&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});Graph.translateDiagram&&(f.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+b+l+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=m?"&scale="+m:"")+(null!=n?"&border="+n:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=
function(a,b,c){var e=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return e};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));
if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,l=null,f=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(l);
l=window.setTimeout(f,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();f()}));g();f()}null!=b&&b()});null!=a.url&&0<a.url.length?this.editor.loadUrl(a.url,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)})):d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){c.alert(a.tooltip)});return b}var e=null,
-c=this;if(null!=a&&0<a.length&&(e=mxUtils.parseXml(a),a=null!=e?e.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=f.getCell(a.getAttribute("id"));if(null!=m){try{var n=a.getAttribute("value");if(null!=n){var x=mxUtils.parseXml(n).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(m,x);else for(var B=x.attributes,y=0;y<B.length;y++)d.setAttributeForCell(m,
-B[y].nodeName,0<B[y].nodeValue.length?B[y].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+m.id+": "+J)}try{var C=a.getAttribute("style");null!=C&&d.model.setStyle(m,C)}catch(J){null!=window.console&&console.log("Error in style for "+m.id+": "+J)}try{var A=a.getAttribute("icon");if(null!=A){var F=0<A.length?JSON.parse(A):null;null!=F&&F.append||d.removeCellOverlays(m);null!=F&&d.addCellOverlay(m,b(F))}}catch(J){null!=window.console&&console.log("Error in icon for "+
+c=this;if(null!=a&&0<a.length&&(e=mxUtils.parseXml(a),a=null!=e?e.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=f.getCell(a.getAttribute("id"));if(null!=m){try{var n=a.getAttribute("value");if(null!=n){var x=mxUtils.parseXml(n).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(m,x);else for(var B=x.attributes,z=0;z<B.length;z++)d.setAttributeForCell(m,
+B[z].nodeName,0<B[z].nodeValue.length?B[z].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+m.id+": "+J)}try{var C=a.getAttribute("style");null!=C&&d.model.setStyle(m,C)}catch(J){null!=window.console&&console.log("Error in style for "+m.id+": "+J)}try{var A=a.getAttribute("icon");if(null!=A){var F=0<A.length?JSON.parse(A):null;null!=F&&F.append||d.removeCellOverlays(m);null!=F&&d.addCellOverlay(m,b(F))}}catch(J){null!=window.console&&console.log("Error in icon for "+
m.id+": "+J)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),G=d.getCellGeometry(m);if(null!=G){G=G.clone();for(key in D){var E=parseFloat(D[key]);"dx"==key?G.x+=E:"dy"==key?G.y+=E:"dw"==key?G.width+=E:"dh"==key?G.height+=E:G[key]=parseFloat(D[key])}d.model.setGeometry(m,G)}}}catch(J){null!=window.console&&console.log("Error in icon for "+m.id+": "+J)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=
I&&(new mxCodec(a.firstChild)).decode(I,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return e};
EditorUi.prototype.getCopyFilename=function(a,b){var e=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=e.lastIndexOf(".");0<=d&&(c=e.substring(d),e=e.substring(0,d));if(b)var k=new Date,d=k.getFullYear(),f=k.getMonth()+1,g=k.getDate(),m=k.getHours(),n=k.getMinutes(),k=k.getSeconds(),e=e+(" "+(d+"-"+f+"-"+g+"-"+m+"-"+n+"-"+k));return e=mxResources.get("copyOf",[e])+c};EditorUi.prototype.fileLoaded=function(a,b){var e=this.getCurrentFile();this.fileEditable=this.fileLoadedError=
@@ -10171,24 +10171,24 @@ mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.bod
var f=a[k].node.cloneNode(!1);f.removeAttribute("name");c.root=a[k].root;var g=d.encode(c);this.editor.graph.saveViewState(a[k].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");f.appendChild(g);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);e=(e<<5)-e+this.hashValue(f,function(a,b,e,c){return!c||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&
"previous"==b?null:e:Math.round(e)},b)<<0}return e};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var k=a.attributes[d].name,l=null!=b?b(a,k,a.attributes[d].value,!0):a.attributes[d].value;null!=l&&(e^=this.hashValue(k,
b,c)+this.hashValue(l,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,f,g,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
-mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),e=b.createElement("mxlibrary");mxUtils.setTextContent(e,JSON.stringify(a));b.appendChild(e);
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);
return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;
if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,e=c.previousSibling;b.insertBefore(c,a);b.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,e,c.documentElement.getAttribute("title"),
b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var k=null,l=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?
(null==k&&(k=document.createElement("div"),k.className="geDropTarget",mxUtils.write(k,mxResources.get("dragElementsHere"))),c.appendChild(k)):this.addLibraryEntries(b,c)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var f=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){l(b,a)}));this.repositionLibrary(e);var g=f.parentNode.previousSibling;d=g.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&g.setAttribute("title",
-this.getLibraryStorageHint(a)+"\n"+d);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.cursor="pointer";m.style.margin="0 3px";var y=null;if(".scratchpad"!=
-a.title||this.closableScratchpad)p.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=y?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,A=null,F=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),f,b,a,a.getMode());mxEvent.consume(c)}),
+this.getLibraryStorageHint(a)+"\n"+d);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.cursor="pointer";m.style.margin="0 3px";var n=null;if(".scratchpad"!=
+a.title||this.closableScratchpad)p.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var C=this.editor.graph,A=null,F=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),f,b,a,a.getMode());mxEvent.consume(c)}),
D=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=m.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",p.insertBefore(A,p.firstChild),g.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),
-g.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),p.insertBefore(y,p.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==y||a.isModified()||(g.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(c)})),g.style.paddingRight=
-18*p.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,e,d){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var g=n.getCellGeometry(a[l]);null!=g&&g.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=d&&(a.title=d);b.push(a);D(e);null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),
-k=null)}),E=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),e=n.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=n.view.translate.x;c.y-=n.view.translate.y;G(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&
-null!=n.panningManager&&null!=n.graphHandler.first&&(n.graphHandler.suspend(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),f.style.backgroundColor="#f1f3f4",f.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(f.style.backgroundColor="",f.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=
-!1,n.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.first&&(n.graphHandler.resume(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),f.style.backgroundColor="",f.style.cursor="",n.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){f.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.cursor="";f.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,e,d,g,p,m,n,t,y){if(null!=c&&"image/"==e.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,m),c)],c[0].vertex=!0,
-G(c,new mxRectangle(0,0,p,m),a,mxEvent.isAltDown(a)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null);else{var q=!1,u=mxUtils.bind(this,function(c,e){if(null!=c&&"application/pdf"==e){var d=Editor.extractGraphModelFromPdf(c);null!=d&&0<d.length&&(c=d)}if(null!=c)if(d=mxUtils.parseXml(c),"mxlibrary"==d.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(d.documentElement));l(g,f);b=b.concat(g);D(a);
-this.spinner.stop();q=!0}catch(R){}else if("mxfile"==d.documentElement.nodeName)try{for(var p=d.documentElement.getElementsByTagName("diagram"),g=0;g<p.length;g++){var m=this.stringToCells(Editor.getDiagramNodeXml(p[g])),n=this.editor.graph.getBoundingBoxFromGeometry(m);G(m,new mxRectangle(0,0,n.width,n.height),a)}q=!0}catch(R){null!=window.console&&console.log("error in drop handler:",R)}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=k&&null!=k.parentNode&&
-0<b.length&&(k.parentNode.removeChild(k),k=null)});null!=y&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(y,function(a){u(a,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,n)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):u(c,e)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){f.style.cursor="";f.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));p.insertBefore(m,p.firstChild);mxEvent.addListener(m,"click",F);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==f&&F(a)});d=m.cloneNode(!1);d.setAttribute("src",
+g.style.paddingRight=18*p.childNodes.length+"px")})):null==n&&(n=m.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),p.insertBefore(n,p.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(g.style.paddingRight=18*p.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),g.style.paddingRight=
+18*p.childNodes.length+"px")}),G=mxUtils.bind(this,function(a,c,e,d){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var g=C.getCellGeometry(a[l]);null!=g&&g.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=d&&(a.title=d);b.push(a);D(e);null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),
+k=null)}),E=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=C.getSelectionCells(),c=C.view.getBounds(b),e=C.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=C.view.translate.x;c.y-=C.view.translate.y;G(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&
+null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),f.style.backgroundColor="#f1f3f4",f.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(f.style.backgroundColor="",f.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=
+!1,C.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),f.style.backgroundColor="",f.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){f.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();
+a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.cursor="";f.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,e,d,g,p,m,n,t,q){if(null!=c&&"image/"==e.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,m),c)],c[0].vertex=!0,
+G(c,new mxRectangle(0,0,p,m),a,mxEvent.isAltDown(a)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null);else{var u=!1,z=mxUtils.bind(this,function(c,e){if(null!=c&&"application/pdf"==e){var d=Editor.extractGraphModelFromPdf(c);null!=d&&0<d.length&&(c=d)}if(null!=c)if(d=mxUtils.parseXml(c),"mxlibrary"==d.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(d.documentElement));l(g,f);b=b.concat(g);D(a);
+this.spinner.stop();u=!0}catch(R){}else if("mxfile"==d.documentElement.nodeName)try{for(var p=d.documentElement.getElementsByTagName("diagram"),g=0;g<p.length;g++){var m=this.stringToCells(Editor.getDiagramNodeXml(p[g])),n=this.editor.graph.getBoundingBoxFromGeometry(m);G(m,new mxRectangle(0,0,n.width,n.height),a)}u=!0}catch(R){null!=window.console&&console.log("error in drop handler:",R)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=k&&null!=k.parentNode&&
+0<b.length&&(k.parentNode.removeChild(k),k=null)});null!=q&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(q,function(a){z(a,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,n)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?z(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):z(c,e)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){f.style.cursor="";f.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));p.insertBefore(m,p.firstChild);mxEvent.addListener(m,"click",F);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==f&&F(a)});d=m.cloneNode(!1);d.setAttribute("src",
Editor.plusImage);d.setAttribute("title",mxResources.get("add"));p.insertBefore(d,p.firstChild);mxEvent.addListener(d,"click",E);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),
p.insertBefore(d,p.firstChild))}g.appendChild(p);g.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var e=a[c],d=e.data;if(null!=d){var d=this.convertDataUri(d),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",
@@ -10216,7 +10216,7 @@ mxResources.get(d?"doNotShowAgain":"close"));e.setAttribute("border","0");e.styl
this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f,g){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+
"."+(null!=g?g:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,d);else{var e=document.createElement("a");
g=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof e.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);g=65==(k?parseInt(k[2],10):!1)?!1:g}if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));g?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},2E4),e.click(),
-e.parentNode.removeChild(e)}catch(z){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),e=c.length,d=Math.ceil(e/1024),k=Array(d),f=0;f<d;++f){for(var g=
+e.parentNode.removeChild(e)}catch(y){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),e=c.length,d=Math.ceil(e/1024),k=Array(d),f=0;f<d;++f){for(var g=
1024*f,m=Math.min(g+1024,e),n=Array(m-g),B=0;g<m;++B,++g)n[B]=c[g].charCodeAt(0);k[f]=new Uint8Array(n)}return new Blob(k,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,m,n){g=null!=g?g:!1;m=null!=m?m:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);isLocalStorage&&f++;var e=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,d);else if(null!=c&&"text/html"==
c.substring(0,9)){var k=new EmbedDialog(this,a);this.showDialog(k.container,440,240,!0,!0);k.init()}else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d,null,n):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(k){try{this.exportFile(a,b,c,d,e,k)}catch(F){this.handleError(F)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,
function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,m,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var e=window.open("about:blank");null==e||null==e.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?e.document.write("<html>"+a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),e.document.write('<html><img style="max-width:100%;" src="data:'+
@@ -10228,8 +10228,8 @@ mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(
arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,g,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var e=this.getServiceCount(!1);isLocalStorage&&e++;var k=4>=e?2:6<e?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var k=c("_blank"==
e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=k&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?k.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&k.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=k.getStatus()&&299>=k.getStatus())try{this.exportFile(k.getText(),
a,g,!0,e,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<e,k,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,m,n,z,x,B,y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k=B?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(k,a,m,n,null,c,null,null,"blank"==
-x?"_blank":"self"==x?"_top":null,null,!0,B,y);d&&this.editor.graph.addSvgShadow(l);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,z,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):
+EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,m,n,y,x,B,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k=B?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(k,a,m,n,null,c,null,null,"blank"==
+x?"_blank":"self"==x?"_top":null,null,!0,B,z);d&&this.editor.graph.addSvgShadow(l);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,y,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,t,this.thumbImageCache)):t(l)}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(a,b,c,d,f,g,m){return this.addCheckbox(a,c,d,f,g,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,
b,c,d,f,g,m,n){g=null!=g?g:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();e.id=m;null!=n&&e.setAttribute("name",n);c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",m),a.appendChild(c),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=
function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var k=document.createElement("select");k.style.width="120px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));k.appendChild(e);e=document.createElement("option");
@@ -10238,36 +10238,36 @@ b.checked)?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled")})
Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));e.appendChild(d);d=document.createElement("option");
d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));e.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(d));a.appendChild(e);mxUtils.write(a,mxResources.get("borderColor")+":");var k="#0000ff",f=null,f=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(k||"none",function(a){k=a;c()});mxEvent.consume(a)}));c();f.style.padding=
mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return k},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(a,b,c,d,f,g,m){m=null!=m?m:[];d&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
-"1"!=urlParams.dev||m.push("lightbox=1"),"auto"!=a&&m.push("target="+a),null!=b&&b!=mxConstants.NONE&&m.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&m.push("edit="+encodeURIComponent(f)),g&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());return m};EditorUi.prototype.createLink=function(a,b,c,d,f,g,m,n,z,x){z=this.createUrlParameters(a,
-b,c,d,f,g,z);a=this.getCurrentFile();b=!0;null!=m?c="#U"+encodeURIComponent(m):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(a.getTitle()));x&&1<c.length&&(z.push("open="+c.substring(1)),c="");return(d&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,m,n,z,x,B){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);z||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];m&&(c.push("pages"),
-e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0);n&&c.push("layers");0<c.length&&(z&&c.push("lightbox"),e.toolbar=c.join(" "));null!=x&&0<x.length&&(e.edit=x);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';a=null!=a?"&fetch="+
-encodeURIComponent(a):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,
-mxResources.get("html"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");k=g.cloneNode(!0);k.setAttribute("value",
-"copy");f.appendChild(k);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(l);mxUtils.br(f);f.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));f.appendChild(l);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.style.cursor="pointer",mxUtils.write(l,mxResources.get("share")),f.appendChild(l),
-mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));k.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(f);var m=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=
-"100%";e.appendChild(C);var A=this.addCheckbox(e,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),f,!f),D=this.addCheckbox(e,mxResources.get("layers"),!0),G=this.addCheckbox(e,mxResources.get("lightbox"),!0),E=this.addEditButton(e,G),I=E.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&G.checked?E.getEditSelect().removeAttribute("disabled"):
-E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,C.value,m.getTarget(),m.getColor(),A.checked,F.checked,D.checked,G.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);k.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var l=this.getCurrentFile(),k="https://www.diagrams.net/doc/faq/publish-diagram-as-link";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");
-m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);e.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.style.cursor="pointer";mxUtils.write(m,mxResources.get("check"));p.appendChild(m);mxEvent.addListener(m,"click",
+"1"!=urlParams.dev||m.push("lightbox=1"),"auto"!=a&&m.push("target="+a),null!=b&&b!=mxConstants.NONE&&m.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&m.push("edit="+encodeURIComponent(f)),g&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());return m};EditorUi.prototype.createLink=function(a,b,c,d,f,g,m,n,y,x){y=this.createUrlParameters(a,
+b,c,d,f,g,y);a=this.getCurrentFile();b=!0;null!=m?c="#U"+encodeURIComponent(m):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));x&&1<c.length&&(y.push("open="+c.substring(1)),c="");return(d&&
+"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,m,n,y,x,B){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);y||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];m&&(c.push("pages"),
+e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0);n&&c.push("layers");0<c.length&&(y&&c.push("lightbox"),e.toolbar=c.join(" "));null!=x&&0<x.length&&(e.edit=x);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';a=null!=a?"&fetch="+
+encodeURIComponent(a):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
+mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value",
+"copy");k.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(l);mxUtils.br(k);k.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));k.appendChild(l);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.style.cursor="pointer",mxUtils.write(l,mxResources.get("share")),k.appendChild(l),
+mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var m=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=
+"100%";e.appendChild(C);var A=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),k,!k),D=this.addCheckbox(e,mxResources.get("layers"),!0),G=this.addCheckbox(e,mxResources.get("lightbox"),!0),E=this.addEditButton(e,G),I=E.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&G.checked?E.getEditSelect().removeAttribute("disabled"):
+E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,C.value,m.getTarget(),m.getColor(),A.checked,F.checked,D.checked,G.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var l=this.getCurrentFile(),k="https://www.diagrams.net/doc/faq/publish-diagram-as-link";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");
+p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);e.appendChild(m);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",
mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,t=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),
n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",e.appendChild(n),mxUtils.write(e,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=d+"px",e.appendChild(t),mxUtils.br(e);var u=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var F=null;if(null==l||l.constructor!=window.DriveFile||
b)F=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(e,mxResources.get("lightbox"),!0,null,null,!g),G=this.addEditButton(e,D),E=G.getEditInput();g&&(E.style.marginLeft=D.style.marginLeft,D.style.display="none",a-=30);var I=this.addCheckbox(e,mxResources.get("layers"),!0);I.style.marginLeft=E.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(I.removeAttribute("disabled"),E.removeAttribute("disabled")):
(I.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==F?!0:F.checked,D.checked,G.getLink(),I.checked,null!=n?n.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxResources.get("image"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";e.appendChild(k);if(f){mxUtils.write(e,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";e.appendChild(l);mxUtils.br(e)}var m=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-p=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),k=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(l.value)||0;c(!m.checked,null!=p?p.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,c,d,f,g,m,n,z){m=null!=m?m:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph,l="jpeg"==n?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(p);mxUtils.write(e,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
+"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";e.appendChild(l);mxUtils.br(e)}var p=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+m=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),k=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(l.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,c,d,f,g,m,n,y){m=null!=m?m:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph,l="jpeg"==n?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(p);mxUtils.write(e,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
"12px";t.value=this.lastExportZoom||"100%";e.appendChild(t);mxUtils.write(e,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";e.appendChild(q);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft=
-"24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");var E=document.createElement("select");E.style.marginTop="16px";E.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(p=0;p<a.length;p++)if(!k.isSelectionEmpty()||"selectionOnly"!=a[p]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(a[p]));I.setAttribute("value",a[p]);E.appendChild(I)}z?(mxUtils.write(e,mxResources.get("size")+":"),e.appendChild(E),mxUtils.br(e),l+=26,mxEvent.addListener(E,
-"change",function(){"selectionOnly"==E.value&&(u.checked=!0)})):g&&(e.appendChild(v),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),l+=26,mxEvent.addListener(u,"change",function(){u.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));k.isSelectionEmpty()?z&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",l-=26):(E.value="diagram",v.setAttribute("checked","checked"),v.defaultChecked=!0,mxEvent.addListener(u,
+"24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");var E=document.createElement("select");E.style.marginTop="16px";E.style.marginLeft="8px";a=["selectionOnly","diagram","page"];for(p=0;p<a.length;p++)if(!k.isSelectionEmpty()||"selectionOnly"!=a[p]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(a[p]));I.setAttribute("value",a[p]);E.appendChild(I)}y?(mxUtils.write(e,mxResources.get("size")+":"),e.appendChild(E),mxUtils.br(e),l+=26,mxEvent.addListener(E,
+"change",function(){"selectionOnly"==E.value&&(u.checked=!0)})):g&&(e.appendChild(v),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),l+=26,mxEvent.addListener(u,"change",function(){u.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));k.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",l-=26):(E.value="diagram",v.setAttribute("checked","checked"),v.defaultChecked=!0,mxEvent.addListener(u,
"change",function(){E.value=u.checked?"selectionOnly":"diagram"}));var J=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),H=null;"dark"==uiTheme&&(H=this.addCheckbox(e,mxResources.get("dark"),!0),l+=26);var K=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible),M=document.createElement("input");M.style.marginTop="16px";M.style.marginRight="8px";M.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||M.setAttribute("disabled","disabled");
b&&(e.appendChild(M),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),l+=26);var N=null;if("png"==n||"jpeg"==n)N=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=26;var Y=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=n);Y.style.marginBottom="16px";var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";b=document.createElement("option");
b.setAttribute("value","auto");mxUtils.write(b,mxResources.get("automatic"));L.appendChild(b);b=document.createElement("option");b.setAttribute("value","blank");mxUtils.write(b,mxResources.get("openInNewWindow"));L.appendChild(b);b=document.createElement("option");b.setAttribute("value","self");mxUtils.write(b,mxResources.get("openInThisWindow"));L.appendChild(b);"svg"==n&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(L),mxUtils.br(e),mxUtils.br(e),l+=26);c=new CustomDialog(this,e,
mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;f(t.value,J.checked,!u.checked,K.checked,Y.checked,M.checked,q.value,v.checked,!1,L.value,null!=N?N.checked:null,null!=H?H.checked:null,E.value)}),null,c,d);this.showDialog(c.container,340,l,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");
-e.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var l=this.addCheckbox(e,mxResources.get("fit"),!0),m=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible&&d,!d),p=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),t=this.addEditButton(e,n),A=t.getEditInput(),F=1<k.model.getChildCount(k.model.getRoot()),
+e.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var l=this.addCheckbox(e,mxResources.get("fit"),!0),p=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible&&d,!d),m=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),t=this.addEditButton(e,n),A=t.getEditInput(),F=1<k.model.getChildCount(k.model.getRoot()),
D=this.addCheckbox(e,mxResources.get("layers"),F,!F);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(F&&D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&n.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,
-function(){a(l.checked,m.checked,p.checked,n.checked,t.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,m,n){function e(b){var e=" ",p="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+function(){a(l.checked,p.checked,m.checked,n.checked,t.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,m,n){function e(b){var e=" ",p="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');m('<img src="'+b+'"'+n+(""!=p?' style="'+p+'"':"")+e+"/>")}var k=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=
this.createImageDataUri(a,b,"png");e(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&
299>=t.getStatus()?e("data:image/png;base64,"+t.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,m){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),k=e.getElementsByTagName("a");if(null!=k)for(var l=0;l<k.length;l++){var p=k[l].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==k[l].getAttribute("target")&&k[l].removeAttribute("target")}d&&
@@ -10278,11 +10278,11 @@ Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxR
a;else if("mxfile"==a.nodeName){var e=a.getElementsByTagName("diagram");if(0<e.length){var c=e[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}e=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=e}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,c=0;if(null!=
a){if(a.hasAttribute("scale")){var e=parseFloat(a.getAttribute("scale"));!isNaN(e)&&0<e&&(b=e)}a.hasAttribute("border")&&(e=parseInt(a.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:b,border:c}};EditorUi.prototype.getEmbeddedPng=function(a,b,c,d,f){try{var e=this.editor.graph,k=null!=e.themes&&"darkTheme"==e.defaultThemeName,g=null;if(null!=c&&0<c.length)e=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(e.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,
!0),e),g=c;else if(k||null!=this.pages&&this.currentPage!=this.pages[0]){var e=this.createTemporaryGraph(e.getStylesheet()),l=e.getGlobalVariable,m=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(m.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var d=c.toDataURL("image/png"),d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));e!=this.editor.graph&&e.container.parentNode.removeChild(e.container)}catch(C){null!=b&&b(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,d,null,e.shadowVisible,null,e,f)}catch(B){null!=b&&b(B)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,m,n,z,x,B,y,C){n=null!=n?n:!0;m=null!=z?z:b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,x,B,null,null,g,null,null,null,b.shadowVisible||
-y,null,C);(b.shadowVisible||y)&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));e!=this.editor.graph&&e.container.parentNode.removeChild(e.container)}catch(C){null!=b&&b(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,d,null,e.shadowVisible,null,e,f)}catch(B){null!=b&&b(B)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,m,n,y,x,B,z,C){n=null!=n?n:!0;m=null!=y?y:b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,x,B,null,null,g,null,null,null,b.shadowVisible||
+z,null,C);(b.shadowVisible||z)&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(p){b(a)}}))}catch(l){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,c,d,f,g,m,n,z,x,B,y,C){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,n):null,z,null==this.pages||0==this.pages.length,B)}catch(D){this.handleError(D)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,m,x,y,C)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,c,d,f,g){b=null!=b?b:0;c=null!=c?c:0;var e=[];try{var k=this.editor.graph;if(null!=a&&0<a.length){k.model.beginUpdate();try{var l=mxUtils.parseXml(a);a={};var m=this.editor.extractGraphModel(l.documentElement,
+EditorUi.prototype.exportImage=function(a,b,c,d,f,g,m,n,y,x,B,z,C){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,n):null,y,null==this.pages||0==this.pages.length,B)}catch(D){this.handleError(D)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,m,x,z,C)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,c,d,f,g){b=null!=b?b:0;c=null!=c?c:0;var e=[];try{var k=this.editor.graph;if(null!=a&&0<a.length){k.model.beginUpdate();try{var l=mxUtils.parseXml(a);a={};var m=this.editor.extractGraphModel(l.documentElement,
null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length&&!g){if(m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var n=p[0].getAttribute("name");null!=n&&""!=n&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,n))}}else if(0<
p.length){g=[];var t=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),d=!1,t=1);for(;t<p.length;t++){var u=p[t].getAttribute("id");p[t].removeAttribute("id");var F=this.updatePageRoot(new DiagramPage(p[t]));a[u]=p[t].getAttribute("id");var D=this.pages.length;null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[D+1]));k.model.execute(new ChangePage(this,F,F,D,!0));g.push(F)}this.updatePageLinks(a,
g)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(e=k.importGraphModel(m,b,c,d),null!=e))for(t=0;t<e.length;t++)this.updatePageLinksForCell(a,e[t])}finally{k.model.endUpdate()}}}catch(G){if(f)throw G;this.handleError(G)}return e};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(b);null!=d&&e.setLinkForCell(b,
@@ -10296,7 +10296,7 @@ this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?e():(this.loadi
"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(t){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(t){null!=window.console&&
console.error(t),c(t)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",
e)})})})}):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,
-' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),k=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(k))try{var g=b[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(g[2]),k=parseFloat(g[3])}catch(y){f=f||100,k=k||100}c(e.convertDataUri(Editor.createSvgDataUri(a)),f,k)}else d({message:mxResources.get("invalidInput")})}catch(y){d(y)}})}catch(q){d(q)}};"undefined"!==typeof mermaid||this.loadingMermaid||
+' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),k=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(k))try{var g=b[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(g[2]),k=parseFloat(g[3])}catch(z){f=f||100,k=k||100}c(e.convertDataUri(Editor.createSvgDataUri(a)),f,k)}else d({message:mxResources.get("invalidInput")})}catch(z){d(z)}})}catch(q){d(q)}};"undefined"!==typeof mermaid||this.loadingMermaid||
this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)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?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(a))),!0);"txt"!=b&&(k.responseType="blob");k.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);
else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var k=e.result,g=k.indexOf(","),l=decodeURIComponent(escape(atob(k.substring(g+1)))),m=mxUtils.parseXml(l).getElementsByTagName("svg");0<m.length&&(a=parseFloat(m[0].getAttribute("width")),f=parseFloat(m[0].getAttribute("height")))}c(e.result,a,f)}catch(E){d(E)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};k.onerror=function(a){d(a)};
@@ -10313,19 +10313,19 @@ a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.impo
function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!b){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,
function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var e=this,d=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(d){if(0==Object.keys(d.files).length)c();else{var f=0,k,g=!1;d.forEach(function(a,e){var d=e.name.toLowerCase();"diagram/diagram.xml"==d?(g=!0,e.async("string").then(function(a){0==a.indexOf("<mxfile ")?
b(a):c()})):0==d.indexOf("versions/")&&(d=parseInt(d.substr(9)),d>f&&(f=d,k=e))});0<f?k.async("string").then(function(d){!e.isOffline()&&(new XMLHttpRequest).upload&&e.isRemoteFileFormat(d,a.name)?e.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):g||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,m,n,z,x,B,y){x=null!=x?x:!0;var e=!1,k=null,l=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):(console.log("here",y,mxEvent.isControlDown(y)),b=this.importXml(a,c,d,x,null,null!=y?mxEvent.isControlDown(y):null));null!=n&&n(b)});"image"==b.substring(0,5)?(z=!1,"image/png"==b.substring(0,9)&&(b=B?null:this.extractGraphModelFromPng(a),
-null!=b&&0<b.length&&(k=this.importXml(b,c,d,x,null,null!=y?mxEvent.isControlDown(y):null),z=!0)),z||(b=this.editor.graph,B=a.indexOf(";"),0<B&&(a=a.substring(0,B)+a.substring(a.indexOf(",",B+1))),x&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),k=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,l)):null!=z&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||
-/(\.vs(x|sx?))($|\?)/i.test(m))?(e=!0,this.importVisio(z,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(e=!0,this.parseFile(null!=z?z:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?l(a.responseText):null!=n&&n(null))}),m)):0==a.indexOf("PK")&&null!=z?(e=!0,this.importZipFile(z,l,mxUtils.bind(this,function(){k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x);n(k)}))):/(\.v(sd|dx))($|\?)/i.test(m)||
-/(\.vs(s|x))($|\?)/i.test(m)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x,null,null!=y?mxEvent.isControlDown(y):null));e||null==n||n(k);return k};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,m,n,z,x,B,y,C){d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var e=null!=b&&null!=c,k=!0;b=null!=b?b:0;c=null!=c?c:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=B||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){l=!0;
-break}var q=mxUtils.bind(this,function(){var l=this.editor.graph,p=l.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,k,g,l,m){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,f,k,g,l,m,e,y,C)}catch(O){return this.handleError(O),null}});g=null!=g?g:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,u=[],
+!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,m,n,y,x,B,z){x=null!=x?x:!0;var e=!1,k=null,l=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):(console.log("here",z,mxEvent.isControlDown(z)),b=this.importXml(a,c,d,x,null,null!=z?mxEvent.isControlDown(z):null));null!=n&&n(b)});"image"==b.substring(0,5)?(y=!1,"image/png"==b.substring(0,9)&&(b=B?null:this.extractGraphModelFromPng(a),
+null!=b&&0<b.length&&(k=this.importXml(b,c,d,x,null,null!=z?mxEvent.isControlDown(z):null),y=!0)),y||(b=this.editor.graph,B=a.indexOf(";"),0<B&&(a=a.substring(0,B)+a.substring(a.indexOf(",",B+1))),x&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),k=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,l)):null!=y&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||
+/(\.vs(x|sx?))($|\?)/i.test(m))?(e=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(e=!0,this.parseFile(null!=y?y:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?l(a.responseText):null!=n&&n(null))}),m)):0==a.indexOf("PK")&&null!=y?(e=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x);n(k)}))):/(\.v(sd|dx))($|\?)/i.test(m)||
+/(\.vs(s|x))($|\?)/i.test(m)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x,null,null!=z?mxEvent.isControlDown(z):null));e||null==n||n(k);return k};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,m,n,y,x,B,z,C){d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var e=null!=b&&null!=c,k=!0;b=null!=b?b:0;c=null!=c?c:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=B||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){l=!0;
+break}var q=mxUtils.bind(this,function(){var l=this.editor.graph,p=l.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,k,g,l,m){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,f,k,g,l,m,e,z,C)}catch(O){return this.handleError(O),null}});g=null!=g?g:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,u=[],
A=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=n)n(u);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var d=u[e]();null!=d&&(c=c.concat(d))}}finally{l.getModel().endUpdate()}}g(c)}}),v=0;v<t;v++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var n=Graph.clipSvgDataUri(a.target.result),
-t=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(t+1)))),u=mxUtils.parseXml(q),q=u.getElementsByTagName("svg");if(0<q.length){var q=q[0],C=y?null:q.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?A(e,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=u){var a=u.getElementsByTagName("svg");
-if(0<a.length){var k=a[0],m=k.getAttribute("width"),y=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,q=k.getAttribute("viewBox");if(null==q||0==q.length)k.setAttribute("viewBox","0 0 "+m+" "+y);else if(isNaN(m)||isNaN(y)){var A=q.split(" ");3<A.length&&(m=parseFloat(A[2]),y=parseFloat(A[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(k));var C=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,y)),v=f(n,g.type,b+
-e*p,c+e*p,Math.max(1,Math.round(m*C)),Math.max(1,Math.round(y*C)),g.name);if(isNaN(m)||isNaN(y)){var x=new Image;x.onload=mxUtils.bind(this,function(){m=Math.max(1,x.width);y=Math.max(1,x.height);v[0].geometry.width=m;v[0].geometry.height=y;k.setAttribute("viewBox","0 0 "+m+" "+y);n=Editor.createSvgDataUri(mxUtils.getXml(k));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));l.setCellStyles("image",n,[v[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(ba){}return null})):
-A(e,mxUtils.bind(this,function(){return f(C,"text/xml",b+e*p,c+e*p,0,0,g.name)}))}else A(e,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==g.type){var v=y?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var F=new Image;F.src=a.target.result;A(e,mxUtils.bind(this,function(){return f(v,"text/xml",b+e*p,c+e*p,F.width,F.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+t=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(t+1)))),u=mxUtils.parseXml(q),q=u.getElementsByTagName("svg");if(0<q.length){var q=q[0],C=z?null:q.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?A(e,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=u){var a=u.getElementsByTagName("svg");
+if(0<a.length){var k=a[0],m=k.getAttribute("width"),z=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,q=k.getAttribute("viewBox");if(null==q||0==q.length)k.setAttribute("viewBox","0 0 "+m+" "+z);else if(isNaN(m)||isNaN(z)){var C=q.split(" ");3<C.length&&(m=parseFloat(C[2]),z=parseFloat(C[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(k));var A=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,z)),v=f(n,g.type,b+
+e*p,c+e*p,Math.max(1,Math.round(m*A)),Math.max(1,Math.round(z*A)),g.name);if(isNaN(m)||isNaN(z)){var x=new Image;x.onload=mxUtils.bind(this,function(){m=Math.max(1,x.width);z=Math.max(1,x.height);v[0].geometry.width=m;v[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+m+" "+z);n=Editor.createSvgDataUri(mxUtils.getXml(k));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));l.setCellStyles("image",n,[v[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(ba){}return null})):
+A(e,mxUtils.bind(this,function(){return f(C,"text/xml",b+e*p,c+e*p,0,0,g.name)}))}else A(e,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==g.type){var v=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var F=new Image;F.src=a.target.result;A(e,mxUtils.bind(this,function(){return f(v,"text/xml",b+e*p,c+e*p,F.width,F.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,a.target.result,mxUtils.bind(this,function(a,l,m){A(e,mxUtils.bind(this,function(){if(null!=a&&a.length<x){var n=k&&this.isResampleImageSize(g.size,B)?Math.min(1,Math.min(d/l,d/m)):1;return f(a,g.type,b+e*p,c+e*p,Math.round(l*n),Math.round(m*n),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),k,d,B,g.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=a.target.result,f(n,g.type,b+e*p,c+e*p,240,160,g.name,function(a){A(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*p,c+e*p,240,160,g.name,function(a){A(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?n.readAsDataURL(g):n.readAsText(g)}})(v)});if(l){l=
-[];for(t=0;t<a.length;t++)l.push(a[t]);a=l;this.confirmImageResize(function(a){k=a;q()},z)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||b)mxSettings.setResizeImages(e?d:null),mxSettings.save();c();a(d)};null==e||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+[];for(t=0;t<a.length;t++)l.push(a[t]);a=l;this.confirmImageResize(function(a){k=a;q()},y)}else q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||b)mxSettings.setResizeImages(e?d:null),mxSettings.save();c();a(d)};null==e||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,e)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var e=new FormData;e.append("format","xml");e.append("upfile",a,c);var d=new XMLHttpRequest;d.open("POST",
OPEN_URL);d.onreadystatechange=function(){b(d)};d.send(e);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(u){}};EditorUi.prototype.isResampleImageSize=function(a,b){b=null!=b?b:this.resampleThreshold;return a>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g,m){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImageSize(null!=m?m:b.length,g))try{var l=Math.max(e/f,k/f);if(1<l){var n=Math.round(e/l),p=Math.round(k/
l),t=document.createElement("canvas");t.width=n;t.height=p;t.getContext("2d").drawImage(a,0,0,n,p);var q=t.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=n;u.height=p;var D=u.toDataURL();q!==D&&(b=q,e=n,k=p)}}}catch(G){}c(b,e,k)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var e=new Image;e.onload=function(){e.width=0<e.width?e.width:120;e.height=0<e.height?e.height:
@@ -10337,8 +10337,8 @@ else if(f=this.graph.getAttributeForCell(e,"mermaidData"),null!=f)this.editMerma
"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1");return f.apply(this,arguments)};var m=b.addClickHandler;
b.addClickHandler=function(a,c,e){var d=c;c=function(a,c){if(null==c){var e=mxEvent.getSource(a);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=d&&d(a,c)};m.call(this,a,c,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var n=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=
function(b,c,e){a.editor.graph.isSelectionEmpty()?n.apply(this,arguments):a.menus.addMenuItems(b,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var v=b.getExportVariables;b.getExportVariables=function(){var b=v.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=
-null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var z=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:
-1:z.apply(this,arguments)};var x=b.labelLinkClicked;b.labelLinkClicked=function(a,c,e){var d=c.getAttribute("href");if(null==d||!b.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))x.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(d),b.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var B=
+null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var y=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:
+1:y.apply(this,arguments)};var x=b.labelLinkClicked;b.labelLinkClicked=function(a,c,e){var d=c.getAttribute("href");if(null==d||!b.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))x.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(d),b.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var B=
this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",
!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();
a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,
@@ -10346,14 +10346,14 @@ a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function
!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(B=this.editor.graph.view,B.setUnit(mxSettings.getUnit()),B.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));
mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,B.unit),this.refresh());if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left=
"2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),
-c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",
+c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",
function(a){b.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(b.isEnabled()){var c=
mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=b.view.translate,d=b.view.scale,f=c.x/d-e.x,g=c.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isShiftDown(a)?this.openFiles(a.dataTransfer.files,!0):(mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a),a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(l);var m=null,e=c.getElementsByTagName("img");null!=e&&1==e.length?(l=e[0].getAttribute("src"),null==l&&(l=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=
!0)):(e=c.getElementsByTagName("a"),null!=e&&1==e.length?l=e[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,m,null,n,mxEvent.isControlDown(a)))});m&&null!=l&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),
mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}b.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){e=!0;break}if(!e){var f=
-c.items;for(index in f){var g=f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+c.items;for(index in f){var g=f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var d=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,c.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=
@@ -10365,7 +10365,7 @@ EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof windo
mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,
"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",
mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(a,b,c,d){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(a,
-e){try{this.spinner.stop();var d=this.createImageDataUri(a,b,"png");if("png"==c)var f=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png"),g=new ClipboardItem({"image/png":f});else var k=parseInt(e.getAttribute("width")),l=parseInt(e.getAttribute("height")),g=new ClipboardItem({"text/html":new Blob(['<img src="'+d+'" width="'+k+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([g])["catch"](mxUtils.bind(this,function(a){this.handleError(a)}))}catch(y){this.handleError(y)}}),
+e){try{this.spinner.stop();var d=this.createImageDataUri(a,b,"png");if("png"==c)var f=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png"),g=new ClipboardItem({"image/png":f});else var k=parseInt(e.getAttribute("width")),l=parseInt(e.getAttribute("height")),g=new ClipboardItem({"text/html":new Blob(['<img src="'+d+'" width="'+k+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([g])["catch"](mxUtils.bind(this,function(a){this.handleError(a)}))}catch(z){this.handleError(z)}}),
null,null,null,mxUtils.bind(this,function(){}),null,null,null!=d?d:"png"==c?1:4,"png"!=c,null,null,null,10,null,null,!1,null,0<a.length?a:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var e=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),d=mxUtils.getXml(c.encodeCells(e));mxUtils.setTextContent(a,encodeURIComponent(d));b?(c.removeCells(e,!1),c.lastPasteXml=null):(c.lastPasteXml=
d,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var a=null;if(Editor.enableNativeCipboard){var b=this.editor.graph;b.isSelectionEmpty()||(a=mxUtils.sortCells(b.getExportableCells(b.model.getTopmostCells(b.getSelectionCells()))),b=mxUtils.getXml(b.encodeCells(a)),navigator.clipboard.writeText(b))}return a};EditorUi.prototype.pasteXml=function(a,b,c,d){var e=this.editor.graph,f=null;e.lastPasteXml==a?e.pasteCounter++:(e.lastPasteXml=a,
e.pasteCounter=0);var g=e.pasteCounter*e.gridSize;if(c||this.isCompatibleString(a))f=this.importXml(a,g,g),e.setSelectionCells(f);else if(b&&1==e.getSelectionCount()){g=e.getStartEditingCell(e.getSelectionCell(),d);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a)&&"image"==e.getCurrentCellStyle(g)[mxConstants.STYLE_SHAPE])e.setCellStyles(mxConstants.STYLE_IMAGE,a,[g]);else{e.model.beginUpdate();try{e.labelChanged(g,a),Graph.isLink(a)&&e.setLinkForCell(g,a)}finally{e.model.endUpdate()}}e.setSelectionCell(g)}else f=
@@ -10374,15 +10374,15 @@ k=!1;if(null!=g&&0<g.length&&"%3CmxGraphModel%3E"==g.substring(0,18)){var l=deco
null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(k=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,k==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,k),f=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==
g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(k=g.getAttribute("src"),null!=k&&("data:image/png;base64,"==k.substring(0,22)&&(f=this.extractGraphModelFromPng(k),null!=f&&0<f.length&&(k=f)),mxUtils.setTextContent(e,k),f=!1)):(g=e.getElementsByTagName("img"),1==g.length&&(g=g[0],k=g.getAttribute("src"),null!=k&&g.parentNode==e&&1==e.children.length&&("data:image/png;base64,"==k.substring(0,22)&&(f=this.extractGraphModelFromPng(k),null!=f&&0<f.length&&(k=f)),mxUtils.setTextContent(e,
k),f=!1)));f&&Graph.removePasteFormatting(e)}else null!=g&&0<g.length&&(e=document.createElement("div"),mxUtils.setTextContent(e,k))}g=e.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))c=g[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*
-b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(y){}try{g=e.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f),this.isCompatibleString(l)&&
-(k=!0,f=l)}catch(y){}try{if(null!=f&&0<f.length){this.pasteXml(f,d,k,a);try{mxEvent.consume(a)}catch(y){}}else if(!c){var n=this.editor.graph;n.lastPasteXml=null;n.pasteCounter=0}}catch(y){this.handleError(y)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",
+b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(z){}try{g=e.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f),this.isCompatibleString(l)&&
+(k=!0,f=l)}catch(z){}try{if(null!=f&&0<f.length){this.pasteXml(f,d,k,a);try{mxEvent.consume(a)}catch(z){}}else if(!c){var n=this.editor.graph;n.lastPasteXml=null;n.pasteCounter=0}}catch(z){this.handleError(z)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",
mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var e=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=
c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,
function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,e,d;if(null==a){d=document.body;
var f=document.documentElement;e=(d.clientWidth||f.clientWidth)-3;d=Math.max(d.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,e=a.clientWidth,d=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,e-3)+"px";f.style.height=Math.max(0,d-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?
this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),e=new mxGraphModel;c.decode(b,e);b=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(b);c++)a.push(e.getChildAt(b,c))}return a};EditorUi.prototype.openFileHandle=function(a,b,c,d,f){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?
-b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var e=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,d);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
+b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var e=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,d);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
b,d)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(c,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(c,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==
a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,d)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
this.defaultFilename,d);try{this.loadLibrary(new LocalLibrary(this,a,c.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(c,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,d)}));else{if("image/png"==c.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==c.type){var g=Editor.extractGraphModelFromPdf(a);null!=g&&(f=null,d=!0,
@@ -10403,12 +10403,12 @@ n,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({e
640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(O){g.postMessage(JSON.stringify({event:"draft",error:O.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var p=1==k.enableRecent,t=1==k.enableSearch,q=1==k.enableCustomTemp,m=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(b,c,d,e){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==
this.emptyDiagramXml,name:c,tempUrl:d,libs:e,builtIn:!0,message:k}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",
docUrl:a,info:b,name:c}),"*")}),null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):
-null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var v=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var z=null!=k.xml?
-k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,H=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=z;g.postMessage(JSON.stringify(b),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(z)));J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);
-H(a)}),M=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(z),c=!1);if(null!=this.pages&&this.currentPage.getId()!=M){for(var N=J.getGlobalVariable,J=this.createTemporaryGraph(J.getStylesheet()),Y,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==M){Y=this.updatePageRoot(this.pages[L]);break}J.getGlobalVariable=function(a){return"page"==a?Y.getName():"pagenumber"==a?1:N.apply(this,
+null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var v=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var y=null!=k.xml?
+k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,H=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=y;g.postMessage(JSON.stringify(b),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(y)));J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);
+H(a)}),M=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(y),c=!1);if(null!=this.pages&&this.currentPage.getId()!=M){for(var N=J.getGlobalVariable,J=this.createTemporaryGraph(J.getStylesheet()),Y,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==M){Y=this.updatePageRoot(this.pages[L]);break}J.getGlobalVariable=function(a){return"page"==a?Y.getName():"pagenumber"==a?1:N.apply(this,
arguments)};document.body.appendChild(J.container);J.model.setRoot(Y.root)}if(null!=k.layerIds){for(var T=J.model,U=T.getChildCells(T.getRoot()),m={},L=0;L<k.layerIds.length;L++)m[k.layerIds[L]]=!0;for(L=0;L<U.length;L++)T.setVisible(U[L],m[U[L].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){K(null)}),null,null,k.scale,k.transparent,k.shadow,null,J,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=M?"&pageId="+M:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?H("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);
-v=this.createLoadMessage("export");v.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var X=this.getXmlFileData();v.xml=mxUtils.getXml(X);v.data=this.getFileData(null,null,!0,null,null,null,X);v.format=k.format}else if("html"==k.format)z=this.editor.getGraphXml(),v.data=this.getHtml(z,this.editor.graph),v.xml=mxUtils.getXml(z),v.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var aa=null!=k.background?k.background:this.editor.graph.background;
+"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=M?"&pageId="+M:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(y))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?H("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);
+v=this.createLoadMessage("export");v.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var X=this.getXmlFileData();v.xml=mxUtils.getXml(X);v.data=this.getFileData(null,null,!0,null,null,null,X);v.format=k.format}else if("html"==k.format)y=this.editor.getGraphXml(),v.data=this.getHtml(y,this.editor.graph),v.xml=mxUtils.getXml(y),v.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var aa=null!=k.background?k.background:this.editor.graph.background;
aa==mxConstants.NONE&&(aa=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var ca=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=Editor.createSvgDataUri(a);g.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,ca,null,null,k.embedImages,aa,
k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var W=this.editor.graph.getSvg(aa,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(W);this.embedFonts(W,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.editor.convertImages(a,
mxUtils.bind(this,function(a){ca(mxUtils.getXml(a))})):ca(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(v),"*")}return}if("load"==k.action){d=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);
@@ -10424,12 +10424,12 @@ urlParams.ready||"ready";g.postMessage(f,"*");if("json"==urlParams.proto){var m=
"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b);"1"!=urlParams.noExitBtn&&
(b=document.createElement("a"),c="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(b,c),b.setAttribute("title",c),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,
-d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,m=null,n=null,B=null,y=null,C=null,A=null,F=null,D=null,G="",E="auto",I="auto",J=null,H=null,K=40,M=40,N=100,Y=0,L=this.editor.graph;L.getGraphBounds();
+d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,m=null,n=null,B=null,z=null,C=null,A=null,F=null,D=null,G="",E="auto",I="auto",J=null,H=null,K=40,M=40,N=100,Y=0,L=this.editor.graph;L.getGraphBounds();
for(var T=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},U=L.getFreeInsertPoint(),X=U.x,aa=U.y,U=aa,ca=null,W="auto",D=null,V=[],fa=null,ea=null,O=0;O<c.length&&"#"==c[O].charAt(0);){a=c[O];for(O++;O<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[O].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[O].substring(1)),O++;if("#"!=a.charAt(1)){var Z=a.indexOf(":");if(0<Z){var R=mxUtils.trim(a.substring(1,Z)),P=mxUtils.trim(a.substring(Z+1));"label"==
-R?ca=L.sanitizeHtml(P):"labelname"==R&&0<P.length&&"-"!=P?y=P:"labels"==R&&0<P.length&&"-"!=P?C=JSON.parse(P):"style"==R?m=P:"parentstyle"==R?A=P:"stylename"==R&&0<P.length&&"-"!=P?B=P:"styles"==R&&0<P.length&&"-"!=P?n=JSON.parse(P):"vars"==R&&0<P.length&&"-"!=P?k=JSON.parse(P):"identity"==R&&0<P.length&&"-"!=P?F=P:"parent"==R&&0<P.length&&"-"!=P?D=P:"namespace"==R&&0<P.length&&"-"!=P?G=P:"width"==R?E=P:"height"==R?I=P:"left"==R&&0<P.length?J=P:"top"==R&&0<P.length?H=P:"ignore"==R?ea=P.split(","):
+R?ca=L.sanitizeHtml(P):"labelname"==R&&0<P.length&&"-"!=P?z=P:"labels"==R&&0<P.length&&"-"!=P?C=JSON.parse(P):"style"==R?m=P:"parentstyle"==R?A=P:"stylename"==R&&0<P.length&&"-"!=P?B=P:"styles"==R&&0<P.length&&"-"!=P?n=JSON.parse(P):"vars"==R&&0<P.length&&"-"!=P?k=JSON.parse(P):"identity"==R&&0<P.length&&"-"!=P?F=P:"parent"==R&&0<P.length&&"-"!=P?D=P:"namespace"==R&&0<P.length&&"-"!=P?G=P:"width"==R?E=P:"height"==R?I=P:"left"==R&&0<P.length?J=P:"top"==R&&0<P.length?H=P:"ignore"==R?ea=P.split(","):
"connect"==R?V.push(JSON.parse(P)):"link"==R?fa=P:"padding"==R?Y=parseFloat(P):"edgespacing"==R?K=parseFloat(P):"nodespacing"==R?M=parseFloat(P):"levelspacing"==R?N=parseFloat(P):"layout"==R&&(W=P)}}}if(null==c[O])throw Error(mxResources.get("invalidOrMissingFile"));for(var da=this.editor.csvToArray(c[O]),R=Z=null,P=[],S=0;S<da.length;S++)F==da[S]&&(Z=S),D==da[S]&&(R=S),P.push(mxUtils.trim(da[S]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+P[0]+"%");if(null!=
V)for(var ga=0;ga<V.length;ga++)null==g[V[ga].to]&&(g[V[ga].to]={});F=[];for(S=O+1;S<c.length;S++){var ja=this.editor.csvToArray(c[S]);if(null==ja){var ha=40<c[S].length?c[S].substring(0,40)+"...":c[S];throw Error(ha+" ("+S+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&F.push(ja)}L.model.beginUpdate();try{for(S=0;S<F.length;S++){var ja=F[S],Q=null,ka=null!=Z?G+ja[Z]:null;null!=ka&&(Q=L.model.getCell(ka));var c=null!=Q,ba=new mxCell(ca,new mxGeometry(X,U,0,0),m||"whiteSpace=wrap;html=1;");
-ba.vertex=!0;ba.id=ka;for(var ia=0;ia<ja.length;ia++)L.setAttributeForCell(ba,P[ia],ja[ia]);if(null!=y&&null!=C){var ta=C[ba.getAttribute(y)];null!=ta&&L.labelChanged(ba,ta)}if(null!=B&&null!=n){var ua=n[ba.getAttribute(B)];null!=ua&&(ba.style=ua)}L.setAttributeForCell(ba,"placeholders","1");ba.style=L.replacePlaceholders(ba,ba.style,k);c&&(L.model.setGeometry(Q,ba.geometry),L.model.setStyle(Q,ba.style),0>mxUtils.indexOf(e,Q)&&e.push(Q));Q=ba;if(!c)for(ga=0;ga<V.length;ga++)g[V[ga].to][Q.getAttribute(V[ga].to)]=
+ba.vertex=!0;ba.id=ka;for(var ia=0;ia<ja.length;ia++)L.setAttributeForCell(ba,P[ia],ja[ia]);if(null!=z&&null!=C){var ta=C[ba.getAttribute(z)];null!=ta&&L.labelChanged(ba,ta)}if(null!=B&&null!=n){var ua=n[ba.getAttribute(B)];null!=ua&&(ba.style=ua)}L.setAttributeForCell(ba,"placeholders","1");ba.style=L.replacePlaceholders(ba,ba.style,k);c&&(L.model.setGeometry(Q,ba.geometry),L.model.setStyle(Q,ba.style),0>mxUtils.indexOf(e,Q)&&e.push(Q));Q=ba;if(!c)for(ga=0;ga<V.length;ga++)g[V[ga].to][Q.getAttribute(V[ga].to)]=
Q;null!=fa&&"link"!=fa&&(L.setLinkForCell(Q,Q.getAttribute(fa)),L.setAttributeForCell(Q,fa,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[Q]));var va=this.editor.graph.getPreferredSizeForCell(Q);Q.vertex&&(null!=J&&null!=Q.getAttribute(J)&&(Q.geometry.x=X+parseFloat(Q.getAttribute(J))),null!=H&&null!=Q.getAttribute(H)&&(Q.geometry.y=aa+parseFloat(Q.getAttribute(H))),"@"==E.charAt(0)&&null!=Q.getAttribute(E.substring(1))?Q.geometry.width=parseFloat(Q.getAttribute(E.substring(1))):Q.geometry.width=
"auto"==E?va.width+Y:parseFloat(E),"@"==I.charAt(0)&&null!=Q.getAttribute(I.substring(1))?Q.geometry.height=parseFloat(Q.getAttribute(I.substring(1))):Q.geometry.height="auto"==I?va.height+Y:parseFloat(I),U+=Q.geometry.height+M);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(Q)):(D=null!=R?L.model.getCell(G+ja[R]):null,d.push(Q),null!=D?(D.style=L.replacePlaceholders(D,A,k),L.addCell(Q,D)):e.push(L.addCell(Q)))}for(var pa=e.slice(),la=e.slice(),ga=0;ga<V.length;ga++)for(var wa=V[ga],S=0;S<d.length;S++){var Q=
d[S],xa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(L.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var l=c.label;null!=c.fromlabel&&(l=(b.getAttribute(c.fromlabel)||"")+(l||""));null!=c.tolabel&&(l=(l||"")+(f.getAttribute(c.tolabel)||""));var m="target"==c.placeholders==!c.invert?f:a,m=null!=c.style?L.replacePlaceholders(m,c.style,k):L.createCurrentEdgeStyle(),l=L.insertEdge(null,null,l||"",c.invert?
@@ -10476,32 +10476,32 @@ c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.o
!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();
return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==
DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,m,n){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,c,d,f,g,m,n)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};
-EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,m,n,z,x,B,y,C,A,F,D){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(a,b,c,d,f,g,m,n,z,x,B,y,C,A,F,D)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,c,d)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,m,n,y,x,B,z,C,A,F,D){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(a,b,c,d,f,g,m,n,y,x,B,z,C,A,F,D)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,c,d)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,c,d)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(a,b,c,d,f)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||
d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,d,b,c,g,f){function m(){for(var a=B.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==B&&b++;y.style.display=0==b?"block":"none"}function n(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+var CommentsWindow=function(a,d,b,c,g,f){function m(){for(var a=B.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==B&&b++;z.style.display=0==b?"block":"none"}function n(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),m()):e();v=null});n.className="geCommentEditBtn";l.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";l.appendChild(p);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function k(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function l(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function t(b,c,d,f,g){function C(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function A(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function H(c,d,e,g,m){function y(){k(v);b.addReply(u,function(a){u.id=a;b.replies.push(u);p(v);e&&e()},function(b){q();l(v);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},g,m)}function q(){n(u,v,function(a){y()},!0)}var C=A().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=t(u,b.replies,C,f+1);d?q():y()}if(g||!b.isResolved){y.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
-var D=document.createElement("div");D.className="geCommentHeader";var z=document.createElement("img");z.className="geCommentUserImg";z.src=b.user.pictureUrl||Editor.userImage;D.appendChild(z);z=document.createElement("div");z.className="geCommentHeaderTxt";D.appendChild(z);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");z.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);e(b,
-K);z.appendChild(K);x.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,b.content||"");x.appendChild(D);b.isLocked&&(x.style.opacity="0.5");D=document.createElement("div");D.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";D.appendChild(G);u||b.isLocked||0!=f&&!q||C(mxResources.get("reply"),function(){H("",!0)},b.isResolved);z=a.getCurrentUser();null==z||z.id!=b.user.id||u||b.isLocked||(C(mxResources.get("edit"),
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function A(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function H(c,d,e,g,m){function z(){k(v);b.addReply(u,function(a){u.id=a;b.replies.push(u);p(v);e&&e()},function(b){C();l(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},g,m)}function C(){n(u,v,function(a){z()},!0)}var q=A().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=t(u,b.replies,q,f+1);d?C():z()}if(g||!b.isResolved){z.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
+var D=document.createElement("div");D.className="geCommentHeader";var y=document.createElement("img");y.className="geCommentUserImg";y.src=b.user.pictureUrl||Editor.userImage;D.appendChild(y);y=document.createElement("div");y.className="geCommentHeaderTxt";D.appendChild(y);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");y.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);e(b,
+K);y.appendChild(K);x.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,b.content||"");x.appendChild(D);b.isLocked&&(x.style.opacity="0.5");D=document.createElement("div");D.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";D.appendChild(G);u||b.isLocked||0!=f&&!q||C(mxResources.get("reply"),function(){H("",!0)},b.isResolved);y=a.getCurrentUser();null==y||y.id!=b.user.id||u||b.isLocked||(C(mxResources.get("edit"),
function(){function c(){n(b,x,function(){k(x);b.editComment(b.content,function(){p(x)},function(b){l(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),C(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){k(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=x.querySelectorAll(".geCommentAction");for(a=
-0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(x);x.style.opacity="0.5"}else{d=A(b).replies;for(a=0;a<d.length;a++)B.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}y.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(b){l(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||C(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(x);x.style.opacity="0.5"}else{d=A(b).replies;for(a=0;a<d.length;a++)B.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}z.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(b){l(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||C(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=A(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);F||(e[g].style.display="none")}m()}b.isResolved?H(mxResources.get("reOpened")+": ",!0,c,!1,
!0):H(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(D);null!=d?B.insertBefore(x,d.nextSibling):B.appendChild(x);for(d=0;null!=b.replies&&d<b.replies.length;d++)D=b.replies[d],D.isResolved=b.isResolved,t(D,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,n(b,x,v.saveCallback,v.deleteOnCancel),b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(B.appendChild(v.div),n(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return x}}var u=
-!a.canComment(),q=a.canReplyToReplies(),v=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;B.style.bottom=parseInt(x)+7+"px";z.appendChild(B);var y=document.createElement("span");y.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(y,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=x;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;x=document.createElement("a");x.className="geButton";if(!u){var A=x.cloneNode();A.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';A.setAttribute("title",mxResources.get("create")+
+!a.canComment(),q=a.canReplyToReplies(),v=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;B.style.bottom=parseInt(x)+7+"px";y.appendChild(B);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(z,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=x;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;x=document.createElement("a");x.className="geButton";if(!u){var A=x.cloneNode();A.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';A.setAttribute("title",mxResources.get("create")+
"...");mxEvent.addListener(A,"click",function(b){function c(){n(d,e,function(b){k(e);a.addComment(b,function(a){b.id=a;D.push(b);p(e)},function(b){l(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=t(d,D,null,0);c();b.preventDefault();mxEvent.consume(b)});C.appendChild(A)}A=x.cloneNode();A.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';A.setAttribute("title",mxResources.get("showResolved"));
var F=!1;"dark"==uiTheme&&(A.style.filter="invert(100%)");mxEvent.addListener(A,"click",function(a){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});C.appendChild(A);a.commentsRefreshNeeded()&&(A=x.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',A.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){G();a.preventDefault();
-mxEvent.consume(a)}),C.appendChild(A));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),C.appendChild(x));z.appendChild(C);var D=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),
+mxEvent.consume(a)}),C.appendChild(A));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),C.appendChild(x));y.appendChild(C);var D=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),
c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(H){a.handleError(H)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});
-for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});B.innerHTML="";B.appendChild(y);y.style.display="block";D=a;for(a=0;a<D.length;a++)b(D[a].replies),t(D[a],D,null,0,F);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(B.appendChild(v.div),n(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=
+for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});B.innerHTML="";B.appendChild(z);z.style.display="block";D=a;for(a=0;a<D.length;a++)b(D[a].replies),t(D[a],D,null,0,F);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(B.appendChild(v.div),n(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=
!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;C=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=B.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<D.length;d++)a(D[d])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),
-z,d,b,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||
+y,d,b,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||
document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var E=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",E);this.destroy=function(){mxEvent.removeListener(window,"resize",E);this.window.destroy()}},ConfirmDialog=function(a,d,b,c,g,f,m,n,e,k,l){var p=document.createElement("div");
p.style.textAlign="center";l=null!=l?l:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=l+"px";t.style.lineHeight="1.2em";mxUtils.write(t,d);p.appendChild(t);null!=k&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",k),t.appendChild(d),p.appendChild(t));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type",
"checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(u.checked)});f.className="geBtn";null!=n&&(f.innerHTML=n+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);var q=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(u.checked)});k.appendChild(q);null!=m?(q.innerHTML=m+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop=
@@ -10509,15 +10509,15 @@ p.style.textAlign="center";l=null!=l?l:44;var t=document.createElement("div");t.
"12px";this.init=function(){q.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
EditorUi.prototype.patchPages=function(a,d,b,c,g){var f={},m=[],n={},e={},k={},l={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])f[p]=c[EditorUi.DIFF_UPDATE][p];if(null!=d[EditorUi.DIFF_REMOVE])for(c=0;c<d[EditorUi.DIFF_REMOVE].length;c++)e[d[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(c=0;c<d[EditorUi.DIFF_INSERT].length;c++)n[d[EditorUi.DIFF_INSERT][c].previous]=d[EditorUi.DIFF_INSERT][c];if(null!=d[EditorUi.DIFF_UPDATE])for(p in d[EditorUi.DIFF_UPDATE])c=
d[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=a){var t="";for(c=0;c<a.length;c++){var u=a[c].getId();k[u]=a[c];null!=l[t]||e[u]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][u]&&null!=d[EditorUi.DIFF_UPDATE][u].previous||(l[t]=u);t=u}}var q={},v=mxUtils.bind(this,function(a){var c=null!=a?a.getId():"";if(null!=a&&!q[c]){q[c]=!0;m.push(a);var e=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][c]:null;null!=e&&(this.updatePageRoot(a),null!=e.name&&a.setName(e.name),
-null!=e.view&&this.patchViewState(a,e.view),null!=e.cells&&this.patchPage(a,e.cells,f[a.getId()],g),!b||null==e.cells&&null==e.view||(a.needsUpdate=!0))}a=l[c];null!=a&&(delete l[c],v(k[a]));a=n[c];null!=a&&(delete n[c],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=k[a.getId()];null==c?v(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});v();for(p in l)v(k[l[p]]),
-delete l[p];for(p in n)z(n[p]),delete n[p];return m};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in d)try{a.viewState[b]=JSON.parse(d[b])}catch(c){}a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
+null!=e.view&&this.patchViewState(a,e.view),null!=e.cells&&this.patchPage(a,e.cells,f[a.getId()],g),!b||null==e.cells&&null==e.view||(a.needsUpdate=!0))}a=l[c];null!=a&&(delete l[c],v(k[a]));a=n[c];null!=a&&(delete n[c],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=k[a.getId()];null==c?v(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});v();for(p in l)v(k[l[p]]),
+delete l[p];for(p in n)y(n[p]),delete n[p];return m};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in d)try{a.viewState[b]=JSON.parse(d[b])}catch(c){}a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
EditorUi.prototype.createParentLookup=function(a,d){function b(a){var b=c[a];null==b&&(b={inserted:[],moved:{}},c[a]=b);return b}var c={};if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++){var f=d[EditorUi.DIFF_INSERT][g],m=null!=f.parent?f.parent:"",n=null!=f.previous?f.previous:"";b(m).inserted[n]=f}if(null!=d[EditorUi.DIFF_UPDATE])for(var e in d[EditorUi.DIFF_UPDATE])f=d[EditorUi.DIFF_UPDATE][e],null!=f.previous&&(m=f.parent,null==m&&(g=a.getCell(e),null!=g&&(g=
a.getParent(g),null!=g&&(m=g.getId()))),null!=m&&(b(m).moved[f.previous]=e));return c};
EditorUi.prototype.patchPage=function(a,d,b,c){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var m=g.updateEdgeParent,n=new mxDictionary,e=[];g.updateEdgeParent=function(a,b){!n.get(a)&&c&&(n.put(a,!0),e.push(a))};var k=f[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var t=null!=k&&null!=k.moved?k.moved[""]:null;null!=t&&(p=g.getCell(t))}null!=p&&(g.setRoot(p),
a.root=p);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var u=0;u<d[EditorUi.DIFF_REMOVE].length;u++){var q=g.getCell(d[EditorUi.DIFF_REMOVE][u]);null!=q&&g.remove(q)}if(null!=d[EditorUi.DIFF_UPDATE]){var v=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(t in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(t),d[EditorUi.DIFF_UPDATE][t],null!=v?v[t]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(u=0;u<d[EditorUi.DIFF_INSERT].length;u++)l=d[EditorUi.DIFF_INSERT][u],
q=g.getCell(l.id),null!=q&&(g.setTerminal(q,g.getCell(l.source),!0),g.setTerminal(q,g.getCell(l.target),!1));g.updateEdgeParent=m;if(c&&0<e.length)for(u=0;u<e.length;u++)g.contains(e[u])&&g.updateEdgeParent(e[u])}finally{g.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,d,b,c,g){if(null!=b){for(var f=c[b.getId()],m=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},n=0,e=d.getChildCount(b),k="",l=0;l<e;l++){var p=d.getChildAt(b,l).getId();null==f[k]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][p]||null==g[EditorUi.DIFF_UPDATE][p].previous&&null==g[EditorUi.DIFF_UPDATE][p].parent)&&(f[k]=p);k=p}e=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
-d.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(d.getChildAt(b,n)!=e&&d.add(b,e,n),this.patchCellRecursive(a,d,e,c,g),n++);return k});for(k=[null];0<k.length;)if(l=k.shift(),l=e(null!=l?l.child:null,null!=l?l.insert:!1),p=f[l],null!=p&&(delete f[l],k.push({child:d.getCell(p)})),p=m[l],null!=p&&(delete m[l],k.push({child:this.getCellForJson(p),insert:!0})),0==k.length){for(l in f)k.push({child:d.getCell(f[l])}),delete f[l];for(l in m)k.push({child:this.getCellForJson(m[l]),insert:!0}),delete m[l]}}};
+EditorUi.prototype.patchCellRecursive=function(a,d,b,c,g){if(null!=b){for(var f=c[b.getId()],m=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},n=0,e=d.getChildCount(b),k="",l=0;l<e;l++){var p=d.getChildAt(b,l).getId();null==f[k]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][p]||null==g[EditorUi.DIFF_UPDATE][p].previous&&null==g[EditorUi.DIFF_UPDATE][p].parent)&&(f[k]=p);k=p}e=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var l=
+d.getCell(k);null!=l&&l!=e&&(e=null)}null!=e&&(d.getChildAt(b,n)!=e&&d.add(b,e,n),this.patchCellRecursive(a,d,e,c,g),n++);return k});for(k=[null];0<k.length;)if(l=k.shift(),l=e(null!=l?l.child:null,null!=l?l.insert:!1),p=f[l],null!=p&&(delete f[l],k.push({child:d.getCell(p)})),p=m[l],null!=p&&(delete m[l],k.push({child:this.getCellForJson(p),insert:!0})),0==k.length){for(l in f)k.push({child:d.getCell(f[l])}),delete f[l];for(l in m)k.push({child:this.getCellForJson(m[l]),insert:!0}),delete m[l]}}};
EditorUi.prototype.patchCell=function(a,d,b,c){if(null!=d&&null!=b){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in b?a.setValue(d,b.value):null!=b.xmlValue&&a.setValue(d,mxUtils.parseXml(b.xmlValue).documentElement);null!=c&&null!=c.style||null==b.style||a.setStyle(d,b.style);null!=b.visible&&a.setVisible(d,1==b.visible);null!=b.collapsed&&a.setCollapsed(d,1==b.collapsed);null!=b.vertex&&(d.vertex=1==b.vertex);null!=b.edge&&(d.edge=1==b.edge);null!=b.connectable&&(d.connectable=
1==b.connectable);null!=b.geometry&&a.setGeometry(d,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(d,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(d,a.getCell(b.target),!1);for(var g in b)this.cellProperties[g]||(d[g]=b[g])}};
EditorUi.prototype.getPagesForNode=function(a,d){var b=this.editor.extractGraphModel(a,!0,!0);null!=b&&(a=b);var b=a.getElementsByTagName(d||"diagram"),c=[];if(0<b.length)for(var g=0;g<b.length;g++){var f=new DiagramPage(b[g]);this.updatePageRoot(f,!0);c.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),c.push(f));return c};
@@ -10570,7 +10570,7 @@ DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mx
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(a,d,b,c){if(null!=a&&(null==c||!c())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var m=this.file.getDescriptorSecret(a);if(null==m||"1"==urlParams.lockdown)this.reload(d,b,c);else{var n=0,e=!1,k=mxUtils.bind(this,function(){if(null==c||!c())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var l=
!0,p=window.setTimeout(mxUtils.bind(this,function(){l=!1;this.reload(d,b,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=m?"&secret="+encodeURIComponent(m):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(p);if(l&&(null==c||!c()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var m=null,q=[];if(200<=
-g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var t=JSON.parse(g.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var x=this.stringToObject(t[z]);if(x.v>DrawioFileSync.PROTOCOL){e=!0;q=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)m=x.d.checksum,q.push(x.d.patch);else{e=!0;q=[];break}}}catch(B){q=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,m,a,d,b,c)):n<=this.maxCacheReadyRetries-1&&!e&&
+g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var t=JSON.parse(g.getText());if(null!=t&&0<t.length)for(var y=0;y<t.length;y++){var x=this.stringToObject(t[y]);if(x.v>DrawioFileSync.PROTOCOL){e=!0;q=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)m=x.d.checksum,q.push(x.d.patch);else{e=!0;q=[];break}}}catch(B){q=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,m,a,d,b,c)):n<=this.maxCacheReadyRetries-1&&!e&&
401!=g.getStatus()&&503!=g.getStatus()?(n++,this.file.stats.cacheMiss++,window.setTimeout(k,(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,b,c))}catch(B){null!=b&&b(B)}}else null!=b&&b()}))}else null!=b&&b()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=b&&b()}};
DrawioFileSync.prototype.reload=function(a,d,b,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),b,c)};
DrawioFileSync.prototype.merge=function(a,d,b,c,g,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var m=this.file.ignorePatches(a),n=this.file.getDescriptorRevisionId(b);if(!m){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
@@ -10625,7 +10625,7 @@ b.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioCl
DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(d){if(null!=d&&null!=d.items)for(var b=0;b<d.items.length;b++)if("anyoneWithLink"===d.items[b].id||"anyone"===d.items[b].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,d,b,c,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,d,b,c,g)}),b,c,g])};
-DriveFile.prototype.saveFile=function(a,d,b,c,g,f){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,n){var e=mxUtils.bind(this,function(f,m){try{var k=this.desc;this.ui.drive.saveFile(this,m,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,0!=a?(this.setModified(this.getShadowModified()),d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
+DriveFile.prototype.saveFile=function(a,d,b,c,g,f){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,n){var e=mxUtils.bind(this,function(f,l){try{var k=this.desc;this.ui.drive.saveFile(this,l,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,0!=a?(this.setModified(this.getShadowModified()),d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=a,null!=n?this.fileSaved(e,k,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),c,n):null!=b&&b(a)):null!=c&&c(a)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),mxUtils.bind(this,function(a,b){try{this.savingFile=!1,this.isConflict(a)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(b,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
this.setShadowModified(!1);e(f,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(a)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),g,g,f,null,a)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}});e(f,d)}))):null!=b&&b()}catch(m){if(null!=c)c(m);else throw m;}};
DriveFile.prototype.copyFile=function(a,d){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,d)}catch(b){d(b)}}),d,!0)};
@@ -10670,17 +10670,17 @@ atob(k),n=this.ui.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!
{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,b.title+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=d)d(B);else throw B;}}),b.title):c(f?new LocalFile(this.ui,a,b.title,!0):new DriveFile(this.ui,a,b))}}catch(x){if(null!=d)d(x);else throw x;}}),mxUtils.bind(this,function(a,b){if(k<this.maxRetries&&null!=b&&403==b.getStatus())k++,window.setTimeout(l,
2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=d)d(a);else throw a;}),null!=b.mimeType&&"image/"==b.mimeType.substring(0,6)&&"image/svg"!=b.mimeType.substring(0,9)||/\.png$/i.test(b.title)||/\.jpe?g$/i.test(b.title)||/\.pdf$/i.test(b.title),null,null,null,g)});l()}}catch(p){if(null!=d)d(p);else throw p;}};DriveClient.prototype.saveFile=function(a,c,d,f,m,n,e,k,l){try{var b=0;a.saveLevel=1;var g=mxUtils.bind(this,function(b){if(null!=f)f(b);else throw b;try{if(!a.isConflict(b)){var c="sl_"+
a.saveLevel+"-error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?
-"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(E){}}),u=mxUtils.bind(this,function(a){g(a);try{EditorUi.logError(a.message,null,null,a)}catch(G){}});if(a.isEditable()&&null!=a.desc){var q=(new Date).getTime(),v=a.desc.etag,z=a.desc.modifiedDate,x=a.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());n=null!=n?n:!1;var y=null,C=!1,A={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(A.mimeType))A.mimeType=
-this.xmlMimeType,y=a.desc,C=c=!0;else if("application/octet-stream"==A.mimeType||"1"==urlParams["override-mime"]&&A.mimeType!=this.xmlMimeType)A.mimeType=this.xmlMimeType;var F=mxUtils.bind(this,function(f,m,p){try{a.saveLevel=3;a.constructor==DriveFile&&(null==k&&(k=[]),null==a.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));p||(null!=f||n||(f=this.placeholderThumbnail,
-m=this.placeholderMimeType),null!=f&&null!=m&&(A.thumbnail={image:f,mimeType:m}));var t=a.getData(),F=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-q,a.saveLevel=11,null==b)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(z)).getTime();if(0>=e||v==b.etag||c&&x==b.headRevisionId){a.saveLevel=12;var f=[];0>=e&&f.push("invalid modified time");v==b.etag&&f.push("stale etag");c&&x==b.headRevisionId&&f.push("stale revision");
-var k=f.join(", ");g({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+x+"."+z+"-"+this.ui.hashValue(v)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(T){}}else if(a.saveLevel=null,d(b,t),null!=y){this.executeRequest({url:"/files/"+y.id+"/revisions/"+
-y.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+y.id+"."+y.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(T){}}}}catch(T){u(T)}}),H=
-mxUtils.bind(this,function(d,m){a.saveLevel=4;try{null!=k&&(A.properties=k);var l=e||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),n=mxUtils.bind(this,function(e){a.saveLevel=5;try{var f=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,k=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(V){}this.executeRequest(this.createUploadRequest(a.getId(),
-A,d,c||e||f,m,e?null:l,C),mxUtils.bind(this,function(a){window.clearTimeout(n);k&&F(a)}),mxUtils.bind(this,function(c){window.clearTimeout(n);if(k){a.saveLevel=6;try{a.isConflict(c)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(d){a.saveLevel=7;try{if(null!=d&&d.etag==l)if(b<this.staleEtagMaxRetries){b++;var e=2*b*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,e);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected",
+"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(E){}}),u=mxUtils.bind(this,function(a){g(a);try{EditorUi.logError(a.message,null,null,a)}catch(G){}});if(a.isEditable()&&null!=a.desc){var q=(new Date).getTime(),v=a.desc.etag,y=a.desc.modifiedDate,x=a.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());n=null!=n?n:!1;var z=null,C=!1,A={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(A.mimeType))A.mimeType=
+this.xmlMimeType,z=a.desc,C=c=!0;else if("application/octet-stream"==A.mimeType||"1"==urlParams["override-mime"]&&A.mimeType!=this.xmlMimeType)A.mimeType=this.xmlMimeType;var F=mxUtils.bind(this,function(f,m,p){try{a.saveLevel=3;a.constructor==DriveFile&&(null==k&&(k=[]),null==a.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));p||(null!=f||n||(f=this.placeholderThumbnail,
+m=this.placeholderMimeType),null!=f&&null!=m&&(A.thumbnail={image:f,mimeType:m}));var t=a.getData(),F=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-q,a.saveLevel=11,null==b)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(y)).getTime();if(0>=e||v==b.etag||c&&x==b.headRevisionId){a.saveLevel=12;var f=[];0>=e&&f.push("invalid modified time");v==b.etag&&f.push("stale etag");c&&x==b.headRevisionId&&f.push("stale revision");
+var k=f.join(", ");g({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+x+"."+y+"-"+this.ui.hashValue(v)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(T){}}else if(a.saveLevel=null,d(b,t),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+
+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(T){}}}}catch(T){u(T)}}),H=
+mxUtils.bind(this,function(d,l){a.saveLevel=4;try{null!=k&&(A.properties=k);var m=e||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),n=mxUtils.bind(this,function(e){a.saveLevel=5;try{var f=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,k=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(V){}this.executeRequest(this.createUploadRequest(a.getId(),
+A,d,c||e||f,l,e?null:m,C),mxUtils.bind(this,function(a){window.clearTimeout(n);k&&F(a)}),mxUtils.bind(this,function(c){window.clearTimeout(n);if(k){a.saveLevel=6;try{a.isConflict(c)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(d){a.saveLevel=7;try{if(null!=d&&d.etag==m)if(b<this.staleEtagMaxRetries){b++;var e=2*b*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,e);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected",
"retry",b,"delay",e)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(O){}}else"1"==
-urlParams.test&&d.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",l,"remote",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),g(c,d)}catch(O){u(O)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(fa){u(fa)}}}))}catch(V){u(V)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==l)n(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(W){}this.executeRequest({url:"/files/"+
-a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==x?("1"==urlParams.test&&l!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",l,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),l=e.etag,n(b)):g({error:{code:412}},e)}catch(V){u(V)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,g(b))}))}});if(B&&null==f){a.saveLevel=8;
-var y=new Image;y.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/y.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(y.height*a);b.getContext("2d").drawImage(y,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");A.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(W){try{p(!1)}catch(V){u(V)}}});y.src="data:image/png;base64,"+d}else p(!1)}catch(X){u(X)}});if(B){var D=this.ui.getPngFileProperties(this.ui.fileNode);
+urlParams.test&&d.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",m,"remote",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),g(c,d)}catch(O){u(O)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(fa){u(fa)}}}))}catch(V){u(V)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==m)n(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(W){}this.executeRequest({url:"/files/"+
+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==x?("1"==urlParams.test&&m!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",m,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),m=e.etag,n(b)):g({error:{code:412}},e)}catch(V){u(V)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,g(b))}))}});if(B&&null==f){a.saveLevel=8;
+var z=new Image;z.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/z.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(z.height*a);b.getContext("2d").drawImage(z,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");A.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(W){try{p(!1)}catch(V){u(V)}}});z.src="data:image/png;base64,"+d}else p(!1)}catch(X){u(X)}});if(B){var D=this.ui.getPngFileProperties(this.ui.fileNode);
this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){H(a,!0)}),g,this.ui.getCurrentFile()!=a?t:null,D.scale,D.border)}else H(t,!1)}catch(M){u(M)}});try{a.saveLevel=2,(n||B||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=A.mimeType&&"application/vnd.jgraph.mxfile"!=A.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:
b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(E){b=null}F(b,"image/png")}catch(E){u(E)}})))&&F(null,null,a.constructor!=DriveLibrary)}catch(D){u(D)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(D){u(D)}};DriveClient.prototype.insertFile=function(a,c,d,f,m,n,e){n=null!=n?n:this.xmlMimeType;a={mimeType:n,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,e),mxUtils.bind(this,
function(a){n==this.libraryMimeType?f(new DriveLibrary(this.ui,c,a)):0==a?null!=m&&m({message:mxResources.get("errorSavingFile")}):f(new DriveFile(this.ui,c,a))}),m)};DriveClient.prototype.createUploadRequest=function(a,c,d,f,m,n,e){m=null!=m?m:!1;var b={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=n&&(b["If-Match"]=n);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+
@@ -10764,7 +10764,7 @@ this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),b(d)):a||401!==d.getSta
function(a){var b=a.split("/");return 1<b.length?{driveId:b[0],id:b[1]}:{id:a}};OneDriveClient.prototype.getItemURL=function(a,b){var c=a.split("/");if(1<c.length){var d=c[1];return(b?"":this.baseUrl)+"/drives/"+c[0]+("root"==d?"/root":"/items/"+d)}return(b?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,b,c){this.getFile(a,b,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(a){var b=a.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
0<b&&(a=a.substring(0,b));return a};OneDriveClient.prototype.getFile=function(a,b,c,g,f){f=null!=f?f:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),e=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||/\.pdf$/i.test(d.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,b,c);
else{var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(l),g){/\.html$/i.test(d.name)&&(a=this.removeExtraHtmlContent(a));var k=null;if(0<(e?a.lastIndexOf(","):-1)){var m=this.ui.extractGraphModelFromPng(a);null!=m&&0<m.length?a=m:k=new LocalFile(this.ui,a,d.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var n=
-a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,d["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),d.name):
+a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,d["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this.ui,a.responseText,d.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=c)c(y);else throw y;}}),d.name):
null!=k?b(k):f?b(new OneDriveLibrary(this.ui,a,d)):b(new OneDriveFile(this.ui,a,d))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(a){window.clearTimeout(l);g&&c(this.parseRequestText(a))}),e||null!=d.file&&null!=d.file.mimeType&&("image/"==d.file.mimeType.substring(0,6)||"application/pdf"==d.file.mimeType))}}else c(this.parseRequestText(a))}),c)};OneDriveClient.prototype.renameFile=function(a,b,c,g){null!=a&&null!=b&&(this.isValidFilename(b)?this.checkExists(a.getParentId(),
b,!1,mxUtils.bind(this,function(d){d?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:b}),"PATCH","application/json",c,g):g()})):g({message:this.invalidFilenameRegExs[0].test(b)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(a,b,c,g){b=this.getItemRef(b);var d=this.getItemRef(a);b.driveId!=d.driveId?g({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):
this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:b}),"PATCH","application/json",c,g)};OneDriveClient.prototype.insertLibrary=function(a,b,c,g,f){this.insertFile(a,b,c,g,!0,f)};OneDriveClient.prototype.insertFile=function(a,b,c,g,f,m){this.isValidFilename(a)?(f=null!=f?f:!1,this.checkExists(m,a,!0,mxUtils.bind(this,function(d){if(d){d="/me/drive/root";null!=m&&(d=this.getItemURL(m,!0));var e=mxUtils.bind(this,function(a){f?c(new OneDriveLibrary(this.ui,b,a)):c(new OneDriveFile(this.ui,
@@ -10805,7 +10805,7 @@ GitHubClient.prototype.getFile=function(a,d,b,c,g){c=null!=c?c:!1;var f=a.split(
else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+m+"/"+n+"/contents/"+a+"?ref="+e+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{d(this.createGitHubFile(m,n,e,JSON.parse(a.getText()),c))}catch(p){b(p)}}),b)};
GitHubClient.prototype.createGitHubFile=function(a,d,b,c,g){a={org:a,repo:d,ref:b,name:c.name,path:c.path,sha:c.sha,html_url:c.html_url,download_url:c.download_url};d=c.content;"base64"===c.encoding&&(/\.jpe?g$/i.test(c.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(c.name)?d="data:image/gif;base64,"+d:/\.png$/i.test(c.name)?(c=this.ui.extractGraphModelFromPng(d),d=null!=c&&0<c.length?c:"data:image/png;base64,"+d):d=Base64.decode(d));return g?new GitHubLibrary(this.ui,d,a):new GitHubFile(this.ui,
d,a)};GitHubClient.prototype.insertLibrary=function(a,d,b,c,g){this.insertFile(a,d,b,c,!0,g,!1)};
-GitHubClient.prototype.insertFile=function(a,d,b,c,g,f,m){g=null!=g?g:!1;f=f.split("/");var n=f[0],e=f[1],k=f[2],l=f.slice(3,f.length).join("/");0<l.length&&(l+="/");l+=a;this.checkExists(n+"/"+e+"/"+k+"/"+l,!0,mxUtils.bind(this,function(f,t){f?g?(m||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,e,k,l,a,d,t,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());b(this.createGitHubFile(n,e,k,d.content,g))}catch(z){c(z)}}),c)}),c)):b(new GitHubFile(this.ui,
+GitHubClient.prototype.insertFile=function(a,d,b,c,g,f,m){g=null!=g?g:!1;f=f.split("/");var n=f[0],e=f[1],k=f[2],l=f.slice(3,f.length).join("/");0<l.length&&(l+="/");l+=a;this.checkExists(n+"/"+e+"/"+k+"/"+l,!0,mxUtils.bind(this,function(f,t){f?g?(m||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,e,k,l,a,d,t,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());b(this.createGitHubFile(n,e,k,d.content,g))}catch(y){c(y)}}),c)}),c)):b(new GitHubFile(this.ui,
d,{org:n,repo:e,ref:k,name:a,path:l,sha:t,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,d,b,c){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(d?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();b(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,d,b,c,g,f,m,n,e){f.length>=this.maxFileSize?e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(b={path:c,branch:decodeURIComponent(b),message:g,content:f},null!=m&&(b.sha=m),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+d+"/contents/"+c,JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){n(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
this.clientId,a.code=null);e(a)})))};
@@ -10815,16 +10815,16 @@ b)}),b,this.ui.getCurrentFile()!=a?a.getData():null,c.scale,c.border)}else k(a.m
GitHubClient.prototype.showGitHubDialog=function(a,d){var b=null,c=null,g=null,f=null,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="304px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.border="1px solid lightgray";e.style.boxSizing=
"border-box";e.style.padding="4px";e.style.overflow="auto";e.style.lineHeight="1.2em";e.style.height="274px";m.appendChild(e);var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";var l=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){d(b+"/"+c+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(l.container,420,360,!0,!0);a&&l.okButton.parentNode.removeChild(l.okButton);var p=
mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(e),e=a);return e}),t=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(b+"/"+c,mxUtils.bind(this,function(){f=null;B()}),null,!0));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(g),
-mxUtils.bind(this,function(){f=null;x()}),null,!0)));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");z()}),null,!0))})(a)}e.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=c=b=null,B()):this.ui.hideDialog()}),null,{})}),q=null,v=null,z=mxUtils.bind(this,function(m){null==
-m&&(e.innerHTML="",m=1);var n=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+m,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));l.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var y=mxUtils.bind(this,
-function(){z(m+1)});mxEvent.addListener(q,"click",y);this.executeRequest(n,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==m&&(t(),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var y=!0,C=0;l=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,function(m,n){if(l==
-("dir"==m.type)){var q=k.cloneNode();q.style.backgroundColor=y?"dark"==uiTheme?"#000000":"#eeeeee":"";y=!y;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==m.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;q.appendChild(t);q.appendChild(p(m.name+("dir"==m.type?"/":""),mxUtils.bind(this,function(){"dir"==m.type?(f=m.path,z()):a&&"file"==m.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+encodeURIComponent(g)+"/"+
+mxUtils.bind(this,function(){f=null;x()}),null,!0)));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");y()}),null,!0))})(a)}e.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=c=b=null,B()):this.ui.hideDialog()}),null,{})}),q=null,v=null,y=mxUtils.bind(this,function(m){null==
+m&&(e.innerHTML="",m=1);var n=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+m,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));l.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var z=mxUtils.bind(this,
+function(){y(m+1)});mxEvent.addListener(q,"click",z);this.executeRequest(n,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==m&&(t(),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var z=!0,C=0;l=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,function(m,n){if(l==
+("dir"==m.type)){var q=k.cloneNode();q.style.backgroundColor=z?"dark"==uiTheme?"#000000":"#eeeeee":"";z=!z;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==m.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;q.appendChild(t);q.appendChild(p(m.name+("dir"==m.type?"/":""),mxUtils.bind(this,function(){"dir"==m.type?(f=m.path,y()):a&&"file"==m.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+encodeURIComponent(g)+"/"+
m.path))})));e.appendChild(q);C++}})(n[m],m)});l(!0);a&&l(!1)}}),u,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var m=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+c+"/branches?per_page=100&page="+a,null,"GET");l.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor=
-"pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",n);this.executeRequest(m,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==b.length&&d)g=b[0].name,f="",z();else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=
-k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=a.name;f="";z()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&n()},mxEvent.addListener(e,"scroll",v))}}),u)}),B=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");l.okButton.setAttribute("disabled",
+"pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",n);this.executeRequest(m,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==b.length&&d)g=b[0].name,f="",y();else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=
+k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=a.name;f="";y()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&n()},mxEvent.addListener(e,"scroll",v))}}),u)}),B=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");l.okButton.setAttribute("disabled",
"disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&mxEvent.removeListener(e,"scroll",v);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var m=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(q,"click",m);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(e,
mxResources.get("noFiles"));else{1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var k=d[1];3>d.length?(b=a,c=k,f=g=null,x()):this.ui.spinner.spin(e,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+k+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();
-b=a.meta.org;c=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";z()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
+b=a.meta.org;c=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";y()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;c=a.name;f="";x(null,!0)})));e.appendChild(g)})(d[l],l)}100==d.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&m()},mxEvent.addListener(e,"scroll",v))}),u)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,b){DrawioFile.call(this,a,d);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(a,d,b){this.doSave(this.getTitle(),d,b)};TrelloFile.prototype.saveAs=function(a,d,b){this.doSave(a,d,b)};TrelloFile.prototype.doSave=function(a,d,b){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(a,!1,d,b)}),b])};
TrelloFile.prototype.saveFile=function(a,d,b,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=b&&b();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,b,c))}),mxUtils.bind(this,
@@ -10862,7 +10862,7 @@ e,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(a){try{d(this.cre
GitLabClient.prototype.getFileContent=function(a){var d=a.file_name,b=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(d)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(d)?b="data:image/gif;base64,"+b:/\.pdf$/i.test(d)?b="data:application/pdf;base64,"+b:/\.png$/i.test(d)?(a=this.ui.extractGraphModelFromPng(b),b=null!=a&&0<a.length?a:"data:image/png;base64,"+b):b=Base64.decode(b));return b};
GitLabClient.prototype.createGitLabFile=function(a,d,b,c,g,f){var m=DRAWIO_GITLAB_URL+"/";a={org:a,repo:d,ref:b,name:c.file_name,path:c.file_path,html_url:m+a+"/"+d+"/blob/"+b+"/"+c.file_path,download_url:m+a+"/"+d+"/raw/"+b+"/"+c.file_path+"?inline=false",last_commit_id:c.last_commit_id,refPos:f};c=this.getFileContent(c);return g?new GitLabLibrary(this.ui,c,a):new GitLabFile(this.ui,c,a)};
GitLabClient.prototype.insertFile=function(a,d,b,c,g,f,m){g=null!=g?g:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(f,e){var k=Math.max(e-1,0),l=f.slice(0,k).join("/"),n=f[k],t=f[e];path=f.slice(e+1,f.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(l+"/"+n+"/"+t+"/"+path,!0,mxUtils.bind(this,function(f,k){if(f)if(g)m||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,t,path,a,d,k,mxUtils.bind(this,function(a){try{var d=
-JSON.parse(a.getText());b(this.createGitLabFile(l,n,t,d.content,g,e))}catch(y){c(y)}}),c)}),c);else{var p=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,d,{org:l,repo:n,ref:t,name:a,path:path,html_url:p+l+"/"+n+"/blob/"+t+"/"+path,download_url:p+l+"/"+n+"/raw/"+t+"/"+path+"?inline=false",refPos:e,last_commit_id:k,isNew:!0}))}else c()}))}),c,null,4>=f.length)};
+JSON.parse(a.getText());b(this.createGitLabFile(l,n,t,d.content,g,e))}catch(z){c(z)}}),c)}),c);else{var p=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,d,{org:l,repo:n,ref:t,name:a,path:path,html_url:p+l+"/"+n+"/blob/"+t+"/"+path,download_url:p+l+"/"+n+"/raw/"+t+"/"+path+"?inline=false",refPos:e,last_commit_id:k,isNew:!0}))}else c()}))}),c,null,4>=f.length)};
GitLabClient.prototype.checkExists=function(a,d,b){this.getFile(a,mxUtils.bind(this,function(c){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();b(!0,c.getCurrentEtag())},function(){g();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};
GitLabClient.prototype.writeFile=function(a,d,b,c,g,f,m,n,e){if(f.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var k="POST";b={path:encodeURIComponent(c),branch:decodeURIComponent(b),commit_message:g,content:f,encoding:"base64"};null!=m&&(b.last_commit_id=m,k="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+d)+"/repository/files/"+encodeURIComponent(c);k=new mxXmlRequest(a,JSON.stringify(b),k);this.executeRequest(k,
mxUtils.bind(this,function(a){n(a)}),e)}};
@@ -10872,19 +10872,19 @@ GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,functi
GitLabClient.prototype.showGitLabDialog=function(a,d){var b=null,c=null,g=null,f=null,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="304px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.border="1px solid lightgray";e.style.boxSizing=
"border-box";e.style.padding="4px";e.style.overflow="auto";e.style.lineHeight="1.2em";e.style.height="274px";m.appendChild(e);var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";var l=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){d(b+"/"+c+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(l.container,420,360,!0,!0);a&&l.okButton.parentNode.removeChild(l.okButton);var p=
mxUtils.bind(this,function(a,b,c,d){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d&&(e.style.textDecoration="underline");null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(e),e=a);return e}),t=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(b+"/"+c,mxUtils.bind(this,function(){f=null;B()}),null,!0));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(g),
-mxUtils.bind(this,function(){f=null;x()}),null,!0)));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");z()}),null,!0))})(a)}e.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=c=b=null,B()):this.ui.hideDialog()}))}),q=null,v=null,z=mxUtils.bind(this,function(m){null==
+mxUtils.bind(this,function(){f=null;x()}),null,!0)));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");y()}),null,!0))})(a)}e.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=c=b=null,B()):this.ui.hideDialog()}))}),q=null,v=null,y=mxUtils.bind(this,function(m){null==
m&&(e.innerHTML="",m=1);var n=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+c)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+m,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));l.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");
-var y=mxUtils.bind(this,function(){z(m+1)});mxEvent.addListener(q,"click",y);this.executeRequest(n,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==m&&(t(!g),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var C=!0,A=0;l=mxUtils.bind(this,function(m){for(var l=0;l<n.length;l++)mxUtils.bind(this,
-function(l){if(m==("tree"==l.type)){var n=k.cloneNode();n.style.backgroundColor=C?"dark"==uiTheme?"#000000":"#eeeeee":"";C=!C;var y=document.createElement("img");y.src=IMAGE_PATH+"/"+("tree"==l.type?"folder.png":"file.png");y.setAttribute("align","absmiddle");y.style.marginRight="4px";y.style.marginTop="-4px";y.width=20;n.appendChild(y);n.appendChild(p(l.name+("tree"==l.type?"/":""),mxUtils.bind(this,function(){"tree"==l.type?(f=l.path,z()):a&&"blob"==l.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+g+
-"/"+l.path))})));e.appendChild(n);A++}})(n[l])});l(!0);a&&l(!1);100==A&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&y()},mxEvent.addListener(e,"scroll",v))}}),u,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var m=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+c)+"/repository/branches?per_page=100&page="+a,null,"GET");l.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&
+var z=mxUtils.bind(this,function(){y(m+1)});mxEvent.addListener(q,"click",z);this.executeRequest(n,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==m&&(t(!g),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var C=!0,A=0;l=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,
+function(m){if(l==("tree"==m.type)){var n=k.cloneNode();n.style.backgroundColor=C?"dark"==uiTheme?"#000000":"#eeeeee":"";C=!C;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==m.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(p(m.name+("tree"==m.type?"/":""),mxUtils.bind(this,function(){"tree"==m.type?(f=m.path,y()):a&&"blob"==m.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+g+
+"/"+m.path))})));e.appendChild(n);A++}})(n[m])});l(!0);a&&l(!1);100==A&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&z()},mxEvent.addListener(e,"scroll",v))}}),u,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var m=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+c)+"/repository/branches?per_page=100&page="+a,null,"GET");l.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&
(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",n);this.executeRequest(m,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==
-b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==b.length&&d)g=b[0].name,f="",z();else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";z()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&n()},mxEvent.addListener(e,"scroll",
+b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==b.length&&d)g=b[0].name,f="",y();else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";y()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&n()},mxEvent.addListener(e,"scroll",
v))}}),u)});l.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));var B=mxUtils.bind(this,function(a){this.ui.spinner.stop();null==a&&(e.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(q,
-"click",d);var l=mxUtils.bind(this,function(a){this.ui.spinner.spin(e,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),m=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(e,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();
-b(a,JSON.parse(c.getText()))}),u)});l(mxUtils.bind(this,function(l){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=l&&0!=l.length){1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",
-mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(b=a[0],c=a[1],g=f=null,2<a.length?(g=encodeURIComponent(a.slice(2,a.length).join("/")),z()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var y=0;y<n.length;y++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
-0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;c=a.path;f="";x(null,!0)})));e.appendChild(g)})(n[y],y);for(y=0;y<l.length;y++)m(l[y],mxUtils.bind(this,function(a,d){for(var g=0;g<d.length;g++){var l=k.cloneNode();l.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){l.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;c=d.path;f="";x(null,
-!0)})));e.appendChild(l)})(d[g])}}))}else mxUtils.write(e,mxResources.get("noFiles"));100==n.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&d()},mxEvent.addListener(e,"scroll",v))}),u)}))});this.token?this.user?B():this.updateUser(function(){B()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,b,c,g,f,m){this.file=a;this.id=d;this.content=b;this.modifiedDate=c;this.createdDate=g;this.isResolved=f;this.user=m;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,b,c,g){d()};DrawioComment.prototype.editComment=function(a,d,b){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,b,c,g,f,m,n){DrawioComment.call(this,a,d,b,c,g,f,m);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,b,c,g){a={content:a.content};c?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),b)};
+"click",d);var m=mxUtils.bind(this,function(a){this.ui.spinner.spin(e,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),l=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(e,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();
+b(a,JSON.parse(c.getText()))}),u)});m(mxUtils.bind(this,function(m){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=m&&0!=m.length){1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",
+mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(b=a[0],c=a[1],g=f=null,2<a.length?(g=encodeURIComponent(a.slice(2,a.length).join("/")),y()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var z=0;z<n.length;z++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
+0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;c=a.path;f="";x(null,!0)})));e.appendChild(g)})(n[z],z);for(z=0;z<m.length;z++)l(m[z],mxUtils.bind(this,function(a,d){for(var g=0;g<d.length;g++){var m=k.cloneNode();m.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){m.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;c=d.path;f="";x(null,
+!0)})));e.appendChild(m)})(d[g])}}))}else mxUtils.write(e,mxResources.get("noFiles"));100==n.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&d()},mxEvent.addListener(e,"scroll",v))}),u)}))});this.token?this.user?B():this.updateUser(function(){B()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,b,c,g,f,m){this.file=a;this.id=d;this.content=b;this.modifiedDate=c;this.createdDate=g;this.isResolved=f;this.user=m;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,b,c,g){d()};DrawioComment.prototype.editComment=function(a,d,b){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,b,c,g,f,m,n){DrawioComment.call(this,a,d,b,c,g,f,m);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,b,c,g){a={content:a.content};c?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),b)};
DriveComment.prototype.editComment=function(a,d,b){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,b)};
DriveComment.prototype.deleteComment=function(a,d){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,d)};App=function(a,d,b){EditorUi.call(this,a,d,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var b={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -10971,8 +10971,8 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
App.prototype.getThumbnail=function(a,d){var b=!1;try{var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);c&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var m=this.editor.graph,n=null!=m.themes&&"darkTheme"==m.defaultThemeName;if(null!=this.pages&&(n||this.currentPage!=this.pages[0])){var e=m.getGlobalVariable,m=this.createTemporaryGraph(n?m.getDefaultStylesheet():m.getStylesheet()),k=this.pages[0];
n&&(m.defaultThemeName="default");m.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};m.getGlobalVariable=e;document.body.appendChild(m.container);m.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(a){try{m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(A){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},
-null,null,null,null,null,null,m),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),p=m.getGraphBounds(),t=a/p.width,t=Math.min(1,Math.min(3*a/(4*p.height),t)),u=Math.floor(p.x),q=Math.floor(p.y);l.setAttribute("width",Math.ceil(t*(p.width+4)));l.setAttribute("height",Math.ceil(t*(p.height+4)));var v=l.getContext("2d");v.scale(t,t);v.translate(-u,-q);var z=m.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";v.save();v.fillStyle=z;v.fillRect(u,
-q,Math.ceil(p.width+4),Math.ceil(p.height+4));v.restore();var x=new mxJsCanvas(l),B=new mxAsyncCanvas(this.thumbImageCache);x.images=this.thumbImageCache.images;var y=new mxImageExport;y.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};y.drawText=function(a,b){};y.drawState(m.getView().getState(m.model.root),B);B.finish(mxUtils.bind(this,function(){try{y.drawState(m.getView().getState(m.model.root),
+null,null,null,null,null,null,m),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),p=m.getGraphBounds(),t=a/p.width,t=Math.min(1,Math.min(3*a/(4*p.height),t)),u=Math.floor(p.x),q=Math.floor(p.y);l.setAttribute("width",Math.ceil(t*(p.width+4)));l.setAttribute("height",Math.ceil(t*(p.height+4)));var v=l.getContext("2d");v.scale(t,t);v.translate(-u,-q);var y=m.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";v.save();v.fillStyle=y;v.fillRect(u,
+q,Math.ceil(p.width+4),Math.ceil(p.height+4));v.restore();var x=new mxJsCanvas(l),B=new mxAsyncCanvas(this.thumbImageCache);x.images=this.thumbImageCache.images;var z=new mxImageExport;z.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};z.drawText=function(a,b){};z.drawState(m.getView().getState(m.model.root),B);B.finish(mxUtils.bind(this,function(){try{z.drawState(m.getView().getState(m.model.root),
x),m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(C){l=null}f(l)}));b=!0}}catch(C){b=!1,null!=m&&m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}b||window.clearTimeout(g);return b};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();d=null!=c?c.getMode():d;d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
@@ -11062,14 +11062,15 @@ mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources
App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var b=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=0,g=[],f=mxUtils.bind(this,function(){if(0==c){if(null!=a)for(var b=a.length-1;0<=b;b--)null!=g[b]&&this.loadLibrary(g[b]);null!=d&&d()}});if(null!=a)for(var m=0;m<a.length;m++){var n=encodeURIComponent(decodeURIComponent(a[m]));mxUtils.bind(this,function(a,d){if(null!=
a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){c++;var e=mxUtils.bind(this,function(b){delete this.pendingLibraries[a];g[d]=b;c--;f()}),k=mxUtils.bind(this,function(d){b(a,d);c--;f()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(x){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(a){null!=a&&0<a.length?e(new UrlLibrary(this,a,n)):k()}),function(){k()},null,!0)}else if("R"==m){m=decodeURIComponent(a.substring(1));try{var m=JSON.parse(m),q={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,
-a,q))}catch(x){k()}}),function(){k()})}catch(z){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(z){k()}else{var v=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==m&&null!=this.oneDrive&&
+a,q))}catch(x){k()}}),function(){k()})}catch(y){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(y){k()}else{var v=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==m&&null!=this.oneDrive&&
null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(x){k()}}),function(a){k()}):k(!0)}}})(n,m)}f()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||(null!=a?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",
this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),"dark"!=uiTheme&&"atlas"!=uiTheme&&(this.shareButton.style.color=
"black",a.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),this.fetchAndShowNotification("device"==this.mode||"google"==this.mode?this.mode:null))}};
-App.prototype.fetchAndShowNotification=function(a){a=a||"online";mxUtils.get(NOTIFICATIONS_URL+"?target="+a,mxUtils.bind(this,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){d=JSON.parse(d.getText());for(var b=a+"NotifReadTS",c=parseInt(localStorage.getItem(b)),g=0;g<d.length;g++)d[g].isNew=!c||d[g].timestamp>c;d.sort(function(a,b){return b.timestamp-a.timestamp});this.showNotification(d,b)}}))};
+App.prototype.fetchAndShowNotification=function(a){if(!this.fetchingNotif){a=a||"online";var d=null,b=mxUtils.bind(this,function(b){b=b.filter(function(b){return!b.targets||-1<b.targets.indexOf(a)});for(var c=a+"NotifReadTS",d=parseInt(localStorage.getItem(c)),m=0;m<b.length;m++)b[m].isNew=!d||b[m].timestamp>d;this.showNotification(b,c)});try{d=JSON.parse(localStorage.getItem(".notifCache"))}catch(c){}null==d||d.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,
+function(a){200<=a.getStatus()&&299>=a.getStatus()&&(a=JSON.parse(a.getText()),a.sort(function(a,b){return b.timestamp-a.timestamp}),localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:a})),this.fetchingNotif=!1,b(a))}))):b(d.notifs)}};
App.prototype.showNotification=function(a,d){function b(a){var b=document.querySelector(".geNotification-count");null==b?EditorUi.logError("Error: element (.geNotification-count) is null in showNotification in shouldAnimate",null,5769):(b.innerHTML=a,b.style.display=0==a?"none":"",b=document.querySelector(".geNotification-bell"),b.style.animation=0==a?"none":"",b.className="geNotification-bell"+(0==a?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==a?"none":"")}
var c=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var b=this.notificationWin.querySelectorAll(".circle.active"),c=0;c<b.length;c++)b[c].className="circle";a[0]&&localStorage.setItem(d,a[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.top="4px");var g=document.createElement("span");g.className="geNotification-count";this.notificationBtn.appendChild(g);
g=document.createElement("div");g.className="geNotification-bell";g.style.opacity="min"==uiTheme?"0.5":"";var f=document.createElement("span");f.className="geBell-top";g.appendChild(f);f=document.createElement("span");f.className="geBell-middle";g.appendChild(f);f=document.createElement("span");f.className="geBell-bottom";g.appendChild(f);f=document.createElement("span");f.className="geBell-rad";g.appendChild(f);this.notificationBtn.appendChild(g);this.buttonContainer.insertBefore(this.notificationBtn,
@@ -11144,11 +11145,11 @@ this.put("units",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["
function(){var a=new FilePropertiesDialog(c);c.showDialog(a.container,320,120,!0,!0);a.init()}).isEnabled=f;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(a){g.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,104)),g.freehand.isDrawing()?g.freehand.stopDrawing():g.freehand.startDrawing(),this.freehandWindow.window.setVisible(g.freehand.isDrawing()))})).isEnabled=function(){return f()&&
mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var b=null==c.pages||1>=c.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(d);var e=c.addCheckbox(a,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),f=c.addCheckbox(a,mxResources.get("compressed"),
!0),k=c.addCheckbox(a,mxResources.get("allPages"),!b,b);k.style.marginBottom="16px";mxEvent.addListener(e,"change",function(){e.checked?k.setAttribute("disabled","disabled"):k.removeAttribute("disabled")});a=new CustomDialog(c,a,mxUtils.bind(this,function(){c.downloadFile("xml",!f.checked,null,!e.checked,b||!k.checked)}),null,mxResources.get("export"));c.showDialog(a.container,300,180,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(a,b,d,e,f,g){a=new EmbedDialog(c,c.createLink(a,b,d,e,f,g,null,!0));c.showDialog(a.container,440,240,!0,!0);a.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(a){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,a,function(a,b,d,e,f,g,k,l,m,n){c.createHtml(a,b,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(a,b){var d=
+!0,null,null,function(a,b,d,e,f,g){a=new EmbedDialog(c,c.createLink(a,b,d,e,f,g,null,!0));c.showDialog(a.container,440,240,!0,!0);a.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(a){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,a,function(a,b,d,e,f,g,k,m,l,n){c.createHtml(a,b,d,e,f,g,k,m,l,n,mxUtils.bind(this,function(a,b){var d=
c.getBaseFilename(k),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+a+"\n"+b+"\n</body>\n</html>";c.saveData(d+".html","html",e,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var a=null==c.pages||1>=c.pages.length,b=document.createElement("div");
-b.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var e=function(){f!=this&&this.checked?(m.removeAttribute("disabled"),m.checked=!g.pageVisible):(m.setAttribute("disabled","disabled"),m.checked=!1)},d=180;if(c.pdfPageExport&&!a){var f=c.addRadiobox(b,"pages",mxResources.get("allPages"),!0),k=c.addRadiobox(b,"pages",mxResources.get("currentPage"),
-!1),l=c.addRadiobox(b,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),m=c.addCheckbox(b,mxResources.get("crop"),!1,!0),n=c.addCheckbox(b,mxResources.get("grid"),!1,!1);mxEvent.addListener(f,"change",e);mxEvent.addListener(k,"change",e);mxEvent.addListener(l,"change",e);d+=60}else l=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),m=c.addCheckbox(b,mxResources.get("crop"),!g.pageVisible||!c.pdfPageExport,!c.pdfPageExport),n=c.addCheckbox(b,mxResources.get("grid"),
-!1,!1),c.pdfPageExport||mxEvent.addListener(l,"change",e);var e=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),p=null,q=null;if(EditorUi.isElectronApp||e)q=c.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),d+=30;e&&(p=c.addCheckbox(b,mxResources.get("transparentBackground"),!1),d+=30);b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("pdf",null,null,!l.checked,a?!0:!f.checked,!m.checked,null!=p&&p.checked,null,null,n.checked,null!=q&&q.checked)}),
+b.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var e=function(){f!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!g.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)},d=180;if(c.pdfPageExport&&!a){var f=c.addRadiobox(b,"pages",mxResources.get("allPages"),!0),k=c.addRadiobox(b,"pages",mxResources.get("currentPage"),
+!1),m=c.addRadiobox(b,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),l=c.addCheckbox(b,mxResources.get("crop"),!1,!0),n=c.addCheckbox(b,mxResources.get("grid"),!1,!1);mxEvent.addListener(f,"change",e);mxEvent.addListener(k,"change",e);mxEvent.addListener(m,"change",e);d+=60}else m=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),l=c.addCheckbox(b,mxResources.get("crop"),!g.pageVisible||!c.pdfPageExport,!c.pdfPageExport),n=c.addCheckbox(b,mxResources.get("grid"),
+!1,!1),c.pdfPageExport||mxEvent.addListener(m,"change",e);var e=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),p=null,q=null;if(EditorUi.isElectronApp||e)q=c.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),d+=30;e&&(p=c.addCheckbox(b,mxResources.get("transparentBackground"),!1),d+=30);b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("pdf",null,null,!m.checked,a?!0:!f.checked,!l.checked,null!=p&&p.checked,null,null,n.checked,null!=q&&q.checked)}),
null,mxResources.get("export"));c.showDialog(b.container,300,d,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function a(){null!=b&&b.removeDraft();c.fileLoaded(null)}var b=c.getCurrentFile();null!=b&&b.isModified()?c.confirm(mxResources.get("allChangesLost"),null,
a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();if(1==g.getSelectionCount()){var a=g.getSelectionCell(),b=g.view.getState(a);null!=b&&null!=b.shape&&null!=b.shape.stencil&&(a=new EditShapeDialog(c,a,mxResources.get("editShape")+":",630,400),c.showDialog(a.container,640,480,!0,!1),a.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,
mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(a,b){c.spinner.stop();var d=new RevisionDialog(c,a,b);c.showDialog(d.container,640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){c.handleError(a)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==
@@ -11156,9 +11157,9 @@ DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxR
function(){var a=new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!c.isMathEnabled();g.model.execute(a)}),l.setToggleAction(!0),l.setSelectedCallback(function(){return c.isMathEnabled()}),l.isEnabled=f);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",
function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var a=g.getSelectionCells(),b=[],d=0;d<a.length;d++)g.getModel().isVertex(a[d])&&b.push(a[d]);0<b.length&&(a=new EditGeometryDialog(c,b),c.showDialog(a.container,200,270,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&
(t=g.copyStyle(g.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&null!=t&&g.pasteStyle(t,g.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var a=new BackgroundImageDialog(c,function(a){c.setBackgroundImage(a)});c.showDialog(a.container,320,170,!0,!0);a.init()}}));c.actions.put("exportSvg",
-new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,b,d,e,f,g,k,l,m,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&c.exportSvg(a/100,b,d,e,f,g,k,!l,!1,n,q,t)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
-"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,b,d,e,f,g,k,l,m,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&c.exportImage(a/100,b,d,e,f,k,!l,!1,null,p,null,q,t)}),!0,!0,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b,d,e,f){c.downloadFile(b?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?
-c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,b,d,e,f,g,k,l,m,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&c.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",p,null,q,t)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b,d,e,f){c.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));l=c.actions.addAction("copyAsImage",
+new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,b,d,e,f,g,k,m,l,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&c.exportSvg(a/100,b,d,e,f,g,k,!m,!1,n,q,t)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),
+"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,b,d,e,f,g,k,m,l,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&c.exportImage(a/100,b,d,e,f,k,!m,!1,null,p,null,q,t)}),!0,!0,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b,d,e,f){c.downloadFile(b?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?
+c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(a,b,d,e,f,g,k,m,l,n,p,q,t){a=parseInt(a);!isNaN(a)&&0<a&&c.exportImage(a/100,!1,d,e,!1,k,!m,!1,"jpeg",p,null,q,t)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b,d,e,f){c.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));l=c.actions.addAction("copyAsImage",
mxUtils.bind(this,function(a,b){var d=mxEvent.isShiftDown(b),e=c.editor.graph,f=mxUtils.sortCells(e.model.getTopmostCells(e.getSelectionCells())),e=mxUtils.getXml(0==f.length?c.editor.getGraphXml():e.encodeCells(f));c.copyImage(f,e,d?null:"png",d?null:2)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas();l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return g.shadowVisible});
c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",
function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var a=new FeedbackDialog(c);c.showDialog(a.container,610,360,!0,!1);a.init()});c.actions.addAction("quickStart...",
@@ -11174,31 +11175,31 @@ b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.styl
"no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)";document.body.appendChild(c)}}return b}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
c.actions.addAction("runLayout",function(){var a=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(a){if(0<a.length)try{var b=JSON.parse(a);c.executeLayoutList(b);c.customLayoutConfig=b}catch(F){c.handleError(F),null!=window.console&&console.error(F)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");a.textarea.style.width="600px";a.textarea.style.height="380px";c.showDialog(a.container,620,460,!0,!0);a.init()});var l=this.get("layout"),
q=l.funct;l.funct=function(a,b){q.apply(this,arguments);a.addItem(mxResources.get("orgChart"),null,function(){function a(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?g():c.spinner.spin(document.body,mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",
-g)})})}):mxscript("js/extensions.min.js",g))}var b=null,d=20,e=20,f=!0,g=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=b&&f){var a=c.editor.graph,g=new mxOrgChartLayout(a,b,d,e),k=a.getDefaultParent();1<a.model.getChildCount(a.getSelectionCell())&&(k=a.getSelectionCell());g.execute(k);f=!1}},k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="6px";l.style.display="inline-block";l.style.width="140px";mxUtils.write(l,
-mxResources.get("orgChartType")+": ");k.appendChild(l);var m=document.createElement("select");m.style.width="200px";m.style.boxSizing="border-box";for(var l=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],n=0;n<l.length;n++){var p=document.createElement("option");mxUtils.write(p,l[n]);p.value=n;2==n&&p.setAttribute("selected",
-"selected");m.appendChild(p)}mxEvent.addListener(m,"change",function(){b=m.value});k.appendChild(m);l=document.createElement("div");l.style.marginTop="6px";l.style.display="inline-block";l.style.width="140px";mxUtils.write(l,mxResources.get("parentChildSpacing")+": ");k.appendChild(l);var y=document.createElement("input");y.type="number";y.value=d;y.style.width="200px";y.style.boxSizing="border-box";k.appendChild(y);mxEvent.addListener(y,"change",function(){d=y.value});l=document.createElement("div");
-l.style.marginTop="6px";l.style.display="inline-block";l.style.width="140px";mxUtils.write(l,mxResources.get("siblingSpacing")+": ");k.appendChild(l);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";k.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});k=new CustomDialog(c,k,function(){null==b&&(b=2);a()});c.showDialog(k.container,355,125,!0,!0)},b,null,f());a.addSeparator(b);a.addItem(mxResources.get("parallels"),
+g)})})}):mxscript("js/extensions.min.js",g))}var b=null,d=20,e=20,f=!0,g=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=b&&f){var a=c.editor.graph,g=new mxOrgChartLayout(a,b,d,e),k=a.getDefaultParent();1<a.model.getChildCount(a.getSelectionCell())&&(k=a.getSelectionCell());g.execute(k);f=!1}},k=document.createElement("div"),m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,
+mxResources.get("orgChartType")+": ");k.appendChild(m);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var m=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],n=0;n<m.length;n++){var p=document.createElement("option");mxUtils.write(p,m[n]);p.value=n;2==n&&p.setAttribute("selected",
+"selected");l.appendChild(p)}mxEvent.addListener(l,"change",function(){b=l.value});k.appendChild(l);m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("parentChildSpacing")+": ");k.appendChild(m);var z=document.createElement("input");z.type="number";z.value=d;z.style.width="200px";z.style.boxSizing="border-box";k.appendChild(z);mxEvent.addListener(z,"change",function(){d=z.value});m=document.createElement("div");
+m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("siblingSpacing")+": ");k.appendChild(m);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";k.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});k=new CustomDialog(c,k,function(){null==b&&(b=2);a()});c.showDialog(k.container,355,125,!0,!0)},b,null,f());a.addSeparator(b);a.addItem(mxResources.get("parallels"),
null,mxUtils.bind(this,function(){var a=new mxParallelEdgeLayout(g);a.checkOverlap=!0;a.spacing=20;c.executeLayout(function(){a.execute(g.getDefaultParent(),g.isSelectionEmpty()?null:g.getSelectionCells())},!1)}),b);a.addSeparator(b);c.menus.addMenuItem(a,"runLayout",b,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,b){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(a,["about"],b);else{var d=a.addItem("Search:",null,null,b,null,null,!1);
d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://www.google.com/search?q=site%3Adiagrams.net+inurl%3A%2Fdoc%2Ffaq%2F+"+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",
action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),this.addMenuItems(a,"- keyboardShortcuts quickStart support - forkme - about".split(" "),
b)):this.addMenuItems(a,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),b)}"1"==urlParams.test&&(a.addSeparator(b),this.addSubmenu("testDevelop",a,b))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var a=prompt("Language Code",Graph.diagramLanguage||"");null!=a&&(Graph.diagramLanguage=0<a.length?a:null,g.refresh())});"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),
mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!g.isSelectionEmpty()){var a=
g.cloneCells(g.getSelectionCells()),b=g.getBoundingBoxFromGeometry(a),a=g.moveCells(a,-b.x,-b.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+b.width+", "+b.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(g.encodeCells(a)))+"'),")}})),c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=g.getGraphBounds(),b=g.view.translate,c=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),
-c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"",a=new TextareaDialog(c,"Paste Data:",a,function(a){if(0<a.length)try{var b=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=
-l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),
+c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"",a=new TextareaDialog(c,"Paste Data:",a,function(a){if(0<a.length)try{var b=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var m=d[k];if(null!=
+m.id&&0<m.id.length)if(null==a[m.id]){a[m.id]=m.id;var l=m.getAttribute("parent");null==l?null!=f?mxLog.debug(c+": Multiple roots: "+m.id):f=m.id:(null==e[l]&&(e[l]=[]),e[l].push(m.id))}else g[m.id]=m.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),
console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=c.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=c.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)b(g[a]);mxLog.show()}catch(I){c.handleError(I),
null!=window.console&&console.error(I)}});a.textarea.style.width="600px";a.textarea.style.height="380px";c.showDialog(a.container,620,460,!0,!0);a.init()})),c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var a=new TextareaDialog(c,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(c.diffPages(c.pages,c.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(A){c.handleError(A),null!=window.console&&console.error(A)}});a.textarea.style.width=
"600px";a.textarea.style.height="380px";c.showDialog(a.container,620,460,!0,!0);a.init()}else c.alert("No pages")})),c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,g.getModel())})),c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/
-c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=
+c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){f--;m.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);l.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=
mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),b)}))));c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?
mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),a.vertex=!0,a=new EditShapeDialog(c,a,mxResources.get("editShape")+":",630,400),c.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=f;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(a){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",a,function(a,b,d,e,f,g,k,l,m,n){c.createHtml(a,b,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(a,b){var d=new EmbedDialog(c,a+"\n"+b,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');
+function(a){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",a,function(a,b,d,e,f,g,k,m,l,n){c.createHtml(a,b,d,e,f,g,k,m,l,n,mxUtils.bind(this,function(a,b){var d=new EmbedDialog(c,a+"\n"+b,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');
e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(b);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,
d.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(b)[1];e.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var a=c.getCurrentFile();null!=a&&c.spinner.spin(document.body,mxResources.get("loading"))&&
c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();null!=b?(b=new EmbedDialog(c,'<img src="'+(a.constructor!=DriveFile?b:"https://drive.google.com/uc?id="+a.getId())+'"/>'),c.showDialog(b.container,440,240,!0,!0),b.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(a,b,d,e,f,g){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(a,
b,d,e,f,g,function(a){c.spinner.stop();a=new EmbedDialog(c,a);c.showDialog(a.container,440,240,!0,!0);a.init()},function(a){c.spinner.stop();c.handleError(a)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(a,b,d,e,f,g){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(a,b,d,e,f,g,function(a){c.spinner.stop();a=new EmbedDialog(c,a);
-c.showDialog(a.container,440,240,!0,!0);a.init()},function(a){c.spinner.stop();c.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=g.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(a.height/g.view.scale)+2,function(a,b,d,e,f,g,k,l){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(m){c.spinner.stop();m=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+c.createLink(a,b,d,e,f,g,m)+'"></iframe>');c.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(a,b,d,e,f,g,k,l){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(k){c.spinner.stop();
+c.showDialog(a.container,440,240,!0,!0);a.init()},function(a){c.spinner.stop();c.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=g.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(a.height/g.view.scale)+2,function(a,b,d,e,f,g,k,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(l){c.spinner.stop();l=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+k+";height:"+m+';" src="'+c.createLink(a,b,d,e,f,g,l)+'"></iframe>');c.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(a,b,d,e,f,g,k,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(k){c.spinner.stop();
k=new EmbedDialog(c,c.createLink(a,b,d,e,f,g,k,null,["border=0"],!0));c.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(a,b,d,e,f,g){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(k){c.spinner.stop();k=new EmbedDialog(c,c.createLink(a,b,d,e,f,g,k));c.showDialog(k.container,440,240,!0,!0);k.init()})})}));
c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
function(a){c.spinner.stop();a=new GoogleSitesDialog(c,a);c.showDialog(a.container,420,256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,360,170,!0,!1)});l=c.actions.addAction("search",function(){var a=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",
@@ -11207,8 +11208,8 @@ window.parent).postMessage(b,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmo
urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(a,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){c.isExportToCanvas()?(this.addMenuItems(a,["exportPng"],b),c.jpgSupported&&this.addMenuItems(a,["exportJpg"],b)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,
["exportPng","exportJpg"],b);this.addMenuItems(a,["exportSvg","-"],b);c.isOffline()||c.printPdfExport?this.addMenuItems(a,["exportPdf"],b):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPdf"],b);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(a,["exportVsdx"],b);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],b);c.isOffline()||(a.addSeparator(b),this.addMenuItem(a,"export",b).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+
"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,b){function d(a){a.pickFile(function(b){c.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(b,function(a){var b="data:image/"==a.getData().substring(0,11)?l(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!c.editor.isDataSvg(a.getData())&&(a.setData(Editor.createSvgDataUri(a.getData())),b="image/svg+xml");f(a.getData(),b,a.getTitle())},function(a){c.handleError(a,null!=a?mxResources.get("errorLoadingFile"):
-null)},a==c.drive)},!0)}var f=mxUtils.bind(this,function(a,b,d){var e=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*g.gridSize)),l=g.snap(Math.ceil(Math.max(0,(f.y+f.height)/e.scale-e.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?c.loadImage(a,mxUtils.bind(this,function(e){var f=!0,m=mxUtils.bind(this,function(){c.resizeImage(e,a,mxUtils.bind(this,function(e,m,n){e=f?Math.min(1,Math.min(c.maxImageSize/m,c.maxImageSize/n)):1;c.importFile(a,b,
-k,l,Math.round(m*e),Math.round(n*e),d,function(a){c.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>c.resampleThreshold?c.confirmImageResize(function(a){f=a;m()}):m()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(a,b,k,l,0,0,d,function(a){c.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?
+null)},a==c.drive)},!0)}var f=mxUtils.bind(this,function(a,b,d){var e=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*g.gridSize)),m=g.snap(Math.ceil(Math.max(0,(f.y+f.height)/e.scale-e.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?c.loadImage(a,mxUtils.bind(this,function(e){var f=!0,l=mxUtils.bind(this,function(){c.resizeImage(e,a,mxUtils.bind(this,function(e,l,n){e=f?Math.min(1,Math.min(c.maxImageSize/l,c.maxImageSize/n)):1;c.importFile(a,b,
+k,m,Math.round(l*e),Math.round(n*e),d,function(a){c.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>c.resampleThreshold?c.confirmImageResize(function(a){f=a;l()}):l()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(a,b,k,m,0,0,d,function(a){c.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?
b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)?b="image/gif":/\.pdf$/i.test(a)&&(b="application/pdf");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(c.drive)},b):m&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},b,null,!1));null!=c.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",
null,function(){d(c.oneDrive)},b):e&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},b,null,!1);null!=c.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){d(c.dropbox)},b):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},b,null,!1);a.addSeparator(b);null!=c.gitHub&&a.addItem(mxResources.get("github")+"...",
null,function(){d(c.gitHub)},b);null!=c.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(c.gitLab)},b);null!=c.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(c.trello)},b):k&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},b,null,!1);a.addSeparator(b);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},b);
@@ -11223,10 +11224,10 @@ mxUtils.bind(this,function(a){c.handleError(a)}))}),mxUtils.bind(this,function(a
if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var b=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){b=!0;break}c.pickFolder(a.getMode(),mxUtils.bind(this,function(b){c.spinner.spin(document.body,mxResources.get("moving"))&&a.move(b,mxUtils.bind(this,function(a){c.spinner.stop()}),mxUtils.bind(this,function(a){c.handleError(a)}))}),null,!0,b)}}));this.put("publish",new Menu(mxUtils.bind(this,function(a,
b){this.addMenuItems(a,["publishLink"],b)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=c.getCurrentFile();null!=a&&a.share()}catch(C){c.handleError(C)}}));this.put("embed",new Menu(mxUtils.bind(this,function(a,
b){var d=c.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],b);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],b);navigator.standalone||c.isOffline()||this.addMenuItems(a,["embedIframe"],b);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),b)})));var v=function(a,b,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&
-!c.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(c,d,e),c.showDialog(a.container,620,420,!0,!1);a.init()}),b,null,f())},z=function(a,b,d,e){var f=new mxCell(a,new mxGeometry(0,0,b,d),e);f.vertex=!0;a=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([f],!0));f.geometry.x=a.x;f.geometry.y=
-a.y;g.getModel().beginUpdate();try{f=g.addCell(f),g.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(f);g.setSelectionCell(f);g.container.focus();g.editAfterInsert&&g.startEditing(f);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(f))},0);return f};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(z("Text",
-40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
-z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var x=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
+!c.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(c,d,e),c.showDialog(a.container,620,420,!0,!1);a.init()}),b,null,f())},y=function(a,b,d,e){var f=new mxCell(a,new mxGeometry(0,0,b,d),e);f.vertex=!0;a=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([f],!0));f.geometry.x=a.x;f.geometry.y=
+a.y;g.getModel().beginUpdate();try{f=g.addCell(f),g.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(f);g.setSelectionCell(f);g.container.focus();g.editAfterInsert&&g.startEditing(f);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(f))},0);return f};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(y("Text",
+40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var x=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),b);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(a,["insertTemplate"],b);a.addSeparator(b);this.addSubmenu("insertLayout",a,b,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,b,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));
this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){x(a,b,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},b,null,f())})));this.put("openRecent",new Menu(function(a,b){var d=c.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){c.loadFile(d.id)},
b)})(d[e]);a.addSeparator(b)}a.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},b)}));this.put("openFrom",new Menu(function(a,b){null!=c.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},b):m&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},b,null,!1);null!=c.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},
@@ -11257,11 +11258,11 @@ a,b);isLocalStorage&&this.addSubmenu("openRecent",a,b);null!=d&&d.constructor==D
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==d||this.addMenuItems(a,["share","-"],b),this.addMenuItems(a,["rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(a,["upload"],b):(this.addMenuItems(a,["makeCopy"],b),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(a,["moveToFolder"],b)));a.addSeparator(b);this.addSubmenu("importFrom",a,b);this.addSubmenu("exportAs",a,b);a.addSeparator(b);
this.addSubmenu("embed",a,b);this.addSubmenu("publish",a,b);a.addSeparator(b);this.addSubmenu("newLibrary",a,b);this.addSubmenu("openLibraryFrom",a,b);c.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],b);null!=d&&null!=c.fileNode&&(d=null!=d.getTitle()?d.getTitle():c.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));this.addMenuItems(a,["-","pageSetup"],b);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],
b);this.addMenuItems(a,["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var d=document.getElementById("extFont_"+b[c].name);null!=d&&d.parentNode.removeChild(d)}a.extFonts=[];for(c=0;null!=this.previousExtFonts&&
-c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,d){for(var e=mxUtils.bind(this,function(e,f,g,k,l){var m=this.editorUi.editor.graph;k=this.styleChange(b,k||e,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[e,null!=f?encodeURIComponent(f):null,null]:
-[e],null,d,function(){"1"!=urlParams["ext-fonts"]?m.setFont(e,f):(document.execCommand("fontname",!1,e),m.addExtFont(e,f))},function(){m.updateLabelElements(m.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&m.replaceElement(a,"div")});"1"==urlParams["ext-fonts"]&&m.addExtFont(e,f)});g&&(g=document.createElement("span"),g.className="geSprite geSprite-delete",g.style.cursor="pointer",g.style.display="inline-block",k.firstChild.nextSibling.nextSibling.appendChild(g),
+c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,d){for(var e=mxUtils.bind(this,function(e,f,g,k,m){var l=this.editorUi.editor.graph;k=this.styleChange(b,k||e,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[e,null!=f?encodeURIComponent(f):null,null]:
+[e],null,d,function(){"1"!=urlParams["ext-fonts"]?l.setFont(e,f):(document.execCommand("fontname",!1,e),l.addExtFont(e,f))},function(){l.updateLabelElements(l.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&l.replaceElement(a,"div")});"1"==urlParams["ext-fonts"]&&l.addExtFont(e,f)});g&&(g=document.createElement("span"),g.className="geSprite geSprite-delete",g.style.cursor="pointer",g.style.display="inline-block",k.firstChild.nextSibling.nextSibling.appendChild(g),
mxEvent.addListener(g,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(b){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[e.toLowerCase()];for(var d=0;d<this.customFonts.length;d++)if(this.customFonts[d].name==e&&this.customFonts[d].url==f){this.customFonts.splice(d,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var g=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=g&&0<g.length)for(d=0;d<g.length;d++)if(g[d].name==e){g.splice(d,
-1);break}for(var k=mxUtils.clone(this.customFonts),d=0;d<k.length;d++)if(k[d].name==e){k.splice(d,1);break}d=new a(this.editorUi,g,k);this.editorUi.editor.graph.model.execute(d)}this.editorUi.menubar.hideMenu();mxEvent.consume(b)})));Graph.addFont(e,f);k.firstChild.nextSibling.style.fontFamily=e;null!=l&&k.setAttribute("title",l)}),f=0;f<this.defaultFonts.length;f++)e(this.defaultFonts[f]);b.addSeparator(d);if("1"!=urlParams["ext-fonts"]){for(var g=function(a){for(var b=encodeURIComponent(a.name)+
-(null==a.url?"":"@"+encodeURIComponent(a.url)),c=a.name,d=0;null!=l[c.toLowerCase()];)c=a.name+" ("+ ++d+")";null==k[b]&&(m.push({name:a.name,url:a.url,label:c,title:a.url}),l[c.toLowerCase()]=a,k[b]=a)},k={},l={},m=[],f=0;f<this.customFonts.length;f++)g(this.customFonts[f],!1);for(var n in Graph.recentCustomFonts)g(Graph.recentCustomFonts[n],!0);m.sort(function(a,b){return a.label<b.label?-1:a.label>b.label?1:0});if(0<m.length){for(f=0;f<m.length;f++)e(m[f].name,m[f].url,!0,m[f].label,m[f].url);
+1);break}for(var k=mxUtils.clone(this.customFonts),d=0;d<k.length;d++)if(k[d].name==e){k.splice(d,1);break}d=new a(this.editorUi,g,k);this.editorUi.editor.graph.model.execute(d)}this.editorUi.menubar.hideMenu();mxEvent.consume(b)})));Graph.addFont(e,f);k.firstChild.nextSibling.style.fontFamily=e;null!=m&&k.setAttribute("title",m)}),f=0;f<this.defaultFonts.length;f++)e(this.defaultFonts[f]);b.addSeparator(d);if("1"!=urlParams["ext-fonts"]){for(var g=function(a){for(var b=encodeURIComponent(a.name)+
+(null==a.url?"":"@"+encodeURIComponent(a.url)),c=a.name,d=0;null!=m[c.toLowerCase()];)c=a.name+" ("+ ++d+")";null==k[b]&&(l.push({name:a.name,url:a.url,label:c,title:a.url}),m[c.toLowerCase()]=a,k[b]=a)},k={},m={},l=[],f=0;f<this.customFonts.length;f++)g(this.customFonts[f],!1);for(var n in Graph.recentCustomFonts)g(Graph.recentCustomFonts[n],!0);l.sort(function(a,b){return a.label<b.label?-1:a.label>b.label?1:0});if(0<l.length){for(f=0;f<l.length;f++)e(l[f].name,l[f].url,!0,l[f].label,l[f].url);
b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),d);b.addSeparator(d)}else{g=this.editorUi.editor.graph.extFonts;if(null!=g&&0<g.length){n={};for(var p=!1,f=0;f<this.customFonts.length;f++)n[this.customFonts[f].name]=!0;for(f=0;f<g.length;f++)n[g[f].name]||(this.customFonts.push(g[f]),p=!0);p&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
this.customFonts))}if(0<this.customFonts.length){for(f=0;f<this.customFonts.length;f++)g=this.customFonts[f].name,n=this.customFonts[f].url,e(g,n,!0),this.editorUi.editor.graph.addExtFont(g,n,!0);b.addSeparator(d);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=new a(this.editorUi,[],[]);c.editor.graph.model.execute(b)}),d);b.addSeparator(d)}}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=a.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],
c="s",d=null;if("1"!=urlParams["ext-fonts"]&&a.isEditing()){var e=a.getSelectedEditingElement();null!=e&&(e=mxUtils.getCurrentStyle(e),null!=e&&(b=Graph.stripQuotes(e.fontFamily),d=Graph.getFontUrl(b,null),null!=d&&(Graph.isGoogleFontUrl(d)?(d=null,c="g"):c="w")))}else e=a.getView().getState(a.getSelectionCell()),null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,"1"!=urlParams["ext-fonts"]?(e=e.style.fontSource,null!=e&&(e=decodeURIComponent(e),Graph.isGoogleFontUrl(e)?c="g":(c="w",d=e))):(c=e.style.FType||
@@ -11335,28 +11336,28 @@ c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(d.relatedPage.root=a.decodeCell(
function(a,b){this.model.beginUpdate();try{var c=[];this.traverse(b,!0,mxUtils.bind(this,function(a,d){null!=d&&c.push(d);a!=b&&c.push(a);return a==b||!this.model.isCollapsed(a)}));this.model.setCollapsed(b,a);for(var d=0;d<c.length;d++)this.model.setVisible(c[d],!a)}finally{this.model.endUpdate()}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return v.isVertex(a)&&
d(a)}function b(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function m(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function n(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),
null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],
-q.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),l=q.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-
-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,v=g=d=0;v<p.length;v++){var u=q.model.getTerminal(p[v],!1);if(f==n(u)){var y=q.view.getState(u);u!=a&&null!=y&&(t&&b!=y.getCenterX()<k.getCenterX()||!t&&b!=y.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,y)&&(d=10+Math.max(d,(Math.min(m.x+m.width,y.x+y.width)-Math.max(m.x,y.x))/l),g=10+Math.max(g,
-(Math.min(m.y+m.height,y.y+y.height)-Math.max(m.y,y.y))/l))}}t?g=0:d=0;for(v=0;v<p.length;v++)if(u=q.model.getTerminal(p[v],!1),f==n(u)&&(y=q.view.getState(u),u!=a&&null!=y&&(t&&b!=y.getCenterX()<k.getCenterX()||!t&&b!=y.getCenterY()<k.getCenterY()))){var A=[];q.traverse(y.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});q.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function k(a){q.model.beginUpdate();try{var b=n(a),c=q.getIncomingEdges(a),
+q.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),m=q.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-
+10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,v=g=d=0;v<p.length;v++){var u=q.model.getTerminal(p[v],!1);if(f==n(u)){var A=q.view.getState(u);u!=a&&null!=A&&(t&&b!=A.getCenterX()<k.getCenterX()||!t&&b!=A.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,A)&&(d=10+Math.max(d,(Math.min(l.x+l.width,A.x+A.width)-Math.max(l.x,A.x))/m),g=10+Math.max(g,
+(Math.min(l.y+l.height,A.y+A.height)-Math.max(l.y,A.y))/m))}}t?g=0:d=0;for(v=0;v<p.length;v++)if(u=q.model.getTerminal(p[v],!1),f==n(u)&&(A=q.view.getState(u),u!=a&&null!=A&&(t&&b!=A.getCenterX()<k.getCenterX()||!t&&b!=A.getCenterY()<k.getCenterY()))){var z=[];q.traverse(A.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});q.moveCells(z,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function k(a){q.model.beginUpdate();try{var b=n(a),c=q.getIncomingEdges(a),
d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&
(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(a,b){q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=n(a);0==d.length&&(d=[q.createEdge(c,null,"",null,null,q.createCurrentEdgeStyle())],e=b);var f=q.cloneCells([d[0],a]);q.model.setTerminal(f[0],a,!0);if(null==q.model.getTerminal(f[0],!1)){q.model.setTerminal(f[0],f[1],!1);var g=q.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),l;for(l in k)q.setCellStyles(l,k[l],
[f[0]]),"edgeStyle"==l&&"elbowEdgeStyle"==k[l]&&q.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[f[0]])}catch(ea){}}var d=q.getOutgoingEdges(a),m=c.geometry,g=[];q.view.currentRoot==c&&(m=new mxRectangle);for(k=0;k<d.length;k++){var p=q.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var t=q.view.getBounds(g),v=q.view.translate,u=q.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==t?a.geometry.x+(a.geometry.width-f[1].geometry.width)/
2:(t.x+t.width)/u-v.x-m.x+10,f[1].geometry.y+=f[1].geometry.height-m.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=null==t?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(t.x+t.width)/u-v.x+-m.x+10,f[1].geometry.y-=f[1].geometry.height+m.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+m.x+40):f[1].geometry.x+(f[1].geometry.width-m.x+40),f[1].geometry.y=null==t?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(t.y+t.height)/u-v.y+-m.y+
10);return q.addCells(f,c)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function t(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||
b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}
-var u=this,q=u.editor.graph,v=q.getModel(),z=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){z.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
+var u=this,q=u.editor.graph,v=q.getModel(),y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){y.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
u.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=
[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(a,b){var c=q.getSelectionCell();if(q.isEnabled()&&q.model.isVertex(c)){if(null!=b&&mxEvent.isAltDown(b))q.setSelectionCells(q.model.getEdges(c,
null==b||!mxEvent.isShiftDown(b),null==b||!mxEvent.isControlDown(b)));else{var d=[];q.traverse(c,!0,function(a,c){null!=c&&d.push(c);null!=b&&mxEvent.isShiftDown(b)||d.push(a);return!0})}q.setSelectionCells(d)}},null,null,"Alt+Shift+D");var x=q.removeCells;q.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,
!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return x.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var B=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=
-f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=B.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var y=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();
+f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=B.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();
try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var t=q.getIncomingEdges(b[0]);if(0<t.length){var v=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=v){var u=q.view.getState(m);null!=u&&(c=(u.getCenterX()-v.getCenterX())/q.view.scale,d=(u.getCenterY()-v.getCenterY())/
-q.view.scale)}}}}l=y.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(t=q.getIncomingEdges(b[p]),0<t.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(t[0],!0);
+q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(t=q.getIncomingEdges(b[p]),0<t.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(t[0],!0);
e=this.cloneCell(t[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=C.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var A=
{88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},F=u.onKeyDown;u.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?k(q.getSelectionCell()):l(q.getSelectionCell()):13==b.which&&(c=e(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==
c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=A[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(b)):39==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(t(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(N){u.handleError(N)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var D=q.connectVertex;q.connectVertex=function(b,c,d,f,g,m,p){var t=q.getIncomingEdges(b);if(a(b)){var v=n(b),u=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,y=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;
-return v==c||0==t.length?l(b,c):u==y?k(b):e(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return D.apply(this,arguments)};q.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||m(c)||q.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!m(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&
+mxEvent.consume(b)):39==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(t(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(N){u.handleError(N)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var D=q.connectVertex;q.connectVertex=function(b,c,d,f,g,m,p){var t=q.getIncomingEdges(b);if(a(b)){var v=n(b),u=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,A=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;
+return v==c||0==t.length?l(b,c):u==A?k(b):e(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return D.apply(this,arguments)};q.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||m(c)||q.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!m(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&
(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(a)})))};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;
mxVertexHandler.prototype.setHandlesVisible=function(a){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,
@@ -11436,25 +11437,25 @@ l.diagramContainer.style.top="47px";var J=l.menus.get("viewZoom");if(null!=J){th
H.style.textDecoration="none";H.style.textDecoration="none";H.style.right="0px";H.style.bottom="0px";H.style.overflow="hidden";H.style.visibility="hidden";H.style.textAlign="center";H.style.color="#000";H.style.fontSize="12px";H.style.color="#707070";H.style.width="59px";H.style.cursor="pointer";H.style.borderTop="1px solid lightgray";H.style.borderLeft="1px solid lightgray";H.style.height=parseInt(l.tabContainerHeight)-1+"px";H.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";I.appendChild(H);
J=mxUtils.bind(this,function(){H.innerHTML=Math.round(100*l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);l.editor.addListener("resetGraphView",J);l.editor.addListener("pageSelected",J);var K=l.setGraphEnabled;l.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(H.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}I.appendChild(l.tabContainer);
I.appendChild(n);I.appendChild(l.diagramContainer);k.appendChild(I);l.updateTabContainer();var M=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,d,f,m){var c=d.y,e=d.x,g=!1,l=!1;if(null!=this.states&&null!=b&&null!=d){var p=this,t=new mxCellState,u=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);t.x=b.x+e;t.y=b.y+c;t.width=b.width;t.height=b.height;for(var v=[],z=[],x=0;x<this.states.length;x++){var B=this.states[x];B instanceof mxCellState&&(m||!this.graph.isCellSelected(B.cell))&&((t.x>=B.x&&t.x<=B.x+B.width||B.x>=t.x&&B.x<=t.x+t.width)&&(t.y>
-B.y+B.height+4||t.y+t.height+4<B.y)?v.push(B):(t.y>=B.y&&t.y<=B.y+B.height||B.y>=t.y&&B.y<=t.y+t.height)&&(t.x>B.x+B.width+4||t.x+t.width+4<B.x)&&z.push(B))}var y=0,C=0,A=B=0,F=0,D=0,G=0,E=0,I=5*u;if(1<v.length){v.push(t);v.sort(function(a,b){return a.y-b.y});var J=!1,x=t==v[0],u=t==v[v.length-1];if(!x&&!u)for(x=1;x<v.length-1;x++)if(t==v[x]){u=v[x-1];x=v[x+1];B=C=A=(x.y-u.y-u.height-t.height)/2;break}for(x=0;x<v.length-1;x++){var u=v[x],H=v[x+1],K=t==u||t==H,H=H.y-u.y-u.height,J=J|t==u;if(0==C&&
-0==y)C=H,y=1;else if(Math.abs(C-H)<=(K||1==x&&J?q:0))y+=1;else if(1<y&&J){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!J)y=0,B=C=0!=A?A:0,v.splice(0,0==x?1:x),x=-1;else break;0!=B||K||(C=B=H)}3==v.length&&v[1]==t&&(B=0)}if(1<z.length){z.push(t);z.sort(function(a,b){return a.x-b.x});J=!1;x=t==z[0];u=t==z[z.length-1];if(!x&&!u)for(x=1;x<z.length-1;x++)if(t==z[x]){u=z[x-1];x=z[x+1];G=D=E=(x.x-u.x-u.width-t.width)/2;break}for(x=0;x<z.length-1;x++){u=z[x];H=z[x+1];K=t==u||t==H;H=H.x-u.x-u.width;J|=t==
-u;if(0==D&&0==F)D=H,F=1;else if(Math.abs(D-H)<=(K||1==x&&J?q:0))F+=1;else if(1<F&&J){z=z.slice(0,x+1);break}else if(3<=z.length-x&&!J)F=0,G=D=0!=E?E:0,z.splice(0,0==x?1:x),x=-1;else break;0!=G||K||(D=G=H)}3==z.length&&z[1]==t&&(G=0)}q=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};D=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<F&&F==z.length-1){F=[];E=p.guidesArrHor;g=[];e=0;x=z[0]==t?1:0;J=z[x].y+z[x].height;if(0<G)for(x=0;x<z.length-1;x++)u=
-z[x],H=z[x+1],t==u?(e=H.x-u.width-G,g.push(new mxPoint(e+u.width+I,J)),g.push(new mxPoint(H.x-I,J))):t==H?(g.push(new mxPoint(u.x+u.width+I,J)),e=u.x+u.width+G,g.push(new mxPoint(e-I,J))):(g.push(new mxPoint(u.x+u.width+I,J)),g.push(new mxPoint(H.x-I,J)));else u=z[0],x=z[2],e=u.x+u.width+(x.x-u.x-u.width-t.width)/2,g.push(new mxPoint(u.x+u.width+I,J)),g.push(new mxPoint(e-I,J)),g.push(new mxPoint(e+t.width+I,J)),g.push(new mxPoint(x.x-I,J));for(x=0;x<g.length;x+=2)z=g[x],G=g[x+1],z=q(z,G,null!=E?
-E[x/2]:null),z.node.style.visibility="visible",z.redraw(),F.push(z);for(x=g.length/2;null!=E&&x<E.length;x++)E[x].destroy();p.guidesArrHor=F;e-=b.x;g=!0}else D(!0);if(1<y&&y==v.length-1){F=[];E=p.guidesArrVer;l=[];c=0;x=v[0]==t?1:0;y=v[x].x+v[x].width;if(0<B)for(x=0;x<v.length-1;x++)u=v[x],H=v[x+1],t==u?(c=H.y-u.height-B,l.push(new mxPoint(y,c+u.height+I)),l.push(new mxPoint(y,H.y-I))):t==H?(l.push(new mxPoint(y,u.y+u.height+I)),c=u.y+u.height+B,l.push(new mxPoint(y,c-I))):(l.push(new mxPoint(y,u.y+
-u.height+I)),l.push(new mxPoint(y,H.y-I)));else u=v[0],x=v[2],c=u.y+u.height+(x.y-u.y-u.height-t.height)/2,l.push(new mxPoint(y,u.y+u.height+I)),l.push(new mxPoint(y,c-I)),l.push(new mxPoint(y,c+t.height+I)),l.push(new mxPoint(y,x.y-I));for(x=0;x<l.length;x+=2)z=l[x],G=l[x+1],z=q(z,G,null!=E?E[x/2]:null,!0),z.node.style.visibility="visible",z.redraw(),F.push(z);for(x=l.length/2;null!=E&&x<E.length;x++)E[x].destroy();p.guidesArrVer=F;c-=b.y;l=!0}else D(!1,!0)}if(g||l)return t=new mxPoint(e,c),v=a.call(this,
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,d,f,m){var c=d.y,e=d.x,g=!1,l=!1;if(null!=this.states&&null!=b&&null!=d){var p=this,t=new mxCellState,u=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);t.x=b.x+e;t.y=b.y+c;t.width=b.width;t.height=b.height;for(var v=[],y=[],x=0;x<this.states.length;x++){var B=this.states[x];B instanceof mxCellState&&(m||!this.graph.isCellSelected(B.cell))&&((t.x>=B.x&&t.x<=B.x+B.width||B.x>=t.x&&B.x<=t.x+t.width)&&(t.y>
+B.y+B.height+4||t.y+t.height+4<B.y)?v.push(B):(t.y>=B.y&&t.y<=B.y+B.height||B.y>=t.y&&B.y<=t.y+t.height)&&(t.x>B.x+B.width+4||t.x+t.width+4<B.x)&&y.push(B))}var z=0,C=0,A=B=0,F=0,D=0,G=0,E=0,I=5*u;if(1<v.length){v.push(t);v.sort(function(a,b){return a.y-b.y});var J=!1,x=t==v[0],u=t==v[v.length-1];if(!x&&!u)for(x=1;x<v.length-1;x++)if(t==v[x]){u=v[x-1];x=v[x+1];B=C=A=(x.y-u.y-u.height-t.height)/2;break}for(x=0;x<v.length-1;x++){var u=v[x],H=v[x+1],K=t==u||t==H,H=H.y-u.y-u.height,J=J|t==u;if(0==C&&
+0==z)C=H,z=1;else if(Math.abs(C-H)<=(K||1==x&&J?q:0))z+=1;else if(1<z&&J){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!J)z=0,B=C=0!=A?A:0,v.splice(0,0==x?1:x),x=-1;else break;0!=B||K||(C=B=H)}3==v.length&&v[1]==t&&(B=0)}if(1<y.length){y.push(t);y.sort(function(a,b){return a.x-b.x});J=!1;x=t==y[0];u=t==y[y.length-1];if(!x&&!u)for(x=1;x<y.length-1;x++)if(t==y[x]){u=y[x-1];x=y[x+1];G=D=E=(x.x-u.x-u.width-t.width)/2;break}for(x=0;x<y.length-1;x++){u=y[x];H=y[x+1];K=t==u||t==H;H=H.x-u.x-u.width;J|=t==
+u;if(0==D&&0==F)D=H,F=1;else if(Math.abs(D-H)<=(K||1==x&&J?q:0))F+=1;else if(1<F&&J){y=y.slice(0,x+1);break}else if(3<=y.length-x&&!J)F=0,G=D=0!=E?E:0,y.splice(0,0==x?1:x),x=-1;else break;0!=G||K||(D=G=H)}3==y.length&&y[1]==t&&(G=0)}q=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};D=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<F&&F==y.length-1){F=[];E=p.guidesArrHor;g=[];e=0;x=y[0]==t?1:0;J=y[x].y+y[x].height;if(0<G)for(x=0;x<y.length-1;x++)u=
+y[x],H=y[x+1],t==u?(e=H.x-u.width-G,g.push(new mxPoint(e+u.width+I,J)),g.push(new mxPoint(H.x-I,J))):t==H?(g.push(new mxPoint(u.x+u.width+I,J)),e=u.x+u.width+G,g.push(new mxPoint(e-I,J))):(g.push(new mxPoint(u.x+u.width+I,J)),g.push(new mxPoint(H.x-I,J)));else u=y[0],x=y[2],e=u.x+u.width+(x.x-u.x-u.width-t.width)/2,g.push(new mxPoint(u.x+u.width+I,J)),g.push(new mxPoint(e-I,J)),g.push(new mxPoint(e+t.width+I,J)),g.push(new mxPoint(x.x-I,J));for(x=0;x<g.length;x+=2)y=g[x],G=g[x+1],y=q(y,G,null!=E?
+E[x/2]:null),y.node.style.visibility="visible",y.redraw(),F.push(y);for(x=g.length/2;null!=E&&x<E.length;x++)E[x].destroy();p.guidesArrHor=F;e-=b.x;g=!0}else D(!0);if(1<z&&z==v.length-1){F=[];E=p.guidesArrVer;l=[];c=0;x=v[0]==t?1:0;z=v[x].x+v[x].width;if(0<B)for(x=0;x<v.length-1;x++)u=v[x],H=v[x+1],t==u?(c=H.y-u.height-B,l.push(new mxPoint(z,c+u.height+I)),l.push(new mxPoint(z,H.y-I))):t==H?(l.push(new mxPoint(z,u.y+u.height+I)),c=u.y+u.height+B,l.push(new mxPoint(z,c-I))):(l.push(new mxPoint(z,u.y+
+u.height+I)),l.push(new mxPoint(z,H.y-I)));else u=v[0],x=v[2],c=u.y+u.height+(x.y-u.y-u.height-t.height)/2,l.push(new mxPoint(z,u.y+u.height+I)),l.push(new mxPoint(z,c-I)),l.push(new mxPoint(z,c+t.height+I)),l.push(new mxPoint(z,x.y-I));for(x=0;x<l.length;x+=2)y=l[x],G=l[x+1],y=q(y,G,null!=E?E[x/2]:null,!0),y.node.style.visibility="visible",y.redraw(),F.push(y);for(x=l.length/2;null!=E&&x<E.length;x++)E[x].destroy();p.guidesArrVer=F;c-=b.y;l=!0}else D(!1,!0)}if(g||l)return t=new mxPoint(e,c),v=a.call(this,
b,t,f,m),g&&!l?t.y=v.y:l&&!g&&(t.x=v.x),v.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;D(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
c)for(m=0;m<c.length;m++)c[m].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,b,c){function g(){var c=a.diagramContainer;p.style.top=c.offsetTop-e+"px";p.style.left=c.offsetLeft-e+"px";p.style.width=(b?0:c.offsetWidth)+e+"px";p.style.height=(b?c.offsetHeight:0)+e+"px"}function f(a,b,c){if(null!=m)return a;var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var m=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
n=window.cancelAnimationFrame||window.mozCancelAnimationFrame,e=this.RULER_THICKNESS,k=this;this.unit=d;var l="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},p=document.createElement("div");p.style.position="absolute";p.style.background=l.bkgClr;p.style[b?"borderRight":"borderBottom"]="0.5px solid "+
l.strokeClr;p.style.borderLeft="0.5px solid "+l.strokeClr;document.body.appendChild(p);mxEvent.disableContextMenu(p);this.editorUiRefresh=a.refresh;a.refresh=function(b){k.editorUiRefresh.apply(a,arguments);g()};g();var t=document.createElement("canvas");t.width=p.offsetWidth;t.height=p.offsetHeight;p.style.overflow="hidden";t.style.position="relative";p.appendChild(t);var u=t.getContext("2d");this.ui=a;var q=a.editor.graph;this.graph=q;this.container=p;this.canvas=t;var v=function(a,c,d,e,f){a=Math.round(a);
-c=Math.round(c);d=Math.round(d);e=Math.round(e);u.beginPath();u.moveTo(a+.5,c+.5);u.lineTo(d+.5,e+.5);u.stroke();f&&(b?(u.save(),u.translate(a,c),u.rotate(-Math.PI/2),u.fillText(f,0,0),u.restore()):u.fillText(f,a,c))},z=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=l.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var a=q.view.scale,c=q.view.getBackgroundPageBounds(),d=q.view.translate,f=q.pageVisible,d=f?e+(b?c.y-q.container.scrollTop:
+c=Math.round(c);d=Math.round(d);e=Math.round(e);u.beginPath();u.moveTo(a+.5,c+.5);u.lineTo(d+.5,e+.5);u.stroke();f&&(b?(u.save(),u.translate(a,c),u.rotate(-Math.PI/2),u.fillText(f,0,0),u.restore()):u.fillText(f,a,c))},y=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=l.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var a=q.view.scale,c=q.view.getBackgroundPageBounds(),d=q.view.translate,f=q.pageVisible,d=f?e+(b?c.y-q.container.scrollTop:
c.x-q.container.scrollLeft):e+(b?d.y*a-q.container.scrollTop:d.x*a-q.container.scrollLeft),g=0;f&&(g=q.getPageLayout(),g=b?g.y*q.pageFormat.height:g.x*q.pageFormat.width);var m,n,p;switch(k.unit){case mxConstants.POINTS:m=p=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:p=10;m=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:p=.5>=a||4<=a?8:16,m=mxConstants.PIXELS_PER_INCH/p,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var x=m;2<=a?x=m/(2*Math.floor(a/2)):.5>=
-a&&(x=m*Math.floor(1/a/2)*(k.unit==mxConstants.MILLIMETERS?2:1));m=null;c=f?Math.min(d+(b?c.height:c.width),b?t.height:t.width):b?t.height:t.width;if(f)if(u.fillStyle=l.outBkgClr,b){var z=d-e;0<z&&u.fillRect(0,e,e,z);c<t.height&&u.fillRect(0,c,e,t.height)}else z=d-e,0<z&&u.fillRect(e,0,z,e),c<t.width&&u.fillRect(c,0,t.width,e);u.fillStyle=l.fontClr;for(f=f?d:d%(x*a);f<=c;f+=x*a)if(z=Math.round((f-d)/a/x),!(f<e||z==m)){m=z;var B=null;0==z%p&&(B=k.formatText(g+z*x)+"");b?v(e-n[Math.abs(z)%p],f,e,f,
-B):v(f,e-n[Math.abs(z)%p],f,e,B)}u.lineWidth=1;v(b?0:e,b?e:0,e,e);u.fillStyle=l.cornerClr;u.fillRect(0,0,e,e)},x=-1,B=function(){null!=m?(null!=n&&n(x),x=m(z)):z()};this.drawRuler=B;this.sizeListener=d=f(function(){var a=q.container;b?(a=a.offsetHeight+e,t.height!=a&&(t.height=a,p.style.height=a+"px",B())):(a=a.offsetWidth+e,t.width!=a&&(t.width=a,p.style.width=a+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=f(function(){var a=b?q.container.scrollTop:q.container.scrollLeft;
-k.lastScroll!=a&&(k.lastScroll=a,B())},10);this.unitListener=function(a,b){k.setUnit(b.getProperty("unit"))};q.addListener(mxEvent.SIZE,d);q.container.addEventListener("scroll",c);q.view.addListener("unitChanged",this.unitListener);a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){l=a;p.style.background=l.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=
-function(a,c,d,f){var g;if(b&&4<a.height||!b&&4<a.width){if(null!=k.guidePart)try{u.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),u.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),u.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(L){}g=k.origGuideMove.apply(this,arguments);try{var m,n,p,q,t,y,x,z,B;u.lineWidth=.5;u.strokeStyle=l.guideClr;u.setLineDash([2]);b?(n=a.y+g.y+e-this.graph.container.scrollTop,m=0,t=n+a.height/2,q=e/2,z=n+a.height,
-x=0,p=u.getImageData(m,n-1,e,3),v(m,n,e,n),n--,y=u.getImageData(q,t-1,e,3),v(q,t,e,t),t--,B=u.getImageData(x,z-1,e,3),v(x,z,e,z),z--):(n=0,m=a.x+g.x+e-this.graph.container.scrollLeft,t=e/2,q=m+a.width/2,z=0,x=m+a.width,p=u.getImageData(m-1,n,3,e),v(m,n,m,e),m--,y=u.getImageData(q-1,t,3,e),v(q,t,q,e),q--,B=u.getImageData(x-1,z,3,e),v(x,z,x,e),x--);if(null==k.guidePart||k.guidePart.x1!=m||k.guidePart.y1!=n)k.guidePart={imgData1:p,x1:m,y1:n,imgData2:y,x2:q,y2:t,imgData3:B,x3:x,y3:z}}catch(L){}}else g=
+a&&(x=m*Math.floor(1/a/2)*(k.unit==mxConstants.MILLIMETERS?2:1));m=null;c=f?Math.min(d+(b?c.height:c.width),b?t.height:t.width):b?t.height:t.width;if(f)if(u.fillStyle=l.outBkgClr,b){var y=d-e;0<y&&u.fillRect(0,e,e,y);c<t.height&&u.fillRect(0,c,e,t.height)}else y=d-e,0<y&&u.fillRect(e,0,y,e),c<t.width&&u.fillRect(c,0,t.width,e);u.fillStyle=l.fontClr;for(f=f?d:d%(x*a);f<=c;f+=x*a)if(y=Math.round((f-d)/a/x),!(f<e||y==m)){m=y;var B=null;0==y%p&&(B=k.formatText(g+y*x)+"");b?v(e-n[Math.abs(y)%p],f,e,f,
+B):v(f,e-n[Math.abs(y)%p],f,e,B)}u.lineWidth=1;v(b?0:e,b?e:0,e,e);u.fillStyle=l.cornerClr;u.fillRect(0,0,e,e)},x=-1,B=function(){null!=m?(null!=n&&n(x),x=m(y)):y()};this.drawRuler=B;this.sizeListener=d=f(function(){var a=q.container;b?(a=a.offsetHeight+e,t.height!=a&&(t.height=a,p.style.height=a+"px",B())):(a=a.offsetWidth+e,t.width!=a&&(t.width=a,p.style.width=a+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=f(function(){var a=b?q.container.scrollTop:q.container.scrollLeft;
+k.lastScroll!=a&&(k.lastScroll=a,B())},10);this.unitListener=function(a,b){k.setUnit(b.getProperty("unit"))};q.addListener(mxEvent.SIZE,d);q.container.addEventListener("scroll",c);q.view.addListener("unitChanged",this.unitListener);a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){l=a;p.style.background=l.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=
+function(a,c,d,f){var g;if(b&&4<a.height||!b&&4<a.width){if(null!=k.guidePart)try{u.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),u.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),u.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(L){}g=k.origGuideMove.apply(this,arguments);try{var m,n,p,q,t,x,z,y,A;u.lineWidth=.5;u.strokeStyle=l.guideClr;u.setLineDash([2]);b?(n=a.y+g.y+e-this.graph.container.scrollTop,m=0,t=n+a.height/2,q=e/2,y=n+a.height,
+z=0,p=u.getImageData(m,n-1,e,3),v(m,n,e,n),n--,x=u.getImageData(q,t-1,e,3),v(q,t,e,t),t--,A=u.getImageData(z,y-1,e,3),v(z,y,e,y),y--):(n=0,m=a.x+g.x+e-this.graph.container.scrollLeft,t=e/2,q=m+a.width/2,y=0,z=m+a.width,p=u.getImageData(m-1,n,3,e),v(m,n,m,e),m--,x=u.getImageData(q-1,t,3,e),v(q,t,q,e),q--,A=u.getImageData(z-1,y,3,e),v(z,y,z,e),z--);if(null==k.guidePart||k.guidePart.x1!=m||k.guidePart.y1!=n)k.guidePart={imgData1:p,x1:m,y1:n,imgData2:x,x2:q,y2:t,imgData3:A,x3:z,y3:y}}catch(L){}}else g=
k.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{u.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),u.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),u.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(C){}return a}}mxRuler.prototype.RULER_THICKNESS=14;
mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
@@ -11464,8 +11465,8 @@ function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,fu
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);a.resetCurrentMenu();f.destroy()});var e=mxEvent.getClientX(d),g=mxEvent.getClientY(d);f.popup(e,g,null,d);a.setCurrentMenu(f,b)}mxEvent.consume(d)}}))});c(this.hRuler.container);c(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var b=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,g=[],f,m=[],n,e=!1,k=!0,l=[],p=!1,t=!0;this.setClosedPath=function(a){e=a};this.setAutoClose=function(a){k=a};this.setStopClickEnabled=function(a){t=a};this.setSmoothing=function(a){b=a};var u=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(c){var b=t&&0<m.length&&null!=n&&2>n.length;b||m.push.apply(m,n);n=[];m.push(null);g.push(c);c=null;b&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var b=m[0].x,d=m[0].x,f=m[0].y,l=m[0].y,n=1;n<m.length;n++)null!=m[n]&&(b=Math.max(b,m[n].x),d=Math.min(d,m[n].x),f=Math.max(f,
-m[n].y),l=Math.min(l,m[n].y));b-=d;f-=l;if(0<b&&0<f){var p=100/b,q=100/f;m.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-l)*q;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<m.length;n++){var x=m[n];if(null==x){var x=!1,v=m[v],z=m[n-1];!e&&k&&(x=v.x-z.x,z=v.y-z.y,x=Math.sqrt(x*x+z*z)<=a.tolerance);if(e||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(e||x?"<fillstroke/>":"<stroke/>");v=n+1}else t=n==v?t+('<path><move x="'+x.x.toFixed(2)+
+m[n].y),l=Math.min(l,m[n].y));b-=d;f-=l;if(0<b&&0<f){var p=100/b,q=100/f;m.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-l)*q;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<m.length;n++){var x=m[n];if(null==x){var x=!1,v=m[v],y=m[n-1];!e&&k&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(e||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(e||x?"<fillstroke/>":"<stroke/>");v=n+1}else t=n==v?t+('<path><move x="'+x.x.toFixed(2)+
'" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/t-v.x,l/t-v.y,b/t,f/t),n);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
10)}for(n=0;n<g.length;n++)g[n].parentNode.removeChild(g[n]);c=null;g=[];m=[]}u(!1)};mxEvent.addGestureListeners(d,function(b){if(p){var e=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),e=Math.max(1,e*a.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill","none");c.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");c.setAttribute("stroke-width",e);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var g=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",g=g.split(" ").map(function(a){return parseFloat(a)*e}).join(" ");c.setAttribute("stroke-dasharray",g)}l=[];g=v(b);z(g);f="M"+g.x+" "+g.y;m.push(g);n=[];c.setAttribute("d",f);d.appendChild(c);mxEvent.consume(b)}},function(a){if(c){z(v(a));var b=x(0);if(b){f+=" L"+b.x+" "+b.y;m.push(b);var d="";n=[];for(var e=2;e<l.length;e+=2)b=x(e),d+=" L"+b.x+" "+b.y,n.push(b);c.setAttribute("d",f+d)}mxEvent.consume(a)}},q);var v=function(b){return mxUtils.convertPoint(a.container,
-mxEvent.getClientX(b),mxEvent.getClientY(b))},z=function(a){for(l.push(a);l.length>b;)l.shift()},x=function(a){var c=l.length;if(1===c%2||c>=b){var d=0,e=0,f,g=0;for(f=a;f<c;f++)g++,a=l[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",g=g.split(" ").map(function(a){return parseFloat(a)*e}).join(" ");c.setAttribute("stroke-dasharray",g)}l=[];g=v(b);y(g);f="M"+g.x+" "+g.y;m.push(g);n=[];c.setAttribute("d",f);d.appendChild(c);mxEvent.consume(b)}},function(a){if(c){y(v(a));var b=x(0);if(b){f+=" L"+b.x+" "+b.y;m.push(b);var d="";n=[];for(var e=2;e<l.length;e+=2)b=x(e),d+=" L"+b.x+" "+b.y,n.push(b);c.setAttribute("d",f+d)}mxEvent.consume(a)}},q);var v=function(b){return mxUtils.convertPoint(a.container,
+mxEvent.getClientX(b),mxEvent.getClientY(b))},y=function(a){for(l.push(a);l.length>b;)l.shift()},x=function(a){var c=l.length;if(1===c%2||c>=b){var d=0,e=0,f,g=0;for(f=a;f<c;f++)g++,a=l[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 453c20ab..5e83efb2 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -5742,31 +5742,65 @@ App.prototype.updateButtonContainer = function()
App.prototype.fetchAndShowNotification = function(target)
{
+ if (this.fetchingNotif)
+ {
+ return;
+ }
+
target = target || 'online';
+ var cachedNotifKey = '.notifCache';
+ var cachedNotif = null;
- mxUtils.get(NOTIFICATIONS_URL + '?target=' + target, mxUtils.bind(this, function(req)
+ var processNotif = mxUtils.bind(this, function(notifs)
{
- if (req.getStatus() >= 200 && req.getStatus() <= 299)
+ notifs = notifs.filter(function(notif)
{
- var notifs = JSON.parse(req.getText());
-
- //Process and sort
- var lsReadFlag = target + 'NotifReadTS';
- var lastRead = parseInt(localStorage.getItem(lsReadFlag));
-
- for (var i = 0; i < notifs.length; i++)
+ return !notif.targets || notif.targets.indexOf(target) > -1;
+ });
+
+ var lsReadFlag = target + 'NotifReadTS';
+ var lastRead = parseInt(localStorage.getItem(lsReadFlag));
+
+ for (var i = 0; i < notifs.length; i++)
+ {
+ notifs[i].isNew = (!lastRead || notifs[i].timestamp > lastRead);
+ }
+
+ this.showNotification(notifs, lsReadFlag);
+ });
+
+ try
+ {
+ cachedNotif = JSON.parse(localStorage.getItem(cachedNotifKey));
+ }
+ catch(e) {} //Ignore
+
+ if (cachedNotif == null || cachedNotif.ts + 24 * 60 * 60 * 1000 < Date.now()) //Cache for one day
+ {
+ this.fetchingNotif = true;
+ //Fetch all notifications and store them, then filter client-side
+ mxUtils.get(NOTIFICATIONS_URL, mxUtils.bind(this, function(req)
+ {
+ if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
- notifs[i].isNew = (!lastRead || notifs[i].timestamp > lastRead);
+ var notifs = JSON.parse(req.getText());
+
+ //Process and sort
+ notifs.sort(function(a, b)
+ {
+ return b.timestamp - a.timestamp;
+ });
+
+ localStorage.setItem(cachedNotifKey, JSON.stringify({ts: Date.now(), notifs: notifs}));
+ this.fetchingNotif = false;
+ processNotif(notifs);
}
-
- notifs.sort(function(a, b)
- {
- return b.timestamp - a.timestamp;
- });
-
- this.showNotification(notifs, lsReadFlag);
- }
- }));
+ }));
+ }
+ else
+ {
+ processNotif(cachedNotif.notifs);
+ }
};
App.prototype.showNotification = function(notifs, lsReadFlag)
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 21d53203..39b0f1c8 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -3202,7 +3202,7 @@ this.container=e};var L=ChangePageSetup.prototype.execute;ChangePageSetup.protot
(this.page.viewState.shadowVisible=this.shadowVisible)):(L.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var O=document.createElement("canvas"),F=new Image;
F.onload=function(){try{O.getContext("2d").drawImage(F,0,0);var a=O.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};F.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.5.0";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.5.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,e,l,p,t){p=null!=p?p:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index ac3e817a..28471d3e 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -3202,7 +3202,7 @@ this.container=e};var L=ChangePageSetup.prototype.execute;ChangePageSetup.protot
(this.page.viewState.shadowVisible=this.shadowVisible)):(L.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var O=document.createElement("canvas"),F=new Image;
F.onload=function(){try{O.getContext("2d").drawImage(F,0,0);var a=O.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};F.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.5.0";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.5.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,e,l,p,t){p=null!=p?p:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 5e0472a2..6e7be2fe 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"14.5.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"14.5.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
diff --git a/src/main/webapp/package.json b/src/main/webapp/package.json
index cf143430..447e569d 100644
--- a/src/main/webapp/package.json
+++ b/src/main/webapp/package.json
@@ -1,6 +1,6 @@
{
"name": "draw.io",
- "version": "14.1.3",
+ "version": "14.5.1",
"description": "diagrams.net desktop",
"main": "electron.js",
"scripts": {
@@ -23,16 +23,16 @@
},
"homepage": "https://github.com/jgraph/drawio",
"dependencies": {
- "commander": "^7.0.0",
+ "commander": "^7.2.0",
"compression": "^1.7.4",
"crc": "^3.8.0",
- "electron-log": "^4.3.0",
+ "electron-log": "^4.3.2",
"electron-progressbar": "^2.0.0",
- "electron-store": "^7.0.1",
- "electron-updater": "^4.3.5",
+ "electron-store": "^7.0.2",
+ "electron-updater": "^4.3.8",
"pdf-lib": "^1.16.0"
},
"devDependencies": {
- "electron": "^11.2.2"
+ "electron": "^12.0.1"
}
}
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 7dbf6e8c..24afe342 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
- "revision": "8b06e9a76adaba70459fa504b109d591"
+ "revision": "fa99c6885caf13e1eb4be667880731e4"
},
{
"url": "js/extensions.min.js",
@@ -58,7 +58,7 @@ if (workbox)
},
{
"url": "js/viewer-static.min.js",
- "revision": "e0c4f222b16dd71611af0d7f7d090cb9"
+ "revision": "4487db351e47e1d27262fb6c88665fd9"
},
{
"url": "connect/jira/editor-1-3-3.html",