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 <david@draw.io>2022-07-22 15:14:38 +0300
committerDavid Benson <david@draw.io>2022-07-22 15:14:38 +0300
commitcd024abfc10ecc63d0bb5c5325676a28a9cbd814 (patch)
tree84f78a61f9df30934ad611a6798cbf065e4ac6e8
parentbcea8f7db437b5d1f762ee8fa2e6a4f320bbc871 (diff)
20.2.0 releasev20.2.0
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js1541
-rw-r--r--src/main/webapp/js/diagramly/DrawioFileSync.js34
-rw-r--r--src/main/webapp/js/diagramly/Editor.js2
-rw-r--r--src/main/webapp/js/diagramly/P2PCollab.js364
-rw-r--r--src/main/webapp/js/integrate.min.js12
-rw-r--r--src/main/webapp/js/viewer-static.min.js6
-rw-r--r--src/main/webapp/js/viewer.min.js6
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
12 files changed, 1018 insertions, 959 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d359bae..ec4568d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+22-JUL-2022: 20.2.0
+
+- Changes real-time collaboration CF worker to use the same DO for multiple files
+
21-JUL-2022: 20.1.4
- Fixes dark mode switch overlaps embed buttons
diff --git a/VERSION b/VERSION
index bc2184a2..aef988c9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20.1.4 \ No newline at end of file
+20.2.0 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 1d338867..dcf0e0bd 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -470,7 +470,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"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]"!==
@@ -10968,8 +10968,8 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,d,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[l]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=l?this.mergeFile(l,b,d,c):this.reloadFile(b,
d))}catch(m){null!=d&&d(m)}}),d))};
DrawioFile.prototype.mergeFile=function(b,d,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),x=b.getShadowPages();if(null!=x&&0<x.length){var z=[this.ui.diffPages(null!=c?c:m,x)],C=this.ignorePatches(z);this.setShadowPages(x);if(C)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",C);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};C={};var e=this.ui.patchPages(m,z[0]),g=this.ui.getHashValueForPages(e,
-c),k=this.ui.getHashValueForPages(x,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",z,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.compressReportData(this.getAnonymizedXmlForPages(e)),p=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(f,z,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+q,null,"mergeFile");return}if(null!=this.sync){var E=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||z.push(E)}this.patch(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+c),k=this.ui.getHashValueForPages(x,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",z,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(x)),t=this.compressReportData(this.getAnonymizedXmlForPages(e)),p=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(f,z,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+t,null,"mergeFile");return}if(null!=this.sync){var E=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||z.push(E)}this.patch(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(J);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var y=this.getCurrentUser(),B=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,J)}}catch(N){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),f=d.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=d.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,d,f){d=null!=d?d:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
@@ -11042,8 +11042,8 @@ DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.proto
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,f){this.saveAs(this.title,d,f)};LocalFile.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};LocalFile.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
LocalFile.prototype.saveFile=function(b,d,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var x=this.getData(),z=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),C=mxUtils.bind(this,function(e){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,
-function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);this.desc.lastModified==q.lastModified?n.write(m?this.ui.base64ToBlob(e,"image/png"):e).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var A=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(x,A,z,g);this.removeDraft()}catch(E){g(E)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;g(q)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(e,b,m?"image/png":"text/xml",m);else if(e.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
+function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);this.desc.lastModified==t.lastModified?n.write(m?this.ui.base64ToBlob(e,"image/png"):e).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var A=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(x,A,z,g);this.removeDraft()}catch(E){g(E)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;g(t)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(e,b,m?"image/png":"text/xml",m);else if(e.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(e)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(e)}));z()}});m?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(e){C(e)}),c,this.ui.getCurrentFile()!=this?x:null,d.scale,d.border)):C(x)};
LocalFile.prototype.rename=function(b,d,f){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,d,f){LocalFile.call(this,b,d,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,d,f){DrawioFile.call(this,b,d);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,d,f){this.saveAs(this.getTitle(),d,f)};StorageFile.prototype.saveAs=function(b,d,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,d,f)};
@@ -11059,8 +11059,8 @@ StorageFile.listFiles=function(b,d,f,c){b.getDatabaseItems(function(l){var m=[];
StorageLibrary.prototype.isRenamable=function(b,d,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,d,f){DrawioFile.call(this,b,d);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,d,f){RemoteFile.call(this,b,d,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,d,f){};
RemoteLibrary.prototype.saveAs=function(b,d,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,d,f){StorageFile.call(this,b,d,f);b=f;d=b.lastIndexOf("/");0<=d&&(b=b.substring(d+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,d,f){return!1};UrlLibrary.prototype.saveAs=function(b,d,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,d,f){DrawioFile.call(this,b,d);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,d,f){function c(k,n,q,p,A,E){function y(){mxEvent.addListener(B,"click",null!=E?E:function(){q!=App.MODE_GOOGLE||b.isDriveDomain()?q==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);d()})):q==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);d()}),
-function(G){b.spinner.stop();b.handleError(G)}):(b.setMode(q,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}z++;++x>f&&(mxUtils.br(C),x=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height=
+var StorageDialog=function(b,d,f){function c(k,n,t,p,A,E){function y(){mxEvent.addListener(B,"click",null!=E?E:function(){t!=App.MODE_GOOGLE||b.isDriveDomain()?t==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(t,!0);d()})):t==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(t,!0);d()}),
+function(G){b.spinner.stop();b.handleError(G)}):(b.setMode(t,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}z++;++x>f&&(mxUtils.br(C),x=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height=
"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",n);var J=document.createElement("div");J.style.textOverflow="ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,n);B.appendChild(J);if(null!=k){var N=document.createElement("img");N.setAttribute("src",k);N.setAttribute("border","0");N.setAttribute("align","absmiddle");N.style.width="60px";N.style.height="60px";N.style.paddingBottom="6px";B.appendChild(N)}else J.style.paddingTop=
"5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=A)for(k=0;k<A.length;k++)mxUtils.br(J),mxUtils.write(J,A[k]);if(null!=p&&null==b[p]){N.style.visibility="hidden";mxUtils.setOpacity(J,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(B);
var u=window.setTimeout(function(){null==b[p]&&(v.stop(),B.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(G,I){null!=b[p]&&I.getProperty("client")==b[p]&&(window.clearTimeout(u),mxUtils.setOpacity(J,100),N.style.visibility="",v.stop(),y(),"drive"==p&&null!=e.parentNode&&e.parentNode.removeChild(e))}))}else y();C.appendChild(B)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom=
@@ -11075,30 +11075,30 @@ b.addLanguageMenu(d,!0);null!=f&&(f.style.bottom="19px")}var c=document.createEl
z=document.createElement("tbody"),C=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");x.setAttribute("align","center");e.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);g.style.textAlign="left";g.appendChild(c);C.appendChild(e);C.appendChild(g);z.appendChild(C);x.appendChild(z);d.appendChild(x);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});d.appendChild(f)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize=
"18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});l.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(q){m.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){q()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)x=document.createElement("option"),mxUtils.write(x,k[f].displayName),x.value=f,n.appendChild(x),
-x=document.createElement("option"),x.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(x,"<"+k[f].email+">"),x.setAttribute("disabled","disabled"),n.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=k.length;n.appendChild(x);mxEvent.addListener(n,"change",function(){var q=n.value,p=k.length!=q;p&&b.drive.setUser(k[q]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(t){m.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){t()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)x=document.createElement("option"),mxUtils.write(x,k[f].displayName),x.value=f,n.appendChild(x),
+x=document.createElement("option"),x.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(x,"<"+k[f].email+">"),x.setAttribute("disabled","disabled"),n.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=k.length;n.appendChild(x);mxEvent.addListener(n,"change",function(){var t=n.value,p=k.length!=t;p&&b.drive.setUser(k[t]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
b.showSplash()})},!0)});l.appendChild(n)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});d.appendChild(l);this.container=d},EmbedDialog=function(b,d,f,c,l,m,x,z,C){x=null!=x?x:"Check out the diagram I made using @drawio";c=document.createElement("div");var e=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>d.length?e?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(d.length));c.appendChild(m);var g=document.createElement("textarea");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.marginTop="10px";g.style.resize="none";g.style.height="150px";g.style.width="440px";g.style.border=
"1px solid gray";g.value=mxResources.get("updatingDocument");c.appendChild(g);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>d.length?(g.value=d,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)):(g.setAttribute("readonly","true"),g.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var k=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!e||navigator.standalone||!(e||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=z?z:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var q=5E5>d.length?g.value:d;if(null!=l)l(q);else if(e)try{var p=b.openLink(q);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=q.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(E){}}),
+mxClient.IS_CHROMEAPP&&!e||navigator.standalone||!(e||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=z?z:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var t=5E5>d.length?g.value:d;if(null!=l)l(t);else if(e)try{var p=b.openLink(t);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=t.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(E){}}),
f||500)}catch(E){b.handleError({message:E.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",m.appendChild(k));if(!e||7500<d.length)z=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=C?C:"embed.txt","txt",d,"text/plain")}),z.className="geBtn",m.appendChild(z);if(e&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var n=mxUtils.button("",function(){try{var q="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});z=document.createElement("img");z.setAttribute("src",Editor.facebookImage);z.setAttribute("width","18");z.setAttribute("height",
-"18");z.setAttribute("border","0");n.appendChild(z);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>d.length&&(n=mxUtils.button("",function(){try{var q="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
-z=document.createElement("img"),z.setAttribute("src",Editor.tweetImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",n.appendChild(z),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>d.length&&(n=mxUtils.button("",function(){try{var q="mailto:?subject="+encodeURIComponent(C||
-b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),z=document.createElement("img"),z.className="geAdaptiveAsset",z.setAttribute("src",Editor.mailImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",n.appendChild(z),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n));
+b.saveData(null!=C?C:"embed.txt","txt",d,"text/plain")}),z.className="geBtn",m.appendChild(z);if(e&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var n=mxUtils.button("",function(){try{var t="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(t)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});z=document.createElement("img");z.setAttribute("src",Editor.facebookImage);z.setAttribute("width","18");z.setAttribute("height",
+"18");z.setAttribute("border","0");n.appendChild(z);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>d.length&&(n=mxUtils.button("",function(){try{var t="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(g.value);b.openLink(t)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
+z=document.createElement("img"),z.setAttribute("src",Editor.tweetImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",n.appendChild(z),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>d.length&&(n=mxUtils.button("",function(){try{var t="mailto:?subject="+encodeURIComponent(C||
+b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(t)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),z=document.createElement("img"),z.className="geAdaptiveAsset",z.setAttribute("src",Editor.mailImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",n.appendChild(z),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n));
z=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(z);n=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?z.className="geBtn gePrimaryBtn":(m.appendChild(n),n.className="geBtn gePrimaryBtn",z.className="geBtn"):(m.appendChild(k),
z.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,d){function f(){var G=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;if(N.checked&&""!=n.value){var I="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=G&&(I+="&title="+encodeURIComponent(G));0<v.length&&(I+="&s="+v);""!=q.value&&"0"!=q.value&&(I+="&border="+q.value);""!=k.value&&(I+="&height="+k.value);I+="&pan="+(p.checked?"1":"0");I+="&zoom="+(A.checked?"1":"0");I+="&fit="+(J.checked?"1":"0");
+var GoogleSitesDialog=function(b,d){function f(){var G=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;if(N.checked&&""!=n.value){var I="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=G&&(I+="&title="+encodeURIComponent(G));0<v.length&&(I+="&s="+v);""!=t.value&&"0"!=t.value&&(I+="&border="+t.value);""!=k.value&&(I+="&height="+k.value);I+="&pan="+(p.checked?"1":"0");I+="&zoom="+(A.checked?"1":"0");I+="&fit="+(J.checked?"1":"0");
I+="&resize="+(B.checked?"1":"0");I+="&x0="+Number(g.value);I+="&y0="+C;l.mathEnabled&&(I+="&math=1");y.checked?I+="&edit=_blank":E.checked&&(I+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));e.value=I}else u.constructor==DriveFile||u.constructor==DropboxFile?(I="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=n.value?I+=encodeURIComponent(mxUtils.htmlEntities(n.value))+"&type=3":(I+=u.getHash().substring(1),I=u.constructor==DropboxFile?I+"&type=2":I+"&type=1"),null!=
G&&(I+="&title="+encodeURIComponent(G)),""!=k.value&&(G=parseInt(k.value)+parseInt(g.value),I+="&height="+G),e.value=I):e.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),x=l.view.scale,z=Math.floor(m.x/x-l.view.translate.x),C=Math.floor(m.y/x-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.marginTop="2px";e.style.width="410px";
c.appendChild(e);mxUtils.br(c);this.init=function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=z;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type","text");
k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(m.height/x);c.appendChild(k);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","28");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";n.value=d||"";c.appendChild(n);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";c.appendChild(q);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input");
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";c.appendChild(t);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input");
A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("zoom")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";E.setAttribute("title",window.location.href);c.appendChild(E);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);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 J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginLeft=
-"8px";c.appendChild(N);mxUtils.write(c,mxResources.get("embed")+" ");var v=b.getBasenames().join(";"),u=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(N,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(n,"change",f);f();
+"8px";c.appendChild(N);mxUtils.write(c,mxResources.get("embed")+" ");var v=b.getBasenames().join(";"),u=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(N,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(n,"change",f);f();
mxEvent.addListener(e,"click",function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)});d=document.createElement("div");d.style.paddingTop="12px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";d.appendChild(m);c.appendChild(d);this.container=c},CreateGraphDialog=function(b,d,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var m=new Graph(l);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var x="curved=1;";m.cellRenderer.installCellOverlayListeners=
function(A,E,y){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(y.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(y.node,"touchstart",function(B){E.fireEvent(new mxEventObject("pointerdown","event",B,"state",A))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
@@ -11106,27 +11106,27 @@ function(A,E,y){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,
m.insertEdge(z,null,"",A,N,x)},function(){m.scrollCellToVisible(N)})});E.addListener("pointerdown",function(y,B){y=B.getProperty("event");B=B.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var J=mxUtils.convertPoint(m.container,mxEvent.getClientX(y),mxEvent.getClientY(y));m.connectionHandler.start(B,J.x,J.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(y);mxEvent.consume(y)});m.addCellOverlay(A,E)});m.getModel().beginUpdate();try{var e=m.insertVertex(z,null,"Start",
0,0,80,30,"ellipse");C(e)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var g=new mxCompactTreeLayout(m);g.edgeRouting=!1;g.levelDistance=30;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(g=new mxCompactTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=30,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(g=new mxRadialTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"organic"==f?(g=new mxFastOrganicLayout(m,!1),g.forceConstant=80):"circle"==f&&(g=new mxCircleLayout(m));if(null!=g){var k=function(A,E){m.getModel().beginUpdate();try{null!=A&&A(),g.execute(m.getDefaultParent(),e)}catch(y){throw y;}finally{A=new mxMorphing(m),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=E&&E()})),A.startAnimation()}},n=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(A,E,y,B,J){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&c.appendChild(q);var p=mxUtils.button(mxResources.get("insert"),function(A){m.clearCellOverlays();
+function(A,E,y,B,J){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var t=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});t.className="geBtn";b.editor.cancelFirst&&c.appendChild(t);var p=mxUtils.button(mxResources.get("insert"),function(A){m.clearCellOverlays();
var E=m.getModel().getChildren(m.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(E,!0));E=b.editor.graph.importCells(E,A.x,A.y);A=b.editor.graph.view;var y=A.getBounds(E);y.x-=A.translate.x;y.y-=A.translate.y;b.editor.graph.scrollRectToVisible(y);b.editor.graph.setSelectionCells(E);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||c.appendChild(q)};this.container=c};
+b.editor.cancelFirst||c.appendChild(t)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geBackgroundImageDialogOption");var z=document.createElement("input");
z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value","url");z.setAttribute("type","radio");z.setAttribute("name","geBackgroundImageDialogOption");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginBottom="8px";C.style.width="360px";C.value=m||null==f?"":f.src;var e=document.createElement("select");e.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var k=document.createElement("option");mxUtils.write(k,b.pages[g].getName()||
-mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);e.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(x.style.display="none",z.style.display="none",e.style.display="none");var n=document.createElement("option"),q=!1,p=!1,A=function(N,v){q||null!=N&&p||(z.checked?null!=v&&v(n.selected?null:
+mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);e.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(x.style.display="none",z.style.display="none",e.style.display="none");var n=document.createElement("option"),t=!1,p=!1,A=function(N,v){t||null!=N&&p||(z.checked?null!=v&&v(n.selected?null:
e.value):""==C.value||b.isOffline()?(y.value="",B.value="",null!=v&&v("")):(C.value=mxUtils.trim(C.value),b.loadImage(C.value,function(u){y.value=u.width;B.value=u.height;null!=v&&v(C.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));y.value="";B.value="";null!=v&&v(null)})))},E=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(v,u,G,I,M,K){C.value=v;A();C.focus()},function(){},function(v){return"image/"==v.type.substring(0,
6)},function(v){for(var u=0;u<v.length;u++)v[u]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?e.focus():C.focus();mxEvent.addListener(e,"focus",function(){x.removeAttribute("checked");z.setAttribute("checked","checked");z.checked=!0});mxEvent.addListener(C,"focus",function(){z.removeAttribute("checked");x.setAttribute("checked","checked");x.checked=!0});if(Graph.fileSupport){C.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=c.parentNode,v=null;mxEvent.addListener(N,
"dragleave",function(u){null!=v&&(v.parentNode.removeChild(v),v=null);u.stopPropagation();u.preventDefault()});mxEvent.addListener(N,"dragover",mxUtils.bind(this,function(u){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=b.highlightElement(N));u.stopPropagation();u.preventDefault()}));mxEvent.addListener(N,"drop",mxUtils.bind(this,function(u){null!=v&&(v.parentNode.removeChild(v),v=null);if(0<u.dataTransfer.files.length)E(u.dataTransfer.files);else if(0<=mxUtils.indexOf(u.dataTransfer.types,
"text/uri-list")){var G=u.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(G)&&(C.value=decodeURIComponent(G),A())}u.stopPropagation();u.preventDefault()}),!1)}};c.appendChild(x);c.appendChild(C);mxUtils.br(c);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";
y.value=null==f||m?"":f.width;c.appendChild(y);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==f||m?"":f.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(C,"change",A);ImageDialog.filePicked=function(N){N.action==google.picker.Action.PICKED&&null!=N.docs[0].thumbnails&&(N=N.docs[0].thumbnails[N.docs[0].thumbnails.length-1],
null!=N&&(C.value=N.url,A()));C.focus()};c.appendChild(z);c.appendChild(e);mxUtils.br(c);m?(z.setAttribute("checked","checked"),z.checked=!0):(x.setAttribute("checked","checked"),x.checked=!0);!l&&z.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),e.appendChild(n),mxEvent.addListener(e,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));f=document.createElement("div");
-f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){q=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){C.value="";y.value="";B.value="";x.checked=!0;q=!1});mxEvent.addGestureListeners(g,function(){q=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type",
+f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){C.value="";y.value="";B.value="";x.checked=!0;t=!1});mxEvent.addGestureListeners(g,function(){t=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type",
"file");mxEvent.addListener(J,"change",function(N){null!=J.files&&(E(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";c.appendChild(J);g=mxUtils.button(mxResources.get("open"),function(){J.click()});g.className="geBtn";f.appendChild(g)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(N){d(""!=N&&null!=N?new mxImage(N,y.value,B.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn";
-f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,d,f){function c(q,p,A){var E=q.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var y=function(U,T,V,W,t){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,t));var D=null;B.getModel().beginUpdate();try{D="txt"==T?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y,
-W,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:U,format:T},null,2))}finally{B.getModel().endUpdate()}null!=D&&(B.setSelectionCell(D),B.scrollCellToVisible(D))},B=b.editor.graph,J="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-q&&"svg"==J?window.setTimeout(function(){b.spinner.stop();y(q,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(q,J,function(U,T,V){b.spinner.stop();y(q,J,U,T,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(q,J,function(U,T,V){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,T,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,T,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:q,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var N=[],v=0,u={},G=0;G<E.length;G++){var I=mxUtils.trim(E[G]);if("primary key"==I.substring(0,11).toLowerCase()){var M=I.match(/\((.+)\)/);M&&M[1]&&(u[M[1]]=!0);E.splice(G,1)}else 0<I.toLowerCase().indexOf("primary key")&&(u[I.split(" ")[0]]=
+f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,d,f){function c(t,p,A){var E=t.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var y=function(U,T,V,W,q){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,q));var D=null;B.getModel().beginUpdate();try{D="txt"==T?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y,
+W,q,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:U,format:T},null,2))}finally{B.getModel().endUpdate()}null!=D&&(B.setSelectionCell(D),B.scrollCellToVisible(D))},B=b.editor.graph,J="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+t&&"svg"==J?window.setTimeout(function(){b.spinner.stop();y(t,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(t,J,function(U,T,V){b.spinner.stop();y(t,J,U,T,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(t,J,function(U,T,V){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,T,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,T,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:t,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var N=[],v=0,u={},G=0;G<E.length;G++){var I=mxUtils.trim(E[G]);if("primary key"==I.substring(0,11).toLowerCase()){var M=I.match(/\((.+)\)/);M&&M[1]&&(u[M[1]]=!0);E.splice(G,1)}else 0<I.toLowerCase().indexOf("primary key")&&(u[I.split(" ")[0]]=
!0,E[G]=mxUtils.trim(I.replace(/primary key/i,"")))}for(G=0;G<E.length;G++)if(I=mxUtils.trim(E[G]),"create table"==I.substring(0,12).toLowerCase())I=mxUtils.trim(I.substring(12)),"("==I.charAt(I.length-1)&&(I=mxUtils.trim(I.substring(0,I.length-1))),p=new mxCell(I,new mxGeometry(v,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,N.push(p),I=b.editor.graph.getPreferredSizeForCell(K),null!=
I&&(p.geometry.width=I.width+10);else if(null!=p&&")"==I.charAt(0))v+=p.geometry.width+40,p=null;else if("("!=I&&null!=p){I=I.substring(0,","==I.charAt(I.length-1)?I.length-1:I.length);M=u[I.split(" ")[0]];var K=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");K.vertex=!0;var H=new mxCell(M?"PK":"",
new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));H.vertex=!0;K.insert(H);I=new mxCell(I,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));I.vertex=!0;K.insert(I);I=b.editor.graph.getPreferredSizeForCell(I);null!=I&&p.geometry.width<I.width+30&&(p.geometry.width=Math.min(320,
@@ -11143,55 +11143,55 @@ m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",I))}
f&&(z.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","mermaid");mxUtils.write(C,mxResources.get("formatSql"));"mermaid"==f&&(z.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","diagram");mxUtils.write(C,mxResources.get("diagram"));var e=document.createElement("option");e.setAttribute("value","circle");mxUtils.write(e,mxResources.get("circle"));var g=document.createElement("option");
g.setAttribute("value","horizontalFlow");mxUtils.write(g,mxResources.get("horizontalFlow"));var k=document.createElement("option");k.setAttribute("value","verticalFlow");mxUtils.write(k,mxResources.get("verticalFlow"));"plantUml"!=f&&(z.appendChild(C),z.appendChild(e),z.appendChild(g),z.appendChild(k));C=document.createElement("option");C.setAttribute("value","plantUmlSvg");mxUtils.write(C,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&C.setAttribute("selected",
"selected");e=document.createElement("option");e.setAttribute("value","plantUmlPng");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(z.appendChild(C),z.appendChild(e),z.appendChild(g));var n=l();x.value=n;d.appendChild(x);this.init=function(){x.focus()};
-Graph.fileSupport&&(x.addEventListener("dragover",function(q){q.stopPropagation();q.preventDefault()},!1),x.addEventListener("drop",function(q){q.stopPropagation();q.preventDefault();if(0<q.dataTransfer.files.length){q=q.dataTransfer.files[0];var p=new FileReader;p.onload=function(A){x.value=A.target.result};p.readAsText(q)}},!1));d.appendChild(z);mxEvent.addListener(z,"change",function(){var q=l();if(0==x.value.length||x.value==n)n=q,x.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(C=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),C.className="geBtn",d.appendChild(C));C=mxUtils.button(mxResources.get("close"),function(){x.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});C.className="geBtn";b.editor.cancelFirst&&d.appendChild(C);e=mxUtils.button(mxResources.get("insert"),function(q){b.hideDialog();c(x.value,z.value,q)});d.appendChild(e);e.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-d.appendChild(C);this.container=d},NewDialog=function(b,d,f,c,l,m,x,z,C,e,g,k,n,q,p,A,E,y){function B(ja){null!=ja&&(Fa=Ga=ja?135:140);ja=!0;if(null!=wa)for(;F<wa.length&&(ja||0!=mxUtils.mod(F,30));){var va=wa[F++];va=v(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs);ja&&va.click();ja=!1}}function J(){if(aa&&null!=q)f||b.hideDialog(),q(aa,Z,H.value);else if(c)f||b.hideDialog(),c(S,H.value,Y,O);else{var ja=H.value;null!=ja&&
-0<ja.length&&b.pickFolder(b.mode,function(va){b.createFile(ja,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,va,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ja,va,ta,da,ba,na,ea){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");S=va;O=ta;Q=na;X=ja;aa=da;Y=ea;Z=ba;X.style.backgroundColor=z;X.style.border=C}function v(ja,va,ta,da,ba,na,ea,ia,
+Graph.fileSupport&&(x.addEventListener("dragover",function(t){t.stopPropagation();t.preventDefault()},!1),x.addEventListener("drop",function(t){t.stopPropagation();t.preventDefault();if(0<t.dataTransfer.files.length){t=t.dataTransfer.files[0];var p=new FileReader;p.onload=function(A){x.value=A.target.result};p.readAsText(t)}},!1));d.appendChild(z);mxEvent.addListener(z,"change",function(){var t=l();if(0==x.value.length||x.value==n)n=t,x.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(C=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),C.className="geBtn",d.appendChild(C));C=mxUtils.button(mxResources.get("close"),function(){x.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});C.className="geBtn";b.editor.cancelFirst&&d.appendChild(C);e=mxUtils.button(mxResources.get("insert"),function(t){b.hideDialog();c(x.value,z.value,t)});d.appendChild(e);e.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+d.appendChild(C);this.container=d},NewDialog=function(b,d,f,c,l,m,x,z,C,e,g,k,n,t,p,A,E,y){function B(ja){null!=ja&&(Fa=Ga=ja?135:140);ja=!0;if(null!=wa)for(;F<wa.length&&(ja||0!=mxUtils.mod(F,30));){var va=wa[F++];va=v(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs);ja&&va.click();ja=!1}}function J(){if(aa&&null!=t)f||b.hideDialog(),t(aa,Z,H.value);else if(c)f||b.hideDialog(),c(S,H.value,Y,O);else{var ja=H.value;null!=ja&&
+0<ja.length&&b.pickFolder(b.mode,function(va){b.createFile(ja,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,va,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ja,va,ta,da,ca,na,ea){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");S=va;O=ta;Q=na;X=ja;aa=da;Y=ea;Z=ca;X.style.backgroundColor=z;X.style.border=C}function v(ja,va,ta,da,ca,na,ea,ia,
oa,ma,xa){function Ea(La,Ta){null==Ja?(Na=La,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ja=Va.getText());Ta(Ja,Na)}))):Ta(Ja,Na)}function Ba(La,Ta,Va){if(null!=La&&mxUtils.isAncestorNode(document.body,sa)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Wa=new mxCodec(La.ownerDocument),$a=new mxGraphModel;
Wa.decode(La,$a);La=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ta?mxResources.get(ta,null,ta):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;N(sa,null,null,ja,ea,xa)},!0,!1)}}function ua(La,Ta){null==ja||Ra||
b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ka?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ka.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ka.naturalWidth+'" height="'+Ka.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Ba(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
sa,Ra=!0,Ea(ja,function(Va){Ra&&b.sidebar.currentElt==sa&&Ba(Va,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=Fa+"px";sa.style.width=Ga+"px";var Ja=null,Na=ja;null!=ta?sa.setAttribute("title",mxResources.get(ta,null,ta)):null!=da&&0<da.length&&sa.setAttribute("title",da);var Ra=!1,Ka=null;if(null!=na){sa.style.display="inline-flex";sa.style.justifyContent="center";
-sa.style.alignItems="center";ba=document.createElement("img");ba.setAttribute("src",na);ba.setAttribute("alt",da);ba.style.maxWidth=Fa+"px";ba.style.maxHeight=Ga+"px";Ka=ba;var Pa=na.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(ba);ba.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){N(sa,null,null,ja,ea,xa)}),null,null);mxEvent.addListener(sa,"dblclick",function(La){J();
-mxEvent.consume(La)})}else if(!ma&&null!=ja&&0<ja.length){var Qa=function(La){U.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";P.spin(ca);Ea(ja,function(Ta,Va){P.stop();null!=Ta&&(N(sa,Ta,va,null,null,xa,Va),La&&J())})};ba=oa||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";sa.style.backgroundImage="url("+ba+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ta){da=document.createElement("table");
+sa.style.alignItems="center";ca=document.createElement("img");ca.setAttribute("src",na);ca.setAttribute("alt",da);ca.style.maxWidth=Fa+"px";ca.style.maxHeight=Ga+"px";Ka=ca;var Pa=na.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(ca);ca.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){N(sa,null,null,ja,ea,xa)}),null,null);mxEvent.addListener(sa,"dblclick",function(La){J();
+mxEvent.consume(La)})}else if(!ma&&null!=ja&&0<ja.length){var Qa=function(La){U.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";P.spin(ba);Ea(ja,function(Ta,Va){P.stop();null!=Ta&&(N(sa,Ta,va,null,null,xa,Va),La&&J())})};ca=oa||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";sa.style.backgroundImage="url("+ca+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ta){da=document.createElement("table");
da.setAttribute("width","100%");da.setAttribute("height","100%");da.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";da.style.lineHeight="1.3em";da.style.border="inherit";na=document.createElement("tbody");oa=document.createElement("tr");ma=document.createElement("td");ma.setAttribute("align","center");ma.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";Oa.style.userSelect="none";Oa.style.borderRadius=
"3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Fa-34+"px";mxUtils.write(Oa,mxResources.get(ta,null,ta));ma.appendChild(Oa);oa.appendChild(ma);na.appendChild(oa);da.appendChild(na);sa.appendChild(da)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){Qa()}),null,null);mxEvent.addListener(sa,"dblclick",function(La){Qa(!0);mxEvent.consume(La)})}else da=document.createElement("table"),da.setAttribute("width",
"100%"),da.setAttribute("height","100%"),da.style.lineHeight="1.3em",na=document.createElement("tbody"),oa=document.createElement("tr"),ma=document.createElement("td"),ma.setAttribute("align","center"),ma.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",Oa.style.maxWidth=
-Fa-34+"px",mxUtils.write(Oa,mxResources.get(ta,null,ta)),ma.appendChild(Oa),oa.appendChild(ma),na.appendChild(oa),da.appendChild(na),sa.appendChild(da),ba&&N(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){N(sa,null,null,ja,ea)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(La){N(sa,null,null,ja,ea)}),mxEvent.addListener(sa,"dblclick",function(La){J();mxEvent.consume(La)}));if(null!=ja){var Sa=document.createElement("img");Sa.setAttribute("src",
-Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(La){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(La){Ua||ua(La,Sa);mxEvent.consume(La)}))}ca.appendChild(sa);return sa}function u(){function ja(ua,
-sa){var Ja=mxResources.get(ua);null==Ja&&(Ja=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+sa.length+")"}function va(ua,sa,Ja){mxEvent.addListener(sa,"click",function(){pa!=sa&&(pa.style.backgroundColor="",pa=sa,pa.style.backgroundColor=x,ca.scrollTop=0,ca.innerText="",F=0,wa=Ja?Ma[ua][Ja]:Aa[ua],V=null,B(!1))})}Ca&&(Ca=!1,mxEvent.addListener(ca,"scroll",function(ua){ca.scrollTop+ca.clientHeight>=ca.scrollHeight&&(B(),mxEvent.consume(ua))}));
-if(0<Da){var ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));la.appendChild(ta);for(var da in za){var ba=document.createElement("div"),na=da;ta=za[da];18<na.length&&(na=na.substring(0,18)+"&hellip;");ba.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ba.setAttribute("title",
-na+" ("+ta.length+")");mxUtils.write(ba,ba.getAttribute("title"));null!=e&&(ba.style.padding=e);la.appendChild(ba);(function(ua,sa){mxEvent.addListener(ba,"click",function(){pa!=sa&&(pa.style.backgroundColor="",pa=sa,pa.style.backgroundColor=x,ca.scrollTop=0,ca.innerText="",F=0,wa=za[ua],V=null,B(!1))})})(da,ba)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");la.appendChild(ta)}for(da in Aa){na=
-Ma[da];var ea=ba=document.createElement(na?"ul":"div");ta=Aa[da];var ia=ja(da,ta);if(null!=na){var oa=document.createElement("li"),ma=document.createElement("div");ma.className="geTempTreeCaret";ma.setAttribute("title",ia);mxUtils.write(ma,ia);ea=ma;oa.appendChild(ma);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var xa in na){var Ea=document.createElement("li"),Ba=ja(xa,na[xa]);Ea.setAttribute("title",Ba);mxUtils.write(Ea,Ba);va(da,Ea,xa);ia.appendChild(Ea)}oa.appendChild(ia);
-ba.className="geTempTree";ba.appendChild(oa);(function(ua,sa){mxEvent.addListener(sa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,ma)}else ba.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ba.setAttribute("title",ia),mxUtils.write(ba,ia);null!=e&&(ba.style.padding=e);la.appendChild(ba);null==pa&&0<ta.length&&(pa=ba,pa.style.backgroundColor=x,wa=ta);va(da,ea)}B(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;x=null!=x?x:"#ebf2f9";z=null!=z?z:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var I=document.createElement("div");
+Fa-34+"px",mxUtils.write(Oa,mxResources.get(ta,null,ta)),ma.appendChild(Oa),oa.appendChild(ma),na.appendChild(oa),da.appendChild(na),sa.appendChild(da),ca&&N(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){N(sa,null,null,ja,ea)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(La){N(sa,null,null,ja,ea)}),mxEvent.addListener(sa,"dblclick",function(La){J();mxEvent.consume(La)}));if(null!=ja){var Sa=document.createElement("img");Sa.setAttribute("src",
+Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(La){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(La){Ua||ua(La,Sa);mxEvent.consume(La)}))}ba.appendChild(sa);return sa}function u(){function ja(ua,
+sa){var Ja=mxResources.get(ua);null==Ja&&(Ja=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+sa.length+")"}function va(ua,sa,Ja){mxEvent.addListener(sa,"click",function(){pa!=sa&&(pa.style.backgroundColor="",pa=sa,pa.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",F=0,wa=Ja?Ma[ua][Ja]:Aa[ua],V=null,B(!1))})}Ca&&(Ca=!1,mxEvent.addListener(ba,"scroll",function(ua){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(B(),mxEvent.consume(ua))}));
+if(0<Da){var ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));la.appendChild(ta);for(var da in za){var ca=document.createElement("div"),na=da;ta=za[da];18<na.length&&(na=na.substring(0,18)+"&hellip;");ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ca.setAttribute("title",
+na+" ("+ta.length+")");mxUtils.write(ca,ca.getAttribute("title"));null!=e&&(ca.style.padding=e);la.appendChild(ca);(function(ua,sa){mxEvent.addListener(ca,"click",function(){pa!=sa&&(pa.style.backgroundColor="",pa=sa,pa.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",F=0,wa=za[ua],V=null,B(!1))})})(da,ca)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");la.appendChild(ta)}for(da in Aa){na=
+Ma[da];var ea=ca=document.createElement(na?"ul":"div");ta=Aa[da];var ia=ja(da,ta);if(null!=na){var oa=document.createElement("li"),ma=document.createElement("div");ma.className="geTempTreeCaret";ma.setAttribute("title",ia);mxUtils.write(ma,ia);ea=ma;oa.appendChild(ma);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var xa in na){var Ea=document.createElement("li"),Ba=ja(xa,na[xa]);Ea.setAttribute("title",Ba);mxUtils.write(Ea,Ba);va(da,Ea,xa);ia.appendChild(Ea)}oa.appendChild(ia);
+ca.className="geTempTree";ca.appendChild(oa);(function(ua,sa){mxEvent.addListener(sa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,ma)}else ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ca.setAttribute("title",ia),mxUtils.write(ca,ia);null!=e&&(ca.style.padding=e);la.appendChild(ca);null==pa&&0<ta.length&&(pa=ca,pa.style.backgroundColor=x,wa=ta);va(da,ea)}B(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;x=null!=x?x:"#ebf2f9";z=null!=z?z:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var I=document.createElement("div");
I.style.userSelect="none";I.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";f&&I.appendChild(M);var K=document.createElement("img");K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="40px";K.style.height="40px";K.style.marginRight="10px";K.style.paddingBottom="4px";K.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";d||G||!f||M.appendChild(K);f&&mxUtils.write(M,(G?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");K=".drawio";
b.mode==App.MODE_GOOGLE&&null!=b.drive?K=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?K=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?K=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?K=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?K=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(K=b.trello.extension);var H=document.createElement("input");H.setAttribute("value",b.defaultFilename+K);H.style.marginLeft="10px";H.style.width=d||
-G?"144px":"244px";this.init=function(){f&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null));null!=ca.parentNode&&null!=ca.parentNode.parentNode&&mxEvent.addGestureListeners(ca.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};f&&(M.appendChild(H),y?H.style.width=d||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(b,H,b.editor.diagramFileTypes),y.style.marginLeft=
+G?"144px":"244px";this.init=function(){f&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};f&&(M.appendChild(H),y?H.style.width=d||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(b,H,b.editor.diagramFileTypes),y.style.marginLeft=
"6px",y.style.width=d||G?"80px":"180px",M.appendChild(y)),null!=b.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(b,H,b.editor.fileExtensions),G.style.marginTop="12px",M.appendChild(G))));M=!1;var F=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(A||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");J();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn";
-if(k||n){var T=[],V=null,W=null,t=null,D=function(ja){U.setAttribute("disabled","disabled");for(var va=0;va<T.length;va++)T[va].className=va==ja?"geBtn gePrimaryBtn":"geBtn"};M=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";I.appendChild(A);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){la.style.display="";fa.style.display="";ca.style.left="160px";D(0);ca.scrollTop=0;ca.innerText="";F=0;V!=wa&&(wa=V,Aa=W,Da=t,la.innerText="",u(),V=null)});
-T.push(G);A.appendChild(G);var L=function(ja){la.style.display="none";fa.style.display="none";ca.style.left="30px";D(ja?-1:1);null==V&&(V=wa);ca.scrollTop=0;ca.innerText="";P.spin(ca);var va=function(ta,da,ba){F=0;P.stop();wa=ta;ba=ba||{};var na=0,ea;for(ea in ba)na+=ba[ea].length;if(da)ca.innerText=da;else if(0==ta.length&&0==na)ca.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ca.innerText="",0<na){la.style.display="";ca.style.left="160px";la.innerText="";Da=0;Aa={"draw.io":ta};
-for(ea in ba)Aa[ea]=ba[ea];u()}else B(!0)};ja?n(R.value,va):k(va)};k&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),A.appendChild(G),T.push(G));if(n){G=document.createElement("span");G.style.marginLeft="10px";G.innerText=mxResources.get("search")+":";A.appendChild(G);var R=document.createElement("input");R.style.marginRight="10px";R.style.marginLeft="10px";R.style.width="220px";mxEvent.addListener(R,"keypress",function(ja){13==ja.keyCode&&L(!0)});A.appendChild(R);G=mxUtils.button(mxResources.get("search"),
-function(){L(!0)});G.className="geBtn";A.appendChild(G)}D(0)}var O=null,Q=null,S=null,X=null,aa=null,Y=null,Z=null,ca=document.createElement("div");ca.style.border="1px solid #d3d3d3";ca.style.position="absolute";ca.style.left="160px";ca.style.right="34px";A=(f?72:40)+(M?30:0);ca.style.top=A+"px";ca.style.bottom="68px";ca.style.margin="6px 0 0 -1px";ca.style.padding="6px";ca.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+
+if(k||n){var T=[],V=null,W=null,q=null,D=function(ja){U.setAttribute("disabled","disabled");for(var va=0;va<T.length;va++)T[va].className=va==ja?"geBtn gePrimaryBtn":"geBtn"};M=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";I.appendChild(A);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){la.style.display="";fa.style.display="";ba.style.left="160px";D(0);ba.scrollTop=0;ba.innerText="";F=0;V!=wa&&(wa=V,Aa=W,Da=q,la.innerText="",u(),V=null)});
+T.push(G);A.appendChild(G);var L=function(ja){la.style.display="none";fa.style.display="none";ba.style.left="30px";D(ja?-1:1);null==V&&(V=wa);ba.scrollTop=0;ba.innerText="";P.spin(ba);var va=function(ta,da,ca){F=0;P.stop();wa=ta;ca=ca||{};var na=0,ea;for(ea in ca)na+=ca[ea].length;if(da)ba.innerText=da;else if(0==ta.length&&0==na)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<na){la.style.display="";ba.style.left="160px";la.innerText="";Da=0;Aa={"draw.io":ta};
+for(ea in ca)Aa[ea]=ca[ea];u()}else B(!0)};ja?n(R.value,va):k(va)};k&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),A.appendChild(G),T.push(G));if(n){G=document.createElement("span");G.style.marginLeft="10px";G.innerText=mxResources.get("search")+":";A.appendChild(G);var R=document.createElement("input");R.style.marginRight="10px";R.style.marginLeft="10px";R.style.width="220px";mxEvent.addListener(R,"keypress",function(ja){13==ja.keyCode&&L(!0)});A.appendChild(R);G=mxUtils.button(mxResources.get("search"),
+function(){L(!0)});G.className="geBtn";A.appendChild(G)}D(0)}var O=null,Q=null,S=null,X=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";A=(f?72:40)+(M?30:0);ba.style.top=A+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+
A+"px;height:22px;margin-top: 6px;white-space: nowrap";var ka=document.createElement("input");ka.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ka.setAttribute("placeholder",mxResources.get("search"));ka.setAttribute("type","text");fa.appendChild(ka);var ha=document.createElement("img"),ra="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ha.setAttribute("src",ra);ha.setAttribute("title",mxResources.get("search"));
ha.style.position="relative";ha.style.left="-18px";ha.style.top="1px";ha.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(ha);mxEvent.addListener(ha,"click",function(){ha.getAttribute("src")==Dialog.prototype.closeImage&&(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search")),ka.value="",null!=qa&&(qa.click(),qa=null));ka.focus()});mxEvent.addListener(ka,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var va=ka.value;if(""==va)null!=qa&&(qa.click(),
-qa=null);else{if(null==NewDialog.tagsList[g]){var ta={};for(xa in Aa)for(var da=Aa[xa],ba=0;ba<da.length;ba++){var na=da[ba];if(null!=na.tags)for(var ea=na.tags.toLowerCase().split(";"),ia=0;ia<ea.length;ia++)null==ta[ea[ia]]&&(ta[ea[ia]]=[]),ta[ea[ia]].push(na)}NewDialog.tagsList[g]=ta}var oa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[g];if(0<Da&&null==ta.__tagsList__){for(xa in za)for(da=za[xa],ba=0;ba<da.length;ba++)for(na=da[ba],ea=na.title.split(" "),ea.push(xa),ia=0;ia<ea.length;ia++){var ma=
-ea[ia].toLowerCase();null==ta[ma]&&(ta[ma]=[]);ta[ma].push(na)}ta.__tagsList__=!0}var xa=[];da={};for(ba=ea=0;ba<oa.length;ba++)if(0<oa[ba].length){ma=ta[oa[ba]];var Ea={};xa=[];if(null!=ma)for(ia=0;ia<ma.length;ia++)na=ma[ia],0==ea==(null==da[na.url])&&(Ea[na.url]=!0,xa.push(na));da=Ea;ea++}ca.scrollTop=0;ca.innerText="";F=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ta,mxResources.get(0==xa.length?"noResultsFor":
-"resultsFor",[va]));ca.appendChild(ta);null!=pa&&null==qa&&(pa.style.backgroundColor="",qa=pa,pa=ta);wa=xa;V=null;B(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ka,"keyup",mxUtils.bind(this,function(ja){""==ka.value?(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search"))):(ha.setAttribute("src",Dialog.prototype.closeImage),ha.setAttribute("title",mxResources.get("reset")))}));A+=23;var la=document.createElement("div");la.style.cssText="position:absolute;left:30px;width:128px;top:"+
-A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ca,"scroll",function(){b.sidebar.hideTooltip()});var Fa=140,Ga=140,Aa={},Ma={},za={},Da=0,Ca=!0,pa=null,qa=null;Aa.basic=[{title:"blankDiagram",select:!0}];var wa=Aa.basic;if(!d){var Ha=function(){mxUtils.get(Ia,function(ja){if(!ya){ya=!0;ja=ja.getXml().documentElement.firstChild;for(var va={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var ta=ja.getAttribute("name"),da=
-ja.getElementsByTagName("add"),ba=[],na=0;na<da.length;na++)ba.push(encodeURIComponent(mxUtils.getTextContent(da[na])));null!=ta&&0<ba.length&&(va[ta]=ba.join(";"))}else if(ba=ja.getAttribute("url"),null!=ba){da=ja.getAttribute("section");ta=ja.getAttribute("subsection");if(null==da&&(na=ba.indexOf("/"),da=ba.substring(0,na),null==ta)){var ea=ba.indexOf("/",na+1);-1<ea&&(ta=ba.substring(na+1,ea))}na=Aa[da];null==na&&(na=[],Aa[da]=na);ba=ja.getAttribute("clibs");null!=va[ba]&&(ba=va[ba]);ba={url:ja.getAttribute("url"),
-libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:ba,tags:ja.getAttribute("tags")};na.push(ba);null!=ta&&(na=Ma[da],null==na&&(na={},Ma[da]=na),da=na[ta],null==da&&(da=[],na[ta]=da),da.push(ba))}ja=ja.nextSibling}P.stop();u()}})};I.appendChild(fa);I.appendChild(la);I.appendChild(ca);var ya=!1,Ia=g;/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)&&(Ia=PROXY_URL+"?url="+encodeURIComponent(Ia));
-P.spin(ca);null!=E?E(function(ja,va){za=ja;t=Da=va;Ha()},Ha):Ha();W=Aa}mxEvent.addListener(H,"keypress",function(ja){b.dialog.container.firstChild==I&&13==ja.keyCode&&J()});E=document.createElement("div");E.style.marginTop=d?"4px":"16px";E.style.textAlign="right";E.style.position="absolute";E.style.left="40px";E.style.bottom="24px";E.style.right="40px";d||b.isOffline()||!f||null!=c||l||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+qa=null);else{if(null==NewDialog.tagsList[g]){var ta={};for(xa in Aa)for(var da=Aa[xa],ca=0;ca<da.length;ca++){var na=da[ca];if(null!=na.tags)for(var ea=na.tags.toLowerCase().split(";"),ia=0;ia<ea.length;ia++)null==ta[ea[ia]]&&(ta[ea[ia]]=[]),ta[ea[ia]].push(na)}NewDialog.tagsList[g]=ta}var oa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[g];if(0<Da&&null==ta.__tagsList__){for(xa in za)for(da=za[xa],ca=0;ca<da.length;ca++)for(na=da[ca],ea=na.title.split(" "),ea.push(xa),ia=0;ia<ea.length;ia++){var ma=
+ea[ia].toLowerCase();null==ta[ma]&&(ta[ma]=[]);ta[ma].push(na)}ta.__tagsList__=!0}var xa=[];da={};for(ca=ea=0;ca<oa.length;ca++)if(0<oa[ca].length){ma=ta[oa[ca]];var Ea={};xa=[];if(null!=ma)for(ia=0;ia<ma.length;ia++)na=ma[ia],0==ea==(null==da[na.url])&&(Ea[na.url]=!0,xa.push(na));da=Ea;ea++}ba.scrollTop=0;ba.innerText="";F=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ta,mxResources.get(0==xa.length?"noResultsFor":
+"resultsFor",[va]));ba.appendChild(ta);null!=pa&&null==qa&&(pa.style.backgroundColor="",qa=pa,pa=ta);wa=xa;V=null;B(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ka,"keyup",mxUtils.bind(this,function(ja){""==ka.value?(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search"))):(ha.setAttribute("src",Dialog.prototype.closeImage),ha.setAttribute("title",mxResources.get("reset")))}));A+=23;var la=document.createElement("div");la.style.cssText="position:absolute;left:30px;width:128px;top:"+
+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Fa=140,Ga=140,Aa={},Ma={},za={},Da=0,Ca=!0,pa=null,qa=null;Aa.basic=[{title:"blankDiagram",select:!0}];var wa=Aa.basic;if(!d){var Ha=function(){mxUtils.get(Ia,function(ja){if(!ya){ya=!0;ja=ja.getXml().documentElement.firstChild;for(var va={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var ta=ja.getAttribute("name"),da=
+ja.getElementsByTagName("add"),ca=[],na=0;na<da.length;na++)ca.push(encodeURIComponent(mxUtils.getTextContent(da[na])));null!=ta&&0<ca.length&&(va[ta]=ca.join(";"))}else if(ca=ja.getAttribute("url"),null!=ca){da=ja.getAttribute("section");ta=ja.getAttribute("subsection");if(null==da&&(na=ca.indexOf("/"),da=ca.substring(0,na),null==ta)){var ea=ca.indexOf("/",na+1);-1<ea&&(ta=ca.substring(na+1,ea))}na=Aa[da];null==na&&(na=[],Aa[da]=na);ca=ja.getAttribute("clibs");null!=va[ca]&&(ca=va[ca]);ca={url:ja.getAttribute("url"),
+libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:ca,tags:ja.getAttribute("tags")};na.push(ca);null!=ta&&(na=Ma[da],null==na&&(na={},Ma[da]=na),da=na[ta],null==da&&(da=[],na[ta]=da),da.push(ca))}ja=ja.nextSibling}P.stop();u()}})};I.appendChild(fa);I.appendChild(la);I.appendChild(ba);var ya=!1,Ia=g;/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)&&(Ia=PROXY_URL+"?url="+encodeURIComponent(Ia));
+P.spin(ba);null!=E?E(function(ja,va){za=ja;q=Da=va;Ha()},Ha):Ha();W=Aa}mxEvent.addListener(H,"keypress",function(ja){b.dialog.container.firstChild==I&&13==ja.keyCode&&J()});E=document.createElement("div");E.style.marginTop=d?"4px":"16px";E.style.textAlign="right";E.style.position="absolute";E.style.left="40px";E.style.bottom="24px";E.style.right="40px";d||b.isOffline()||!f||null!=c||l||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
A.className="geBtn",E.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||l&&null==m||E.appendChild(A);d||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(va,function(ta){S=ta;O=null;templateRealURl=
va;b.hideDialog();J()},function(ta){b.handleError(ta)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),d.className="geBtn",E.appendChild(d));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(va){b.openFiles(ja.files,!0);ja.value=""});ja.style.display=
"none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),p.className="geBtn",E.appendChild(p));E.appendChild(U);b.editor.cancelFirst||null!=c||l&&null==m||E.appendChild(A);I.appendChild(E);this.container=I};NewDialog.tagsList={};
-var CreateDialog=function(b,d,f,c,l,m,x,z,C,e,g,k,n,q,p,A,E){function y(M,K,H,F){function P(){mxEvent.addListener(U,"click",function(){var D=H;if(x){var L=N.value,R=L.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>R){D=null!=D?D:I.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
+var CreateDialog=function(b,d,f,c,l,m,x,z,C,e,g,k,n,t,p,A,E){function y(M,K,H,F){function P(){mxEvent.addListener(U,"click",function(){var D=H;if(x){var L=N.value,R=L.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>R){D=null!=D?D:I.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
(O=".drawio");0<=R&&(L=L.substring(0,R));N.value=L+O}}B(H)})}var U=document.createElement("a");U.style.overflow="hidden";var T=document.createElement("img");T.src=M;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(T);U.style.color=
-"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,K);if(null!=F&&null==b[F]){T.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=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});W.spin(U);var t=window.setTimeout(function(){null==b[F]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[F]&&(window.clearTimeout(t),
+"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,K);if(null!=F&&null==b[F]){T.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=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});W.spin(U);var q=window.setTimeout(function(){null==b[F]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[F]&&(window.clearTimeout(q),
mxUtils.setOpacity(V,100),T.style.visibility="",W.stop(),P())}))}else P();u.appendChild(U);++G==k&&(mxUtils.br(u),G=0)}function B(M){var K=N.value;if(null==M||null!=K&&0<K.length)E&&b.hideDialog(),f(K,M,N)}g="1"==urlParams.noDevice?!1:g;x=null!=x?x:!0;z=null!=z?z:!0;k=null!=k?k:4;E=null!=E?E:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom=
"24px";m.appendChild(J);mxUtils.write(m,mxResources.get("filename")+":");var N=document.createElement("input");N.setAttribute("value",d);N.style.width="200px";N.style.marginLeft="10px";N.style.marginBottom="20px";N.style.maxWidth="70%";this.init=function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};m.appendChild(N);null!=A&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),
-l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,N,A)));A=null;if("1"!=urlParams.noDevice&&null!=n&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";l=document.createElement("img");var v=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+q+";base64,"+v);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=q||(A=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(v,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+q+";base64,"+v+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),
+l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,N,A)));A=null;if("1"!=urlParams.noDevice&&null!=n&&null!=t&&"image/"==t.substring(0,6)&&("image/svg"!=t.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";l=document.createElement("img");var v=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+t+";base64,"+v);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=t||(A=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(v,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+t+";base64,"+v+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),
A.style.marginTop="6px",A.className="geBtn");C&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(M){mxEvent.isPopupTrigger(M)||B("_blank")}))}mxUtils.br(m);var u=document.createElement("div");u.style.textAlign="center";var G=0;u.style.marginTop="6px";m.appendChild(u);var I=document.createElement("select");I.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(n=document.createElement("option"),n.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(n,mxResources.get("googleDrive")),I.appendChild(n),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(n,mxResources.get("oneDrive")),I.appendChild(n),b.mode==App.MODE_ONEDRIVE&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(n,mxResources.get("dropbox")),I.appendChild(n),b.mode==App.MODE_DROPBOX&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITHUB),mxUtils.write(n,mxResources.get("github")),I.appendChild(n),y(IMAGE_PATH+
@@ -11204,28 +11204,28 @@ var PopupDialog=function(b,d,f,c,l){l=null!=l?l:!0;var m=document.createElement(
null!=f&&f();b.openLink(d,null,!0)});z.className="geBtn gePrimaryBtn";z.style.width=x.style.width;m.appendChild(z);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,d,f,c,l,m,x,z){function C(){0<k.value.length?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}m=null!=m?m:!0;var e=b.editor.graph,g=document.createElement("div");mxUtils.write(g,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor=
"transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",f);k.setAttribute("type","text");k.setAttribute("spellcheck","false");k.setAttribute("autocorrect","off");k.setAttribute("autocomplete","off");k.setAttribute("autocapitalize","off");k.style.marginTop="6px";k.style.width=(Graph.fileSupport?460:340)-20+"px";k.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){k.value="";k.focus()});
-d.appendChild(k);d.appendChild(f);g.appendChild(d);var n=z,q,p,A=function(J,N,v,u){var G="data:"==J.substring(0,5);!b.isOffline()||G&&"undefined"===typeof chrome?0<J.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(J,function(I){b.spinner.stop();b.hideDialog();var M=!1===u?1:null!=N&&null!=v?Math.max(N/I.width,v/I.height):Math.min(1,Math.min(520/I.width,520/I.height));m&&(J=b.convertDataUri(J));c(J,Math.round(Number(I.width)*M),Math.round(Number(I.height)*M),n,q,p)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(J,null,null,n,q,p)):(J=b.convertDataUri(J),N=null==N?120:N,v=null==v?100:v,b.hideDialog(),c(J,N,v,n,q,p))},E=function(J,N){if(null!=J){var v=l?null:e.getModel().getGeometry(e.getSelectionCell());null!=v?A(J,v.width,v.height,N):A(J,null,null,N)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",
+d.appendChild(k);d.appendChild(f);g.appendChild(d);var n=z,t,p,A=function(J,N,v,u){var G="data:"==J.substring(0,5);!b.isOffline()||G&&"undefined"===typeof chrome?0<J.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(J,function(I){b.spinner.stop();b.hideDialog();var M=!1===u?1:null!=N&&null!=v?Math.max(N/I.width,v/I.height):Math.min(1,Math.min(520/I.width,520/I.height));m&&(J=b.convertDataUri(J));c(J,Math.round(Number(I.width)*M),Math.round(Number(I.height)*M),n,t,p)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(J,null,null,n,t,p)):(J=b.convertDataUri(J),N=null==N?120:N,v=null==v?100:v,b.hideDialog(),c(J,N,v,n,t,p))},E=function(J,N){if(null!=J){var v=l?null:e.getModel().getGeometry(e.getSelectionCell());null!=v?A(J,v.width,v.height,N):A(J,null,null,N)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",
mxResources.get("dragImagesHere"));var J=g.parentNode,N=null;mxEvent.addListener(J,"dragleave",function(v){null!=N&&(N.parentNode.removeChild(N),N=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files,
0,0,b.maxImageSize,function(G,I,M,K,H,F,P,U){E(G,U)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var I=0;I<G.length;I++)G[I]()},!mxEvent.isControlDown(v),null,null,!0);else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var u=v.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(u)&&E(decodeURIComponent(u))}v.stopPropagation();v.preventDefault()}),!1)}};z=document.createElement("div");z.style.marginTop="14px";z.style.textAlign=
"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&z.appendChild(f);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(k.value=J.url));k.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type",
"file");mxEvent.addListener(y,"change",function(J){null!=y.files&&(b.importFiles(y.files,0,0,b.maxImageSize,function(N,v,u,G,I,M){E(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var v=0;v<N.length;v++)N[v]()},!0),y.type="",y.type="file",y.value="")});y.style.display="none";document.body.appendChild(y);b.imgDlgFileInputElt=y}d=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});d.className="geBtn";z.appendChild(d)}mxEvent.addListener(k,
-"keypress",function(J){13==J.keyCode&&E(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var J=new CropImageDialog(b,k.value,n,function(N,v,u){n=N;q=v;p=u});b.showDialog(J.container,300,390,!0,!0)});x&&(B.className="geBtn",z.appendChild(B));mxEvent.addListener(k,"change",function(J){n=null;C()});C();x=mxUtils.button(mxResources.get("apply"),function(){E(k.value)});x.className="geBtn gePrimaryBtn";z.appendChild(x);b.editor.cancelFirst||z.appendChild(f);Graph.fileSupport&&(z.style.marginTop=
+"keypress",function(J){13==J.keyCode&&E(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var J=new CropImageDialog(b,k.value,n,function(N,v,u){n=N;t=v;p=u});b.showDialog(J.container,300,390,!0,!0)});x&&(B.className="geBtn",z.appendChild(B));mxEvent.addListener(k,"change",function(J){n=null;C()});C();x=mxUtils.button(mxResources.get("apply"),function(){E(k.value)});x.className="geBtn gePrimaryBtn";z.appendChild(x);b.editor.cancelFirst||z.appendChild(f);Graph.fileSupport&&(z.style.marginTop=
"120px",g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.backgroundPosition="center 65%",g.style.backgroundRepeat="no-repeat",x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),g.appendChild(x));g.appendChild(z);this.container=g},LinkDialog=function(b,d,f,c,l,m,x){function z(J,N,v){v=mxUtils.button("",v);
v.className="geBtn";v.setAttribute("title",N);N=document.createElement("img");N.style.height="26px";N.style.width="26px";N.setAttribute("src",J);v.style.minWidth="42px";v.style.verticalAlign="middle";v.appendChild(N);B.appendChild(v)}var C=document.createElement("div");C.style.height="100%";mxUtils.write(C,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow=
"clip";e.style.cursor="default";e.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="97%";g.style.boxSizing="border-box";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";g.style.marginBottom="4px";var k=document.createElement("div");k.setAttribute("title",
mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geLinkDialogOption");
-var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=x&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);x=null!=x?x:"_blank";A.setAttribute("title",x);m&&(g.style.width="340px");if(l&&
-null!=b.pages){null!=d&&Graph.isPageLink(d)?(q.setAttribute("checked","checked"),q.defaultChecked=!0):(g.setAttribute("value",d),n.setAttribute("checked","checked"),n.defaultChecked=!0);e.appendChild(n);e.appendChild(g);e.appendChild(k);m&&(e.appendChild(A),mxUtils.write(e,mxResources.get("openInNewWindow")));mxUtils.br(e);e.appendChild(q);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value",
-"data:page/id,"+b.pages[m].getId()),d==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&q.checked){var E=document.createElement("option");mxUtils.write(E,mxResources.get("pageNotFound"));E.setAttribute("disabled","disabled");E.setAttribute("selected","selected");E.setAttribute("value","pageNotFound");p.appendChild(E);mxEvent.addListener(p,"change",function(){null==E.parentNode||E.selected||E.parentNode.removeChild(E)})}e.appendChild(p)}else g.setAttribute("value",
-d),e.appendChild(g),e.appendChild(k);C.appendChild(e);var y=mxUtils.button(f,function(){b.hideDialog();c(q.checked?"pageNotFound"!==p.value?p.value:d:g.value,LinkDialog.selectedDocs,A.checked?x:null)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){q.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");q.setAttribute("checked",
-"checked");q.checked=!0});mxEvent.addListener(g,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var J=C.parentNode,N=null;mxEvent.addListener(J,"dragleave",function(v){null!=N&&(N.parentNode.removeChild(N),N=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));
+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","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=x&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);x=null!=x?x:"_blank";A.setAttribute("title",x);m&&(g.style.width="340px");if(l&&
+null!=b.pages){null!=d&&Graph.isPageLink(d)?(t.setAttribute("checked","checked"),t.defaultChecked=!0):(g.setAttribute("value",d),n.setAttribute("checked","checked"),n.defaultChecked=!0);e.appendChild(n);e.appendChild(g);e.appendChild(k);m&&(e.appendChild(A),mxUtils.write(e,mxResources.get("openInNewWindow")));mxUtils.br(e);e.appendChild(t);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value",
+"data:page/id,"+b.pages[m].getId()),d==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&t.checked){var E=document.createElement("option");mxUtils.write(E,mxResources.get("pageNotFound"));E.setAttribute("disabled","disabled");E.setAttribute("selected","selected");E.setAttribute("value","pageNotFound");p.appendChild(E);mxEvent.addListener(p,"change",function(){null==E.parentNode||E.selected||E.parentNode.removeChild(E)})}e.appendChild(p)}else g.setAttribute("value",
+d),e.appendChild(g),e.appendChild(k);C.appendChild(e);var y=mxUtils.button(f,function(){b.hideDialog();c(t.checked?"pageNotFound"!==p.value?p.value:d:g.value,LinkDialog.selectedDocs,A.checked?x:null)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){t.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");t.setAttribute("checked",
+"checked");t.checked=!0});mxEvent.addListener(g,"focus",function(){t.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var J=C.parentNode,N=null;mxEvent.addListener(J,"dragleave",function(v){null!=N&&(N.parentNode.removeChild(N),N=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));
mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=N&&(N.parentNode.removeChild(N),N=null);0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(v.dataTransfer.getData("text/uri-list")),n.setAttribute("checked","checked"),n.checked=!0,y.click());v.stopPropagation();v.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="18px";B.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
f.style.verticalAlign="middle";f.className="geBtn";B.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&B.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(J){if(J.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=J.docs;var N=J.docs[0].url;"application/mxe"==J.docs[0].mimeType||null!=J.docs[0].mimeType&&
"application/vnd.jgraph."==J.docs[0].mimeType.substring(0,23)?N="https://www.draw.io/#G"+J.docs[0].id:"application/vnd.google-apps.folder"==J.docs[0].mimeType&&(N="https://drive.google.com/#folders/"+J.docs[0].id);g.value=N;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
function(){b.spinner.stop();if(null==b.linkPicker){var J=b.drive.createLinkPicker();b.linkPicker=J.setCallback(function(N){LinkDialog.filePicked(N)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(J){g.value=J[0].link;g.focus()}})});null!=b.oneDrive&&z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
function(){b.oneDrive.pickFile(function(J,N){g.value=N.value[0].webUrl;g.focus()},!0)});null!=b.gitHub&&z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(J){if(null!=J){J=J.split("/");var N=J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value="https://github.com/"+N+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});null!=b.gitLab&&z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(J){if(null!=J){J=J.split("/");var N=
-J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+N+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});mxEvent.addListener(g,"keypress",function(J){13==J.keyCode&&(b.hideDialog(),c(q.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(y);b.editor.cancelFirst||B.appendChild(f);C.appendChild(B);this.container=C},FeedbackDialog=function(b,d,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
+J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+N+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});mxEvent.addListener(g,"keypress",function(J){13==J.keyCode&&(b.hideDialog(),c(t.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(y);b.editor.cancelFirst||B.appendChild(f);C.appendChild(B);this.container=C},FeedbackDialog=function(b,d,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var x=document.createElement("input");x.setAttribute("type","text");x.style.marginTop="6px";x.style.width="600px";var z=mxUtils.button(mxResources.get("sendMessage"),function(){var k=g.value+(e.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;k.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+
":\n"+k),function(n){b.spinner.stop();200<=n.getStatus()&&299>=n.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});z.className="geBtn gePrimaryBtn";if(!f){z.setAttribute("disabled","disabled");var C=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(x,
@@ -11235,7 +11235,7 @@ l.appendChild(g);f=document.createElement("div");f.style.marginTop="26px";f.styl
var RevisionDialog=function(b,d,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="0px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height="376px";
m.style.overflow="hidden";var x=document.createElement("div");x.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(x);mxEvent.disableContextMenu(m);c.appendChild(m);var z=new Graph(m);z.setTooltips(!1);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var C=0,e=null,g=0,k=z.getGlobalVariable;
z.getGlobalVariable=function(X){return"page"==X&&null!=e&&null!=e[g]?e[g].getAttribute("name"):"pagenumber"==X?g+1:"pagecount"==X?null!=e?e.length:1:k.apply(this,arguments)};z.getLinkForCell=function(){return null};Editor.MathJaxRender&&z.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(z.container)}));var n={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},q=new Spinner(n),p=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),E={};for(n=0;n<A.length;n++)E[A[n].getAttribute("id")]=A[n];var y=null,B=null,J=null,N=null,v=mxUtils.button("",function(){null!=J&&z.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},t=new Spinner(n),p=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),E={};for(n=0;n<A.length;n++)E[A[n].getAttribute("id")]=A[n];var y=null,B=null,J=null,N=null,v=mxUtils.button("",function(){null!=J&&z.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");
mxUtils.setOpacity(v,20);var u=mxUtils.button("",function(){null!=J&&z.zoomOut()});u.className="geSprite geSprite-zoomout";u.setAttribute("title",mxResources.get("zoomOut"));u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var G=mxUtils.button("",function(){null!=J&&(z.maxFitScale=8,z.fit(8),z.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border=
"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var I=mxUtils.button("",function(){null!=J&&(z.zoomActual(),z.center())});I.className="geSprite geSprite-actualsize";I.setAttribute("title",mxResources.get("actualSize"));I.style.outline="none";I.style.border="none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare"));
M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var K=m.cloneNode(!1);K.style.pointerEvent="none";m.parentNode.appendChild(K);var H=new Graph(K);H.setTooltips(!1);H.setEnabled(!1);H.setPanning(!0);H.panningHandler.ignoreCell=!0;H.panningHandler.useLeftButtonForPanning=!0;H.minFitScale=null;H.maxFitScale=null;H.centerZoom=!0;mxEvent.addGestureListeners(M,function(X){X=E[e[C].getAttribute("id")];mxUtils.setOpacity(M,20);x.innerText="";null==X?mxUtils.write(x,
@@ -11244,43 +11244,43 @@ mxResources.get("pageNotFound")):(F.style.display="none",m.style.display="none",
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=N&&(mxEvent.isShiftDown(X)?null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(aa)],
null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(N):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(aa){b.spinner.stop();b.replaceFileData(N);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
U.className="geBtn";U.setAttribute("disabled","disabled");U.setAttribute("title","Shift+Click for Diff");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";var V=null;mxEvent.addListener(T,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=J&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(T.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",U.className="geBtn gePrimaryBtn");A=document.createElement("div");
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var q=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(T.selectedIndex))});q.className="geBtn gePrimaryBtn";q.setAttribute("disabled","disabled");null!=f&&(q.style.display="none",U.className="geBtn gePrimaryBtn");A=document.createElement("div");
A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var L=null;if(null!=d&&0<d.length){m.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%";
-var O=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(C=mxUtils.indexOf(b.pages,b.currentPage));for(n=d.length-1;0<=n;n--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){q.stop();x.innerText="";var ka=mxUtils.parseXml(fa),ha=b.editor.extractGraphModel(ka.documentElement,!0);if(null!=ha){var ra=function(Fa){null!=Fa&&(Fa=la(Editor.parseDiagramNode(Fa)));return Fa},la=function(Fa){var Ga=Fa.getAttribute("background");
+var O=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(C=mxUtils.indexOf(b.pages,b.currentPage));for(n=d.length-1;0<=n;n--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){t.stop();x.innerText="";var ka=mxUtils.parseXml(fa),ha=b.editor.extractGraphModel(ka.documentElement,!0);if(null!=ha){var ra=function(Fa){null!=Fa&&(Fa=la(Editor.parseDiagramNode(Fa)));return Fa},la=function(Fa){var Ga=Fa.getAttribute("background");
if(null==Ga||""==Ga||Ga==mxConstants.NONE)Ga=z.defaultPageBackgroundColor;m.style.backgroundColor=Ga;(new mxCodec(Fa.ownerDocument)).decode(Fa,z.getModel());z.maxFitScale=1;z.fit(8);z.center();return Fa};T.style.display="none";T.innerText="";J=ka;N=fa;e=parseSelectFunction=null;g=0;if("mxfile"==ha.nodeName){ka=ha.getElementsByTagName("diagram");e=[];for(fa=0;fa<ka.length;fa++)e.push(ka[fa]);g=Math.min(C,e.length-1);0<e.length&&ra(e[g]);if(1<e.length)for(T.removeAttribute("disabled"),T.style.display=
"",fa=0;fa<e.length;fa++)ka=document.createElement("option"),mxUtils.write(ka,e[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),ka.setAttribute("value",fa),fa==g&&ka.setAttribute("selected","selected"),T.appendChild(ka);V=function(){try{var Fa=parseInt(T.value);g=C=Fa;ra(e[Fa])}catch(Ga){T.value=C,b.handleError(Ga)}}}else la(ha);fa=X.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");F.innerText="";mxUtils.write(F,(null!=fa?fa+" ":"")+aa.toLocaleDateString()+
-" "+aa.toLocaleTimeString());F.setAttribute("title",Y.getAttribute("title"));v.removeAttribute("disabled");u.removeAttribute("disabled");G.removeAttribute("disabled");I.removeAttribute("disabled");M.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),P.removeAttribute("disabled"),t.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(I,60);
-mxUtils.setOpacity(M,60)}else T.style.display="none",T.innerText="",F.innerText="",mxUtils.write(F,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ca=document.createElement("td");ca.style.padding="6px";ca.style.whiteSpace="nowrap";X==d[d.length-1]?mxUtils.write(ca,mxResources.get("current")):aa.toDateString()===Q?mxUtils.write(ca,
-aa.toLocaleTimeString()):mxUtils.write(ca,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ca);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){B!=X&&(q.stop(),null!=y&&(y.style.backgroundColor=""),B=X,y=Y,y.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=J=null,F.removeAttribute("title"),
-F.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=z.defaultPageBackgroundColor,x.innerText="",z.getModel().clear(),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),T.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(M,20),q.spin(m),X.getXml(function(ka){if(B==X)try{Z(ka)}catch(ha){F.innerText=mxResources.get("error")+": "+ha.message}},function(ka){q.stop();T.style.display="none";T.innerText="";F.innerText="";mxUtils.write(F,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){t.click();
+" "+aa.toLocaleTimeString());F.setAttribute("title",Y.getAttribute("title"));v.removeAttribute("disabled");u.removeAttribute("disabled");G.removeAttribute("disabled");I.removeAttribute("disabled");M.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),P.removeAttribute("disabled"),q.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(I,60);
+mxUtils.setOpacity(M,60)}else T.style.display="none",T.innerText="",F.innerText="",mxUtils.write(F,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==d[d.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===Q?mxUtils.write(ba,
+aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){B!=X&&(t.stop(),null!=y&&(y.style.backgroundColor=""),B=X,y=Y,y.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=J=null,F.removeAttribute("title"),
+F.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=z.defaultPageBackgroundColor,x.innerText="",z.getModel().clear(),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),T.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(M,20),t.spin(m),X.getXml(function(ka){if(B==X)try{Z(ka)}catch(ha){F.innerText=mxResources.get("error")+": "+ha.message}},function(ka){t.stop();T.style.display="none";T.innerText="";F.innerText="";mxUtils.write(F,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){q.click();
window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(d[n]);null!=S&&n==d.length-1&&(L=S)}R.appendChild(O);l.appendChild(R)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(l,
-mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(T);D.appendChild(v);D.appendChild(u);D.appendChild(I);D.appendChild(G);D.appendChild(M);b.editor.cancelFirst?(A.appendChild(l),A.appendChild(P),A.appendChild(W),A.appendChild(U),A.appendChild(t)):(A.appendChild(P),A.appendChild(W),A.appendChild(U),A.appendChild(t),A.appendChild(l));c.appendChild(A);c.appendChild(D);c.appendChild(F);
-this.container=c},DraftDialog=function(b,d,f,c,l,m,x,z,C){var e=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,d);e.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(C[k.value].data);J=b.editor.extractGraphModel(B.documentElement,!0);N=0;this.init()});if(null!=C){k.style.marginLeft="4px";for(d=0;d<C.length;d++){var q=
-document.createElement("option");q.setAttribute("value",d);var p=new Date(C[d].created),A=new Date(C[d].modified);mxUtils.write(q,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());k.appendChild(q)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=C[0].data);var E=document.createElement("div");E.style.position="absolute";E.style.border="1px solid lightGray";E.style.marginTop="10px";E.style.left=
+mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(T);D.appendChild(v);D.appendChild(u);D.appendChild(I);D.appendChild(G);D.appendChild(M);b.editor.cancelFirst?(A.appendChild(l),A.appendChild(P),A.appendChild(W),A.appendChild(U),A.appendChild(q)):(A.appendChild(P),A.appendChild(W),A.appendChild(U),A.appendChild(q),A.appendChild(l));c.appendChild(A);c.appendChild(D);c.appendChild(F);
+this.container=c},DraftDialog=function(b,d,f,c,l,m,x,z,C){var e=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,d);e.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(C[k.value].data);J=b.editor.extractGraphModel(B.documentElement,!0);N=0;this.init()});if(null!=C){k.style.marginLeft="4px";for(d=0;d<C.length;d++){var t=
+document.createElement("option");t.setAttribute("value",d);var p=new Date(C[d].created),A=new Date(C[d].modified);mxUtils.write(t,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());k.appendChild(t)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=C[0].data);var E=document.createElement("div");E.style.position="absolute";E.style.border="1px solid lightGray";E.style.marginTop="10px";E.style.left=
"40px";E.style.right="40px";E.style.top="46px";E.style.bottom="74px";E.style.overflow="hidden";mxEvent.disableContextMenu(E);e.appendChild(E);var y=new Graph(E);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=mxUtils.parseXml(f),J=b.editor.extractGraphModel(B.documentElement,!0),N=0,v=null,u=y.getGlobalVariable;y.getGlobalVariable=function(I){return"page"==I&&null!=v&&null!=v[N]?
v[N].getAttribute("name"):"pagenumber"==I?N+1:"pagecount"==I?null!=v?v.length:1:u.apply(this,arguments)};y.getLinkForCell=function(){return null};f=mxUtils.button("",function(){y.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);g=mxUtils.button("",function(){y.zoomOut()});g.className="geSprite geSprite-zoomout";g.setAttribute("title",mxResources.get("zoomOut"));
-g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);d=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.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);q=mxUtils.button("",function(){y.zoomActual();y.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline=
-"none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);x=mxUtils.button(x||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});x.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign=
+g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);d=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.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);t=mxUtils.button("",function(){y.zoomActual();y.center()});t.className="geSprite geSprite-actualsize";t.setAttribute("title",mxResources.get("actualSize"));t.style.outline=
+"none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);x=mxUtils.button(x||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});x.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign=
"bottom";G.style.marginRight="6px";G.style.display="none";m=mxUtils.button(m||mxResources.get("edit"),function(){c.apply(this,[k.value])});m.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.position="absolute";p.style.bottom="30px";p.style.right="40px";p.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
function(){function I(F){if(null!=F){var P=F.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";E.style.backgroundColor=P;(new mxCodec(F.ownerDocument)).decode(F,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}return F}function M(F){null!=F&&(F=I(Editor.parseDiagramNode(F)));return F}mxEvent.addListener(G,"change",function(F){N=parseInt(G.value);M(v[N]);mxEvent.consume(F)});if("mxfile"==J.nodeName){var K=J.getElementsByTagName("diagram");
-v=[];for(var H=0;H<K.length;H++)v.push(K[H]);0<v.length&&M(v[N]);G.innerText="";if(1<v.length)for(G.style.display="",H=0;H<v.length;H++)K=document.createElement("option"),mxUtils.write(K,v[H].getAttribute("name")||mxResources.get("pageWithNumber",[H+1])),K.setAttribute("value",H),H==N&&K.setAttribute("selected","selected"),G.appendChild(K);else G.style.display="none"}else I(J)};A.appendChild(G);A.appendChild(f);A.appendChild(g);A.appendChild(q);A.appendChild(d);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";z=null!=z?mxUtils.button(mxResources.get("ignore"),z):null;null!=z&&(z.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=z&&p.appendChild(z),p.appendChild(x),p.appendChild(m)):(p.appendChild(m),p.appendChild(x),null!=z&&p.appendChild(z),p.appendChild(f));e.appendChild(p);e.appendChild(A);this.container=e},FindWindow=function(b,d,f,c,l,m){function x(V,W,t,D){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
-for(var L=0;L<W.length;L++)if("label"!=W[L].nodeName){var R=mxUtils.trim(W[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(D&&0<=R.indexOf(t)||!D&&R.substring(0,t.length)===t)||null!=V&&V.test(R))return!0}}return!1}function z(){q&&v.value?(P.removeAttribute("disabled"),U.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));v.value&&N.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function C(V,
-W,t){H.innerText="";var D=g.model.getDescendants(g.model.getRoot()),L=N.value.toLowerCase(),R=u.checked?new RegExp(L):null,O=null;A=null;k!=L&&(k=L,n=null,p=!1);var Q=null==n;if(0<L.length){if(p){p=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;n=null;do p=!1,D=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(D),g.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!C(!0,W,t)&&V!=S);n&&(n=null,t?b.editor.graph.model.execute(new SelectPage(b,
-D)):b.selectPage(D));p=!1;g=b.editor.graph;return C(!0,W,t)}for(X=0;X<D.length;X++){S=g.view.getState(D[X]);W&&null!=R&&(Q=Q||S==n);if(null!=S&&null!=S.cell.value&&(Q||null==O)&&(g.model.isVertex(S.cell)||g.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(I.innerHTML=g.sanitizeHtml(g.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([I])):label=g.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;W&&m&&null!=R&&S==n&&(label=label.substr(E),
-aa=E);var Y=""==v.value,Z=Y;if(null==R&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&x(R,S.cell,L,Z))||null!=R&&(R.test(label)||Y&&x(R,S.cell,L,Z)))if(m&&(null!=R?(Y=label.match(R),null!=Y&&0<Y.length&&(A=Y[0].toLowerCase(),E=aa+Y.index+A.length)):(A=L,E=A.length)),Q){O=S;break}else null==O&&(O=S)}Q=Q||S==n}}if(null!=O){if(X==D.length&&G.checked)return n=null,p=!0,C(!0,W,t);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?t||g.getSelectionCell()==n.cell&&
-1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&G.checked)return p=!0,C(!0,W,t);g.isEnabled()&&!t&&g.clearSelection()}q=null!=O;m&&!V&&z();return 0==L.length||null!=O}var e=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,q=!1,p=!1,A=null,E=0,y=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var J=m?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder",
+v=[];for(var H=0;H<K.length;H++)v.push(K[H]);0<v.length&&M(v[N]);G.innerText="";if(1<v.length)for(G.style.display="",H=0;H<v.length;H++)K=document.createElement("option"),mxUtils.write(K,v[H].getAttribute("name")||mxResources.get("pageWithNumber",[H+1])),K.setAttribute("value",H),H==N&&K.setAttribute("selected","selected"),G.appendChild(K);else G.style.display="none"}else I(J)};A.appendChild(G);A.appendChild(f);A.appendChild(g);A.appendChild(t);A.appendChild(d);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";z=null!=z?mxUtils.button(mxResources.get("ignore"),z):null;null!=z&&(z.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=z&&p.appendChild(z),p.appendChild(x),p.appendChild(m)):(p.appendChild(m),p.appendChild(x),null!=z&&p.appendChild(z),p.appendChild(f));e.appendChild(p);e.appendChild(A);this.container=e},FindWindow=function(b,d,f,c,l,m){function x(V,W,q,D){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
+for(var L=0;L<W.length;L++)if("label"!=W[L].nodeName){var R=mxUtils.trim(W[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(D&&0<=R.indexOf(q)||!D&&R.substring(0,q.length)===q)||null!=V&&V.test(R))return!0}}return!1}function z(){t&&v.value?(P.removeAttribute("disabled"),U.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));v.value&&N.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function C(V,
+W,q){H.innerText="";var D=g.model.getDescendants(g.model.getRoot()),L=N.value.toLowerCase(),R=u.checked?new RegExp(L):null,O=null;A=null;k!=L&&(k=L,n=null,p=!1);var Q=null==n;if(0<L.length){if(p){p=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;n=null;do p=!1,D=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(D),g.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!C(!0,W,q)&&V!=S);n&&(n=null,q?b.editor.graph.model.execute(new SelectPage(b,
+D)):b.selectPage(D));p=!1;g=b.editor.graph;return C(!0,W,q)}for(X=0;X<D.length;X++){S=g.view.getState(D[X]);W&&null!=R&&(Q=Q||S==n);if(null!=S&&null!=S.cell.value&&(Q||null==O)&&(g.model.isVertex(S.cell)||g.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(I.innerHTML=g.sanitizeHtml(g.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([I])):label=g.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;W&&m&&null!=R&&S==n&&(label=label.substr(E),
+aa=E);var Y=""==v.value,Z=Y;if(null==R&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&x(R,S.cell,L,Z))||null!=R&&(R.test(label)||Y&&x(R,S.cell,L,Z)))if(m&&(null!=R?(Y=label.match(R),null!=Y&&0<Y.length&&(A=Y[0].toLowerCase(),E=aa+Y.index+A.length)):(A=L,E=A.length)),Q){O=S;break}else null==O&&(O=S)}Q=Q||S==n}}if(null!=O){if(X==D.length&&G.checked)return n=null,p=!0,C(!0,W,q);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?q||g.getSelectionCell()==n.cell&&
+1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&G.checked)return p=!0,C(!0,W,q);g.isEnabled()&&!q&&g.clearSelection()}t=null!=O;m&&!V&&z();return 0==L.length||null!=O}var e=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,t=!1,p=!1,A=null,E=0,y=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var J=m?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder",
mxResources.get("find"));N.setAttribute("type","text");N.style.marginTop="4px";N.style.marginBottom="6px";N.style.width=J;N.style.fontSize="12px";N.style.borderRadius="4px";N.style.padding="6px";B.appendChild(N);mxUtils.br(B);if(m){var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("replaceWith"));v.setAttribute("type","text");v.style.marginTop="4px";v.style.marginBottom="6px";v.style.width=J;v.style.fontSize="12px";v.style.borderRadius="4px";v.style.padding="6px";
B.appendChild(v);mxUtils.br(B);mxEvent.addListener(v,"input",z)}var u=document.createElement("input");u.setAttribute("id","geFindWinRegExChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";B.appendChild(u);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");B.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));B.appendChild(J);J=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft=
"6px";J.style.top="-1px";B.appendChild(J);mxUtils.br(B);var G=document.createElement("input");G.setAttribute("id","geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";B.appendChild(G);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");B.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));B.appendChild(J);var I=document.createElement("div");mxUtils.br(B);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop=
"6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";B.appendChild(J);var M=mxUtils.button(mxResources.get("reset"),function(){H.innerText="";N.value="";N.style.backgroundColor="";m&&(v.value="",z());k=n=null;p=!1;N.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";m||J.appendChild(M);var K=mxUtils.button(mxResources.get("find"),
-function(){try{N.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";J.appendChild(K);var H=document.createElement("div");H.style.marginTop="10px";if(m){var F=function(V,W,t,D,L){if(null==L||"1"!=L.html)return D=V.toLowerCase().indexOf(W,
-D),0>D?V:V.substr(0,D)+t+V.substr(D+W.length);var R=V;W=mxUtils.htmlEntities(W);L=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)L.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return R;R=D+W.length;t=mxUtils.htmlEntities(t);V=V.substr(0,D)+t+V.substr(R);for(var Q=0,S=0;S<L.length;S++){if(L[S]-Q<D)V=V.substr(0,L[S])+O[S]+V.substr(L[S]);else{var X=L[S]-Q<R?D+Q:L[S]+(t.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}Q+=O[S].length}return V.replace(/\n/g,
-"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,F(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));N.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
-"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");J.appendChild(P);mxUtils.br(J);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,F(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));P.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px";
-U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");J.appendChild(U);var T=mxUtils.button(mxResources.get("replaceAll"),function(){H.innerText="";if(v.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var t=0,D={};C(!1,!0,!0)&&100>t;){var L=n.cell,R=g.getLabel(L),O=D[L.id];if(O&&O.replAllMrk==
-y&&O.replAllPos>=E)break;D[L.id]={replAllMrk:y,replAllPos:E};g.isCellEditable(L)&&(g.model.setValue(L,F(R,A,v.value,E-A.length,g.getCurrentCellStyle(L))),t++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(H,mxResources.get("matchesRepl",[t]))}catch(Q){b.handleError(Q)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}y++}});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";
+function(){try{N.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";J.appendChild(K);var H=document.createElement("div");H.style.marginTop="10px";if(m){var F=function(V,W,q,D,L){if(null==L||"1"!=L.html)return D=V.toLowerCase().indexOf(W,
+D),0>D?V:V.substr(0,D)+q+V.substr(D+W.length);var R=V;W=mxUtils.htmlEntities(W);L=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)L.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return R;R=D+W.length;q=mxUtils.htmlEntities(q);V=V.substr(0,D)+q+V.substr(R);for(var Q=0,S=0;S<L.length;S++){if(L[S]-Q<D)V=V.substr(0,L[S])+O[S]+V.substr(L[S]);else{var X=L[S]-Q<R?D+Q:L[S]+(q.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}Q+=O[S].length}return V.replace(/\n/g,
+"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,F(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));N.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(q){b.handleError(q)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
+"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");J.appendChild(P);mxUtils.br(J);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,F(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));P.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(q){b.handleError(q)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px";
+U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");J.appendChild(U);var T=mxUtils.button(mxResources.get("replaceAll"),function(){H.innerText="";if(v.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var q=0,D={};C(!1,!0,!0)&&100>q;){var L=n.cell,R=g.getLabel(L),O=D[L.id];if(O&&O.replAllMrk==
+y&&O.replAllPos>=E)break;D[L.id]={replAllMrk:y,replAllPos:E};g.isCellEditable(L)&&(g.model.setValue(L,F(R,A,v.value,E-A.length,g.getCurrentCellStyle(L))),q++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(H,mxResources.get("matchesRepl",[q]))}catch(Q){b.handleError(Q)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}y++}});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";
T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(M);M=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));M.setAttribute("title",mxResources.get("close"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow=
"ellipsis";M.className="geBtn";J.appendChild(M);mxUtils.br(J);J.appendChild(H)}else M.style.width="90px",K.style.width="90px";mxEvent.addListener(N,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)e.funct();else if(k!=N.value.toLowerCase()||13==V.keyCode)try{N.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){N.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(V){70==
V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(e.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),B,d,f,c,l,!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()?(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():
@@ -11289,7 +11289,7 @@ document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.remo
g.style.width="90%";g.style.visibility="hidden";z.appendChild(g);mxUtils.br(z);e=function(){x.freehand.setPerfectFreehandMode(C.checked);g.style.visibility=C.checked?"visible":"hidden"};mxEvent.addListener(C,"change",e);e();mxEvent.addListener(g,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));
k.style.marginTop=m?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";z.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),z,d,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);x.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,
mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(x.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,d,f,c,l){var m=b.editor.graph,
-x=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(C,e){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],q=0;q<k.length;q++){var p=mxUtils.trim(k[q]);""!=p&&0>mxUtils.indexOf(C,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?e(C.concat(n)):m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
+x=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(C,e){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],t=0;t<k.length;t++){var p=mxUtils.trim(k[t]);""!=p&&0>mxUtils.indexOf(C,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?e(C.concat(n)):m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
")");b.showDialog(g.container,300,80,!0,!0);g.init()}}),z=x.div;this.window=new mxWindow(mxResources.get("tags"),z,d,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){x.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,d,f,c){var l=document.createElement("div");l.style.textAlign=
"center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var x="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";d==b.drive?(x=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?(x=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
d==b.oneDrive?(x=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(x=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(x=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg",z.style.width="32px"):d==b.trello&&(x=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var C=document.createElement("input");C.setAttribute("type",
@@ -11298,79 +11298,79 @@ d==b.oneDrive?(x=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-wh
0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{z={title:f[m].title,entries:[]};for(C=0;C<f[m].entries.length;C++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[C].id)&&z.entries.push(f[m].entries[C]);0<z.entries.length&&l.push(z)}f=l;if(d){m=mxUtils.bind(this,function(u){for(var G=0;G<u.length;G++)(function(I){var M=p.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,
I.title);g.appendChild(M);for(var K=0;K<I.entries.length;K++)(function(H){var F=p.cloneNode(!1);F.style.cursor="pointer";F.style.padding="4px 0px 4px 20px";F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.setAttribute("title",H.title+" ("+H.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(H.id);P.defaultChecked=P.checked;F.appendChild(P);mxUtils.write(F," "+H.title);g.appendChild(F);var U=function(T){if(null==
T||"INPUT"!=mxEvent.getSource(T).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerText="";if(null!=H.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,H.desc);k.appendChild(V)}null!=H.imageCallback?H.imageCallback(k):null!=H.image?k.innerHTML+='<img border="0" src="'+H.image+'"/>':null==H.desc&&(k.style.padding="20px",k.style.color=
-"rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=F;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(F,"click",U);mxEvent.addListener(F,"dblclick",function(T){P.checked=!P.checked;mxEvent.consume(T)});q.push(function(){return P.checked?H.id:null});0==G&&0==K&&U()})(I.entries[K])})(u[G])});C=document.createElement("div");C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes"));
+"rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=F;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(F,"click",U);mxEvent.addListener(F,"dblclick",function(T){P.checked=!P.checked;mxEvent.consume(T)});t.push(function(){return P.checked?H.id:null});0==G&&0==K&&U()})(I.entries[K])})(u[G])});C=document.createElement("div");C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes"));
C.style.position="absolute";C.style.top="0px";C.style.left="0px";C.style.lineHeight="40px";C.style.height="40px";C.style.right="0px";var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";
-k.style.textAlign="center";var n=null,q=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(C);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input");
+k.style.textAlign="center";var n=null,t=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(C);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input");
A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;f.appendChild(A);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(u){A.checked=!A.checked;mxEvent.consume(u)});var E=document.createElement("input");E.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),
-m.style.paddingRight="20px",m.appendChild(E),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),E.style.position="relative",E.style.top="1px",E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(u){mxEvent.getSource(u)!=E&&(E.checked=!E.checked,mxEvent.consume(u))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var u=[],G=0;G<q.length;G++){var I=
-q[G].apply(this,arguments);null!=I&&u.push(I)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(G=mxUtils.indexOf(u,".scratchpad"),null!=b.scratchpad!=(0<=G&&0<u.splice(G,1).length)&&b.toggleScratchpad(),G=mxUtils.indexOf(u,"search"),mxSettings.settings.search=0<=G&&0<u.splice(G,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),E.checked&&mxSettings.save());b.sidebar.showEntries(u.join(";"),E.checked,!0);b.setSidebarTitles(A.checked,E.checked)});C.className="geBtn gePrimaryBtn"}else{var y=
+m.style.paddingRight="20px",m.appendChild(E),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),E.style.position="relative",E.style.top="1px",E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(u){mxEvent.getSource(u)!=E&&(E.checked=!E.checked,mxEvent.consume(u))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var u=[],G=0;G<t.length;G++){var I=
+t[G].apply(this,arguments);null!=I&&u.push(I)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(G=mxUtils.indexOf(u,".scratchpad"),null!=b.scratchpad!=(0<=G&&0<u.splice(G,1).length)&&b.toggleScratchpad(),G=mxUtils.indexOf(u,"search"),mxSettings.settings.search=0<=G&&0<u.splice(G,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),E.checked&&mxSettings.save());b.sidebar.showEntries(u.join(";"),E.checked,!0);b.setSidebarTitles(A.checked,E.checked)});C.className="geBtn gePrimaryBtn"}else{var y=
document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";C=document.createElement("tr");y.style.width="100%";d=document.createElement("td");l=document.createElement("td");x=document.createElement("td");var B=mxUtils.bind(this,function(u,G,I){var M=document.createElement("input");M.type="checkbox";y.appendChild(M);M.checked=b.sidebar.isEntryVisible(I);var K=document.createElement("span");mxUtils.write(K,G);G=document.createElement("div");G.style.display=
-"block";G.appendChild(M);G.appendChild(K);mxEvent.addListener(K,"click",function(H){M.checked=!M.checked;mxEvent.consume(H)});u.appendChild(G);return function(){return M.checked?I:null}});C.appendChild(d);C.appendChild(l);C.appendChild(x);m.appendChild(C);y.appendChild(m);q=[];var J=0;for(m=0;m<f.length;m++)for(C=0;C<f[m].entries.length;C++)J++;var N=[d,l,x],v=0;for(m=0;m<f.length;m++)(function(u){for(var G=0;G<u.entries.length;G++){var I=u.entries[G];q.push(B(N[Math.floor(v/(J/3))],I.title,I.id));
+"block";G.appendChild(M);G.appendChild(K);mxEvent.addListener(K,"click",function(H){M.checked=!M.checked;mxEvent.consume(H)});u.appendChild(G);return function(){return M.checked?I:null}});C.appendChild(d);C.appendChild(l);C.appendChild(x);m.appendChild(C);y.appendChild(m);t=[];var J=0;for(m=0;m<f.length;m++)for(C=0;C<f[m].entries.length;C++)J++;var N=[d,l,x],v=0;for(m=0;m<f.length;m++)(function(u){for(var G=0;G<u.entries.length;G++){var I=u.entries[G];t.push(B(N[Math.floor(v/(J/3))],I.title,I.id));
v++}})(f[m]);c.appendChild(y);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";E=document.createElement("input");isLocalStorage&&(E.setAttribute("type","checkbox"),E.checked=!0,E.defaultChecked=!0,f.appendChild(E),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(u){E.checked=!E.checked;mxEvent.consume(u)}));c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){for(var u=["search"],G=0;G<q.length;G++){var I=q[G].apply(this,arguments);null!=I&&u.push(I)}b.sidebar.showEntries(0<u.length?u.join(";"):"",E.checked);b.hideDialog()});C.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(C)):(f.appendChild(C),f.appendChild(m));c.appendChild(f);this.container=
+function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){for(var u=["search"],G=0;G<t.length;G++){var I=t[G].apply(this,arguments);null!=I&&u.push(I)}b.sidebar.showEntries(0<u.length?u.join(";"):"",E.checked);b.hideDialog()});C.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(C)):(f.appendChild(C),f.appendChild(m));c.appendChild(f);this.container=
c},PluginsDialog=function(b,d,f,c){function l(){C=!0;if(0==z.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var p=0;p<z.length;p++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var E=document.createElement("span");E.className="geSprite geSprite-delete";E.style.position="relative";E.style.cursor="pointer";E.style.top="5px";E.style.marginRight="4px";E.style.display="inline-block";A.appendChild(E);mxUtils.write(A,z[p]);x.appendChild(A);mxUtils.br(x);mxEvent.addListener(E,
"click",function(y){return function(){b.confirm(mxResources.get("delete")+' "'+z[y]+'"?',function(){null!=f&&f(z[y]);z.splice(y,1);l()})}}(p))}}}var m=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var z=mxSettings.getPlugins().slice(),C=!1;m.appendChild(x);l();C=!1;var e=mxUtils.button(mxResources.get("add"),null!=d?function(){d(function(p){p&&0>mxUtils.indexOf(z,p)&&z.push(p);l()})}:function(){var p=document.createElement("div"),A=document.createElement("span");
A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");p.appendChild(A);var E=document.createElement("select");E.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var y=document.createElement("option");mxUtils.write(y,App.publicPlugin[A]);y.value=App.publicPlugin[A];E.appendChild(y)}p.appendChild(E);mxUtils.br(p);mxUtils.br(p);A=mxUtils.button(mxResources.get("custom")+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog();
if(null!=J&&0<J.length){J=J.split(";");for(var N=0;N<J.length;N++){var v=J[N],u=App.pluginRegistry[v];null!=u&&(v=u);0<v.length&&0>mxUtils.indexOf(z,v)&&z.push(v)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});A.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var B=App.pluginRegistry[E.value];0>mxUtils.indexOf(z,B)&&(z.push(B),l())}),null,null,null,A);b.showDialog(p.container,300,100,!0,!0)});e.className=
-"geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){C?(mxSettings.setPlugins(z),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
-q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(e),n.appendChild(k)):(n.appendChild(e),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,d,f,c){function l(){var u=E.checked,G=y.checked,I=q.geometry,M=C.width,K=C.height,H=(300-M)/2,F=(300-K)/2;I.x<H?(I.width-=H-I.x,I.x=H):I.x+I.width>H+M&&(I.width=H+M-I.x,I.x=Math.min(I.x,H+M));I.y<F?(I.height-=
-F-I.y,I.y=F):I.y+I.height>F+K&&(I.height=F+K-I.y,I.y=Math.min(I.y,F+K));var P=(I.x-H)/M*100;M=100-(I.x+I.width-H)/M*100;H=(I.y-F)/K*100;I=100-(I.y+I.height-F)/K*100;return"inset("+mxUtils.format(H)+"% "+mxUtils.format(M)+"% "+mxUtils.format(I)+"% "+mxUtils.format(P)+"%"+(u?" round "+n+"%":G?" round 50%":"")+")"}function m(u){null!=g&&(!0!==u&&(g.model.setGeometry(q,k.clone()),n=5,J.value=n),g.model.setStyle(q,p+l()),g.selectAll(),B.style.visibility=E.checked?"visible":"hidden")}var x=document.createElement("div"),
-z=document.createElement("div");z.style.height="300px";z.style.width="300px";z.style.display="inline-flex";z.style.justifyContent="center";z.style.alignItems="center";z.style.position="absolute";var C=document.createElement("img");C.onload=function(){function u(){g.model.setStyle(q,p+l())}g=new Graph(e);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var G=g.createVertexHandler;
-g.createVertexHandler=function(){var R=G.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var I=q.geometry,M=C.width,K=C.height,H=(300-M)/2,F=(300-K)/2,P=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(P[0]),T=parseFloat(P[1]),V=parseFloat(P[2]),W=parseFloat(P[3]);isFinite(U)&&isFinite(T)&&isFinite(V)&&isFinite(W)?(I.x=W/100*M+H,I.y=U/100*K+F,I.width=(100-T)/100*M+H-I.x,I.height=(100-V)/100*K+F-I.y,"round"==P[4]?"50%"==P[5]?y.setAttribute("checked",
-"checked"):(n=parseInt(P[5]),J.value=n,E.setAttribute("checked","checked"),B.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(R){}q.style=p+(f?f:l());q.vertex=!0;g.addCell(q,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,u);g.addListener(mxEvent.CELLS_RESIZED,u);var t=g.graphHandler.mouseUp,D=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){t.apply(this,arguments);e.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){D.apply(this,
-arguments);e.style.backgroundColor=""};g.dblClick=function(){};var L=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){L.call(this,[q],[q])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",d);C.style.maxWidth="300px";C.style.maxHeight="300px";z.appendChild(C);x.appendChild(z);var e=document.createElement("div");e.style.width="300px";e.style.height="300px";e.style.overflow="hidden";e.style.backgroundColor="#fff9";x.appendChild(e);
-var g=null,k=new mxGeometry(100,100,100,100),n=5,q=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+d.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";x.appendChild(A);d=document.createElement("label");d.setAttribute("for","croppingRect");mxUtils.write(d,mxResources.get("rectangle"));
+"geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){C?(mxSettings.setPlugins(z),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
+t.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");n.appendChild(t);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(e),n.appendChild(k)):(n.appendChild(e),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,d,f,c){function l(){var u=E.checked,G=y.checked,I=t.geometry,M=C.width,K=C.height,H=(300-M)/2,F=(300-K)/2;I.x<H?(I.width-=H-I.x,I.x=H):I.x+I.width>H+M&&(I.width=H+M-I.x,I.x=Math.min(I.x,H+M));I.y<F?(I.height-=
+F-I.y,I.y=F):I.y+I.height>F+K&&(I.height=F+K-I.y,I.y=Math.min(I.y,F+K));var P=(I.x-H)/M*100;M=100-(I.x+I.width-H)/M*100;H=(I.y-F)/K*100;I=100-(I.y+I.height-F)/K*100;return"inset("+mxUtils.format(H)+"% "+mxUtils.format(M)+"% "+mxUtils.format(I)+"% "+mxUtils.format(P)+"%"+(u?" round "+n+"%":G?" round 50%":"")+")"}function m(u){null!=g&&(!0!==u&&(g.model.setGeometry(t,k.clone()),n=5,J.value=n),g.model.setStyle(t,p+l()),g.selectAll(),B.style.visibility=E.checked?"visible":"hidden")}var x=document.createElement("div"),
+z=document.createElement("div");z.style.height="300px";z.style.width="300px";z.style.display="inline-flex";z.style.justifyContent="center";z.style.alignItems="center";z.style.position="absolute";var C=document.createElement("img");C.onload=function(){function u(){g.model.setStyle(t,p+l())}g=new Graph(e);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var G=g.createVertexHandler;
+g.createVertexHandler=function(){var R=G.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var I=t.geometry,M=C.width,K=C.height,H=(300-M)/2,F=(300-K)/2,P=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(P[0]),T=parseFloat(P[1]),V=parseFloat(P[2]),W=parseFloat(P[3]);isFinite(U)&&isFinite(T)&&isFinite(V)&&isFinite(W)?(I.x=W/100*M+H,I.y=U/100*K+F,I.width=(100-T)/100*M+H-I.x,I.height=(100-V)/100*K+F-I.y,"round"==P[4]?"50%"==P[5]?y.setAttribute("checked",
+"checked"):(n=parseInt(P[5]),J.value=n,E.setAttribute("checked","checked"),B.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(R){}t.style=p+(f?f:l());t.vertex=!0;g.addCell(t,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,u);g.addListener(mxEvent.CELLS_RESIZED,u);var q=g.graphHandler.mouseUp,D=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){q.apply(this,arguments);e.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){D.apply(this,
+arguments);e.style.backgroundColor=""};g.dblClick=function(){};var L=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){L.call(this,[t],[t])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",d);C.style.maxWidth="300px";C.style.maxHeight="300px";z.appendChild(C);x.appendChild(z);var e=document.createElement("div");e.style.width="300px";e.style.height="300px";e.style.overflow="hidden";e.style.backgroundColor="#fff9";x.appendChild(e);
+var g=null,k=new mxGeometry(100,100,100,100),n=5,t=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+d.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";x.appendChild(A);d=document.createElement("label");d.setAttribute("for","croppingRect");mxUtils.write(d,mxResources.get("rectangle"));
x.appendChild(d);var E=document.createElement("input");E.setAttribute("type","radio");E.setAttribute("id","croppingRounded");E.setAttribute("name","croppingShape");E.style.margin="5px";x.appendChild(E);d=document.createElement("label");d.setAttribute("for","croppingRounded");mxUtils.write(d,mxResources.get("rounded"));x.appendChild(d);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingEllipse");y.setAttribute("name","croppingShape");y.style.margin="5px";
x.appendChild(y);d=document.createElement("label");d.setAttribute("for","croppingEllipse");mxUtils.write(d,mxResources.get("ellipse"));x.appendChild(d);mxEvent.addListener(A,"change",m);mxEvent.addListener(E,"change",m);mxEvent.addListener(y,"change",m);var B=document.createElement("div");B.style.textAlign="center";B.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min","1");J.setAttribute("max","49");J.setAttribute("value",n);J.setAttribute("title",
-mxResources.get("arcSize"));B.appendChild(J);x.appendChild(B);mxEvent.addListener(J,"change",function(){n=this.value;m(!0)});d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){c(l(),q.geometry.width,q.geometry.height);b.hideDialog()});z.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){c(null,C.width,C.height);b.hideDialog()});N.className="geBtn";var v=document.createElement("div");
+mxResources.get("arcSize"));B.appendChild(J);x.appendChild(B);mxEvent.addListener(J,"change",function(){n=this.value;m(!0)});d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){c(l(),t.geometry.width,t.geometry.height);b.hideDialog()});z.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){c(null,C.width,C.height);b.hideDialog()});N.className="geBtn";var v=document.createElement("div");
v.style.marginTop="10px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(d),v.appendChild(N),v.appendChild(z)):(v.appendChild(N),v.appendChild(z),v.appendChild(d));x.appendChild(v);this.container=x},EditGeometryDialog=function(b,d){var f=b.editor.graph,c=1==d.length?f.getCellGeometry(d[0]):null,l=document.createElement("div"),m=document.createElement("table"),x=document.createElement("tbody"),z=document.createElement("tr"),C=document.createElement("td"),e=document.createElement("td");
m.style.paddingLeft="6px";mxUtils.write(C,mxResources.get("relative")+":");var g=document.createElement("input");g.setAttribute("type","checkbox");null!=c&&c.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};e.appendChild(g);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=document.createElement("td");mxUtils.write(C,mxResources.get("left")+":");var k=document.createElement("input");
k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";e.appendChild(k);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=document.createElement("td");mxUtils.write(C,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";e.appendChild(n);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");
-e=document.createElement("td");mxUtils.write(C,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.x:"";e.appendChild(q);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=document.createElement("td");mxUtils.write(C,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
+e=document.createElement("td");mxUtils.write(C,mxResources.get("dx")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c&&null!=c.offset?c.offset.x:"";e.appendChild(t);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=document.createElement("td");mxUtils.write(C,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
p.value=null!=c&&null!=c.offset?c.offset.y:"";e.appendChild(p);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=document.createElement("td");mxUtils.write(C,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.width:"";e.appendChild(A);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=
document.createElement("td");mxUtils.write(C,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="100px";E.value=null!=c?c.height:"";e.appendChild(E);z.appendChild(C);z.appendChild(e);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");e=document.createElement("td");mxUtils.write(C,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=
1==d.length?mxUtils.getValue(f.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";e.appendChild(y);z.appendChild(C);z.appendChild(e);x.appendChild(z);m.appendChild(x);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<d.length;J++){var N=f.getCellGeometry(d[J]);null!=N&&(N=N.clone(),f.isCellMovable(d[J])&&(N.relative=g.checked,
-0<mxUtils.trim(k.value).length&&(N.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(N.y=Number(n.value)),0<mxUtils.trim(q.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(q.value)),0<mxUtils.trim(p.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(p.value))),f.isCellResizable(d[J])&&(0<mxUtils.trim(A.value).length&&(N.width=Number(A.value)),0<mxUtils.trim(E.value).length&&(N.height=Number(E.value))),f.getModel().setGeometry(d[J],N));0<mxUtils.trim(y.value).length&&
+0<mxUtils.trim(k.value).length&&(N.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(N.y=Number(n.value)),0<mxUtils.trim(t.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(t.value)),0<mxUtils.trim(p.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(p.value))),f.isCellResizable(d[J])&&(0<mxUtils.trim(A.value).length&&(N.width=Number(A.value)),0<mxUtils.trim(E.value).length&&(N.height=Number(E.value))),f.getModel().setGeometry(d[J],N));0<mxUtils.trim(y.value).length&&
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[d[J]])}}finally{f.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&B.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(B)):(m.appendChild(B),m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,d,f,c,l,m){function x(G){for(G=document.elementFromPoint(G.clientX,
-G.clientY);null!=G&&G.parentNode!=q;)G=G.parentNode;var I=null;if(null!=G){var M=q.firstChild;for(I=0;null!=M&&M!=G;)M=M.nextSibling,I++}return I}function z(G,I,M,K,H,F,P,U,T){try{if(b.spinner.stop(),null==I||"image/"==I.substring(0,6))if(null==G&&null!=P||null==A[G]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
-X.title.length?"#d0d0d0":""};q.style.backgroundImage="";p.style.display="none";var W=H,t=F;if(H>b.maxImageSize||F>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,H)),b.maxImageSize/Math.max(1,F));H*=D;F*=D}W>t?(t=Math.round(100*t/W),W=100):(W=Math.round(100*W/t),t=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
-"transform .1s ease-in-out");if(null!=G){var R=document.createElement("img");R.setAttribute("src",J.convert(G));R.style.width=W+"px";R.style.height=t+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-t)/2)+"px";R.style.paddingLeft=Math.floor((100-W)/2)+"px";L.appendChild(R)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var Q=document.createElement("img");
-Q.setAttribute("src",Editor.closeBlackImage);Q.setAttribute("border","0");Q.setAttribute("title",mxResources.get("delete"));Q.setAttribute("align","top");Q.style.paddingTop="4px";Q.style.position="absolute";Q.style.marginLeft="-12px";Q.style.zIndex="1";Q.style.cursor="pointer";mxEvent.addListener(Q,"dragstart",function(ca){mxEvent.consume(ca)});(function(ca,fa,ka){mxEvent.addListener(Q,"click",function(ha){A[fa]=null;for(var ra=0;ra<g.length;ra++)if(null!=g[ra].data&&g[ra].data==fa||null!=g[ra].xml&&
-null!=ka&&g[ra].xml==ka.xml){g.splice(ra,1);break}L.parentNode.removeChild(ca);0==g.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(Q,"dblclick",function(ha){mxEvent.consume(ha)})})(L,G,P);L.appendChild(Q);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=G?(X={data:G,w:H,h:F,title:T},null!=U&&(X.aspect=U),A[G]=R,g.push(X)):null!=P&&(P.aspect="fixed",g.push(P),X=P);mxEvent.addListener(S,"keydown",function(ca){13==ca.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ca))});V();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(ca){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ca)});O=function(ca){if(mxClient.IS_IOS||
-mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ka){null!=ka&&(X.title=ka,V())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ca)}else if("true"!=S.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);B=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(ca)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);q.appendChild(L);mxEvent.addListener(L,"dragstart",function(ca){null==G&&null!=P&&(Q.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ca.dataTransfer.setData("Text",
-P.xml);E=x(ca);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);Q.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ca){"hidden"==Q.style.visibility&&(Q.style.visibility="",S.style.visibility="");E=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else N||(N=!0,b.handleError({message:mxResources.get("fileExists")}));else{H=
-!1;try{if(W=mxUtils.parseXml(G),"mxlibrary"==W.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=t&&0<t.length)for(var aa=0;aa<t.length;aa++)null!=t[aa].xml?z(null,null,0,0,0,0,t[aa]):z(t[aa].data,null,0,0,t[aa].w,t[aa].h,null,"fixed",t[aa].title);H=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){t=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(t));var Z=b.editor.graph.getBoundingBoxFromGeometry(O);
-z(null,null,0,0,0,0,{xml:t,w:Z.width,h:Z.height})}H=!0}}catch(ca){}H||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ca){}return null}function C(G){G.dataTransfer.dropEffect=null!=E?"move":"copy";G.stopPropagation();G.preventDefault()}function e(G){G.stopPropagation();G.preventDefault();N=!1;y=x(G);if(null!=E)null!=y&&y<q.children.length?(g.splice(y>E?y-1:y,0,g.splice(E,1)[0]),q.insertBefore(q.children[E],q.children[y])):(g.push(g.splice(E,1)[0]),q.appendChild(q.children[E]));
-else if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,0,0,b.maxImageSize,v(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var I=decodeURIComponent(G.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(I)||/(\.png)($|\?)/i.test(I)||/(\.gif)($|\?)/i.test(I)||/(\.svg)($|\?)/i.test(I))&&b.loadImage(I,function(M){z(I,null,0,0,M.width,M.height);q.scrollTop=q.scrollHeight})}G.stopPropagation();G.preventDefault()}var g=[];f=document.createElement("div");
+G.clientY);null!=G&&G.parentNode!=t;)G=G.parentNode;var I=null;if(null!=G){var M=t.firstChild;for(I=0;null!=M&&M!=G;)M=M.nextSibling,I++}return I}function z(G,I,M,K,H,F,P,U,T){try{if(b.spinner.stop(),null==I||"image/"==I.substring(0,6))if(null==G&&null!=P||null==A[G]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
+X.title.length?"#d0d0d0":""};t.style.backgroundImage="";p.style.display="none";var W=H,q=F;if(H>b.maxImageSize||F>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,H)),b.maxImageSize/Math.max(1,F));H*=D;F*=D}W>q?(q=Math.round(100*q/W),W=100):(W=Math.round(100*W/q),q=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
+"transform .1s ease-in-out");if(null!=G){var R=document.createElement("img");R.setAttribute("src",J.convert(G));R.style.width=W+"px";R.style.height=q+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-q)/2)+"px";R.style.paddingLeft=Math.floor((100-W)/2)+"px";L.appendChild(R)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var Q=document.createElement("img");
+Q.setAttribute("src",Editor.closeBlackImage);Q.setAttribute("border","0");Q.setAttribute("title",mxResources.get("delete"));Q.setAttribute("align","top");Q.style.paddingTop="4px";Q.style.position="absolute";Q.style.marginLeft="-12px";Q.style.zIndex="1";Q.style.cursor="pointer";mxEvent.addListener(Q,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,fa,ka){mxEvent.addListener(Q,"click",function(ha){A[fa]=null;for(var ra=0;ra<g.length;ra++)if(null!=g[ra].data&&g[ra].data==fa||null!=g[ra].xml&&
+null!=ka&&g[ra].xml==ka.xml){g.splice(ra,1);break}L.parentNode.removeChild(ba);0==g.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(Q,"dblclick",function(ha){mxEvent.consume(ha)})})(L,G,P);L.appendChild(Q);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=G?(X={data:G,w:H,h:F,title:T},null!=U&&(X.aspect=U),A[G]=R,g.push(X)):null!=P&&(P.aspect="fixed",g.push(P),X=P);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ba))});V();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||
+mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ka){null!=ka&&(X.title=ka,V())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);B=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);t.appendChild(L);mxEvent.addListener(L,"dragstart",function(ba){null==G&&null!=P&&(Q.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ba.dataTransfer.setData("Text",
+P.xml);E=x(ba);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);Q.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ba){"hidden"==Q.style.visibility&&(Q.style.visibility="",S.style.visibility="");E=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else N||(N=!0,b.handleError({message:mxResources.get("fileExists")}));else{H=
+!1;try{if(W=mxUtils.parseXml(G),"mxlibrary"==W.documentElement.nodeName){q=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=q&&0<q.length)for(var aa=0;aa<q.length;aa++)null!=q[aa].xml?z(null,null,0,0,0,0,q[aa]):z(q[aa].data,null,0,0,q[aa].w,q[aa].h,null,"fixed",q[aa].title);H=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){q=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(q));var Z=b.editor.graph.getBoundingBoxFromGeometry(O);
+z(null,null,0,0,0,0,{xml:q,w:Z.width,h:Z.height})}H=!0}}catch(ba){}H||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function C(G){G.dataTransfer.dropEffect=null!=E?"move":"copy";G.stopPropagation();G.preventDefault()}function e(G){G.stopPropagation();G.preventDefault();N=!1;y=x(G);if(null!=E)null!=y&&y<t.children.length?(g.splice(y>E?y-1:y,0,g.splice(E,1)[0]),t.insertBefore(t.children[E],t.children[y])):(g.push(g.splice(E,1)[0]),t.appendChild(t.children[E]));
+else if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,0,0,b.maxImageSize,v(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var I=decodeURIComponent(G.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(I)||/(\.png)($|\?)/i.test(I)||/(\.gif)($|\?)/i.test(I)||/(\.svg)($|\?)/i.test(I))&&b.loadImage(I,function(M){z(I,null,0,0,M.width,M.height);t.scrollTop=t.scrollHeight})}G.stopPropagation();G.preventDefault()}var g=[];f=document.createElement("div");
f.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";f.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==d&&(d=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",d);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";null==l||l.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");
-p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var A={},E=null,y=null,B=null;d=function(G){"true"!=mxEvent.getSource(G).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(G))};mxEvent.addListener(q,"mousedown",d);mxEvent.addListener(q,"pointerdown",d);mxEvent.addListener(q,"touchstart",d);var J=new mxUrlConverter,N=
-!1;if(null!=c)for(d=0;d<c.length;d++)k=c[d],z(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(q,"dragleave",function(G){p.style.cursor="";for(var I=mxEvent.getSource(G);null!=I;){if(I==q||I==p){G.stopPropagation();G.preventDefault();break}I=I.parentNode}});var v=function(G){return function(I,M,K,H,F,P,U,T,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){z(W,M,K,H,F,P,U,"fixed",mxEvent.isAltDown(G)?
-null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(I,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(z(W.responseText,M,K,H,F,P,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(z(I,M,K,H,F,P,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",C);mxEvent.addListener(q,"drop",e);mxEvent.addListener(p,"dragover",C);mxEvent.addListener(p,"drop",e);f.appendChild(q);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&
+5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");
+p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var A={},E=null,y=null,B=null;d=function(G){"true"!=mxEvent.getSource(G).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(G))};mxEvent.addListener(t,"mousedown",d);mxEvent.addListener(t,"pointerdown",d);mxEvent.addListener(t,"touchstart",d);var J=new mxUrlConverter,N=
+!1;if(null!=c)for(d=0;d<c.length;d++)k=c[d],z(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(t,"dragleave",function(G){p.style.cursor="";for(var I=mxEvent.getSource(G);null!=I;){if(I==t||I==p){G.stopPropagation();G.preventDefault();break}I=I.parentNode}});var v=function(G){return function(I,M,K,H,F,P,U,T,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){z(W,M,K,H,F,P,U,"fixed",mxEvent.isAltDown(G)?
+null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(I,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(z(W.responseText,M,K,H,F,P,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(z(I,M,K,H,F,P,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",C);mxEvent.addListener(t,"drop",e);mxEvent.addListener(p,"dragover",C);mxEvent.addListener(p,"drop",e);f.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&
c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(G){b.spinner.stop();if(null!=G){var I=b.getSearch("create title mode url drive splash state clibs ui".split(" "));I+=(0==I.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(G);G=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
"/"+I,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(G.container,450,240,!0);G.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("export"),
function(){var G=b.createLibraryDataFromImages(g),I=n.value;/(\.xml)$/i.test(I)||(I+=".xml");b.isLocalFileSave()?b.saveLocalFile(G,I,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(I)+"&format=xml&xml="+encodeURIComponent(G))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var u=document.createElement("input");u.setAttribute("multiple","multiple");
-u.setAttribute("type","file");mxEvent.addListener(u,"change",function(G){N=!1;b.importFiles(u.files,0,0,b.maxImageSize,function(I,M,K,H,F,P,U,T,V){null!=u.files&&(v(G)(I,M,K,H,F,P,U,T,V),u.type="",u.type="file",u.value="")});q.scrollTop=q.scrollHeight});u.style.display="none";document.body.appendChild(u);b.libDlgFileInputElt=u}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k=
-mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(G,I,M){N=!1;if(null!=G){if("data:image/"==G.substring(0,11)){var K=G.indexOf(",");0<K&&(G=G.substring(0,K)+";base64,"+G.substring(K+1))}z(G,null,0,0,I,M);q.scrollTop=q.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(G,I,M,K){b.saveLibrary(G,I,M,K)};k=mxUtils.button(mxResources.get("save"),
+u.setAttribute("type","file");mxEvent.addListener(u,"change",function(G){N=!1;b.importFiles(u.files,0,0,b.maxImageSize,function(I,M,K,H,F,P,U,T,V){null!=u.files&&(v(G)(I,M,K,H,F,P,U,T,V),u.type="",u.type="file",u.value="")});t.scrollTop=t.scrollHeight});u.style.display="none";document.body.appendChild(u);b.libDlgFileInputElt=u}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k=
+mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(G,I,M){N=!1;if(null!=G){if("data:image/"==G.substring(0,11)){var K=G.indexOf(",");0<K&&(G=G.substring(0,K)+";base64,"+G.substring(K+1))}z(G,null,0,0,I,M);t.scrollTop=t.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(G,I,M,K){b.saveLibrary(G,I,M,K)};k=mxUtils.button(mxResources.get("save"),
mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(n.value,g,l,m)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";c.appendChild(k);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,d,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),x=document.createElement("tbody");m.style.cellPadding="4px";var z=document.createElement("tr");var C=document.createElement("td");C.setAttribute("colspan",
"2");C.style.fontSize="10pt";mxUtils.write(C,f);z.appendChild(C);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");var e=document.createElement("textarea");e.style.outline="none";e.style.resize="none";e.style.width=c-200+"px";e.style.height=l+"px";this.textarea=e;this.init=function(){e.focus();e.scrollTop=0};C.appendChild(e);z.appendChild(C);C=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
"6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);C.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var k=b.editor.graph.cloneCell(d);g.addCells([k]);f=g.view.getState(k);var n="";null!=f.shape&&null!=f.shape.stencil&&(n=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(e,n||"");f=g.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);g.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);z.appendChild(C);
x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");C.setAttribute("colspan","2");C.style.paddingTop="2px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",C.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&C.appendChild(l);
-var q=function(p,A,E){var y=e.value,B=mxUtils.parseXml(y);y=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(E&&b.hideDialog(),B=!p.model.contains(A),!E||B||y!=n){y=Graph.compress(y);p.getModel().beginUpdate();try{if(B){var J=b.editor.graph.getFreeInsertPoint();A.geometry.x=J.x;A.geometry.y=J.y;p.addCell(A)}p.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+y+")",[A])}catch(N){throw N;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(A),p.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){q(g,k,!1)});f.className="geBtn";C.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){q(b.editor.graph,d,!0)});f.className="geBtn gePrimaryBtn";C.appendChild(f);b.editor.cancelFirst||C.appendChild(l);z.appendChild(C);x.appendChild(z);m.appendChild(x);this.container=m},CustomDialog=function(b,d,f,c,l,m,
+var t=function(p,A,E){var y=e.value,B=mxUtils.parseXml(y);y=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(E&&b.hideDialog(),B=!p.model.contains(A),!E||B||y!=n){y=Graph.compress(y);p.getModel().beginUpdate();try{if(B){var J=b.editor.graph.getFreeInsertPoint();A.geometry.x=J.x;A.geometry.y=J.y;p.addCell(A)}p.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+y+")",[A])}catch(N){throw N;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(A),p.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){t(g,k,!1)});f.className="geBtn";C.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){t(b.editor.graph,d,!0)});f.className="geBtn gePrimaryBtn";C.appendChild(f);b.editor.cancelFirst||C.appendChild(l);z.appendChild(C);x.appendChild(z);m.appendChild(x);this.container=m},CustomDialog=function(b,d,f,c,l,m,
x,z,C,e,g){var k=document.createElement("div");k.appendChild(d);var n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="center";null!=x&&n.appendChild(x);b.isOffline()||null==m||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),d.className="geBtn",n.appendChild(d));C=mxUtils.button(C||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});C.className="geBtn";z&&(C.style.display="none");b.editor.cancelFirst&&n.appendChild(C);l=mxUtils.button(l||
-mxResources.get("ok"),mxUtils.bind(this,function(){e||b.hideDialog(null,null,this.container);if(null!=f){var q=f();if("string"===typeof q){b.showError(mxResources.get("error"),q);return}}e&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(C);if(null!=g)for(z=0;z<g.length;z++)(function(q,p,A){q=mxUtils.button(q,function(E){p(E)});null!=A&&q.setAttribute("title",A);q.className="geBtn";n.appendChild(q)})(g[z][0],g[z][1],g[z][2]);
-k.appendChild(n);this.cancelBtn=C;this.okButton=l;this.container=k},TemplatesDialog=function(b,d,f,c,l,m,x,z,C,e,g,k,n,q,p){function A(ea){Ca.innerText=ea;Ca.style.display="block";setTimeout(function(){Ca.style.display="none"},4E3)}function E(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",D=t,t=null)}function y(ea,ia,oa,ma,xa,Ea,Ba){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";T.querySelector(".geTempDlgRadioBtn[data-id="+
+mxResources.get("ok"),mxUtils.bind(this,function(){e||b.hideDialog(null,null,this.container);if(null!=f){var t=f();if("string"===typeof t){b.showError(mxResources.get("error"),t);return}}e&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(C);if(null!=g)for(z=0;z<g.length;z++)(function(t,p,A){t=mxUtils.button(t,function(E){p(E)});null!=A&&t.setAttribute("title",A);t.className="geBtn";n.appendChild(t)})(g[z][0],g[z][1],g[z][2]);
+k.appendChild(n);this.cancelBtn=C;this.okButton=l;this.container=k},TemplatesDialog=function(b,d,f,c,l,m,x,z,C,e,g,k,n,t,p){function A(ea){Ca.innerText=ea;Ca.style.display="block";setTimeout(function(){Ca.style.display="none"},4E3)}function E(){null!=q&&(q.style.fontWeight="normal",q.style.textDecoration="none",D=q,q=null)}function y(ea,ia,oa,ma,xa,Ea,Ba){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";T.querySelector(".geTempDlgRadioBtn[data-id="+
ma+"]").className="geTempDlgRadioBtn "+(Ba?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");T.querySelector("."+ia).src="/images/"+oa+"-sel.svg";T.querySelector("."+xa).src="/images/"+Ea+".svg";return!0}function B(ea,ia,oa,ma){function xa(sa,Ja){null==Ba?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&(Ba=Na.getText());Ja(Ba)}))):Ja(Ba)}
function Ea(sa,Ja,Na){if(null!=sa&&mxUtils.isAncestorNode(document.body,ia)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(sa.ownerDocument),Ka=new mxGraphModel;Ra.decode(sa,Ka);sa=Ka.root.getChildAt(0).children||[];b.sidebar.createTooltip(ia,sa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(Ja,Na),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";T.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(T.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}var Ba=null;if(qa||b.sidebar.currentElt==
ia)b.sidebar.hideTooltip();else{var ua=function(sa){qa&&b.sidebar.currentElt==ia&&Ea(sa,mxEvent.getClientX(ma),mxEvent.getClientY(ma));qa=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ia;qa=!0;oa.src="/images/aui-wait.gif";ea.isExt?C(ea,ua,function(){A(mxResources.get("cantLoadPrev"));qa=!1;oa.src="/images/icon-search.svg"}):xa(ea.url,ua)}}function J(ea,ia,oa){if(null!=L){for(var ma=L.className.split(" "),xa=0;xa<ma.length;xa++)if(-1<ma[xa].indexOf("Active")){ma.splice(xa,
1);break}L.className=ma.join(" ")}null!=ea?(L=ea,L.className+=" "+ia,R=oa,Ma.className="geTempDlgCreateBtn"):(R=L=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(ea,ia){if(null!=R){var oa=function(ua){Ba.isExternal?C(Ba,function(sa){ma(sa,ua)},xa):Ba.url?mxUtils.get(TEMPLATE_PATH+"/"+Ba.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?ma(sa.getText(),ua):xa()})):ma(b.emptyDiagramXml,ua)},ma=function(ua,sa){p||b.hideDialog(!0);d(ua,sa,Ba,ia)},xa=function(){A(mxResources.get("cannotLoad"));
Ea()},Ea=function(){R=Ba;Ma.className="geTempDlgCreateBtn";ia&&(za.className="geTempDlgOpenBtn")},Ba=R;R=null;"boolean"!==typeof ia&&(ia=Ba.isExternal&&k);1==ea?e(Ba.url,Ba):ia?(za.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),oa,ea,function(ua){var sa=null!=ua&&0<ua.length;return sa&&p?(oa(ua),!1):sa},null,null,null,Ea,q?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function v(ea){Ma.innerText=mxResources.get(ca||ea?"create":"copy");ea=ea?"none":"";k&&(za.style.display=ea);for(var ia=T.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ia.length;oa++)ia[oa].style.display=ea}function u(ea,ia,oa,ma,xa){xa||(ka.innerText="",J(),X=ea,aa=ma);var Ea=null;if(oa){Ea=document.createElement("table");
+mxResources.get("ok"),oa,ea,function(ua){var sa=null!=ua&&0<ua.length;return sa&&p?(oa(ua),!1):sa},null,null,null,Ea,t?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function v(ea){Ma.innerText=mxResources.get(ba||ea?"create":"copy");ea=ea?"none":"";k&&(za.style.display=ea);for(var ia=T.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ia.length;oa++)ia[oa].style.display=ea}function u(ea,ia,oa,ma,xa){xa||(ka.innerText="",J(),X=ea,aa=ma);var Ea=null;if(oa){Ea=document.createElement("table");
Ea.className="geTempDlgDiagramsListGrid";var Ba=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Ba.appendChild(ua);Ea.appendChild(Ba);ka.appendChild(Ea)}for(Ba=0;Ba<ea.length;Ba++){ea[Ba].isExternal=
!ia;var sa=ea[Ba].url,Ja=(ua=mxUtils.htmlEntities(ia?mxResources.get(ea[Ba].title,null,ea[Ba].title):ea[Ba].title))||ea[Ba].url,Na=ea[Ba].imgUrl,Ra=ea[Ba].changedBy||"",Ka="";ea[Ba].lastModifiedOn&&(Ka=b.timeSince(new Date(ea[Ba].lastModifiedOn)),null==Ka&&(Ka=mxResources.get("lessThanAMinute")),Ka=mxResources.get("timeAgo",[Ka],"{1} ago"));Na||(Na=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=oa?50:15;null!=ua&&ua.length>sa&&(ua=ua.substring(0,sa)+"&hellip;");if(oa){var Pa=document.createElement("tr");
Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));xa||Na.appendChild(Qa);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=ua;Na.appendChild(Ja);Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ra;Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ka;Pa.appendChild(Na);Ea.appendChild(Pa);
@@ -11380,42 +11380,42 @@ Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ua?ua:"";Oa.appendChil
ma[Ua],0<ea.length&&(xa=document.createElement("div"),xa.className="geTempDlgImportCat",xa.innerText=mxResources.get(Ua,null,Ua),ka.appendChild(xa),u(ea,ia,oa,null,!0))}function G(ea,ia){Aa.innerText="";J();var oa=Math.floor(Aa.offsetWidth/150)-1;ia=!ia&&ea.length>oa?oa:ea.length;for(var ma=0;ma<ia;ma++){var xa=ea[ma];xa.isCategory=!0;var Ea=document.createElement("div"),Ba=mxResources.get(xa.title);null==Ba&&(Ba=xa.title.substring(0,1).toUpperCase()+xa.title.substring(1));Ea.className="geTempDlgNewDiagramCatItem";
Ea.setAttribute("title",Ba);Ba=mxUtils.htmlEntities(Ba);15<Ba.length&&(Ba=Ba.substring(0,15)+"&hellip;");null==L&&(v(!0),J(Ea,"geTempDlgNewDiagramCatItemActive",xa));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+"/"+xa.img;ua.appendChild(sa);Ea.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Ba;Ea.appendChild(ua);Aa.appendChild(Ea);(function(Ja,
Na){mxEvent.addListener(Ea,"click",function(){L!=Na&&(v(!0),J(Na,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(Ea,"dblclick",N)})(xa,Ea)}Ea=document.createElement("div");Ea.className="geTempDlgNewDiagramCatItem";Ba=mxResources.get("showAllTemps");Ea.setAttribute("title",Ba);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize="32px";Ea.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";
-ua.innerText=Ba;Ea.appendChild(ua);Aa.appendChild(Ea);mxEvent.addListener(Ea,"click",function(){function Ja(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}ca=!0;var Na=T.querySelector(".geTemplatesList");Na.style.display="block";la.style.width="";Da.style.display="";Da.value="";Y=null;Ja()});fa.style.display=ea.length<=oa?"none":""}function I(ea,ia,oa){function ma(Sa,Ua){var La=mxResources.get(Sa);null==La&&(La=Sa.substring(0,1).toUpperCase()+Sa.substring(1));
-Sa=La+" ("+Ua.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"&hellip;");return{lbl:La+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function xa(Sa,Ua,La,Ta,Va){mxEvent.addListener(La,"click",function(){t!=La&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Ga.style.display="none",Fa.style.minHeight="100%"),t=La,t.style.fontWeight="bold",t.style.textDecoration="underline",la.scrollTop=0,V&&(W=!0),ha.innerHTML=Ua,ra.style.display="none",u(Va?ia[Sa]:
+ua.innerText=Ba;Ea.appendChild(ua);Aa.appendChild(Ea);mxEvent.addListener(Ea,"click",function(){function Ja(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}ba=!0;var Na=T.querySelector(".geTemplatesList");Na.style.display="block";la.style.width="";Da.style.display="";Da.value="";Y=null;Ja()});fa.style.display=ea.length<=oa?"none":""}function I(ea,ia,oa){function ma(Sa,Ua){var La=mxResources.get(Sa);null==La&&(La=Sa.substring(0,1).toUpperCase()+Sa.substring(1));
+Sa=La+" ("+Ua.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"&hellip;");return{lbl:La+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function xa(Sa,Ua,La,Ta,Va){mxEvent.addListener(La,"click",function(){q!=La&&(null!=q?(q.style.fontWeight="normal",q.style.textDecoration="none"):(Ga.style.display="none",Fa.style.minHeight="100%"),q=La,q.style.fontWeight="bold",q.style.textDecoration="underline",la.scrollTop=0,V&&(W=!0),ha.innerHTML=Ua,ra.style.display="none",u(Va?ia[Sa]:
Ta?Ia[Sa][Ta]:ea[Sa],Va?!1:!0))})}var Ea=T.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Ea.appendChild(oa);for(var Ba in ia){oa=document.createElement("div");var ua=ia[Ba];ua=ma(Ba,ua);oa.className="geTemplateCatLink";oa.setAttribute("title",ua.fullLbl);oa.innerHTML=ua.lbl;Ea.appendChild(oa);xa(Ba,ua.lblOnly,oa,
null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Ea.appendChild(oa)}for(Ba in ea){var sa=Ia[Ba],Ja=oa=document.createElement(sa?"ul":"div");ua=ea[Ba];ua=ma(Ba,ua);if(null!=sa){var Na=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl);
Ra.innerHTML=ua.lbl;Ja=Ra;Na.appendChild(Ra);var Ka=document.createElement("ul");Ka.className="geTempTreeNested";Ka.style.visibility="hidden";for(var Pa in sa){var Qa=document.createElement("li"),Oa=ma(Pa,sa[Pa]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";xa(Ba,Oa.lblOnly,Qa,Pa);Ka.appendChild(Qa)}Na.appendChild(Ka);oa.className="geTempTree";oa.appendChild(Na);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var La=
Sa.querySelectorAll("li"),Ta=0;Ta<La.length;Ta++)La[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<La.length;Va++)La[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ka,Ra)}else oa.className="geTemplateCatLink geTemplateDrawioCatLink",oa.setAttribute("title",ua.fullLbl),oa.innerHTML=ua.lbl;Ea.appendChild(oa);xa(Ba,ua.lblOnly,
Ja)}}function M(){mxUtils.get(c,function(ea){if(!wa){wa=!0;ea=ea.getXml().documentElement.firstChild;for(var ia={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var oa=ea.getAttribute("name"),ma=ea.getElementsByTagName("add"),xa=[],Ea=0;Ea<ma.length;Ea++)xa.push(encodeURIComponent(mxUtils.getTextContent(ma[Ea])));null!=oa&&0<xa.length&&(ia[oa]=xa.join(";"))}else if(xa=ea.getAttribute("url"),null!=xa){ma=ea.getAttribute("section");oa=ea.getAttribute("subsection");
if(null==ma&&(Ea=xa.indexOf("/"),ma=xa.substring(0,Ea),null==oa)){var Ba=xa.indexOf("/",Ea+1);-1<Ba&&(oa=xa.substring(Ea+1,Ba))}Ea=ya[ma];null==Ea&&(ta++,Ea=[],ya[ma]=Ea);xa=ea.getAttribute("clibs");null!=ia[xa]&&(xa=ia[xa]);xa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),clibs:xa,tags:ea.getAttribute("tags")};Ea.push(xa);null!=oa&&(Ea=Ia[ma],null==Ea&&(Ea={},Ia[ma]=Ea),ma=Ea[oa],null==ma&&(ma=[],
-Ea[oa]=ma),ma.push(xa))}ea=ea.nextSibling}I(ya,ja,da)}})}function K(ea){x&&(la.scrollTop=0,ka.innerText="",pa.spin(ka),W=!1,V=!0,ha.innerText=mxResources.get("recentDiag"),Y=null,x(ba,function(){A(mxResources.get("cannotLoad"));ba([])},ea?null:m))}function H(ea){if(""==ea)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var ia={};for(Ja in ya)for(var oa=ya[Ja],ma=0;ma<oa.length;ma++){var xa=oa[ma];if(null!=xa.tags)for(var Ea=xa.tags.toLowerCase().split(";"),Ba=0;Ba<Ea.length;Ba++)null==
+Ea[oa]=ma),ma.push(xa))}ea=ea.nextSibling}I(ya,ja,da)}})}function K(ea){x&&(la.scrollTop=0,ka.innerText="",pa.spin(ka),W=!1,V=!0,ha.innerText=mxResources.get("recentDiag"),Y=null,x(ca,function(){A(mxResources.get("cannotLoad"));ca([])},ea?null:m))}function H(ea){if(""==ea)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var ia={};for(Ja in ya)for(var oa=ya[Ja],ma=0;ma<oa.length;ma++){var xa=oa[ma];if(null!=xa.tags)for(var Ea=xa.tags.toLowerCase().split(";"),Ba=0;Ba<Ea.length;Ba++)null==
ia[Ea[Ba]]&&(ia[Ea[Ba]]=[]),ia[Ea[Ba]].push(xa)}TemplatesDialog.tagsList[c]=ia}var ua=ea.toLowerCase().split(" ");ia=TemplatesDialog.tagsList[c];if(0<da&&null==ia.__tagsList__){for(Ja in ja)for(oa=ja[Ja],ma=0;ma<oa.length;ma++)for(xa=oa[ma],Ea=xa.title.split(" "),Ea.push(Ja),Ba=0;Ba<Ea.length;Ba++){var sa=Ea[Ba].toLowerCase();null==ia[sa]&&(ia[sa]=[]);ia[sa].push(xa)}ia.__tagsList__=!0}var Ja=[];oa={};for(ma=Ea=0;ma<ua.length;ma++)if(0<ua[ma].length){sa=ia[ua[ma]];var Na={};Ja=[];if(null!=sa)for(Ba=
-0;Ba<sa.length;Ba++)xa=sa[Ba],0==Ea==(null==oa[xa.url])&&(Na[xa.url]=!0,Ja.push(xa));oa=Na;Ea++}0==Ja.length?ha.innerText=mxResources.get("noResultsFor",[ea]):u(Ja,!0)}}function F(ea){if(Y!=ea||Q!=Z)E(),la.scrollTop=0,ka.innerText="",ha.innerText=mxResources.get("searchResults")+' "'+ea+'"',na=null,ca?H(ea):z&&(ea?(pa.spin(ka),W=!1,V=!0,z(ea,ba,function(){A(mxResources.get("searchFailed"));ba([])},Q?null:m)):K(Q)),Y=ea,Z=Q}function P(ea){null!=na&&clearTimeout(na);13==ea.keyCode?F(Da.value):na=setTimeout(function(){F(Da.value)},
+0;Ba<sa.length;Ba++)xa=sa[Ba],0==Ea==(null==oa[xa.url])&&(Na[xa.url]=!0,Ja.push(xa));oa=Na;Ea++}0==Ja.length?ha.innerText=mxResources.get("noResultsFor",[ea]):u(Ja,!0)}}function F(ea){if(Y!=ea||Q!=Z)E(),la.scrollTop=0,ka.innerText="",ha.innerText=mxResources.get("searchResults")+' "'+ea+'"',na=null,ba?H(ea):z&&(ea?(pa.spin(ka),W=!1,V=!0,z(ea,ca,function(){A(mxResources.get("searchFailed"));ca([])},Q?null:m)):K(Q)),Y=ea,Z=Q}function P(ea){null!=na&&clearTimeout(na);13==ea.keyCode?F(Da.value):na=setTimeout(function(){F(Da.value)},
1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(z?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
(n?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(k?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",T=document.createElement("div");T.innerHTML=U;T.className=
-"geTemplateDlg";this.container=T;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,t=null,D=null,L=null,R=null,O=!1,Q=!0,S=!1,X=[],aa=null,Y,Z,ca=!1,fa=T.querySelector(".geTempDlgShowAllBtn"),ka=T.querySelector(".geTempDlgDiagramsTiles"),ha=T.querySelector(".geTempDlgDiagramsListTitle"),ra=T.querySelector(".geTempDlgDiagramsListBtns"),la=T.querySelector(".geTempDlgContent"),Fa=T.querySelector(".geTempDlgDiagramsList"),Ga=T.querySelector(".geTempDlgNewDiagramCat"),
-Aa=T.querySelector(".geTempDlgNewDiagramCatList"),Ma=T.querySelector(".geTempDlgCreateBtn"),za=T.querySelector(".geTempDlgOpenBtn"),Da=T.querySelector(".geTempDlgSearchBox"),Ca=T.querySelector(".geTempDlgErrMsg"),pa=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(T.querySelector(".geTempDlgBack"),"click",function(){E();ca=!1;T.querySelector(".geTemplatesList").style.display="none";la.style.width=
+"geTemplateDlg";this.container=T;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,q=null,D=null,L=null,R=null,O=!1,Q=!0,S=!1,X=[],aa=null,Y,Z,ba=!1,fa=T.querySelector(".geTempDlgShowAllBtn"),ka=T.querySelector(".geTempDlgDiagramsTiles"),ha=T.querySelector(".geTempDlgDiagramsListTitle"),ra=T.querySelector(".geTempDlgDiagramsListBtns"),la=T.querySelector(".geTempDlgContent"),Fa=T.querySelector(".geTempDlgDiagramsList"),Ga=T.querySelector(".geTempDlgNewDiagramCat"),
+Aa=T.querySelector(".geTempDlgNewDiagramCatList"),Ma=T.querySelector(".geTempDlgCreateBtn"),za=T.querySelector(".geTempDlgOpenBtn"),Da=T.querySelector(".geTempDlgSearchBox"),Ca=T.querySelector(".geTempDlgErrMsg"),pa=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(T.querySelector(".geTempDlgBack"),"click",function(){E();ba=!1;T.querySelector(".geTemplatesList").style.display="none";la.style.width=
"100%";Ga.style.display="";Fa.style.minHeight="calc(100% - 280px)";Da.style.display=z?"":"none";Da.value="";Y=null;K(Q)});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){y(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==Y?K(Q):F(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){y(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==Y?K(Q):F(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){y(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,u(X,!1,S,aa))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){y(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,u(X,!1,S,aa))});var qa=!1;
mxEvent.addListener(fa,"click",function(){O?(Ga.style.height="280px",Aa.style.height="190px",fa.innerText=mxResources.get("showMore"),G(va)):(Ga.style.height="440px",Aa.style.height="355px",fa.innerText=mxResources.get("showLess"),G(va,!0));O=!O});var wa=!1,Ha=!1,ya={},Ia={},ja={},va=[],ta=1,da=0;null!=g?g(function(ea,ia){ja=ea;da=ia;M()},M):M();mxUtils.get(l,function(ea){if(!Ha){Ha=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==typeof ea.getAttribute&&null!=ea.getAttribute("title")&&
-va.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;G(va)}});var ba=function(ea,ia,oa){ra.style.display="";pa.stop();V=!1;if(W)W=!1;else if(ia)ka.innerText=ia;else{oa=oa||{};ia=0;for(var ma in oa)ia+=oa[ma].length;0==ea.length&&0==ia?ka.innerText=mxResources.get("noDiagrams"):u(ea,!1,S,0==ia?null:oa)}};K(Q);var na=null;mxEvent.addListener(Da,"keyup",P);mxEvent.addListener(Da,"search",P);mxEvent.addListener(Da,
+va.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;G(va)}});var ca=function(ea,ia,oa){ra.style.display="";pa.stop();V=!1;if(W)W=!1;else if(ia)ka.innerText=ia;else{oa=oa||{};ia=0;for(var ma in oa)ia+=oa[ma].length;0==ea.length&&0==ia?ka.innerText=mxResources.get("noDiagrams"):u(ea,!1,S,0==ia?null:oa)}};K(Q);var na=null;mxEvent.addListener(Da,"keyup",P);mxEvent.addListener(Da,"search",P);mxEvent.addListener(Da,
"input",P);mxEvent.addListener(Ma,"click",function(ea){N(!1,!1)});k&&mxEvent.addListener(za,"click",function(ea){N(!1,!0)});n&&mxEvent.addListener(T.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){N(!0)});mxEvent.addListener(T.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,d,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var x="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";d==b.drive?(x=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?
(x=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==b.oneDrive?(x=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(x=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(x=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg"):d==b.trello&&(x=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));
f=mxUtils.button(f,c);f.insertBefore(z,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,d,f,c,l){function m(J){this.style.border="";13==J.keyCode&&B.click()}var x=document.createElement("table"),z=document.createElement("tbody");x.style.marginTop="8px";var C=document.createElement("tr");var e=document.createElement("td");e.colSpan=2;e.style.whiteSpace=
"nowrap";e.style.fontSize="10pt";e.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","sysfonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-sysfonts");e.appendChild(g);var k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",null,"System Fonts"));e.appendChild(k);C.appendChild(e);
z.appendChild(C);C=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.width="120px";e.style.paddingLeft="15px";mxUtils.write(e,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(e);var n=document.createElement("input");"s"==c&&n.setAttribute("value",d);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_s";e=document.createElement("td");e.appendChild(n);C.appendChild(e);z.appendChild(C);C=document.createElement("tr");
-e=document.createElement("td");e.colSpan=2;e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","googlefonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-googlefonts");e.appendChild(q);k=document.createElement("label");k.setAttribute("for","fontdialog-googlefonts");mxUtils.write(k,mxResources.get("googleFonts",
+e=document.createElement("td");e.colSpan=2;e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","googlefonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-googlefonts");e.appendChild(t);k=document.createElement("label");k.setAttribute("for","fontdialog-googlefonts");mxUtils.write(k,mxResources.get("googleFonts",
null,"Google Fonts"));e.appendChild(k);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(k=b.menus.createHelpLink("https://fonts.google.com/"),k.getElementsByTagName("img")[0].setAttribute("valign","middle"),e.appendChild(k));C.appendChild(e);z.appendChild(C);C=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.width="120px";e.style.paddingLeft="15px";mxUtils.write(e,mxResources.get("fontname",null,"Font Name")+":");
C.appendChild(e);var p=document.createElement("input");"g"==c&&p.setAttribute("value",d);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";e=document.createElement("td");e.appendChild(p);C.appendChild(e);z.appendChild(C);C=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");e.appendChild(A);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));e.appendChild(k);C.appendChild(e);Editor.enableWebFonts&&z.appendChild(C);C=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";e.style.width="120px";e.style.paddingLeft=
"15px";mxUtils.write(e,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(e);var E=document.createElement("input");"w"==c&&(Editor.enableWebFonts?E.setAttribute("value",d):n.setAttribute("value",d));E.style.marginLeft="4px";E.style.width="250px";E.className="dlg_fontName_w";e=document.createElement("td");e.appendChild(E);C.appendChild(e);Editor.enableWebFonts&&z.appendChild(C);C=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";
e.style.width="120px";e.style.paddingLeft="15px";mxUtils.write(e,mxResources.get("fontUrl",null,"Font URL")+":");C.appendChild(e);var y=document.createElement("input");y.setAttribute("value",f||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";e=document.createElement("td");e.appendChild(y);C.appendChild(e);Editor.enableWebFonts&&z.appendChild(C);this.init=function(){var J=n;"g"==c?J=p:"w"==c&&Editor.enableWebFonts&&(J=E);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
J.select():document.execCommand("selectAll",!1,null)};C=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="20px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");b.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",e.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});d.className="geBtn";b.editor.cancelFirst&&e.appendChild(d);
-var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var J=n.value;var N="s"}else if(q.checked){J=p.value;var v=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");N="g"}else A.checked&&(J=E.value,v=y.value,N="w");var u=v;var G=N,I=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==J||0==J.length?(x.querySelector(".dlg_fontName_"+G).style.border="1px solid red",u=!1):"w"!=G||I.test(u)?u=!0:(x.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",u=!1);u&&(l(J,v,N),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(E,"keypress",m);mxEvent.addListener(y,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(E,"focus",function(){A.setAttribute("checked","checked");A.checked=
+var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var J=n.value;var N="s"}else if(t.checked){J=p.value;var v=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");N="g"}else A.checked&&(J=E.value,v=y.value,N="w");var u=v;var G=N,I=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==J||0==J.length?(x.querySelector(".dlg_fontName_"+G).style.border="1px solid red",u=!1):"w"!=G||I.test(u)?u=!0:(x.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",u=!1);u&&(l(J,v,N),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(E,"keypress",m);mxEvent.addListener(y,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(E,"focus",function(){A.setAttribute("checked","checked");A.checked=
!0});mxEvent.addListener(y,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});e.appendChild(B);b.editor.cancelFirst||e.appendChild(d);C.appendChild(e);z.appendChild(C);x.appendChild(z);this.container=x};
function AspectDialog(b,d,f,c,l){this.aspect={pageId:d||(b.pages?b.pages[0].getId():null),layerIds:f||[]};d=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));d.appendChild(m);f=document.createElement("div");f.className="geAspectDlgList";d.appendChild(f);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));d.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList";
d.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(x);x.className="geBtn gePrimaryBtn";
@@ -11431,15 +11431,15 @@ z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";mxUtil
mxUtils.write(z,mxResources.get("borderWidth")+":");l.appendChild(z);var e=document.createElement("input");e.setAttribute("value",x);e.style.marginLeft="4px";e.style.width="180px";z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(e);l.appendChild(z);f.appendChild(l);this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
parseInt(C.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(e.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var g=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";mxUtils.write(z,mxResources.get("compressed")+":");l.appendChild(z);var k=document.createElement("input");k.setAttribute("type","checkbox");
g&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(k);l.appendChild(z);f.appendChild(l);this.init=function(){k.focus()};m=function(){null!=b.fileNode&&g!=k.checked&&(b.fileNode.setAttribute("compressed",k.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";
-z.style.width="120px";mxUtils.write(z,mxResources.get("realtimeCollaboration")+":");l.appendChild(z);var n=document.createElement("input");n.setAttribute("type","checkbox");var q=c.isRealtimeEnabled();if(q="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=q&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this,
+z.style.width="120px";mxUtils.write(z,mxResources.get("realtimeCollaboration")+":");l.appendChild(z);var n=document.createElement("input");n.setAttribute("type","checkbox");var t=c.isRealtimeEnabled();if(t="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=t&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this,
function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){n.focus()};z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(n);z.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(z);f.appendChild(l)}this.init=null!=this.init?this.init:
function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");z=document.createElement("td");z.colSpan=2;z.style.paddingTop="20px";z.style.whiteSpace="nowrap";z.setAttribute("align","center");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&z.appendChild(x);z.appendChild(m);b.editor.cancelFirst||z.appendChild(x);l.appendChild(z);f.appendChild(l);d.appendChild(f);this.container=
d},ConnectionPointsDialog=function(b,d){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(H,F){H=new mxCell("",new mxGeometry(H,F,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");H.vertex=!0;H.cp=!0;return k.addCell(H)}function x(H){H=k.getSelectionCells();k.deleteCells(H)}function z(){var H=parseInt(G.value)||0;H=0>H?0:100<H?100:H;
G.value=H;var F=parseInt(M.value)||0;F=0>F?0:100<F?100:F;M.value=F;var P=parseInt(I.value)||0,U=parseInt(K.value)||0;H=k.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(H/100,F/100),!1,null,P,U));F=k.getSelectionCell();if(null!=F){P=F.geometry.clone();U=k.view.scale;var T=k.view.translate;P.x=(H.x-3*U)/U-T.x;P.y=(H.y-3*U)/U-T.y;k.model.setGeometry(F,P)}}function C(H){var F=0,P=0,U=n.geometry,T=mxUtils.format((H.geometry.x+3-U.x)/U.width);H=mxUtils.format((H.geometry.y+3-U.y)/U.height);
0>T?(F=T*U.width,T=0):1<T&&(F=(T-1)*U.width,T=1);0>H?(P=H*U.height,H=0):1<H&&(P=(H-1)*U.height,H=1);return{x:T,y:H,dx:parseInt(F),dy:parseInt(P)}}function e(){if(1==k.getSelectionCount()){var H=k.getSelectionCell();H=C(H);G.value=100*H.x;M.value=100*H.y;I.value=H.dx;K.value=H.dy;u.style.visibility=""}else u.style.visibility="hidden"}var g=document.createElement("div");g.style.width="350px";g.style.height="350px";g.style.overflow="hidden";g.style.border="1px solid lightGray";g.style.boxSizing="border-box";
mxEvent.disableContextMenu(g);c.appendChild(g);var k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!0);k.setConnectable(!1);k.setTooltips(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;k.maxFitScale=2;g=d.geometry;var n=new mxCell(d.value,new mxGeometry(0,0,g.width,g.height),d.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");n.vertex=!0;k.addCell(n);k.dblClick=function(H,F){if(null!=F&&F!=n)k.setSelectionCell(F);else{F=
-mxUtils.convertPoint(k.container,mxEvent.getClientX(H),mxEvent.getClientY(H));mxEvent.consume(H);H=k.view.scale;var P=k.view.translate;k.setSelectionCell(m((F.x-3*H)/H-P.x,(F.y-3*H)/H-P.y))}};l=new mxKeyHandler(k);l.bindKey(46,x);l.bindKey(8,x);k.getRubberband().isForceRubberbandEvent=function(H){return 0==H.evt.button&&(null==H.getCell()||H.getCell()==n)};k.panningHandler.isForcePanningEvent=function(H){return 2==H.evt.button};var q=k.isCellSelectable;k.isCellSelectable=function(H){return H==n?!1:
-q.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var A=0;null!=g&&A<g.length;A++){var E=k.getConnectionPoint(p,g[A]);m(E.x-3,E.y-3)}k.fit(8);k.center();A=mxUtils.button("",function(){k.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
+mxUtils.convertPoint(k.container,mxEvent.getClientX(H),mxEvent.getClientY(H));mxEvent.consume(H);H=k.view.scale;var P=k.view.translate;k.setSelectionCell(m((F.x-3*H)/H-P.x,(F.y-3*H)/H-P.y))}};l=new mxKeyHandler(k);l.bindKey(46,x);l.bindKey(8,x);k.getRubberband().isForceRubberbandEvent=function(H){return 0==H.evt.button&&(null==H.getCell()||H.getCell()==n)};k.panningHandler.isForcePanningEvent=function(H){return 2==H.evt.button};var t=k.isCellSelectable;k.isCellSelectable=function(H){return H==n?!1:
+t.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var A=0;null!=g&&A<g.length;A++){var E=k.getConnectionPoint(p,g[A]);m(E.x-3,E.y-3)}k.fit(8);k.center();A=mxUtils.button("",function(){k.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
"-6px":"0px";mxUtils.setOpacity(A,60);E=mxUtils.button("",function(){k.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.position="relative";E.style.outline="none";E.style.border="none";E.style.margin="2px";E.style.cursor="pointer";E.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(E,60);var y=mxUtils.button("",function(){k.fit(8);k.center()});y.className="geSprite geSprite-fit";y.setAttribute("title",mxResources.get("fit"));y.style.position=
"relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var B=mxUtils.button("",function(){k.zoomActual();k.center()});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B,
60);var J=mxUtils.button("",x);J.className="geSprite geSprite-delete";J.setAttribute("title",mxResources.get("delete"));J.style.position="relative";J.style.outline="none";J.style.border="none";J.style.margin="2px";J.style.float="right";J.style.cursor="pointer";mxUtils.setOpacity(J,10);g=document.createElement("div");g.appendChild(A);g.appendChild(E);g.appendChild(B);g.appendChild(y);g.appendChild(J);c.appendChild(g);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min",
@@ -11475,110 +11475,110 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAY
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!1;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,D){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,
-D){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,D){return"1"==
-mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
+"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,D){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
+D){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,D){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&
-0==t.edges.length&&D.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,D){t=D.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},
-isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,D){t=D.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast","0")},isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTable(t.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&D.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,D){q=D.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
+isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,D){q=D.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTable(q.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,D){return D.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,D){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,D){return D.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,D){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,D){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;D=D.editorUi.editor.graph;return null!=t&&(D.isSwimlane(t)||0<D.model.getChildCount(t))},
-isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,D){var L=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;D=D.editorUi.editor.graph;return null!=L&&(D.isContainer(L)&&"0"!=t.style.collapsible||!D.isContainer(L)&&"1"==t.style.collapsible)},isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length&&!D.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(t,D){D=D.editorUi.editor.graph.model;return 0<t.vertices.length?D.isVertex(D.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,D){t=0<t.vertices.length?D.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,D){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;D=D.editorUi.editor.graph;return null!=q&&(D.isSwimlane(q)||0<D.model.getChildCount(q))},
+isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,D){var L=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;D=D.editorUi.editor.graph;return null!=L&&(D.isContainer(L)&&"0"!=q.style.collapsible||!D.isContainer(L)&&"1"==q.style.collapsible)},isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length&&!D.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,D){D=D.editorUi.editor.graph.model;return 0<q.vertices.length?D.isVertex(D.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,D){q=0<q.vertices.length?D.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,D){var L=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,D){return 0<t.vertices.length&&
-D.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(t){var D=rough.canvas({getContext:function(){return t}});D.draw=function(L){var R=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<R.length;O++){var Q=R[O];switch(Q.type){case "path":null!=L.stroke&&this._drawToContext(t,Q,L);break;case "fillPath":this._drawToContext(t,Q,L);break;case "fillSketch":this.fillSketch(t,Q,L)}}};D.fillSketch=function(L,R,O){var Q=t.state.strokeColor,S=t.state.strokeWidth,X=t.state.strokeAlpha,aa=t.state.dashed,Y=O.fillWeight;
-0>Y&&(Y=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(Y);t.setDashed(!1);this._drawToContext(L,R,O);t.setDashed(aa);t.setStrokeWidth(S);t.setStrokeColor(Q);t.setStrokeAlpha(X)};D._drawToContext=function(L,R,O){L.begin();for(var Q=0;Q<R.ops.length;Q++){var S=R.ops[Q],X=S.data;switch(S.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===R.type&&
-O.filled?L.fill():L.stroke()};return D};(function(){function t(Q,S,X){this.canvas=Q;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(Q,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,D){var L=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,D){return 0<q.vertices.length&&
+D.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(q){var D=rough.canvas({getContext:function(){return q}});D.draw=function(L){var R=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<R.length;O++){var Q=R[O];switch(Q.type){case "path":null!=L.stroke&&this._drawToContext(q,Q,L);break;case "fillPath":this._drawToContext(q,Q,L);break;case "fillSketch":this.fillSketch(q,Q,L)}}};D.fillSketch=function(L,R,O){var Q=q.state.strokeColor,S=q.state.strokeWidth,X=q.state.strokeAlpha,aa=q.state.dashed,Y=O.fillWeight;
+0>Y&&(Y=O.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(O.fill||"");q.setStrokeWidth(Y);q.setDashed(!1);this._drawToContext(L,R,O);q.setDashed(aa);q.setStrokeWidth(S);q.setStrokeColor(Q);q.setStrokeAlpha(X)};D._drawToContext=function(L,R,O){L.begin();for(var Q=0;Q<R.ops.length;Q++){var S=R.ops[Q],X=S.data;switch(S.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===R.type&&
+O.filled?L.fill():L.stroke()};return D};(function(){function q(Q,S,X){this.canvas=Q;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,q.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Q,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,
"jiggle",aa.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",aa.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",aa.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",aa.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==S?-1:S;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);X.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=Q||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};t.prototype.begin=function(){this.passThrough?
-this.originalBegin.apply(this.canvas,arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};t.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(Q,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
-S,X,aa),this.lastX=X,this.lastY=aa)};t.prototype.curveTo=function(Q,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};t.prototype.arcTo=function(Q,S,X,aa,Y,Z,ca){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,X,aa,Y,Z,ca);if(null!=fa)for(var ka=0;ka<fa.length;ka+=6)this.curveTo(fa[ka],fa[ka+1],fa[ka+2],fa[ka+3],fa[ka+4],fa[ka+
-5]);this.lastX=Z;this.lastY=ca}};t.prototype.rect=function(Q,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,X,aa,this.getStyle(!0,!0)))};t.prototype.ellipse=function(Q,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};t.prototype.roundrect=function(Q,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(Q+Y,S),this.lineTo(Q+X-Y,S),this.quadTo(Q+X,S,Q+X,S+Z),this.lineTo(Q+X,S+aa-Z),this.quadTo(Q+X,S+aa,Q+X-Y,S+aa),this.lineTo(Q+Y,S+aa),this.quadTo(Q,S+aa,Q,S+aa-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+Y,S))};t.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||
-delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!0,!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new t(Q,Editor.createRoughCanvas(Q),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,X,aa,Y){null!=Q.handJiggle&&Q.handJiggle.passThrough||L.apply(this,arguments)};var R=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==t&&!this.outline){Q.save();
-var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ca=Q.setStrokeColor;Q.setStrokeColor=function(){};var fa=Q.setFillColor;Q.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;R.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=fa;Q.setStrokeColor=ca;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;Q.restore();X&&null!=aa&&(Q.addTolerance=function(){})}R.apply(this,arguments);
-Q.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,X,aa,Y,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==t?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?
-t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,D,L){if(null!=t&&"undefined"!==typeof pako){var R=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=R&&0<R.length)for(var Q=0;Q<R.length;Q++)if("mxgraph"==R[Q].getAttribute("class")){O.push(R[Q]);break}0<O.length&&(R=O[0].getAttribute("data-mxgraph"),null!=R?(O=JSON.parse(R),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
-(R=mxUtils.getTextContent(O[0]),R=Graph.decompress(R,null,L),0<R.length&&(t=mxUtils.parseXml(R),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(R=t.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)t=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||D||(O=null,"diagram"==t.nodeName?O=t:"mxfile"==
-t.nodeName&&(R=t.getElementsByTagName("diagram"),0<R.length&&(O=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,L)));null==t||"mxGraphModel"==t.nodeName||D&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,D){var L=mxUtils.trim(mxUtils.getTextContent(t)),R=null;0<L.length?(t=Graph.decompress(L,null,D),null!=t&&0<t.length&&(R=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(R=mxUtils.createXmlDocument(),
-R.appendChild(R.importNode(t[0],!0)),R=R.documentElement));return R};Editor.getDiagramNodeXml=function(t){var D=mxUtils.getTextContent(t),L=null;0<D.length?L=Graph.decompress(D):null!=t.firstChild&&(L=mxUtils.getXml(t.firstChild));return L};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var D=t.indexOf("EmbeddedFile");if(-1<D){var L=t.indexOf("stream",D)+9;if(0<t.substring(D,L).indexOf("application#2Fvnd.jgraph.mxfile"))return D=
-t.indexOf("endstream",L-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(L,D)),{to:"string"})}return null}L=null;D="";for(var R=0,O=0,Q=[],S=null;O<t.length;){var X=t.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(R)?R++:R=0;if(19==R){var aa=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){L=t.substring(O,aa);break}}10==X&&("endobj"==D?S=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(S=[],Q[D.split(" ")[0]]=S):null!=S&&S.push(D),
-D="")}null==L&&(L=Editor.extractGraphModelFromXref(Q));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(t){var D=t.trailer,L=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=t[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(t=t[D[1]],null!=t&&(t=t.join("\n"),L=t.substring(1,t.length-1))))));return L};Editor.extractParserError=function(t,D){var L=
-null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(L=D||mxResources.get("invalidChars"),D=t[0].getElementsByTagName("div"),0<D.length&&(L=mxUtils.getTextContent(D[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(t,D){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=D))};Editor.configure=function(t,D){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(t.css));var R=document.getElementsByTagName("script")[0];R.parentNode.insertBefore(L,R)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle);
-null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(L=parseFloat(t.zoomFactor),!isNaN(L)&&1<L?Graph.prototype.zoomFactor=L:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(L=parseInt(t.gridSteps),!isNaN(L)&&0<L?mxGraphView.prototype.gridSteps=L:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=t.pageFormat&&(L=parseInt(t.pageFormat.width),R=parseInt(t.pageFormat.height),!isNaN(L)&&0<L&&!isNaN(R)&&0<R?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,L,R),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(L=parseInt(t.sidebarTitleSize),!isNaN(L)&&0<L?Sidebar.prototype.sidebarTitleSize=L:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=t.autosaveDelay&&(L=parseInt(t.autosaveDelay),!isNaN(L)&&0<L?DrawioFile.prototype.autosaveDelay=L:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=t.plugins&&!D)for(App.initPluginCallback(),D=0;D<t.plugins.length;D++)mxscript(t.plugins[D]);null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);
-null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(t));D.parentNode.insertBefore(L,D);t=t.split("url(");for(L=1;L<t.length;L++){var R=t[L].indexOf(")");R=Editor.trimCssUrl(t[L].substring(0,R));var O=
-document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",R);O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
-t?t:Editor.GUID_LENGTH;for(var D=[],L=0;L<t;L++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null;if(null!=t){var D=Editor.extractParserError(t,
-mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==t.nodeName){D=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=L&&(R=new mxCodec(L.ownerDocument),R.decode(L,this.graph.getStylesheet())));
-else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=L){var R=new mxCodec(L.ownerDocument);R.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");D=t.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&
-this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(D=t.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<D.length;L++)this.graph.addExtFont(D[L].name,D[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,D){t=null!=t?t:!0;var L=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var R=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=R&&L.setAttribute("backgroundImage",JSON.stringify(R));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(R=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",R.join("|")));return L};Editor.prototype.isDataSvg=function(t){try{var D=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var L=
-mxUtils.parseXml(D).documentElement;return"mxfile"==L.nodeName||"mxGraphModel"==L.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(t,D,L){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(t,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){t=null!=t?t:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),
+"dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=Q||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};q.prototype.begin=function(){this.passThrough?
+this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};q.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,
+arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};q.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Q,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
+S,X,aa),this.lastX=X,this.lastY=aa)};q.prototype.curveTo=function(Q,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};q.prototype.arcTo=function(Q,S,X,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,X,aa,Y,Z,ba);if(null!=fa)for(var ka=0;ka<fa.length;ka+=6)this.curveTo(fa[ka],fa[ka+1],fa[ka+2],fa[ka+3],fa[ka+4],fa[ka+
+5]);this.lastX=Z;this.lastY=ba}};q.prototype.rect=function(Q,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,X,aa,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Q,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Q,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(Q+Y,S),this.lineTo(Q+X-Y,S),this.quadTo(Q+X,S,Q+X,S+Z),this.lineTo(Q+X,S+aa-Z),this.quadTo(Q+X,S+aa,Q+X-Y,S+aa),this.lineTo(Q+Y,S+aa),this.quadTo(Q,S+aa,Q,S+aa-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+Y,S))};q.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||
+delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new q(Q,Editor.createRoughCanvas(Q),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,X,aa,Y){null!=Q.handJiggle&&Q.handJiggle.passThrough||L.apply(this,arguments)};var R=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==q&&!this.outline){Q.save();
+var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=Q.setStrokeColor;Q.setStrokeColor=function(){};var fa=Q.setFillColor;Q.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;R.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=fa;Q.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;Q.restore();X&&null!=aa&&(Q.addTolerance=function(){})}R.apply(this,arguments);
+Q.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,X,aa,Y,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==q?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
+q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,D,L){if(null!=q&&"undefined"!==typeof pako){var R=q.ownerDocument.getElementsByTagName("div"),O=[];if(null!=R&&0<R.length)for(var Q=0;Q<R.length;Q++)if("mxgraph"==R[Q].getAttribute("class")){O.push(R[Q]);break}0<O.length&&(R=O[0].getAttribute("data-mxgraph"),null!=R?(O=JSON.parse(R),null!=O&&null!=O.xml&&(q=mxUtils.parseXml(O.xml),q=q.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
+(R=mxUtils.getTextContent(O[0]),R=Graph.decompress(R,null,L),0<R.length&&(q=mxUtils.parseXml(R),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(R=q.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)q=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||D||(O=null,"diagram"==q.nodeName?O=q:"mxfile"==
+q.nodeName&&(R=q.getElementsByTagName("diagram"),0<R.length&&(O=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=O&&(q=Editor.parseDiagramNode(O,L)));null==q||"mxGraphModel"==q.nodeName||D&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,D){var L=mxUtils.trim(mxUtils.getTextContent(q)),R=null;0<L.length?(q=Graph.decompress(L,null,D),null!=q&&0<q.length&&(R=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(R=mxUtils.createXmlDocument(),
+R.appendChild(R.importNode(q[0],!0)),R=R.documentElement));return R};Editor.getDiagramNodeXml=function(q){var D=mxUtils.getTextContent(q),L=null;0<D.length?L=Graph.decompress(D):null!=q.firstChild&&(L=mxUtils.getXml(q.firstChild));return L};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var D=q.indexOf("EmbeddedFile");if(-1<D){var L=q.indexOf("stream",D)+9;if(0<q.substring(D,L).indexOf("application#2Fvnd.jgraph.mxfile"))return D=
+q.indexOf("endstream",L-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(L,D)),{to:"string"})}return null}L=null;D="";for(var R=0,O=0,Q=[],S=null;O<q.length;){var X=q.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(R)?R++:R=0;if(19==R){var aa=q.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){L=q.substring(O,aa);break}}10==X&&("endobj"==D?S=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(S=[],Q[D.split(" ")[0]]=S):null!=S&&S.push(D),
+D="")}null==L&&(L=Editor.extractGraphModelFromXref(Q));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(q){var D=q.trailer,L=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=q[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(q=q[D[1]],null!=q&&(q=q.join("\n"),L=q.substring(1,q.length-1))))));return L};Editor.extractParserError=function(q,D){var L=
+null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(L=D||mxResources.get("invalidChars"),D=q[0].getElementsByTagName("div"),0<D.length&&(L=mxUtils.getTextContent(D[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(q,D){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=D))};Editor.configure=function(q,D){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(q.css));var R=document.getElementsByTagName("script")[0];R.parentNode.insertBefore(L,R)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);
+null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(L=parseFloat(q.zoomFactor),!isNaN(L)&&1<L?Graph.prototype.zoomFactor=L:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(L=parseInt(q.gridSteps),!isNaN(L)&&0<L?mxGraphView.prototype.gridSteps=L:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=q.pageFormat&&(L=parseInt(q.pageFormat.width),R=parseInt(q.pageFormat.height),!isNaN(L)&&0<L&&!isNaN(R)&&0<R?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,L,R),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(L=parseInt(q.sidebarTitleSize),!isNaN(L)&&0<L?Sidebar.prototype.sidebarTitleSize=L:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=q.autosaveDelay&&(L=parseInt(q.autosaveDelay),!isNaN(L)&&0<L?DrawioFile.prototype.autosaveDelay=L:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=q.plugins&&!D)for(App.initPluginCallback(),D=0;D<q.plugins.length;D++)mxscript(q.plugins[D]);null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);
+null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(q));D.parentNode.insertBefore(L,D);q=q.split("url(");for(L=1;L<q.length;L++){var R=q[L].indexOf(")");R=Editor.trimCssUrl(q[L].substring(0,R));var O=
+document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",R);O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=
+q?q:Editor.GUID_LENGTH;for(var D=[],L=0;L<q;L++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var D=Editor.extractParserError(q,
+mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==q.nodeName){D=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=L&&(R=new mxCodec(L.ownerDocument),R.decode(L,this.graph.getStylesheet())));
+else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=L){var R=new mxCodec(L.ownerDocument);R.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");D=q.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&
+this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(D=q.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<D.length;L++)this.graph.addExtFont(D[L].name,D[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,D){q=null!=q?q:!0;var L=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var R=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=R&&L.setAttribute("backgroundImage",JSON.stringify(R));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",
+this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(R=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",R.join("|")));return L};Editor.prototype.isDataSvg=function(q){try{var D=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var L=
+mxUtils.parseXml(D).documentElement;return"mxfile"==L.nodeName||"mxGraphModel"==L.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(q,D,L){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(q,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),
MathJax.typeset([O]),Editor.onMathJaxDone()}catch(Q){MathJax.typesetClear([O]),null!=Q.retry?Q.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Q.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(Q,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",t);D[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(t){if(0<t.length){var D="",L=[""],R=0,O=!0,Q;t=$jscomp.makeIterator(t);for(Q=t.next();!Q.done;Q=t.next())Q=Q.value,'"'===Q?(O&&Q===D&&(L[R]+=Q),O=!O):","===Q&&O?Q=L[++R]="":L[R]+=Q,D=Q;return L}return[]};Editor.prototype.getProxiedUrl=
-function(t){if(!this.isCorsEnabledForUrl(t)){var D=/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t);D=/\.png$/i.test(t)||/\.pdf$/i.test(t)||D;var L="t="+(new Date).getTime();t=PROXY_URL+"?url="+encodeURIComponent(t)+"&"+L+(D?"&base64=1":"")}return t};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=
-new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var D=t.convert,L=this;t.convert=function(R){if(null!=R){var O="http://"==R.substring(0,7)||"https://"==R.substring(0,8);O&&!navigator.onLine?
-R=Editor.svgBrokenImage.src:!O||R.substring(0,t.baseUrl.length)==t.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=D.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,D){try{var L=!0,R=window.setTimeout(mxUtils.bind(this,function(){L=
-!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(Q){window.clearTimeout(R);L&&D(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(R);L&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(R);if(L)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=O.height;Q.width=O.width;S.drawImage(O,0,0);D(Q.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};
-O.onerror=function(){window.clearTimeout(R);L&&D(Editor.svgBrokenImage.src)};O.src=t}}catch(Q){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,D,L,R){null==R&&(R=this.createImageUrlConverter());var O=0,Q=L||{};L=mxUtils.bind(this,function(S,X){S=t.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(X));if(null!=Z&&"data:"!=Z.substring(0,5)){var ca=Q[Z];null==ca?(O++,this.convertImageToDataUri(Z,
-function(fa){null!=fa&&(Q[Z]=fa,Y.setAttribute(X,fa));O--;0==O&&D(t)})):Y.setAttribute(X,ca)}else null!=Z&&Y.setAttribute(X,Z)}}catch(fa){}})(S[aa])});L("image","xlink:href");L("img","src");0==O&&D(t)};Editor.base64Encode=function(t){for(var D="",L=0,R=t.length,O,Q,S;L<R;){O=t.charCodeAt(L++)&255;if(L==R){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);D+="==";break}Q=t.charCodeAt(L++);
-if(L==R){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);D+="=";break}S=t.charCodeAt(L++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&
-15)<<2|(S&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return D};Editor.prototype.loadUrl=function(t,D,L,R,O,Q,S,X){try{var aa=!S&&(R||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=D){var ca=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ca=Array(Z.length);for(var fa=0;fa<Z.length;fa++)ca[fa]=String.fromCharCode(Z[fa]);ca=ca.join("")}Q=null!=Q?Q:"data:image/png;base64,";ca=Q+Editor.base64Encode(ca)}D(ca)}}else null!=L&&(0==Z.getStatus()?L({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?L({code:Z.getStatus()},Z):L({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=L&&L({message:mxResources.get("error")+
-" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=L&&L(Z)}};Editor.prototype.absoluteCssFonts=function(t){var D=null;if(null!=t){var L=t.split("url(");if(0<L.length){D=[L[0]];t=window.location.pathname;var R=null!=t?t.lastIndexOf("/"):-1;0<=R&&(t=t.substring(0,R+1));R=document.getElementsByTagName("base");var O=null;null!=R&&0<R.length&&(O=R[0].getAttribute("href"));for(var Q=1;Q<L.length;Q++)if(R=L[Q].indexOf(")"),0<R){var S=
-Editor.trimCssUrl(L[Q].substring(0,R));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":t)+S);D.push('url("'+S+'"'+L[Q].substring(R))}else D.push(L[Q])}else D=[t]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(t,D,L){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+encodeURIComponent(D));L(t,D)};Editor.prototype.embedCssFonts=function(t,D){var L=t.split("url("),R=0;null==this.cachedFonts&&
-(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==R){for(var aa=[L[0]],Y=1;Y<L.length;Y++){var Z=L[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,Z))]);aa.push('"'+L[Y].substring(Z))}D(aa.join(""))}});if(0<L.length){for(t=1;t<L.length;t++){var Q=L[t].indexOf(")"),S=null,X=L[t].indexOf("format(",Q);0<X&&(S=Editor.trimCssUrl(L[t].substring(X+7,L[t].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=
+O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",q);D[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var D="",L=[""],R=0,O=!0,Q;q=$jscomp.makeIterator(q);for(Q=q.next();!Q.done;Q=q.next())Q=Q.value,'"'===Q?(O&&Q===D&&(L[R]+=Q),O=!O):","===Q&&O?Q=L[++R]="":L[R]+=Q,D=Q;return L}return[]};Editor.prototype.getProxiedUrl=
+function(q){if(!this.isCorsEnabledForUrl(q)){var D=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);D=/\.png$/i.test(q)||/\.pdf$/i.test(q)||D;var L="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+L+(D?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=
+new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var D=q.convert,L=this;q.convert=function(R){if(null!=R){var O="http://"==R.substring(0,7)||"https://"==R.substring(0,8);O&&!navigator.onLine?
+R=Editor.svgBrokenImage.src:!O||R.substring(0,q.baseUrl.length)==q.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=D.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,D){try{var L=!0,R=window.setTimeout(mxUtils.bind(this,function(){L=
+!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Q){window.clearTimeout(R);L&&D(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(R);L&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(R);if(L)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=O.height;Q.width=O.width;S.drawImage(O,0,0);D(Q.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};
+O.onerror=function(){window.clearTimeout(R);L&&D(Editor.svgBrokenImage.src)};O.src=q}}catch(Q){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,D,L,R){null==R&&(R=this.createImageUrlConverter());var O=0,Q=L||{};L=mxUtils.bind(this,function(S,X){S=q.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(X));if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=Q[Z];null==ba?(O++,this.convertImageToDataUri(Z,
+function(fa){null!=fa&&(Q[Z]=fa,Y.setAttribute(X,fa));O--;0==O&&D(q)})):Y.setAttribute(X,ba)}else null!=Z&&Y.setAttribute(X,Z)}}catch(fa){}})(S[aa])});L("image","xlink:href");L("img","src");0==O&&D(q)};Editor.base64Encode=function(q){for(var D="",L=0,R=q.length,O,Q,S;L<R;){O=q.charCodeAt(L++)&255;if(L==R){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);D+="==";break}Q=q.charCodeAt(L++);
+if(L==R){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);D+="=";break}S=q.charCodeAt(L++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&
+15)<<2|(S&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return D};Editor.prototype.loadUrl=function(q,D,L,R,O,Q,S,X){try{var aa=!S&&(R||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=D){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var fa=0;fa<Z.length;fa++)ba[fa]=String.fromCharCode(Z[fa]);ba=ba.join("")}Q=null!=Q?Q:"data:image/png;base64,";ba=Q+Editor.base64Encode(ba)}D(ba)}}else null!=L&&(0==Z.getStatus()?L({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?L({code:Z.getStatus()},Z):L({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=L&&L({message:mxResources.get("error")+
+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=L&&L(Z)}};Editor.prototype.absoluteCssFonts=function(q){var D=null;if(null!=q){var L=q.split("url(");if(0<L.length){D=[L[0]];q=window.location.pathname;var R=null!=q?q.lastIndexOf("/"):-1;0<=R&&(q=q.substring(0,R+1));R=document.getElementsByTagName("base");var O=null;null!=R&&0<R.length&&(O=R[0].getAttribute("href"));for(var Q=1;Q<L.length;Q++)if(R=L[Q].indexOf(")"),0<R){var S=
+Editor.trimCssUrl(L[Q].substring(0,R));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":q)+S);D.push('url("'+S+'"'+L[Q].substring(R))}else D.push(L[Q])}else D=[q]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(q,D,L){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+encodeURIComponent(D));L(q,D)};Editor.prototype.embedCssFonts=function(q,D){var L=q.split("url("),R=0;null==this.cachedFonts&&
+(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==R){for(var aa=[L[0]],Y=1;Y<L.length;Y++){var Z=L[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,Z))]);aa.push('"'+L[Y].substring(Z))}D(aa.join(""))}});if(0<L.length){for(q=1;q<L.length;q++){var Q=L[q].indexOf(")"),S=null,X=L[q].indexOf("format(",Q);0<X&&(S=Editor.trimCssUrl(L[q].substring(X+7,L[q].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=
aa;R++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,
-aa,mxUtils.bind(this,function(Z,ca){this.loadUrl(ca,mxUtils.bind(this,function(fa){this.cachedFonts[aa]=fa;R--;O()}),mxUtils.bind(this,function(fa){R--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[t].substring(0,Q)),S)}O()}else D(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=D;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=
-function(){var t={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(t[D]=Graph.fontMapping[D]);return t};Editor.prototype.embedExtFonts=function(t){var D=this.graph.getCustomFonts();if(0<D.length){var L=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(L.join(""),t)}),Q=0;Q<D.length;Q++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(R++,this.loadUrl(X,
-mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;L.push(aa+"\n");R--;O()}),mxUtils.bind(this,function(aa){R--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(D[Q].name,D[Q].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var D=document.getElementsByTagName("style"),L=0;L<D.length;L++){var R=mxUtils.getTextContent(D[L]);0>
-R.indexOf("mxPageSelector")&&0<R.indexOf("MathJax")&&t[0].appendChild(D[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var L=t.getElementsByTagName("defs"),R=t.ownerDocument;0==L.length?(L=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=t.firstChild?t.insertBefore(L,t.firstChild):t.appendChild(L)):L=L[0];t=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"style"):
-R.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,D);L.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,D,L){var R=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(R/t,R/D))};Editor.prototype.exportToCanvas=function(t,D,L,R,O,Q,S,X,aa,Y,Z,ca,fa,ka,ha,ra,la,Fa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;ca=null!=ca?ca:this.graph;fa=null!=fa?fa:0;var Ga=aa?null:
-ca.background;Ga==mxConstants.NONE&&(Ga=null);null==Ga&&(Ga=R);null==Ga&&0==aa&&(Ga=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ca.getSvg(null,null,fa,ka,null,S,null,null,null,Y,null,ra,la,Fa),mxUtils.bind(this,function(Aa){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Da=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(Ma,0,0);t(Ca,Aa)},0):(wa.drawImage(Ma,0,0),t(Ca,Aa))},Ca=document.createElement("canvas"),pa=parseInt(Aa.getAttribute("width")),
-qa=parseInt(Aa.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=Q?Math.min(1,Math.min(3*D/(4*qa),D/pa)):D/pa);X=this.getMaxCanvasScale(pa,qa,X);pa=Math.ceil(X*pa);qa=Math.ceil(X*qa);Ca.setAttribute("width",pa);Ca.setAttribute("height",qa);var wa=Ca.getContext("2d");null!=Ga&&(wa.beginPath(),wa.rect(0,0,pa,qa),wa.fillStyle=Ga,wa.fill());1!=X&&wa.scale(X,X);if(ha){var Ha=ca.view,ya=Ha.scale;Ha.scale=1;var Ia=btoa(unescape(encodeURIComponent(Ha.createSvgGrid(Ha.gridColor))));Ha.scale=ya;Ia="data:image/svg+xml;base64,"+
-Ia;var ja=ca.gridSize*Ha.gridSteps*X,va=ca.getGraphBounds(),ta=Ha.translate.x*ya,da=Ha.translate.y*ya,ba=ta+(va.x-ta)/ya-fa,na=da+(va.y-da)/ya-fa,ea=new Image;ea.onload=function(){try{for(var ia=-Math.round(ja-mxUtils.mod((ta-ba)*X,ja)),oa=-Math.round(ja-mxUtils.mod((da-na)*X,ja));ia<pa;ia+=ja)for(var ma=oa;ma<qa;ma+=ja)wa.drawImage(ea,ia/X,ma/X);Da()}catch(xa){null!=O&&O(xa)}};ea.onerror=function(ia){null!=O&&O(ia)};ea.src=Ia}else Da()}catch(ia){null!=O&&O(ia)}});Ma.onerror=function(Da){null!=O&&
+aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(fa){this.cachedFonts[aa]=fa;R--;O()}),mxUtils.bind(this,function(fa){R--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[q].substring(0,Q)),S)}O()}else D(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=D;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=
+function(){var q={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(q[D]=Graph.fontMapping[D]);return q};Editor.prototype.embedExtFonts=function(q){var D=this.graph.getCustomFonts();if(0<D.length){var L=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(L.join(""),q)}),Q=0;Q<D.length;Q++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(R++,this.loadUrl(X,
+mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;L.push(aa+"\n");R--;O()}),mxUtils.bind(this,function(aa){R--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(D[Q].name,D[Q].url);O()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var D=document.getElementsByTagName("style"),L=0;L<D.length;L++){var R=mxUtils.getTextContent(D[L]);0>
+R.indexOf("mxPageSelector")&&0<R.indexOf("MathJax")&&q[0].appendChild(D[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var L=q.getElementsByTagName("defs"),R=q.ownerDocument;0==L.length?(L=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(L,q.firstChild):q.appendChild(L)):L=L[0];q=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"style"):
+R.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,D);L.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,D,L){var R=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(R/q,R/D))};Editor.prototype.exportToCanvas=function(q,D,L,R,O,Q,S,X,aa,Y,Z,ba,fa,ka,ha,ra,la,Fa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;ba=null!=ba?ba:this.graph;fa=null!=fa?fa:0;var Ga=aa?null:
+ba.background;Ga==mxConstants.NONE&&(Ga=null);null==Ga&&(Ga=R);null==Ga&&0==aa&&(Ga=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,fa,ka,null,S,null,null,null,Y,null,ra,la,Fa),mxUtils.bind(this,function(Aa){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Da=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(Ma,0,0);q(Ca,Aa)},0):(wa.drawImage(Ma,0,0),q(Ca,Aa))},Ca=document.createElement("canvas"),pa=parseInt(Aa.getAttribute("width")),
+qa=parseInt(Aa.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=Q?Math.min(1,Math.min(3*D/(4*qa),D/pa)):D/pa);X=this.getMaxCanvasScale(pa,qa,X);pa=Math.ceil(X*pa);qa=Math.ceil(X*qa);Ca.setAttribute("width",pa);Ca.setAttribute("height",qa);var wa=Ca.getContext("2d");null!=Ga&&(wa.beginPath(),wa.rect(0,0,pa,qa),wa.fillStyle=Ga,wa.fill());1!=X&&wa.scale(X,X);if(ha){var Ha=ba.view,ya=Ha.scale;Ha.scale=1;var Ia=btoa(unescape(encodeURIComponent(Ha.createSvgGrid(Ha.gridColor))));Ha.scale=ya;Ia="data:image/svg+xml;base64,"+
+Ia;var ja=ba.gridSize*Ha.gridSteps*X,va=ba.getGraphBounds(),ta=Ha.translate.x*ya,da=Ha.translate.y*ya,ca=ta+(va.x-ta)/ya-fa,na=da+(va.y-da)/ya-fa,ea=new Image;ea.onload=function(){try{for(var ia=-Math.round(ja-mxUtils.mod((ta-ca)*X,ja)),oa=-Math.round(ja-mxUtils.mod((da-na)*X,ja));ia<pa;ia+=ja)for(var ma=oa;ma<qa;ma+=ja)wa.drawImage(ea,ia/X,ma/X);Da()}catch(xa){null!=O&&O(xa)}};ea.onerror=function(ia){null!=O&&O(ia)};ea.src=Ia}else Da()}catch(ia){null!=O&&O(ia)}});Ma.onerror=function(Da){null!=O&&
O(Da)};Y&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Da){null!=O&&O(Da)}});this.embedExtFonts(mxUtils.bind(this,function(Da){try{null!=Da&&this.addFontCss(Aa,Da),this.loadFonts(za)}catch(Ca){null!=O&&O(Ca)}}))}catch(Da){null!=O&&O(Da)}}),L,Z)}catch(Aa){null!=O&&O(Aa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var m=
-l,x=0;8>x;x++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(t,D,L,R){for(var O=0;O<R;O++)t=Editor.crcTable[(t^D.charCodeAt(L+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var D=-1,L=0;L<t.length;L++)D=D>>>8^Editor.crcTable[(D^t.charCodeAt(L))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(t,D,L,R,O){function Q(Z,ca){var fa=aa;aa+=ca;return Z.substring(fa,aa)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<
-16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var aa=0;if(Q(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(t,4),"IHDR"!=Q(t,4))null!=O&&O();else{Q(t,17);O=t.substring(0,aa);do{var Y=S(t);if("IDAT"==Q(t,4)){O=t.substring(0,aa-8);"pHYs"==D&&"dpi"==L?(L=Math.round(R/.0254),L=X(L)+X(L)+String.fromCharCode(1)):L=L+String.fromCharCode(0)+
-("zTXt"==D?String.fromCharCode(0):"")+R;R=4294967295;R=Editor.updateCRC(R,D,0,4);R=Editor.updateCRC(R,L,0,L.length);O+=X(L.length)+D+L+X(R^4294967295);O+=t.substring(aa-8,t.length);break}O+=t.substring(aa-8,aa-4+Y);Q(t,Y);Q(t,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var z=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,D){z.apply(this,
-arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var C=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,D){var L=null;null!=t.editor.graph.getModel().getParent(D)?L=D.getId():null!=t.currentPage&&(L=t.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var e=Format.prototype.init;
-Format.prototype.init=function(){e.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var g=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?g.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(t){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,L=D.editor.graph,R=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var Q=new ChangePageSetup(D);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=O;L.model.execute(Q)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
-D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(R.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(R,60));t.appendChild(R)}return t};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=n.apply(this,arguments);var D=this.editorUi,L=D.editor.graph;if(L.isEnabled()){var R=D.getCurrentFile();if(null!=R&&R.isAutosaveOptional()){var O=
-this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(S){D.editor.setAutosave(S);D.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(S){this.listener=function(){S(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return L.mathEnabled},function(S){D.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var Q=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";O.appendChild(Q)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+l,x=0;8>x;x++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(q,D,L,R){for(var O=0;O<R;O++)q=Editor.crcTable[(q^D.charCodeAt(L+O))&255]^q>>>8;return q};Editor.crc32=function(q){for(var D=-1,L=0;L<q.length;L++)D=D>>>8^Editor.crcTable[(D^q.charCodeAt(L))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(q,D,L,R,O){function Q(Z,ba){var fa=aa;aa+=ba;return Z.substring(fa,aa)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<
+16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var aa=0;if(Q(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(q,4),"IHDR"!=Q(q,4))null!=O&&O();else{Q(q,17);O=q.substring(0,aa);do{var Y=S(q);if("IDAT"==Q(q,4)){O=q.substring(0,aa-8);"pHYs"==D&&"dpi"==L?(L=Math.round(R/.0254),L=X(L)+X(L)+String.fromCharCode(1)):L=L+String.fromCharCode(0)+
+("zTXt"==D?String.fromCharCode(0):"")+R;R=4294967295;R=Editor.updateCRC(R,D,0,4);R=Editor.updateCRC(R,L,0,L.length);O+=X(L.length)+D+L+X(R^4294967295);O+=q.substring(aa-8,q.length);break}O+=q.substring(aa-8,aa-4+Y);Q(q,Y);Q(q,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var z=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,D){z.apply(this,
+arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var C=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,D){var L=null;null!=q.editor.graph.getModel().getParent(D)?L=D.getId():null!=q.currentPage&&(L=q.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var e=Format.prototype.init;
+Format.prototype.init=function(){e.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var g=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?g.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(q){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,L=D.editor.graph,R=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var Q=new ChangePageSetup(D);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=O;L.model.execute(Q)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
+D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(R.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(R,60));q.appendChild(R)}return q};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=n.apply(this,arguments);var D=this.editorUi,L=D.editor.graph;if(L.isEnabled()){var R=D.getCurrentFile();if(null!=R&&R.isAutosaveOptional()){var O=
+this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(S){D.editor.setAutosave(S);D.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(S){this.listener=function(){S(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});q.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return L.mathEnabled},function(S){D.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";q.appendChild(O);var Q=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";O.appendChild(Q)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
@@ -11601,29 +11601,29 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(t,D,L){if(null!=D){var R=function(Q){if(null!=Q)if(L)for(var S=0;S<Q.length;S++)D[Q[S].name]=Q[S];else for(var X in D){var aa=!1;for(S=0;S<Q.length;S++)if(Q[S].name==X&&Q[S].type==D[X].type){aa=!0;break}aa||delete D[X]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),R(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{R(JSON.parse(t))}catch(Q){}}};var q=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));q.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
-{},L=t.vertices,R=t.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],D,0==O);for(O=0;O<R.length;O++)this.findCommonProperties(R[O],D,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,t))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(t,D,L){function R(wa,Ha,ya,Ia){ca.getModel().beginUpdate();try{var ja=[],va=[];if(null!=ya.index){for(var ta=[],da=ya.parentRow.nextSibling;da&&da.getAttribute("data-pName")==wa;)ta.push(da.getAttribute("data-pValue")),da=da.nextSibling;ya.index<ta.length?null!=Ia?ta.splice(Ia,1):ta[ya.index]=Ha:ta.push(Ha);null!=ya.size&&ta.length>ya.size&&(ta=ta.slice(0,ya.size));Ha=ta.join(",");null!=ya.countProperty&&(ca.setCellStyles(ya.countProperty,ta.length,
-ca.getSelectionCells()),ja.push(ya.countProperty),va.push(ta.length))}ca.setCellStyles(wa,Ha,ca.getSelectionCells());ja.push(wa);va.push(Ha);if(null!=ya.dependentProps)for(wa=0;wa<ya.dependentProps.length;wa++){var ba=ya.dependentPropsDefVal[wa],na=ya.dependentPropsVals[wa];if(na.length>Ha)na=na.slice(0,Ha);else for(var ea=na.length;ea<Ha;ea++)na.push(ba);na=na.join(",");ca.setCellStyles(ya.dependentProps[wa],na,ca.getSelectionCells());ja.push(ya.dependentProps[wa]);va.push(na)}if("function"==typeof ya.onChange)ya.onChange(ca,
-Ha);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",va,"cells",ca.getSelectionCells()))}finally{ca.getModel().endUpdate()}}function O(wa,Ha,ya){var Ia=mxUtils.getOffset(t,!0),ja=mxUtils.getOffset(wa,!0);Ha.style.position="absolute";Ha.style.left=ja.x-Ia.x+"px";Ha.style.top=ja.y-Ia.y+"px";Ha.style.width=wa.offsetWidth+"px";Ha.style.height=wa.offsetHeight-(ya?4:0)+"px";Ha.style.zIndex=5}function Q(wa,Ha,ya){var Ia=document.createElement("div");Ia.style.width="32px";Ia.style.height=
+function(q,D,L){if(null!=D){var R=function(Q){if(null!=Q)if(L)for(var S=0;S<Q.length;S++)D[Q[S].name]=Q[S];else for(var X in D){var aa=!1;for(S=0;S<Q.length;S++)if(Q[S].name==X&&Q[S].type==D[X].type){aa=!0;break}aa||delete D[X]}},O=this.editorUi.editor.graph.view.getState(q);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),R(O.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{R(JSON.parse(q))}catch(Q){}}};var t=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));t.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
+{},L=q.vertices,R=q.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],D,0==O);for(O=0;O<R.length;O++)this.findCommonProperties(R[O],D,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,q))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(q,D,L){function R(wa,Ha,ya,Ia){ba.getModel().beginUpdate();try{var ja=[],va=[];if(null!=ya.index){for(var ta=[],da=ya.parentRow.nextSibling;da&&da.getAttribute("data-pName")==wa;)ta.push(da.getAttribute("data-pValue")),da=da.nextSibling;ya.index<ta.length?null!=Ia?ta.splice(Ia,1):ta[ya.index]=Ha:ta.push(Ha);null!=ya.size&&ta.length>ya.size&&(ta=ta.slice(0,ya.size));Ha=ta.join(",");null!=ya.countProperty&&(ba.setCellStyles(ya.countProperty,ta.length,
+ba.getSelectionCells()),ja.push(ya.countProperty),va.push(ta.length))}ba.setCellStyles(wa,Ha,ba.getSelectionCells());ja.push(wa);va.push(Ha);if(null!=ya.dependentProps)for(wa=0;wa<ya.dependentProps.length;wa++){var ca=ya.dependentPropsDefVal[wa],na=ya.dependentPropsVals[wa];if(na.length>Ha)na=na.slice(0,Ha);else for(var ea=na.length;ea<Ha;ea++)na.push(ca);na=na.join(",");ba.setCellStyles(ya.dependentProps[wa],na,ba.getSelectionCells());ja.push(ya.dependentProps[wa]);va.push(na)}if("function"==typeof ya.onChange)ya.onChange(ba,
+Ha);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",va,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(wa,Ha,ya){var Ia=mxUtils.getOffset(q,!0),ja=mxUtils.getOffset(wa,!0);Ha.style.position="absolute";Ha.style.left=ja.x-Ia.x+"px";Ha.style.top=ja.y-Ia.y+"px";Ha.style.width=wa.offsetWidth+"px";Ha.style.height=wa.offsetHeight-(ya?4:0)+"px";Ha.style.zIndex=5}function Q(wa,Ha,ya){var Ia=document.createElement("div");Ia.style.width="32px";Ia.style.height=
"4px";Ia.style.margin="2px";Ia.style.border="1px solid black";Ia.style.background=Ha&&"none"!=Ha?Ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ja){this.editorUi.pickColor(Ha,function(va){Ia.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;R(wa,va,ya)});mxEvent.consume(ja)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ia);return btn}function S(wa,Ha,ya,Ia,ja,va,ta){null!=Ha&&(Ha=Ha.split(","),
-fa.push({name:wa,values:Ha,type:ya,defVal:Ia,countProperty:ja,parentRow:va,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(Z,function(da){for(var ba=va,na=0;null!=ba.nextSibling;)if(ba.nextSibling.getAttribute("data-pName")==wa)ba=ba.nextSibling,na++;else break;var ea={type:ya,parentRow:va,index:na,isDeletable:!0,defVal:Ia,countProperty:ja};na=Y(wa,"",ea,0==na%2,ta);R(wa,Ia,ea);ba.parentNode.insertBefore(na,ba.nextSibling);mxEvent.consume(da)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function X(wa,Ha,ya,Ia,ja,va,ta){if(0<ja){var da=Array(ja);Ha=null!=Ha?Ha.split(","):[];for(var ba=0;ba<ja;ba++)da[ba]=null!=Ha[ba]?Ha[ba]:null!=Ia?Ia:"";fa.push({name:wa,values:da,type:ya,defVal:Ia,parentRow:va,flipBkg:ta,size:ja})}return document.createElement("div")}function aa(wa,Ha,ya){var Ia=document.createElement("input");Ia.type="checkbox";Ia.checked="1"==Ha;mxEvent.addListener(Ia,"change",function(){R(wa,Ia.checked?"1":"0",ya)});return Ia}function Y(wa,
-Ha,ya,Ia,ja){var va=ya.dispName,ta=ya.type,da=document.createElement("tr");da.className="gePropRow"+(ja?"Dark":"")+(Ia?"Alt":"")+" gePropNonHeaderRow";da.setAttribute("data-pName",wa);da.setAttribute("data-pValue",Ha);Ia=!1;null!=ya.index&&(da.setAttribute("data-index",ya.index),va=(null!=va?va:"")+"["+ya.index+"]",Ia=!0);var ba=document.createElement("td");ba.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(ba,va);ba.setAttribute("title",va);Ia&&(ba.style.textAlign="right");
-da.appendChild(ba);ba=document.createElement("td");ba.className="gePropRowCell";if("color"==ta)ba.appendChild(Q(wa,Ha,ya));else if("bool"==ta||"boolean"==ta)ba.appendChild(aa(wa,Ha,ya));else if("enum"==ta){var na=ya.enumList;for(ja=0;ja<na.length;ja++)if(va=na[ja],va.val==Ha){mxUtils.write(ba,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(ba,"click",mxUtils.bind(Z,function(){var ea=document.createElement("select");O(ba,ea);for(var ia=0;ia<na.length;ia++){var oa=na[ia],ma=
-document.createElement("option");ma.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ma,mxResources.get(oa.dispName,null,oa.dispName));ea.appendChild(ma)}ea.value=Ha;t.appendChild(ea);mxEvent.addListener(ea,"change",function(){var xa=mxUtils.htmlEntities(ea.value);R(wa,xa,ya)});ea.focus();mxEvent.addListener(ea,"blur",function(){t.removeChild(ea)})}))}else"dynamicArr"==ta?ba.appendChild(S(wa,Ha,ya.subType,ya.subDefVal,ya.countProperty,da,ja)):"staticArr"==ta?ba.appendChild(X(wa,Ha,ya.subType,ya.subDefVal,
-ya.size,da,ja)):"readOnly"==ta?(ja=document.createElement("input"),ja.setAttribute("readonly",""),ja.value=Ha,ja.style.width="96px",ja.style.borderWidth="0px",ba.appendChild(ja)):(ba.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ha)),mxEvent.addListener(ba,"click",mxUtils.bind(Z,function(){function ea(){var oa=ia.value;oa=0==oa.length&&"string"!=ta?0:oa;ya.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",ta="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=ya.min&&oa<
-ya.min?oa=ya.min:null!=ya.max&&oa>ya.max&&(oa=ya.max);oa=encodeURIComponent(("int"==ta?parseInt(oa):oa)+"");R(wa,oa,ya)}var ia=document.createElement("input");O(ba,ia,!0);ia.value=decodeURIComponent(Ha);ia.className="gePropEditor";"int"!=ta&&"float"!=ta||ya.allowAuto||(ia.type="number",ia.step="int"==ta?"1":"any",null!=ya.min&&(ia.min=parseFloat(ya.min)),null!=ya.max&&(ia.max=parseFloat(ya.max)));t.appendChild(ia);mxEvent.addListener(ia,"keypress",function(oa){13==oa.keyCode&&ea()});ia.focus();mxEvent.addListener(ia,
-"blur",function(){ea()})})));ya.isDeletable&&(ja=mxUtils.button("-",mxUtils.bind(Z,function(ea){R(wa,"",ya,ya.index);mxEvent.consume(ea)})),ja.style.height="16px",ja.style.width="25px",ja.style.float="right",ja.className="geColorBtn",ba.appendChild(ja));da.appendChild(ba);return da}var Z=this,ca=this.editorUi.editor.graph,fa=[];t.style.position="relative";t.style.padding="0";var ka=document.createElement("table");ka.className="geProperties";ka.style.whiteSpace="nowrap";ka.style.width="100%";var ha=
-document.createElement("tr");ha.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var la=document.createElement("img");la.src=Sidebar.prototype.expandedImage;la.style.verticalAlign="middle";ra.appendChild(la);mxUtils.write(ra,mxResources.get("property"));ha.style.cursor="pointer";var Fa=function(){var wa=ka.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){la.src=Sidebar.prototype.collapsedImage;var Ha="none";for(var ya=t.childNodes.length-
-1;0<=ya;ya--)try{var Ia=t.childNodes[ya],ja=Ia.nodeName.toUpperCase();"INPUT"!=ja&&"SELECT"!=ja||t.removeChild(Ia)}catch(va){}}else la.src=Sidebar.prototype.expandedImage,Ha="";for(ya=0;ya<wa.length;ya++)wa[ya].style.display=Ha};mxEvent.addListener(ha,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Fa()});ha.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");ha.appendChild(ra);ka.appendChild(ha);var Ga=
+fa.push({name:wa,values:Ha,type:ya,defVal:Ia,countProperty:ja,parentRow:va,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(Z,function(da){for(var ca=va,na=0;null!=ca.nextSibling;)if(ca.nextSibling.getAttribute("data-pName")==wa)ca=ca.nextSibling,na++;else break;var ea={type:ya,parentRow:va,index:na,isDeletable:!0,defVal:Ia,countProperty:ja};na=Y(wa,"",ea,0==na%2,ta);R(wa,Ia,ea);ca.parentNode.insertBefore(na,ca.nextSibling);mxEvent.consume(da)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function X(wa,Ha,ya,Ia,ja,va,ta){if(0<ja){var da=Array(ja);Ha=null!=Ha?Ha.split(","):[];for(var ca=0;ca<ja;ca++)da[ca]=null!=Ha[ca]?Ha[ca]:null!=Ia?Ia:"";fa.push({name:wa,values:da,type:ya,defVal:Ia,parentRow:va,flipBkg:ta,size:ja})}return document.createElement("div")}function aa(wa,Ha,ya){var Ia=document.createElement("input");Ia.type="checkbox";Ia.checked="1"==Ha;mxEvent.addListener(Ia,"change",function(){R(wa,Ia.checked?"1":"0",ya)});return Ia}function Y(wa,
+Ha,ya,Ia,ja){var va=ya.dispName,ta=ya.type,da=document.createElement("tr");da.className="gePropRow"+(ja?"Dark":"")+(Ia?"Alt":"")+" gePropNonHeaderRow";da.setAttribute("data-pName",wa);da.setAttribute("data-pValue",Ha);Ia=!1;null!=ya.index&&(da.setAttribute("data-index",ya.index),va=(null!=va?va:"")+"["+ya.index+"]",Ia=!0);var ca=document.createElement("td");ca.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(ca,va);ca.setAttribute("title",va);Ia&&(ca.style.textAlign="right");
+da.appendChild(ca);ca=document.createElement("td");ca.className="gePropRowCell";if("color"==ta)ca.appendChild(Q(wa,Ha,ya));else if("bool"==ta||"boolean"==ta)ca.appendChild(aa(wa,Ha,ya));else if("enum"==ta){var na=ya.enumList;for(ja=0;ja<na.length;ja++)if(va=na[ja],va.val==Ha){mxUtils.write(ca,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){var ea=document.createElement("select");O(ca,ea);for(var ia=0;ia<na.length;ia++){var oa=na[ia],ma=
+document.createElement("option");ma.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ma,mxResources.get(oa.dispName,null,oa.dispName));ea.appendChild(ma)}ea.value=Ha;q.appendChild(ea);mxEvent.addListener(ea,"change",function(){var xa=mxUtils.htmlEntities(ea.value);R(wa,xa,ya)});ea.focus();mxEvent.addListener(ea,"blur",function(){q.removeChild(ea)})}))}else"dynamicArr"==ta?ca.appendChild(S(wa,Ha,ya.subType,ya.subDefVal,ya.countProperty,da,ja)):"staticArr"==ta?ca.appendChild(X(wa,Ha,ya.subType,ya.subDefVal,
+ya.size,da,ja)):"readOnly"==ta?(ja=document.createElement("input"),ja.setAttribute("readonly",""),ja.value=Ha,ja.style.width="96px",ja.style.borderWidth="0px",ca.appendChild(ja)):(ca.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ha)),mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){function ea(){var oa=ia.value;oa=0==oa.length&&"string"!=ta?0:oa;ya.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",ta="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=ya.min&&oa<
+ya.min?oa=ya.min:null!=ya.max&&oa>ya.max&&(oa=ya.max);oa=encodeURIComponent(("int"==ta?parseInt(oa):oa)+"");R(wa,oa,ya)}var ia=document.createElement("input");O(ca,ia,!0);ia.value=decodeURIComponent(Ha);ia.className="gePropEditor";"int"!=ta&&"float"!=ta||ya.allowAuto||(ia.type="number",ia.step="int"==ta?"1":"any",null!=ya.min&&(ia.min=parseFloat(ya.min)),null!=ya.max&&(ia.max=parseFloat(ya.max)));q.appendChild(ia);mxEvent.addListener(ia,"keypress",function(oa){13==oa.keyCode&&ea()});ia.focus();mxEvent.addListener(ia,
+"blur",function(){ea()})})));ya.isDeletable&&(ja=mxUtils.button("-",mxUtils.bind(Z,function(ea){R(wa,"",ya,ya.index);mxEvent.consume(ea)})),ja.style.height="16px",ja.style.width="25px",ja.style.float="right",ja.className="geColorBtn",ca.appendChild(ja));da.appendChild(ca);return da}var Z=this,ba=this.editorUi.editor.graph,fa=[];q.style.position="relative";q.style.padding="0";var ka=document.createElement("table");ka.className="geProperties";ka.style.whiteSpace="nowrap";ka.style.width="100%";var ha=
+document.createElement("tr");ha.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var la=document.createElement("img");la.src=Sidebar.prototype.expandedImage;la.style.verticalAlign="middle";ra.appendChild(la);mxUtils.write(ra,mxResources.get("property"));ha.style.cursor="pointer";var Fa=function(){var wa=ka.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){la.src=Sidebar.prototype.collapsedImage;var Ha="none";for(var ya=q.childNodes.length-
+1;0<=ya;ya--)try{var Ia=q.childNodes[ya],ja=Ia.nodeName.toUpperCase();"INPUT"!=ja&&"SELECT"!=ja||q.removeChild(Ia)}catch(va){}}else la.src=Sidebar.prototype.expandedImage,Ha="";for(ya=0;ya<wa.length;ya++)wa[ya].style.display=Ha};mxEvent.addListener(ha,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Fa()});ha.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");ha.appendChild(ra);ka.appendChild(ha);var Ga=
!1,Aa=!1;ha=null;1==L.vertices.length&&0==L.edges.length?ha=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(ha=L.edges[0].id);null!=ha&&ka.appendChild(Y("id",mxUtils.htmlEntities(ha),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in D)if(ha=D[Ma],"function"!=typeof ha.isVisible||ha.isVisible(L,this)){var za=null!=L.style[Ma]?mxUtils.htmlEntities(L.style[Ma]+""):null!=ha.getDefaultValue?ha.getDefaultValue(L,this):ha.defVal;if("separator"==ha.type)Aa=!Aa;else{if("staticArr"==ha.type)ha.size=
parseInt(L.style[ha.sizeProperty]||D[ha.sizeProperty].defVal)||0;else if(null!=ha.dependentProps){var Da=ha.dependentProps,Ca=[],pa=[];for(ra=0;ra<Da.length;ra++){var qa=L.style[Da[ra]];pa.push(D[Da[ra]].subDefVal);Ca.push(null!=qa?qa.split(","):[])}ha.dependentPropsDefVal=pa;ha.dependentPropsVals=Ca}ka.appendChild(Y(Ma,za,ha,Ga,Aa));Ga=!Ga}}for(ra=0;ra<fa.length;ra++)for(ha=fa[ra],D=ha.parentRow,L=0;L<ha.values.length;L++)Ma=Y(ha.name,ha.values[L],{type:ha.type,parentRow:ha.parentRow,isDeletable:ha.isDeletable,
-index:L,defVal:ha.defVal,countProperty:ha.countProperty,size:ha.size},0==L%2,ha.flipBkg),D.parentNode.insertBefore(Ma,D.nextSibling),D=Ma;t.appendChild(ka);Fa();return t};StyleFormatPanel.prototype.addStyles=function(t){function D(ha){mxEvent.addListener(ha,"mouseenter",function(){ha.style.opacity="1"});mxEvent.addListener(ha,"mouseleave",function(){ha.style.opacity="0.5"})}var L=this.editorUi,R=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
-O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var Q="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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y=
+index:L,defVal:ha.defVal,countProperty:ha.countProperty,size:ha.size},0==L%2,ha.flipBkg),D.parentNode.insertBefore(Ma,D.nextSibling),D=Ma;q.appendChild(ka);Fa();return q};StyleFormatPanel.prototype.addStyles=function(q){function D(ha){mxEvent.addListener(ha,"mouseenter",function(){ha.style.opacity="1"});mxEvent.addListener(ha,"mouseleave",function(){ha.style.opacity="0.5"})}var L=this.editorUi,R=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
+O.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(O);var Q="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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y=
document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ha){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ha)}))})(aa);X.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ha){null!=X[ha]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ha,ca(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ca=mxUtils.bind(this,function(ha){var ra=mxUtils.bind(this,function(Fa){var Ga=mxUtils.button("",mxUtils.bind(this,function(za){R.getModel().beginUpdate();try{for(var Da=L.getSelectionState().cells,Ca=0;Ca<Da.length;Ca++){for(var pa=R.getModel().getStyle(Da[Ca]),qa=0;qa<Q.length;qa++)pa=mxUtils.removeStylename(pa,
+(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ha,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ha){var ra=mxUtils.bind(this,function(Fa){var Ga=mxUtils.button("",mxUtils.bind(this,function(za){R.getModel().beginUpdate();try{for(var Da=L.getSelectionState().cells,Ca=0;Ca<Da.length;Ca++){for(var pa=R.getModel().getStyle(Da[Ca]),qa=0;qa<Q.length;qa++)pa=mxUtils.removeStylename(pa,
Q[qa]);var wa=R.getModel().isVertex(Da[Ca])?R.defaultVertexStyle:R.defaultEdgeStyle;null!=Fa?(mxEvent.isShiftDown(za)||(pa=""==Fa.fill?mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,Fa.fill||mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,null)),pa=mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,Fa.gradient||mxUtils.getValue(wa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(za)||mxClient.IS_MAC&&mxEvent.isMetaDown(za)||!R.getModel().isVertex(Da[Ca])||
(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,Fa.font||mxUtils.getValue(wa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(za)||(pa=""==Fa.stroke?mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,Fa.stroke||mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,null)))):(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),pa=mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(wa,
mxConstants.STYLE_STROKECOLOR,"#000000")),pa=mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_GRADIENTCOLOR,null)),R.getModel().isVertex(Da[Ca])&&(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_FONTCOLOR,null))));R.getModel().setStyle(Da[Ca],pa)}}finally{R.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px";
@@ -11632,18 +11632,18 @@ mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkM
Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Fa.title&&Ga.setAttribute("title",Fa.title)}else{Aa=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ga.style.backgroundColor=Aa;Ga.style.border="1px solid "+Ma}Ga.style.borderRadius="0";O.appendChild(Ga)});O.innerText="";for(var la=0;la<ha.length;la++)0<la&&0==mxUtils.mod(la,4)&&mxUtils.br(O),ra(ha[la])});null==this.format.currentScheme?
Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var fa=document.createElement("div");fa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ka=document.createElement("div");ka.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(t.appendChild(fa),t.appendChild(ka));mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(fa);D(ka);ca(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var D=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,R=null;1==D.cells.length&&(R=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),R.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),R.style.width="210px",R.style.marginBottom="2px",t.appendChild(R));L=1==D.cells.length?L.view.getState(D.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
-mxResources.get("editShape")),D.style.marginBottom="2px",null==R?D.style.width="210px":(R.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),t.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==R?D.style.width="210px":(R.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
-t.appendChild(D));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
-D){var L=Graph.fontMapping[D];null==L&&Graph.isCssFontUrl(D)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",D)):(null==L&&(L='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+D+'");\n}'),t=document.createElement("style"),mxUtils.write(t,L));return t};Graph.addFont=function(t,D,L){if(null!=t&&0<t.length&&null!=D&&0<D.length){var R=t.toLowerCase();if("helvetica"!=R&&"arial"!=t&&"sans-serif"!=
-R){var O=Graph.customFontElements[R];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:t,url:D,elt:Graph.createFontElement(t,O)},Graph.customFontElements[R]=O,Graph.recentCustomFonts[R]=O,D=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=D&&D.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
-return t};Graph.getFontUrl=function(t,D){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(D=t.url);return D};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var D=0;D<t.length;D++){var L=t[D].getAttribute("data-font-src");if(null!=L){var R="FONT"==t[D].nodeName?t[D].getAttribute("face"):t[D].style.fontFamily;null!=R&&Graph.addFont(R,L)}}};Graph.processFontStyle=function(t){if(null!=t){var D=mxUtils.getValue(t,"fontSource",null);if(null!=D){var L=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
-null);null!=L&&Graph.addFont(L,decodeURIComponent(D))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function t(O){D=O}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var L=this.getInsertPoint;
+1<this.defaultColorSchemes.length&&(q.appendChild(fa),q.appendChild(ka));mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(fa);D(ka);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(S);return q};StyleFormatPanel.prototype.addEditOps=function(q){var D=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,R=null;1==D.cells.length&&(R=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),R.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),R.style.width="210px",R.style.marginBottom="2px",q.appendChild(R));L=1==D.cells.length?L.view.getState(D.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
+mxResources.get("editShape")),D.style.marginBottom="2px",null==R?D.style.width="210px":(R.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),q.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==R?D.style.width="210px":(R.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
+q.appendChild(D));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
+D){var L=Graph.fontMapping[D];null==L&&Graph.isCssFontUrl(D)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",D)):(null==L&&(L='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+D+'");\n}'),q=document.createElement("style"),mxUtils.write(q,L));return q};Graph.addFont=function(q,D,L){if(null!=q&&0<q.length&&null!=D&&0<D.length){var R=q.toLowerCase();if("helvetica"!=R&&"arial"!=q&&"sans-serif"!=
+R){var O=Graph.customFontElements[R];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:q,url:D,elt:Graph.createFontElement(q,O)},Graph.customFontElements[R]=O,Graph.recentCustomFonts[R]=O,D=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=D&&D.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
+return q};Graph.getFontUrl=function(q,D){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(D=q.url);return D};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var D=0;D<q.length;D++){var L=q[D].getAttribute("data-font-src");if(null!=L){var R="FONT"==q[D].nodeName?q[D].getAttribute("face"):q[D].style.fontFamily;null!=R&&Graph.addFont(R,L)}}};Graph.processFontStyle=function(q){if(null!=q){var D=mxUtils.getValue(q,"fontSource",null);if(null!=D){var L=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
+null);null!=L&&Graph.addFont(L,decodeURIComponent(D))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function q(O){D=O}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var L=this.getInsertPoint;
this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):L.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=
-Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var E=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,D){return Graph.processFontStyle(E.apply(this,arguments))};var y=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,D,L,R,O,Q,S,X,aa,Y,Z){y.apply(this,arguments);Graph.processFontAttributes(Z)};
-var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,D,L){function R(){for(var ha=S.getSelectionCells(),ra=[],la=0;la<ha.length;la++)S.isCellVisible(ha[la])&&ra.push(ha[la]);S.setSelectionCells(ra)}function O(ha){S.setHiddenTags(ha?[]:X.slice());R();S.refresh()}function Q(ha,ra){Y.innerText="";if(0<ha.length){var la=document.createElement("table");
+Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var E=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,D){return Graph.processFontStyle(E.apply(this,arguments))};var y=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,D,L,R,O,Q,S,X,aa,Y,Z){y.apply(this,arguments);Graph.processFontAttributes(Z)};
+var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,D,L){function R(){for(var ha=S.getSelectionCells(),ra=[],la=0;la<ha.length;la++)S.isCellVisible(ha[la])&&ra.push(ha[la]);S.setSelectionCells(ra)}function O(ha){S.setHiddenTags(ha?[]:X.slice());R();S.refresh()}function Q(ha,ra){Y.innerText="";if(0<ha.length){var la=document.createElement("table");
la.setAttribute("cellpadding","2");la.style.boxSizing="border-box";la.style.tableLayout="fixed";la.style.width="100%";var Fa=document.createElement("tbody");if(null!=ha&&0<ha.length)for(var Ga=0;Ga<ha.length;Ga++)(function(Aa){var Ma=0>mxUtils.indexOf(S.hiddenTags,Aa),za=document.createElement("tr"),Da=document.createElement("td");Da.style.align="center";Da.style.width="16px";var Ca=document.createElement("img");Ca.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);Ca.setAttribute("title",
mxResources.get(Ma?"hideIt":"show",[Aa]));mxUtils.setOpacity(Ca,Ma?75:25);Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(D||Editor.isDarkMode())Ca.style.filter="invert(100%)";Da.appendChild(Ca);mxEvent.addListener(Ca,"click",function(qa){mxEvent.isShiftDown(qa)?O(0<=mxUtils.indexOf(S.hiddenTags,Aa)):(S.toggleHiddenTag(Aa),R(),S.refresh());mxEvent.consume(qa)});za.appendChild(Da);Da=document.createElement("td");Da.style.overflow="hidden";Da.style.whiteSpace="nowrap";
Da.style.textOverflow="ellipsis";Da.style.verticalAlign="middle";Da.style.cursor="pointer";Da.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);Da.appendChild(a);mxEvent.addListener(Da,"click",function(qa){if(mxEvent.isShiftDown(qa)){O(!0);var wa=S.getCellsForTags([Aa],null,null,!0);S.isEnabled()?S.setSelectionCells(wa):S.highlightCells(wa)}else if(Ma&&0<S.hiddenTags.length)O(!0);else{wa=
@@ -11651,42 +11651,42 @@ X.slice();var Ha=mxUtils.indexOf(wa,Aa);wa.splice(Ha,1);S.setHiddenTags(wa);R();
"middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(D||Editor.isDarkMode())Ca.style.filter="invert(100%)";mxEvent.addListener(Ca,"click",function(qa){var wa=mxUtils.indexOf(X,Aa);0<=wa&&X.splice(wa,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Aa]);S.refresh();mxEvent.consume(qa)});Da.appendChild(Ca)}else{var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.margin="0px";pa.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Aa);pa.checked=pa.defaultChecked;
pa.style.background="transparent";pa.setAttribute("title",mxResources.get(pa.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(pa,"change",function(qa){pa.checked?S.addTagsForCells(S.getSelectionCells(),[Aa]):S.removeTagsForCells(S.getSelectionCells(),[Aa]);mxEvent.consume(qa)});Da.appendChild(pa)}za.appendChild(Da)}Fa.appendChild(za)})(ha[Ga]);la.appendChild(Fa);Y.appendChild(la)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow=
"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ha){S.setHiddenTags([]);mxEvent.isShiftDown(ha)||
-(X=S.hiddenTags.slice());R();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ca=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(ha){X=ha;fa()})});ca.setAttribute("title",mxResources.get("add"));ca.className="geBtn";ca.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var fa=mxUtils.bind(this,function(ha,ra){if(t()){ha=S.getAllTags();for(ra=0;ra<ha.length;ra++)0>mxUtils.indexOf(X,
+(X=S.hiddenTags.slice());R();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(ha){X=ha;fa()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var fa=mxUtils.bind(this,function(ha,ra){if(q()){ha=S.getAllTags();for(ra=0;ra<ha.length;ra++)0>mxUtils.indexOf(X,
ha[ra])&&X.push(ha[ra]);X.sort();S.isSelectionEmpty()?Q(X):Q(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,fa);S.model.addListener(mxEvent.CHANGE,fa);S.addListener(mxEvent.REFRESH,fa);var ka=document.createElement("div");ka.style.boxSizing="border-box";ka.style.whiteSpace="nowrap";ka.style.position="absolute";ka.style.overflow="hidden";ka.style.bottom="0px";ka.style.height="42px";ka.style.right="10px";ka.style.left="10px";S.isEnabled()&&(ka.appendChild(Z),
-ka.appendChild(ca),aa.appendChild(ka));return{div:aa,refresh:fa}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var D in Graph.customFontElements){var L=Graph.customFontElements[D];t.push({name:L.name,url:L.url})}return t};Graph.prototype.setFont=function(t,D){Graph.addFont(t,D);document.execCommand("fontname",!1,t);if(null!=D){var L=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(t,D);for(var R=0;R<L.length;R++)L[R].getAttribute("face")==
-t&&L[R].getAttribute("data-font-src")!=D&&L[R].setAttribute("data-font-src",D)}};var J=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return J.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 t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var D in t)this.globalVars[D]=
-t[D]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var D=N.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[t]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,D,L,R,O,Q,S,X,aa,Y,Z,ca,fa,ka){var ha=null,ra=null,la=null;ca||null==this.themes||"darkTheme"!=this.defaultThemeName||(ha=this.stylesheet,ra=this.shapeForegroundColor,la=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+ka.appendChild(ba),aa.appendChild(ka));return{div:aa,refresh:fa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var D in Graph.customFontElements){var L=Graph.customFontElements[D];q.push({name:L.name,url:L.url})}return q};Graph.prototype.setFont=function(q,D){Graph.addFont(q,D);document.execCommand("fontname",!1,q);if(null!=D){var L=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(q,D);for(var R=0;R<L.length;R++)L[R].getAttribute("face")==
+q&&L[R].getAttribute("data-font-src")!=D&&L[R].setAttribute("data-font-src",D)}};var J=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return J.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 q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var D in q)this.globalVars[D]=
+q[D]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var D=N.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[q]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,D,L,R,O,Q,S,X,aa,Y,Z,ba,fa,ka){var ha=null,ra=null,la=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ha=this.stylesheet,ra=this.shapeForegroundColor,la=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Fa=v.apply(this,arguments),Ga=this.getCustomFonts();if(Z&&0<Ga.length){var Aa=Fa.ownerDocument,Ma=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var za="",Da="",Ca=0;Ca<Ga.length;Ca++){var pa=Ga[Ca].name,qa=Ga[Ca].url;Graph.isCssFontUrl(qa)?
-za+="@import url("+qa+");\n":Da+='@font-face {\nfont-family: "'+pa+'";\nsrc: url("'+qa+'");\n}\n'}Ma.appendChild(Aa.createTextNode(za+Da));Fa.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Fa),Editor.MathJaxRender(Fa),Fa.parentNode.removeChild(Fa));null!=ha&&(this.shapeBackgroundColor=la,this.shapeForegroundColor=ra,this.stylesheet=ha,this.refresh());return Fa};var u=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){u.apply(this,
-arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var I=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);return I.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var D="1"==mxUtils.getValue(t.style,"enumerate",0);D&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):D||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);D=t.secondLabel;if(null!=D){var L=t.view.scale,R=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*L,t.y+4*L,0,0):mxRectangle.fromPoint(t.view.getPoint(t));D.bounds.equals(t)&&D.value==R&&D.scale==L||(D.bounds=t,D.value=R,D.scale=
-L,D.redraw())}};var M=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){M.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=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;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var K=Graph.prototype.refresh;Graph.prototype.refresh=function(){K.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
-t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,R=0,O=0,Q=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
-function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<R&&R--;0==R&&aa()}),aa=mxUtils.bind(this,function(){if(O<t.length){var Y=this.stoppingCustomActions,Z=t[O++],ca=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),R++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var fa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(fa),1);this.setCellsVisible(fa,!0)}null!=Z.hide&&(Q(),fa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(fa),0),this.setCellsVisible(fa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
+za+="@import url("+qa+");\n":Da+='@font-face {\nfont-family: "'+pa+'";\nsrc: url("'+qa+'");\n}\n'}Ma.appendChild(Aa.createTextNode(za+Da));Fa.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Fa),Editor.MathJaxRender(Fa),Fa.parentNode.removeChild(Fa));null!=ha&&(this.shapeBackgroundColor=la,this.shapeForegroundColor=ra,this.stylesheet=ha,this.refresh());return Fa};var u=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){u.apply(this,
+arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var I=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return I.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var D="1"==mxUtils.getValue(q.style,"enumerate",0);D&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):D||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);D=q.secondLabel;if(null!=D){var L=q.view.scale,R=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*L,q.y+4*L,0,0):mxRectangle.fromPoint(q.view.getPoint(q));D.bounds.equals(q)&&D.value==R&&D.scale==L||(D.bounds=q,D.value=R,D.scale=
+L,D.redraw())}};var M=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){M.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=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;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var K=Graph.prototype.refresh;Graph.prototype.refresh=function(){K.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),null!=
+q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,R=0,O=0,Q=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<R&&R--;0==R&&aa()}),aa=mxUtils.bind(this,function(){if(O<q.length){var Y=this.stoppingCustomActions,Z=q[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),R++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var fa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(fa),1);this.setCellsVisible(fa,!0)}null!=Z.hide&&(Q(),fa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(fa),0),this.setCellsVisible(fa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));fa=[];null!=Z.select&&this.isEnabled()&&(fa=this.getCellsForAction(Z.select),this.setSelectionCells(fa));null!=Z.highlight&&(fa=this.getCellsForAction(Z.highlight),this.highlightCells(fa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(fa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<fa.length&&this.scrollCellToVisible(fa[0]);if(null!=Z.tags){fa=[];null!=Z.tags.hidden&&(fa=fa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ka=this.getAllTags(),ha=0;ha<ka.length;ha++)0>mxUtils.indexOf(Z.tags.visible,ka[ha])&&0>mxUtils.indexOf(fa,ka[ha])&&fa.push(ka[ha]);this.setHiddenTags(fa);this.refresh()}0<ca.length&&(R++,this.executeAnimations(ca,X,Y?1:Z.steps,Y?0:Z.delay));
-0==R?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=D&&D()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,D){var L=this.getLinkForCell(D);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(t,L));if(this.isHtmlLabel(D)){var R=document.createElement("div");R.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=R.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),null!=L&&"data:action/json,"==
-L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(t,L)),Q=!0);Q&&this.labelChanged(D,R.innerHTML)}};Graph.prototype.updateCustomLink=function(t,D){if("data:action/json,"==D.substring(0,17))try{var L=JSON.parse(D.substring(17));null!=L.actions&&(this.updateCustomLinkActions(t,L.actions),D="data:action/json,"+JSON.stringify(L))}catch(R){}return D};Graph.prototype.updateCustomLinkActions=function(t,D){for(var L=0;L<D.length;L++){var R=D[L],O;for(O in R)this.updateCustomLinkAction(t,
-R[O],"cells"),this.updateCustomLinkAction(t,R[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,D,L){if(null!=D&&null!=D[L]){for(var R=[],O=0;O<D[L].length;O++)if("*"==D[L][O])R.push(D[L][O]);else{var Q=t[D[L][O]];null!=Q?""!=Q&&R.push(Q):R.push(D[L][O])}D[L]=R}};Graph.prototype.getCellsForAction=function(t,D){D=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,D));if(null!=t.excludeCells){for(var L=[],R=0;R<D.length;R++)0>t.excludeCells.indexOf(D[R].id)&&L.push(D[R]);
-D=L}return D};Graph.prototype.getCellsById=function(t){var D=[];if(null!=t)for(var L=0;L<t.length;L++)if("*"==t[L]){var R=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(Q){return Q!=R},R))}else{var O=this.model.getCell(t[L]);null!=O&&D.push(O)}return D};var F=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return F.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(t){var D=mxUtils.indexOf(this.hiddenTags,t);0>D?this.hiddenTags.push(t):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var D=0;D<t.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,t[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,D,L,
-R){var O=[];if(null!=t){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},X=0;X<t.length;X++)0<t[X].length&&(S[t[X]]=!0,Q++);for(X=0;X<D.length;X++)if(L&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var aa=this.getTagsForCell(D[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=t.length)){for(var Z=Y=0;Z<aa.length&&Y<Q;Z++)null!=S[aa[Z]]&&Y++;Y=Y==Q}Y&&(1!=R||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var D=null,L=[],R=0;R<t.length;R++){var O=this.getTagsForCell(t[R]);L=[];if(0<O.length){O=O.split(" ");for(var Q={},S=0;S<O.length;S++)if(null==D||null!=D[O[S]])Q[O[S]]=!0,L.push(O[S]);D=Q}else return[]}return L};Graph.prototype.getTagsForCells=function(t){for(var D=[],L={},R=0;R<t.length;R++){var O=this.getTagsForCell(t[R]);if(0<O.length){O=O.split(" ");for(var Q=
-0;Q<O.length;Q++)null==L[O[Q]]&&(L[O[Q]]=!0,D.push(O[Q]))}}return D};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,D){if(0<t.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<t.length;L++){for(var R=this.getTagsForCell(t[L]),O=R.split(" "),Q=!1,S=0;S<D.length;S++){var X=mxUtils.trim(D[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(R=0<R.length?R+" "+X:X,Q=!0)}Q&&this.setAttributeForCell(t[L],"tags",R)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(t,D){if(0<t.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<t.length;L++){var R=this.getTagsForCell(t[L]);if(0<R.length){for(var O=R.split(" "),Q=!1,S=0;S<D.length;S++){var X=mxUtils.indexOf(O,D[S]);0<=X&&(O.splice(X,1),Q=!0)}Q&&this.setAttributeForCell(t[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var D=0;D<t.length;D++)this.model.setVisible(t[D],!this.model.isVisible(t[D]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(t,D){this.model.beginUpdate();try{for(var L=0;L<t.length;L++)this.model.setVisible(t[L],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,D,L,R){for(var O=0;O<t.length;O++)this.highlightCell(t[O],D,L,R)};Graph.prototype.highlightCell=function(t,D,L,R,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;t=this.view.getState(t);var Q=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,
-1)+O),Q=new mxCellHighlight(this,D,O,!1),null!=R&&(Q.opacity=R),Q.highlight(t),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},L));return Q};Graph.prototype.addSvgShadow=function(t,D,L,R){L=null!=L?L:!1;R=null!=R?R:!0;var O=t.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",
+null!=Z.scroll&&(fa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<fa.length&&this.scrollCellToVisible(fa[0]);if(null!=Z.tags){fa=[];null!=Z.tags.hidden&&(fa=fa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ka=this.getAllTags(),ha=0;ha<ka.length;ha++)0>mxUtils.indexOf(Z.tags.visible,ka[ha])&&0>mxUtils.indexOf(fa,ka[ha])&&fa.push(ka[ha]);this.setHiddenTags(fa);this.refresh()}0<ba.length&&(R++,this.executeAnimations(ba,X,Y?1:Z.steps,Y?0:Z.delay));
+0==R?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=D&&D()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,D){var L=this.getLinkForCell(D);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(q,L));if(this.isHtmlLabel(D)){var R=document.createElement("div");R.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=R.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),null!=L&&"data:action/json,"==
+L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(q,L)),Q=!0);Q&&this.labelChanged(D,R.innerHTML)}};Graph.prototype.updateCustomLink=function(q,D){if("data:action/json,"==D.substring(0,17))try{var L=JSON.parse(D.substring(17));null!=L.actions&&(this.updateCustomLinkActions(q,L.actions),D="data:action/json,"+JSON.stringify(L))}catch(R){}return D};Graph.prototype.updateCustomLinkActions=function(q,D){for(var L=0;L<D.length;L++){var R=D[L],O;for(O in R)this.updateCustomLinkAction(q,
+R[O],"cells"),this.updateCustomLinkAction(q,R[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,D,L){if(null!=D&&null!=D[L]){for(var R=[],O=0;O<D[L].length;O++)if("*"==D[L][O])R.push(D[L][O]);else{var Q=q[D[L][O]];null!=Q?""!=Q&&R.push(Q):R.push(D[L][O])}D[L]=R}};Graph.prototype.getCellsForAction=function(q,D){D=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,D));if(null!=q.excludeCells){for(var L=[],R=0;R<D.length;R++)0>q.excludeCells.indexOf(D[R].id)&&L.push(D[R]);
+D=L}return D};Graph.prototype.getCellsById=function(q){var D=[];if(null!=q)for(var L=0;L<q.length;L++)if("*"==q[L]){var R=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(Q){return Q!=R},R))}else{var O=this.model.getCell(q[L]);null!=O&&D.push(O)}return D};var F=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return F.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(q){var D=mxUtils.indexOf(this.hiddenTags,q);0>D?this.hiddenTags.push(q):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var D=0;D<q.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,q[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,D,L,
+R){var O=[];if(null!=q){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},X=0;X<q.length;X++)0<q[X].length&&(S[q[X]]=!0,Q++);for(X=0;X<D.length;X++)if(L&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var aa=this.getTagsForCell(D[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=q.length)){for(var Z=Y=0;Z<aa.length&&Y<Q;Z++)null!=S[aa[Z]]&&Y++;Y=Y==Q}Y&&(1!=R||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var D=null,L=[],R=0;R<q.length;R++){var O=this.getTagsForCell(q[R]);L=[];if(0<O.length){O=O.split(" ");for(var Q={},S=0;S<O.length;S++)if(null==D||null!=D[O[S]])Q[O[S]]=!0,L.push(O[S]);D=Q}else return[]}return L};Graph.prototype.getTagsForCells=function(q){for(var D=[],L={},R=0;R<q.length;R++){var O=this.getTagsForCell(q[R]);if(0<O.length){O=O.split(" ");for(var Q=
+0;Q<O.length;Q++)null==L[O[Q]]&&(L[O[Q]]=!0,D.push(O[Q]))}}return D};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,D){if(0<q.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<q.length;L++){for(var R=this.getTagsForCell(q[L]),O=R.split(" "),Q=!1,S=0;S<D.length;S++){var X=mxUtils.trim(D[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(R=0<R.length?R+" "+X:X,Q=!0)}Q&&this.setAttributeForCell(q[L],"tags",R)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(q,D){if(0<q.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<q.length;L++){var R=this.getTagsForCell(q[L]);if(0<R.length){for(var O=R.split(" "),Q=!1,S=0;S<D.length;S++){var X=mxUtils.indexOf(O,D[S]);0<=X&&(O.splice(X,1),Q=!0)}Q&&this.setAttributeForCell(q[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var D=0;D<q.length;D++)this.model.setVisible(q[D],!this.model.isVisible(q[D]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(q,D){this.model.beginUpdate();try{for(var L=0;L<q.length;L++)this.model.setVisible(q[L],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,D,L,R){for(var O=0;O<q.length;O++)this.highlightCell(q[O],D,L,R)};Graph.prototype.highlightCell=function(q,D,L,R,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;q=this.view.getState(q);var Q=null;null!=q&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,
+1)+O),Q=new mxCellHighlight(this,D,O,!1),null!=R&&(Q.opacity=R),Q.highlight(q),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},L));return Q};Graph.prototype.addSvgShadow=function(q,D,L,R){L=null!=L?L:!1;R=null!=R?R:!0;var O=q.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",
this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
"offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
-S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=S[0];O.appendChild(Q);L||(D=null!=D?D:t.getElementsByTagName("g")[0],
-null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&R&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),D=t.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,t.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(t,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=
-null!=D?D:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),D=0;do var L=this.model.getChildAt(this.model.root,D);while(D++<t&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};
+S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=q.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=q.firstChild?q.insertBefore(O,q.firstChild):q.appendChild(O)):O=S[0];O.appendChild(Q);L||(D=null!=D?D:q.getElementsByTagName("g")[0],
+null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&R&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),D=q.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,q.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(q,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=
+null!=D?D:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),D=0;do var L=this.model.getChildAt(this.model.root,D);while(D++<q&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};
mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=
[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",
STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=
@@ -11698,114 +11698,114 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
-[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var D=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?D="mxgraph.er":"sysML"==t.substring(0,5)&&(D="mxgraph.sysml"));return D};var P=mxMarker.createMarker;mxMarker.createMarker=function(t,D,L,R,O,Q,S,X,aa,Y){if(null!=L&&null==mxMarker.markers[L]){var Z=this.getPackageForType(L);null!=Z&&mxStencilRegistry.getStencil(Z)}return P.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,
-D,L,R,O,Q){"1"==mxUtils.getValue(D.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(t,D){function L(){fa.value=Math.max(1,Math.min(X,Math.max(parseInt(fa.value),parseInt(ca.value))));ca.value=Math.max(1,Math.min(X,Math.min(parseInt(fa.value),parseInt(ca.value))))}function R(va){function ta(Ka,Pa,Qa){var Oa=Ka.useCssTransforms,Sa=Ka.currentTranslate,Ua=Ka.currentScale,La=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var D=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?D="mxgraph.er":"sysML"==q.substring(0,5)&&(D="mxgraph.sysml"));return D};var P=mxMarker.createMarker;mxMarker.createMarker=function(q,D,L,R,O,Q,S,X,aa,Y){if(null!=L&&null==mxMarker.markers[L]){var Z=this.getPackageForType(L);null!=Z&&mxStencilRegistry.getStencil(Z)}return P.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,
+D,L,R,O,Q){"1"==mxUtils.getValue(D.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(q,D){function L(){fa.value=Math.max(1,Math.min(X,Math.max(parseInt(fa.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(fa.value),parseInt(ba.value))))}function R(va){function ta(Ka,Pa,Qa){var Oa=Ka.useCssTransforms,Sa=Ka.currentTranslate,Ua=Ka.currentScale,La=
Ka.view.translate,Ta=Ka.view.scale;Ka.useCssTransforms&&(Ka.useCssTransforms=!1,Ka.currentTranslate=new mxPoint(0,0),Ka.currentScale=1,Ka.view.translate=new mxPoint(0,0),Ka.view.scale=1);var Va=Ka.getGraphBounds(),Wa=0,$a=0,Xa=Ia.get(),ab=1/Ka.pageScale,Za=Fa.checked;if(Za){ab=parseInt(Ha.value);var gb=parseInt(ya.value);ab=Math.min(Xa.height*gb/(Va.height/Ka.view.scale),Xa.width*ab/(Va.width/Ka.view.scale))}else ab=parseInt(la.value)/(100*Ka.pageScale),isNaN(ab)&&(da=1/Ka.pageScale,la.value="100 %");
-Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*da);Xa.height=Math.ceil(Xa.height*da);ab*=da;!Za&&Ka.pageVisible?(Va=Ka.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ka,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ka.checked&&(Pa.isCellVisible=function(Ya){return Ka.isCellSelected(Ya)});Wa=t.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
-(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ka.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
+Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*da);Xa.height=Math.ceil(Xa.height*da);ab*=da;!Za&&Ka.pageVisible?(Va=Ka.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ka,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ka.checked&&(Pa.isCellVisible=function(Ya){return Ka.isCellSelected(Ya)});Wa=q.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
+(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=q.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(q.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ka.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Pa.renderPage;Pa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Pa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ka.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Pa.backgroundColor=Xa;Pa.autoOrigin=Za;Pa.appendGraph(Ka,
ab,Wa,$a,Qa,!0);Qa=Ka.getCustomFonts();if(null!=Pa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Pa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Pa.wnd.document.writeln('<style type="text/css">'),Pa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Pa.wnd.document.writeln("</style>"))}Oa&&(Ka.useCssTransforms=Oa,
-Ka.currentTranslate=Sa,Ka.currentScale=Ua,Ka.view.translate=La,Ka.view.scale=Ta);return Pa}var da=parseInt(ja.value)/100;isNaN(da)&&(da=1,ja.value="100 %");da*=.75;var ba=null,na=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ba=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ca.value,oa=fa.value,ma=!Y.checked,xa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,
-Y.checked,ia,oa,Fa.checked,Ha.value,ya.value,parseInt(la.value)/100,parseInt(ja.value)/100,Ia.get());else{ma&&(ma=ka.checked||ia==aa&&oa==aa);if(!ma&&null!=t.pages&&t.pages.length){var Ea=0;ma=t.pages.length-1;Y.checked||(Ea=parseInt(ia)-1,ma=parseInt(oa)-1);for(var Ba=Ea;Ba<=ma;Ba++){var ua=t.pages[Ba];ia=ua==t.currentPage?O:null;if(null==ia){ia=t.createTemporaryGraph(O.stylesheet);ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;oa=!0;Ea=!1;var sa=null,
-Ja=null;null==ua.viewState&&null==ua.root&&t.updatePageRoot(ua);null!=ua.viewState&&(oa=ua.viewState.pageVisible,Ea=ua.viewState.mathEnabled,sa=ua.viewState.background,Ja=ua.viewState.backgroundImage,ia.extFonts=ua.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=t.createImageForPageLink(Ja.originalSrc,ua));ia.background=sa;ia.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;ia.pageVisible=oa;ia.mathEnabled=Ea;var Na=ia.getGraphBounds;ia.getGraphBounds=function(){var Ka=
-Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ka=mxRectangle.fromRectangle(Ka);Ka.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ka};var Ra=ia.getGlobalVariable;ia.getGlobalVariable=function(Ka){return"page"==Ka?ua.getName():"pagenumber"==Ka?Ba+1:"pagecount"==Ka?null!=t.pages?t.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ia.container);t.updatePageRoot(ua);
-ia.model.setRoot(ua.root)}xa=ta(ia,xa,Ba!=ma);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else xa=ta(O);null==xa?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(xa.mathEnabled&&(ma=xa.wnd.document,va&&(xa.wnd.IMMEDIATE_PRINT=!0),ma.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),xa.closeDocument(),!xa.mathEnabled&&va&&PrintDialog.printPreview(xa));null!=ba&&(O.shapeForegroundColor=na,O.shapeBackgroundColor=ea,O.stylesheet=
-ba,O.refresh())}}var O=t.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,D||mxResources.get("print"));Q.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type",
-"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));S.appendChild(D);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");S.appendChild(D);var ca=document.createElement("input");ca.style.cssText="margin:0 8px 0 8px;";ca.setAttribute("value","1");ca.setAttribute("type",
-"number");ca.setAttribute("min","1");ca.style.width="50px";S.appendChild(ca);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));S.appendChild(D);var fa=ca.cloneNode(!0);S.appendChild(fa);mxEvent.addListener(ca,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(ca,"change",L);mxEvent.addListener(fa,"change",L);if(null!=t.pages&&(X=t.pages.length,null!=t.currentPage))for(D=0;D<t.pages.length;D++)if(t.currentPage==t.pages[D]){aa=
-D+1;ca.value=aa;fa.value=aa;break}ca.setAttribute("max",X);fa.setAttribute("max",X);t.isPagesEnabled()?1<X&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ka=document.createElement("input");ka.setAttribute("value","all");ka.setAttribute("type","radio");ka.style.marginRight="8px";O.isSelectionEmpty()&&ka.setAttribute("disabled","disabled");var ha=document.createElement("div");ha.style.marginBottom="10px";1==X?(ka.setAttribute("type","checkbox"),ka.style.marginBottom="12px",ha.appendChild(ka)):
+Ka.currentTranslate=Sa,Ka.currentScale=Ua,Ka.view.translate=La,Ka.view.scale=Ta);return Pa}var da=parseInt(ja.value)/100;isNaN(da)&&(da=1,ja.value="100 %");da*=.75;var ca=null,na=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ca=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ba.value,oa=fa.value,ma=!Y.checked,xa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,
+Y.checked,ia,oa,Fa.checked,Ha.value,ya.value,parseInt(la.value)/100,parseInt(ja.value)/100,Ia.get());else{ma&&(ma=ka.checked||ia==aa&&oa==aa);if(!ma&&null!=q.pages&&q.pages.length){var Ea=0;ma=q.pages.length-1;Y.checked||(Ea=parseInt(ia)-1,ma=parseInt(oa)-1);for(var Ba=Ea;Ba<=ma;Ba++){var ua=q.pages[Ba];ia=ua==q.currentPage?O:null;if(null==ia){ia=q.createTemporaryGraph(O.stylesheet);ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;oa=!0;Ea=!1;var sa=null,
+Ja=null;null==ua.viewState&&null==ua.root&&q.updatePageRoot(ua);null!=ua.viewState&&(oa=ua.viewState.pageVisible,Ea=ua.viewState.mathEnabled,sa=ua.viewState.background,Ja=ua.viewState.backgroundImage,ia.extFonts=ua.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=q.createImageForPageLink(Ja.originalSrc,ua));ia.background=sa;ia.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;ia.pageVisible=oa;ia.mathEnabled=Ea;var Na=ia.getGraphBounds;ia.getGraphBounds=function(){var Ka=
+Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ka=mxRectangle.fromRectangle(Ka);Ka.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ka};var Ra=ia.getGlobalVariable;ia.getGlobalVariable=function(Ka){return"page"==Ka?ua.getName():"pagenumber"==Ka?Ba+1:"pagecount"==Ka?null!=q.pages?q.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ia.container);q.updatePageRoot(ua);
+ia.model.setRoot(ua.root)}xa=ta(ia,xa,Ba!=ma);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else xa=ta(O);null==xa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(xa.mathEnabled&&(ma=xa.wnd.document,va&&(xa.wnd.IMMEDIATE_PRINT=!0),ma.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),xa.closeDocument(),!xa.mathEnabled&&va&&PrintDialog.printPreview(xa));null!=ca&&(O.shapeForegroundColor=na,O.shapeBackgroundColor=ea,O.stylesheet=
+ca,O.refresh())}}var O=q.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,D||mxResources.get("print"));Q.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type",
+"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));S.appendChild(D);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");S.appendChild(D);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type",
+"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));S.appendChild(D);var fa=ba.cloneNode(!0);S.appendChild(fa);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(fa,"change",L);if(null!=q.pages&&(X=q.pages.length,null!=q.currentPage))for(D=0;D<q.pages.length;D++)if(q.currentPage==q.pages[D]){aa=
+D+1;ba.value=aa;fa.value=aa;break}ba.setAttribute("max",X);fa.setAttribute("max",X);q.isPagesEnabled()?1<X&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ka=document.createElement("input");ka.setAttribute("value","all");ka.setAttribute("type","radio");ka.style.marginRight="8px";O.isSelectionEmpty()&&ka.setAttribute("disabled","disabled");var ha=document.createElement("div");ha.style.marginBottom="10px";1==X?(ka.setAttribute("type","checkbox"),ka.style.marginBottom="12px",ha.appendChild(ka)):
(ka.setAttribute("name","pages-printdialog"),ka.style.marginBottom="8px",S.appendChild(ka));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));ka.parentNode.appendChild(D);1==X&&mxUtils.br(ka.parentNode);var ra=document.createElement("input");ra.style.marginRight="8px";ra.setAttribute("value","adjust");ra.setAttribute("type","radio");ra.setAttribute("name","printZoom");ha.appendChild(ra);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));
ha.appendChild(D);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="50px";ha.appendChild(la);mxEvent.addListener(la,"focus",function(){ra.checked=!0});Q.appendChild(ha);S=S.cloneNode(!1);var Fa=ra.cloneNode(!0);Fa.setAttribute("value","fit");ra.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(Fa);S.appendChild(D);ha=
document.createElement("table");ha.style.display="inline-block";var Ga=document.createElement("tbody"),Aa=document.createElement("tr"),Ma=Aa.cloneNode(!0),za=document.createElement("td"),Da=za.cloneNode(!0),Ca=za.cloneNode(!0),pa=za.cloneNode(!0),qa=za.cloneNode(!0),wa=za.cloneNode(!0);za.style.textAlign="right";pa.style.textAlign="right";mxUtils.write(za,mxResources.get("fitTo"));var Ha=document.createElement("input");Ha.style.cssText="margin:0 8px 0 8px;";Ha.setAttribute("value","1");Ha.setAttribute("min",
"1");Ha.setAttribute("type","number");Ha.style.width="40px";Da.appendChild(Ha);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));Ca.appendChild(D);mxUtils.write(pa,mxResources.get("fitToBy"));var ya=Ha.cloneNode(!0);qa.appendChild(ya);mxEvent.addListener(Ha,"focus",function(){Fa.checked=!0});mxEvent.addListener(ya,"focus",function(){Fa.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));wa.appendChild(D);Aa.appendChild(za);
-Aa.appendChild(Da);Aa.appendChild(Ca);Ma.appendChild(pa);Ma.appendChild(qa);Ma.appendChild(wa);Ga.appendChild(Aa);Ga.appendChild(Ma);ha.appendChild(Ga);S.appendChild(ha);Q.appendChild(S);S=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));S.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var Ia=PageSetupDialog.addPageFormatPanel(D,"printdialog",t.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));S.appendChild(D);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";S.appendChild(ja);Q.appendChild(S);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&&
-D.appendChild(S);t.isOffline()||(ha=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ha.className="geBtn",D.appendChild(ha));PrintDialog.previewEnabled&&(ha=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();R(!1)}),ha.className="geBtn",D.appendChild(ha));ha=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();R(!0)});ha.className="geBtn gePrimaryBtn";D.appendChild(ha);t.editor.cancelFirst||
-D.appendChild(S);Q.appendChild(D);this.container=Q};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat=
+Aa.appendChild(Da);Aa.appendChild(Ca);Ma.appendChild(pa);Ma.appendChild(qa);Ma.appendChild(wa);Ga.appendChild(Aa);Ga.appendChild(Ma);ha.appendChild(Ga);S.appendChild(ha);Q.appendChild(S);S=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));S.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var Ia=PageSetupDialog.addPageFormatPanel(D,"printdialog",q.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));S.appendChild(D);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";S.appendChild(ja);Q.appendChild(S);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});S.className="geBtn";q.editor.cancelFirst&&
+D.appendChild(S);q.isOffline()||(ha=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ha.className="geBtn",D.appendChild(ha));PrintDialog.previewEnabled&&(ha=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();R(!1)}),ha.className="geBtn",D.appendChild(ha));ha=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();R(!0)});ha.className="geBtn gePrimaryBtn";D.appendChild(ha);q.editor.cancelFirst||
+D.appendChild(S);Q.appendChild(D);this.container=Q};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}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)}}else T.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 V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var t=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(D){}};W.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(t){}Editor.prototype.useCanvasForExport=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var q=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(D){}};W.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(q){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};b.afterDecode=function(d,f,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(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"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=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(e,g,k,n,q,p,A){p=null!=p?p:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==g||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var E=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(e);(new Image).src=E+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+
-encodeURIComponent(n):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(y){}try{A||null==window.console||console.error(p,e,g,k,n,q)}catch(y){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(k){}};EditorUi.sendReport=
+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(e,g,k,n,t,p,A){p=null!=p?p:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==g||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var E=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";t=null!=t?t:Error(e);(new Image).src=E+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+
+encodeURIComponent(n):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(y){}try{A||null==window.console||console.error(p,e,g,k,n,t)}catch(y){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(k){}};EditorUi.sendReport=
function(e,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,e.length>g&&(e=e.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],g=0;g<arguments.length;g++)e.push(arguments[g]);console.log.apply(console,
e)}}catch(k){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.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;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(q){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var q=
-g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(p){}};k.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(q){}try{g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(e,g,k){return this.editor.graph.openLink(e,g,k)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,g){g(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,g,k){localStorage.setItem(e,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(e,g){localStorage.removeItem(e);g()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var t=
+g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(p){}};k.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(t){}try{g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(e,g,k){return this.editor.graph.openLink(e,g,k)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,g){g(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,g,k){localStorage.setItem(e,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(e,g){localStorage.removeItem(e);g()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(e,g,k){var n=null==e||null==g;k=null!=k?k:24;var q=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=q.spin;q.spin=function(E,y){var B=!1;this.active||(p.call(this,E),this.active=!0,null!=y&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),B=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(e,g,k){var n=null==e||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=t.spin;t.spin=function(E,y){var B=!1;this.active||(p.call(this,E),this.active=!0,null!=y&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),B=document.createElement("div"),
B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,e)+"px",B.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=y.substring(y.length-3,y.length)&&"!"!=y.charAt(y.length-1)&&(y+="..."),B.innerHTML=y,E.appendChild(B),q.status=B),this.pause=mxUtils.bind(this,function(){var J=function(){};this.active&&(J=mxUtils.bind(this,function(){this.spin(E,y)}));this.stop();return J}),B=!0);return B};var A=q.stop;q.stop=function(){A.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
-return q};EditorUi.prototype.isCompatibleString=function(e){try{var g=mxUtils.parseXml(e),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=y.substring(y.length-3,y.length)&&"!"!=y.charAt(y.length-1)&&(y+="..."),B.innerHTML=y,E.appendChild(B),t.status=B),this.pause=mxUtils.bind(this,function(){var J=function(){};this.active&&(J=mxUtils.bind(this,function(){this.spin(E,y)}));this.stop();return J}),B=!0);return B};var A=t.stop;t.stop=function(){A.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};
+return t};EditorUi.prototype.isCompatibleString=function(e){try{var g=mxUtils.parseXml(e),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(e){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,q=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var A=q.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<A&&q.movePage(A,A-1)};if(38==p.keyCode)return function(){0<A&&q.movePage(A,0)};if(39==p.keyCode)return function(){A<q.pages.length-1&&q.movePage(A,
-A+1)};if(40==p.keyCode)return function(){A<q.pages.length-1&&q.movePage(A,q.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<A&&q.selectNextPage(!1)};if(38==p.keyCode)return function(){0<A&&q.selectPage(q.pages[0])};if(39==p.keyCode)return function(){A<q.pages.length-1&&q.selectNextPage(!0)};if(40==p.keyCode)return function(){A<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)||
+EditorUi.prototype.createKeyHandler=function(e){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,t=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==p.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==p.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,
+A+1)};if(40==p.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<A&&t.selectNextPage(!1)};if(38==p.keyCode)return function(){0<A&&t.selectPage(t.pages[0])};if(39==p.keyCode)return function(){A<t.pages.length-1&&t.selectNextPage(!0)};if(40==p.keyCode)return function(){A<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)||
n.isSelectionEmpty()||mxEvent.isAltDown(p)||mxEvent.isShiftDown(p)||mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)?k.apply(this,arguments):null}}return g};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var g=d.apply(this,arguments);if(null==g)try{var k=e.indexOf("&lt;mxfile ");if(0<=k){var n=e.lastIndexOf("&lt;/mxfile&gt;");n>k&&(g=e.substring(k,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var q=mxUtils.parseXml(e),p=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var g=e.indexOf('<meta charset="utf-8">');0<=g&&(e=e.slice(0,g)+'<meta charset="utf-8"/>'+e.slice(g+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
-e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var g=null!=e?this.editor.extractGraphModel(e,!0):null;null!=g&&(e=g);if(null!=e){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var q=n.length-1;0<=q;q--){var p=this.updatePageRoot(new DiagramPage(n[q]));null==p.getName()&&
-p.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,p,0==q?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=k)for(q=0;q<k.length;q++)g.model.execute(new ChangePage(this,k[q],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,g,k,n,q,p,A,E,y,B,J){g=null!=g?g:this.editor.graph;q=null!=q?q:!1;y=null!=y?y:!0;var N=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var v="_blank";else N=v=n;if(null==e)return"";var u=e;if("mxfile"!=u.nodeName.toLowerCase()){if(J){var G=e.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid());
+""))}else{var t=mxUtils.parseXml(e),p=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var g=e.indexOf('<meta charset="utf-8">');0<=g&&(e=e.slice(0,g)+'<meta charset="utf-8"/>'+e.slice(g+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
+e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var g=null!=e?this.editor.extractGraphModel(e,!0):null;null!=g&&(e=g);if(null!=e){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var t=n.length-1;0<=t;t--){var p=this.updatePageRoot(new DiagramPage(n[t]));null==p.getName()&&
+p.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,p,0==t?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=k)for(t=0;t<k.length;t++)g.model.execute(new ChangePage(this,k[t],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,g,k,n,t,p,A,E,y,B,J){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;y=null!=y?y:!0;var N=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var v="_blank";else N=v=n;if(null==e)return"";var u=e;if("mxfile"!=u.nodeName.toLowerCase()){if(J){var G=e.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid());
G.appendChild(e)}else{G=Graph.zapGremlins(mxUtils.getXml(e));u=Graph.compress(G);if(Graph.decompress(u)!=G)return G;G=e.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid());mxUtils.setTextContent(G,u)}u=e.ownerDocument.createElement("mxfile");u.appendChild(G)}B?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):
(u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("modified",(new Date).toISOString()),u.setAttribute("agent",navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("etag",Editor.guid()),e=null!=k?k.getMode():this.mode,
-null!=e&&u.setAttribute("type",e),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));J=J?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!p&&!q&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))J=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,v,N);else if(p||!q&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),J=this.getEmbeddedSvg(J,g,n,null,E,y,N);return J};EditorUi.prototype.getXmlFileData=
-function(e,g,k,n){e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var q=this.editor.getGraphXml(e,n);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(y){var B=y.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(y)),y=y.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&y.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?y=y.cloneNode(!0):(y=y.cloneNode(!1),mxUtils.setTextContent(y,
-Graph.compressNode(B)));q.appendChild(y)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),g)e(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],A=p.node;if(p!=this.currentPage)if(p.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,E,null,n);EditorUi.removeChildNodes(A);mxUtils.setTextContent(A,
+null!=e&&u.setAttribute("type",e),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));J=J?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!p&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))J=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,v,N);else if(p||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),J=this.getEmbeddedSvg(J,g,n,null,E,y,N);return J};EditorUi.prototype.getXmlFileData=
+function(e,g,k,n){e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var t=this.editor.getGraphXml(e,n);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(y){var B=y.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(y)),y=y.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&y.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?y=y.cloneNode(!0):(y=y.cloneNode(!1),mxUtils.setTextContent(y,
+Graph.compressNode(B)));t.appendChild(y)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(t)),t=this.fileNode.cloneNode(!1),g)e(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],A=p.node;if(p!=this.currentPage)if(p.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,E,null,n);EditorUi.removeChildNodes(A);mxUtils.setTextContent(A,
Graph.compressNode(E));delete p.needsUpdate}else n&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),
-E=E.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,E,null,n),A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(E))));e(A)}return q};EditorUi.prototype.anonymizeString=function(e,g){for(var k=[],n=0;n<e.length;n++){var q=e.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?k.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(q)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var g=0;g<e[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));e[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(p){e[EditorUi.DIFF_INSERT][g].data=
-p.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var n in e[EditorUi.DIFF_UPDATE]){var q=e[EditorUi.DIFF_UPDATE][n];null!=q.name&&(q.name=this.anonymizeString(q.name));null!=q.cells&&(g=mxUtils.bind(this,function(p){var A=q.cells[p];if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&&
-delete q.cells[p]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete e[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,g){if(null!=e.attributes)for(var k=0;k<e.attributes.length;k++)"as"!=e.attributes[k].name&&e.setAttribute(e.attributes[k].name,this.anonymizeString(e.attributes[k].value,g));if(null!=e.childNodes)for(k=
+E=E.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,E,null,n),A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(E))));e(A)}return t};EditorUi.prototype.anonymizeString=function(e,g){for(var k=[],n=0;n<e.length;n++){var t=e.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(t)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var g=0;g<e[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));e[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(p){e[EditorUi.DIFF_INSERT][g].data=
+p.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var n in e[EditorUi.DIFF_UPDATE]){var t=e[EditorUi.DIFF_UPDATE][n];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(g=mxUtils.bind(this,function(p){var A=t.cells[p];if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&&
+delete t.cells[p]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete e[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,g){if(null!=e.attributes)for(var k=0;k<e.attributes.length;k++)"as"!=e.attributes[k].name&&e.setAttribute(e.attributes[k].name,this.anonymizeString(e.attributes[k].value,g));if(null!=e.childNodes)for(k=
0;k<e.childNodes.length;k++)this.anonymizeAttributes(e.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(e,g){g=e.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=
g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
-this.editor.setStatus(""),e?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(e,g,k,n,q,p,A,E,y,B,J){q=null!=q?q:!0;p=null!=p?p:!1;var N=this.editor.graph;if(g||!e&&null!=y&&/(\.svg)$/i.test(y.getTitle())){var v=
+this.editor.setStatus(""),e?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(e,g,k,n,t,p,A,E,y,B,J){t=null!=t?t:!0;p=null!=p?p:!1;var N=this.editor.graph;if(g||!e&&null!=y&&/(\.svg)$/i.test(y.getTitle())){var v=
null!=N.themes&&"darkTheme"==N.defaultThemeName;B=!1;if(v||null!=this.pages&&this.currentPage!=this.pages[0]){var u=N.getGlobalVariable;N=this.createTemporaryGraph(v?N.getDefaultStylesheet():N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var G=this.pages[0];this.currentPage==G?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&N.setBackgroundImage(G.viewState.backgroundImage);N.getGlobalVariable=
-function(I){return"page"==I?G.getName():"pagenumber"==I?1:u.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(G.root)}}A=null!=A?A:this.getXmlFileData(q,p,B,J);y=null!=y?y:this.getCurrentFile();e=this.createFileData(A,N,y,window.location.href,e,g,k,n,q,E,B);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return e};EditorUi.prototype.getHtml=function(e,g,k,n,q,p){p=null!=p?p:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=
-p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var y=g.view.scale;p=Math.floor(A.x/y-g.view.translate.x);y=Math.floor(A.y/y-g.view.translate.y);A=g.background;null==q&&(g=this.getBasenames().join(";"),0<g.length&&(E=EditorUi.drawHost+"/embed.js?s="+g));e.setAttribute("x0",p);e.setAttribute("y0",y)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize","0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=n&&e.setAttribute("edit",
-n));null!=q&&(q=q.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";n=Graph.compress(e);Graph.decompress(n)!=e&&(n=encodeURIComponent(e));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
-q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,g,k,n,q){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+
-g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var g=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
+function(I){return"page"==I?G.getName():"pagenumber"==I?1:u.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(G.root)}}A=null!=A?A:this.getXmlFileData(t,p,B,J);y=null!=y?y:this.getCurrentFile();e=this.createFileData(A,N,y,window.location.href,e,g,k,n,t,E,B);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return e};EditorUi.prototype.getHtml=function(e,g,k,n,t,p){p=null!=p?p:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=
+p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var y=g.view.scale;p=Math.floor(A.x/y-g.view.translate.x);y=Math.floor(A.y/y-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(E=EditorUi.drawHost+"/embed.js?s="+g));e.setAttribute("x0",p);e.setAttribute("y0",y)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize","0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=n&&e.setAttribute("edit",
+n));null!=t&&(t=t.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";n=Graph.compress(e);Graph.decompress(n)!=e&&(n=encodeURIComponent(e));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+
+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,g,k,n,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+
+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var g=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
[this],"data",[e],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");e=null!=g?this.editor.extractGraphModel(g,!0):null;null!=e&&(g=e);if(null!=g&&"mxfile"==g.nodeName&&(e=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var n=0;n<e.length;n++)null==e[n].getAttribute("id")&&e[n].setAttribute("id",n),g=new DiagramPage(e[n]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",
[n+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");g={};for(n=0;n<q.length;n++)g[q[n]]=!0;var p=this.editor.graph.getModel(),A=p.getChildren(p.root);for(n=0;n<A.length;n++){var E=A[n];p.setVisible(E,g[E.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(e){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||
-/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(e,g,k,n,q,p,A,E,y,B,J,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==e?
-!1:!q),u=v+("xml"==e||"pdf"==e&&J?".drawio":"")+"."+e;if("xml"==e){var G=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,q,null,null,null,g);this.saveData(u,e,G,"text/xml")}else if("html"==e)G=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(u,e,G,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==e)u=v+".png";else if("jpeg"==e)u=v+".jpg";else if("remoteSvg"==e){u=v+".svg";e="svg";var I=parseInt(y);
-"string"===typeof E&&0<E.indexOf("%")&&(E=parseInt(E)/100);if(0<I){var M=this.editor.graph,K=M.getGraphBounds();var H=Math.ceil(K.width*E/M.view.scale+2*I);var F=Math.ceil(K.height*E/M.view.scale+2*I)}}this.saveRequest(u,e,mxUtils.bind(this,function(W,t){try{var D=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var L=this.createDownloadRequest(W,e,n,t,A,q,E,y,B,J,N,H,F);this.editor.graph.pageVisible=D;return L}catch(R){this.handleError(R)}}))}else{var P=null,U=mxUtils.bind(this,
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var t=urlParams["layer-ids"].split(" ");g={};for(n=0;n<t.length;n++)g[t[n]]=!0;var p=this.editor.graph.getModel(),A=p.getChildren(p.root);for(n=0;n<A.length;n++){var E=A[n];p.setVisible(E,g[E.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(e){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||
+/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(e,g,k,n,t,p,A,E,y,B,J,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==e?
+!1:!t),u=v+("xml"==e||"pdf"==e&&J?".drawio":"")+"."+e;if("xml"==e){var G=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,t,null,null,null,g);this.saveData(u,e,G,"text/xml")}else if("html"==e)G=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(u,e,G,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==e)u=v+".png";else if("jpeg"==e)u=v+".jpg";else if("remoteSvg"==e){u=v+".svg";e="svg";var I=parseInt(y);
+"string"===typeof E&&0<E.indexOf("%")&&(E=parseInt(E)/100);if(0<I){var M=this.editor.graph,K=M.getGraphBounds();var H=Math.ceil(K.width*E/M.view.scale+2*I);var F=Math.ceil(K.height*E/M.view.scale+2*I)}}this.saveRequest(u,e,mxUtils.bind(this,function(W,q){try{var D=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var L=this.createDownloadRequest(W,e,n,q,A,t,E,y,B,J,N,H,F);this.editor.graph.pageVisible=D;return L}catch(R){this.handleError(R)}}))}else{var P=null,U=mxUtils.bind(this,
function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});if("svg"==e){var T=this.editor.graph.background;if(A||T==mxConstants.NONE)T=null;var V=this.editor.graph.getSvg(T,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();U(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else u=v+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(e,g,k,n,q,p,A,E,y,B,J,N,v){var u=this.editor.graph,G=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var I="",M="";if(G.width*G.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-B=B?"1":"0";"pdf"==g&&(null!=J?M="&from="+J.from+"&to="+J.to:0==p&&(M="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){I="&from="+p;break}p=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!q?q||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;q={globalVars:u.getExportVariables()};y&&(q.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&
-(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+I+M+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=A?"&scale="+A:"")+(null!=E?"&border="+E:"")+(N&&isFinite(N)?"&w="+N:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(e,g){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,g,k){var n=
-window.location.hash,q=mxUtils.bind(this,function(A){var E=null!=e.data?e.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=e.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return n};this.fileLoaded(A);"csv"==e.format&&this.importCsv(E,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var y=
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else u=v+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(e,g,k,n,t,p,A,E,y,B,J,N,v){var u=this.editor.graph,G=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var I="",M="";if(G.width*G.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+B=B?"1":"0";"pdf"==g&&(null!=J?M="&from="+J.from+"&to="+J.to:0==p&&(M="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){I="&from="+p;break}p=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;t={globalVars:u.getExportVariables()};y&&(t.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&
+(t.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+I+M+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(null!=A?"&scale="+A:"")+(null!=E?"&border="+E:"")+(N&&isFinite(N)?"&w="+N:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(e,g){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,g,k){var n=
+window.location.hash,t=mxUtils.bind(this,function(A){var E=null!=e.data?e.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=e.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return n};this.fileLoaded(A);"csv"==e.format&&this.importCsv(E,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var y=
null!=e.interval?parseInt(e.interval):6E4,B=null,J=mxUtils.bind(this,function(){var v=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(u){v===this.currentPage&&(200<=u.getStatus()&&300>=u.getStatus()?(this.updateDiagram(u.getText()),N()):this.handleError({message:mxResources.get("error")+" "+u.getStatus()}))}),mxUtils.bind(this,function(u){this.handleError(u)}))}),N=mxUtils.bind(this,function(){window.clearTimeout(B);
-B=window.setTimeout(J,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();J()}));N();J()}null!=g&&g()});if(null!=e.url&&0<e.url.length){var p=e.url;if(/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))p=this.editor.getProxiedUrl(p);this.editor.loadUrl(p,mxUtils.bind(this,function(A){q(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else q("")};EditorUi.prototype.updateDiagram=function(e){function g(F){var P=new mxCellOverlay(F.image||
-q.warningImage,F.tooltip,F.align,F.valign,F.offset);P.addListener(mxEvent.CLICK,function(U,T){n.alert(F.tooltip)});return P}var k=null,n=this;if(null!=e&&0<e.length&&(k=mxUtils.parseXml(e),e=null!=k?k.documentElement:null,null!=e&&"updates"==e.nodeName)){var q=this.editor.graph,p=q.getModel();p.beginUpdate();var A=null;try{for(e=e.firstChild;null!=e;){if("update"==e.nodeName){var E=p.getCell(e.getAttribute("id"));if(null!=E){try{var y=e.getAttribute("value");if(null!=y){var B=mxUtils.parseXml(y).documentElement;
-if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(E,B);else for(var J=B.attributes,N=0;N<J.length;N++)q.setAttributeForCell(E,J[N].nodeName,0<J[N].nodeValue.length?J[N].nodeValue:null)}}catch(F){null!=window.console&&console.log("Error in value for "+E.id+": "+F)}try{var v=e.getAttribute("style");null!=v&&q.model.setStyle(E,v)}catch(F){null!=window.console&&console.log("Error in style for "+E.id+": "+F)}try{var u=e.getAttribute("icon");if(null!=u){var G=0<u.length?JSON.parse(u):null;null!=
-G&&G.append||q.removeCellOverlays(E);null!=G&&q.addCellOverlay(E,g(G))}}catch(F){null!=window.console&&console.log("Error in icon for "+E.id+": "+F)}try{var I=e.getAttribute("geometry");if(null!=I){I=JSON.parse(I);var M=q.getCellGeometry(E);if(null!=M){M=M.clone();for(key in I){var K=parseFloat(I[key]);"dx"==key?M.x+=K:"dy"==key?M.y+=K:"dw"==key?M.width+=K:"dh"==key?M.height+=K:M[key]=parseFloat(I[key])}q.model.setGeometry(E,M)}}}catch(F){null!=window.console&&console.log("Error in icon for "+E.id+
-": "+F)}}}else if("model"==e.nodeName){for(var H=e.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(e.firstChild)).decode(H,p)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(q.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(A=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):
-1);e=e.nextSibling}}finally{p.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(e,g){var k=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var n=k.lastIndexOf(".");0<=n&&(e=k.substring(n),k=k.substring(0,n));if(g){g=k;var q=new Date;k=q.getFullYear();n=q.getMonth()+1;var p=q.getDate(),A=q.getHours(),E=q.getMinutes();q=q.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+A+"-"+E+"-"+q))}return k=mxResources.get("copyOf",
-[k])+e};EditorUi.prototype.fileLoaded=function(e,g){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
+B=window.setTimeout(J,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();J()}));N();J()}null!=g&&g()});if(null!=e.url&&0<e.url.length){var p=e.url;if(/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))p=this.editor.getProxiedUrl(p);this.editor.loadUrl(p,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(e){function g(F){var P=new mxCellOverlay(F.image||
+t.warningImage,F.tooltip,F.align,F.valign,F.offset);P.addListener(mxEvent.CLICK,function(U,T){n.alert(F.tooltip)});return P}var k=null,n=this;if(null!=e&&0<e.length&&(k=mxUtils.parseXml(e),e=null!=k?k.documentElement:null,null!=e&&"updates"==e.nodeName)){var t=this.editor.graph,p=t.getModel();p.beginUpdate();var A=null;try{for(e=e.firstChild;null!=e;){if("update"==e.nodeName){var E=p.getCell(e.getAttribute("id"));if(null!=E){try{var y=e.getAttribute("value");if(null!=y){var B=mxUtils.parseXml(y).documentElement;
+if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(E,B);else for(var J=B.attributes,N=0;N<J.length;N++)t.setAttributeForCell(E,J[N].nodeName,0<J[N].nodeValue.length?J[N].nodeValue:null)}}catch(F){null!=window.console&&console.log("Error in value for "+E.id+": "+F)}try{var v=e.getAttribute("style");null!=v&&t.model.setStyle(E,v)}catch(F){null!=window.console&&console.log("Error in style for "+E.id+": "+F)}try{var u=e.getAttribute("icon");if(null!=u){var G=0<u.length?JSON.parse(u):null;null!=
+G&&G.append||t.removeCellOverlays(E);null!=G&&t.addCellOverlay(E,g(G))}}catch(F){null!=window.console&&console.log("Error in icon for "+E.id+": "+F)}try{var I=e.getAttribute("geometry");if(null!=I){I=JSON.parse(I);var M=t.getCellGeometry(E);if(null!=M){M=M.clone();for(key in I){var K=parseFloat(I[key]);"dx"==key?M.x+=K:"dy"==key?M.y+=K:"dw"==key?M.width+=K:"dh"==key?M.height+=K:M[key]=parseFloat(I[key])}t.model.setGeometry(E,M)}}}catch(F){null!=window.console&&console.log("Error in icon for "+E.id+
+": "+F)}}}else if("model"==e.nodeName){for(var H=e.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(e.firstChild)).decode(H,p)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(t.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(A=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):
+1);e=e.nextSibling}}finally{p.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(e,g){var k=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var n=k.lastIndexOf(".");0<=n&&(e=k.substring(n),k=k.substring(0,n));if(g){g=k;var t=new Date;k=t.getFullYear();n=t.getMonth()+1;var p=t.getDate(),A=t.getHours(),E=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+A+"-"+E+"-"+t))}return k=mxResources.get("copyOf",
+[k])+e};EditorUi.prototype.fileLoaded=function(e,g){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);
e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");
!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=e.getMode()){var p="1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?
"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(A){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError=A;if(null!=e)try{e.close()}catch(E){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+A.message,label:"stack_"+A.stack})}catch(E){}e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||q():q()});g?e():this.handleError(A,
-mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else q();return n};EditorUi.prototype.getHashValueForPages=function(e,g){var k=0,n=new mxGraphModel,q=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<e.length;p++){this.updatePageRoot(e[p]);var A=e[p].node.cloneNode(!1);A.removeAttribute("name");n.root=e[p].root;var E=q.encode(n);this.editor.graph.saveViewState(e[p].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);
+1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError=A;if(null!=e)try{e.close()}catch(E){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+A.message,label:"stack_"+A.stack})}catch(E){}e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||t():t()});g?e():this.handleError(A,
+mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else t();return n};EditorUi.prototype.getHashValueForPages=function(e,g){var k=0,n=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<e.length;p++){this.updatePageRoot(e[p]);var A=e[p].node.cloneNode(!1);A.removeAttribute("name");n.root=e[p].root;var E=t.encode(n);this.editor.graph.saveViewState(e[p].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);
null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(y,B,J,N){return!N||"mxGeometry"!=y.nodeName&&"mxPoint"!=y.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?N&&"mxCell"==y.nodeName&&"previous"==B?null:J:Math.round(J)},g)<<0}return k};EditorUi.prototype.hashValue=function(e,g,k){var n=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=
-e.nodeName&&(n^=this.hashValue(e.nodeName,g,k));if(null!=e.attributes){null!=k&&(k.attrCount+=e.attributes.length);for(var q=0;q<e.attributes.length;q++){var p=e.attributes[q].name,A=null!=g?g(e,p,e.attributes[q].value,!0):e.attributes[q].value;null!=A&&(n^=this.hashValue(p,g,k)+this.hashValue(A,g,k))}}if(null!=e.childNodes)for(q=0;q<e.childNodes.length;q++)n=(n<<5)-n+this.hashValue(e.childNodes[q],g,k)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);g=0;null!=k&&(k.byteCount+=e.length);for(q=
-0;q<e.length;q++)g=(g<<5)-g+e.charCodeAt(q)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,g,k,n,q,p,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(e){null==e&&(e=this.emptyLibraryXml);
+e.nodeName&&(n^=this.hashValue(e.nodeName,g,k));if(null!=e.attributes){null!=k&&(k.attrCount+=e.attributes.length);for(var t=0;t<e.attributes.length;t++){var p=e.attributes[t].name,A=null!=g?g(e,p,e.attributes[t].value,!0):e.attributes[t].value;null!=A&&(n^=this.hashValue(p,g,k)+this.hashValue(A,g,k))}}if(null!=e.childNodes)for(t=0;t<e.childNodes.length;t++)n=(n<<5)-n+this.hashValue(e.childNodes[t],g,k)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);g=0;null!=k&&(k.byteCount+=e.length);for(t=
+0;t<e.length;t++)g=(g<<5)-g+e.charCodeAt(t)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,g,k,n,t,p,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(e){null==e&&(e=this.emptyLibraryXml);
this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(e));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=
null))};EditorUi.prototype.removeLibrarySidebar=function(e){var g=this.sidebar.palettes[e];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var g=this.sidebar.container;if(null==e){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(e=k[k.length-1].nextSibling)}e=null!=e?e:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var n=k.previousSibling;g.insertBefore(k,
e);g.insertBefore(n,k)};EditorUi.prototype.loadLibrary=function(e,g){var k=mxUtils.parseXml(e.getData());if("mxlibrary"==k.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(e,n,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,g,k,n){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());
-".scratchpad"==e.title&&(this.scratchpad=e);var q=this.sidebar.palettes[e.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var p=null,A=mxUtils.bind(this,function(H,F){0==H.length&&e.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),F.appendChild(p)):this.addLibraryEntries(H,F)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=e.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&
-(k=k.substring(0,k.lastIndexOf("."))));var E=this.sidebar.addPalette(e.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(H){A(g,H)}));this.repositionLibrary(q);var y=E.parentNode.previousSibling;n=y.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=e.title&&y.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";y.style.position=
+".scratchpad"==e.title&&(this.scratchpad=e);var t=this.sidebar.palettes[e.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var p=null,A=mxUtils.bind(this,function(H,F){0==H.length&&e.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),F.appendChild(p)):this.addLibraryEntries(H,F)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=e.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&
+(k=k.substring(0,k.lastIndexOf("."))));var E=this.sidebar.addPalette(e.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(H){A(g,H)}));this.repositionLibrary(t);var y=E.parentNode.previousSibling;n=y.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=e.title&&y.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";y.style.position=
"relative";var J=document.createElement("img");J.className="geAdaptiveAsset";J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("close"));J.setAttribute("valign","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.top="2px";J.style.width="14px";J.style.cursor="pointer";J.style.margin="0 3px";var N=null;if(".scratchpad"!=e.title||this.closableScratchpad)B.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(H){if(!mxEvent.isConsumed(H)){var F=
mxUtils.bind(this,function(){this.closeLibrary(e)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F();mxEvent.consume(H)}}));if(e.isEditable()){var v=this.editor.graph,u=null,G=mxUtils.bind(this,function(H){this.showLibraryDialog(e.getTitle(),E,g,e,e.getMode());mxEvent.consume(H)}),I=mxUtils.bind(this,function(H){e.setModified(!0);e.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=J.cloneNode(!1),
u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",B.insertBefore(u,B.firstChild),y.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(e.getTitle(),g,e,e.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),y.style.paddingRight=18*B.childNodes.length+"px")})):null==N&&(N=J.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",
@@ -11814,172 +11814,172 @@ mxResources.get("save")),B.insertBefore(N,B.firstChild),mxEvent.addListener(N,"c
this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var F=v.getSelectionCells(),P=v.view.getBounds(F),U=v.view.scale;P.x/=U;P.y/=U;P.width/=U;P.height/=U;P.x-=v.view.translate.x;P.y-=v.view.translate.y;M(F,P)}mxEvent.consume(H)});mxEvent.addGestureListeners(E,function(){},mxUtils.bind(this,function(H){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.first&&(v.graphHandler.suspend(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility=
"hidden"),E.style.backgroundColor="#f1f3f4",E.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,mxEvent.consume(H))}),mxUtils.bind(this,function(H){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(E.style.backgroundColor="",E.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,K(H),mxEvent.consume(H))}));mxEvent.addListener(E,"mouseleave",mxUtils.bind(this,function(H){v.isMouseDown&&null!=v.graphHandler.first&&
(v.graphHandler.resume(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),E.style.backgroundColor="",E.style.cursor="",v.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(H){E.style.backgroundColor="#f1f3f4";H.dataTransfer.dropEffect="copy";E.style.cursor="copy";this.sidebar.hideTooltip();H.stopPropagation();H.preventDefault()})),mxEvent.addListener(E,"drop",mxUtils.bind(this,function(H){E.style.cursor="";E.style.backgroundColor=
-"";0<H.dataTransfer.files.length&&this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(F,P,U,T,V,W,t,D,L){if(null!=F&&"image/"==P.substring(0,6))F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(F),F=[new mxCell("",new mxGeometry(0,0,V,W),F)],F[0].vertex=!0,M(F,new mxRectangle(0,0,V,W),H,mxEvent.isAltDown(H)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&&
-(p.parentNode.removeChild(p),p=null);else{var R=!1,O=mxUtils.bind(this,function(Q,S){null!=Q&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(Q),null!=S&&0<S.length&&(Q=S));if(null!=Q)if(Q=mxUtils.parseXml(Q),"mxlibrary"==Q.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(Q.documentElement));A(X,E);g=g.concat(X);I(H);this.spinner.stop();R=!0}catch(ca){}else if("mxfile"==Q.documentElement.nodeName)try{var aa=Q.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y=
-this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);M(Y,new mxRectangle(0,0,Z.width,Z.height),H)}R=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}R||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=L&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(L,function(Q){O(Q,
-"text/xml")},null,t):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,t)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(Q){4==Q.readyState&&(this.spinner.stop(),200<=Q.status&&299>=Q.status?O(Q.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Q.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(F,P)}}));
+"";0<H.dataTransfer.files.length&&this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(F,P,U,T,V,W,q,D,L){if(null!=F&&"image/"==P.substring(0,6))F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(F),F=[new mxCell("",new mxGeometry(0,0,V,W),F)],F[0].vertex=!0,M(F,new mxRectangle(0,0,V,W),H,mxEvent.isAltDown(H)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&&
+(p.parentNode.removeChild(p),p=null);else{var R=!1,O=mxUtils.bind(this,function(Q,S){null!=Q&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(Q),null!=S&&0<S.length&&(Q=S));if(null!=Q)if(Q=mxUtils.parseXml(Q),"mxlibrary"==Q.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(Q.documentElement));A(X,E);g=g.concat(X);I(H);this.spinner.stop();R=!0}catch(ba){}else if("mxfile"==Q.documentElement.nodeName)try{var aa=Q.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y=
+this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);M(Y,new mxRectangle(0,0,Z.width,Z.height),H)}R=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}R||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=L&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(L,function(Q){O(Q,
+"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,q)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(Q){4==Q.readyState&&(this.spinner.stop(),200<=Q.status&&299>=Q.status?O(Q.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Q.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(F,P)}}));
H.stopPropagation();H.preventDefault()})),mxEvent.addListener(E,"dragleave",function(H){E.style.cursor="";E.style.backgroundColor="";H.stopPropagation();H.preventDefault()}));J=J.cloneNode(!1);J.setAttribute("src",Editor.editImage);J.setAttribute("title",mxResources.get("edit"));B.insertBefore(J,B.firstChild);mxEvent.addListener(J,"click",G);mxEvent.addListener(E,"dblclick",function(H){mxEvent.getSource(H)==E&&G(H)});n=J.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
mxResources.get("add"));B.insertBefore(n,B.firstChild);mxEvent.addListener(n,"click",K);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(H){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(H)})),B.insertBefore(n,B.firstChild))}y.appendChild(B);
-y.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,g){for(var k=0;k<e.length;k++){var n=e[k],q=n.data;if(null!=q){q=this.convertDataUri(q);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+q,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(q=this.stringToCells(Graph.decompress(n.xml)),0<q.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(q,
+y.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,g){for(var k=0;k<e.length;k++){var n=e[k],t=n.data;if(null!=t){t=this.convertDataUri(t);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+t,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(t=this.stringToCells(Graph.decompress(n.xml)),0<t.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(t,
n.w,n.h,n.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.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%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,g,k,n,q,p,A){e=new ImageDialog(this,e,g,k,n,q,p,A);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,g){e=null!=e?e:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k),
-k.ignoreColor=!0,this.editor.graph.model.execute(k))});e=new BackgroundImageDialog(this,e,g);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,g,k,n,q){e=new LibraryDialog(this,e,g,k,n,q);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));e.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var g=f.apply(this,arguments);
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,g,k,n,t,p,A){e=new ImageDialog(this,e,g,k,n,t,p,A);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,g){e=null!=e?e:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k),
+k.ignoreColor=!0,this.editor.graph.model.execute(k))});e=new BackgroundImageDialog(this,e,g);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,g,k,n,t){e=new LibraryDialog(this,e,g,k,n,t);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));e.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var g=f.apply(this,arguments);
this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");e.style.position="absolute";e.style.overflow="hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k=
-g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));e.appendChild(g);return e};EditorUi.prototype.handleError=function(e,g,k,n,q,p,A){var E=null!=this.spinner&&null!=this.spinner.pause?
+g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));e.appendChild(g);return e};EditorUi.prototype.handleError=function(e,g,k,n,t,p,A){var E=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},y=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{A?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(u){}if(null!=y||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),J=null;g=null!=g?g:mxResources.get("error");if(null!=y){null!=
-y.retry&&(B=mxResources.get("cancel"),J=function(){E();y.retry()});if(404==y.code||404==y.status||403==y.code){A=403==y.code?null!=y.message?mxUtils.htmlEntities(y.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=q?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
-N.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==y.code||404==y.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(g,A,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(e,g,k,n,q)}),
+y.retry&&(B=mxResources.get("cancel"),J=function(){E();y.retry()});if(404==y.code||404==y.status||403==y.code){A=403==y.code?null!=y.message?mxUtils.htmlEntities(y.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=t?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+N.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==y.code||404==y.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(g,A,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(e,g,k,n,t)}),
J,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){K.innerText="";for(var H=0;H<G.length;H++){var F=document.createElement("option");mxUtils.write(F,G[H].displayName);F.value=H;K.appendChild(F);F=document.createElement("option");F.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(F,"<"+G[H].email+">");F.setAttribute("disabled","disabled");K.appendChild(F)}F=document.createElement("option");mxUtils.write(F,mxResources.get("addAccount"));F.value=G.length;K.appendChild(F)}var G=this.drive.getUsersList(),
I=document.createElement("div"),M=document.createElement("span");M.style.marginTop="6px";mxUtils.write(M,mxResources.get("changeUser")+": ");I.appendChild(M);var K=document.createElement("select");K.style.width="200px";u();mxEvent.addListener(K,"change",mxUtils.bind(this,function(){var H=K.value,F=G.length!=H;F&&this.drive.setUser(G[H]);this.drive.authorize(F,mxUtils.bind(this,function(){F||(G=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));I.appendChild(K);
I=new CustomDialog(this,I,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(I.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=y.message?A=""==y.message&&null!=y.name?mxUtils.htmlEntities(y.name):mxUtils.htmlEntities(y.message):null!=y.response&&null!=y.response.error?A=mxUtils.htmlEntities(y.response.error):"undefined"!==typeof window.App&&(y.code==App.ERROR_TIMEOUT?
A=mxUtils.htmlEntities(mxResources.get("timeout")):y.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof y&&0<y.length&&(A=mxUtils.htmlEntities(y)))}var v=p=null;null!=y&&null!=y.helpLink?(p=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(y.helpLink)})):null!=y&&null!=y.ownerEmail&&(p=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+p+": "+y.ownerEmail+")"),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+
-mxUtils.htmlEntities(y.ownerEmail))}));this.showError(g,A,B,k,J,null,null,p,v,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(e,g,k){e=new ErrorDialog(this,null,e,mxResources.get("ok"),g);this.showDialog(e.container,k||340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(e,g,k,n,q,p){var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){A();null!=g&&
-g()},function(){A();null!=k&&k()},n,q,null,null,null,null,E);this.showDialog(e.container,340,46+E,!0,p);e.init()};EditorUi.prototype.showBanner=function(e,g,k,n){var q=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+e])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(q);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var A=document.createElement("input");
+mxUtils.htmlEntities(y.ownerEmail))}));this.showError(g,A,B,k,J,null,null,p,v,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(e,g,k){e=new ErrorDialog(this,null,e,mxResources.get("ok"),g);this.showDialog(e.container,k||340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(e,g,k,n,t,p){var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){A();null!=g&&
+g()},function(){A();null!=k&&k()},n,t,null,null,null,null,E);this.showDialog(e.container,340,46+E,!0,p);e.init()};EditorUi.prototype.showBanner=function(e,g,k,n){var t=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+e])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";t=document.createElement("img");t.setAttribute("src",IMAGE_PATH+"/logo.png");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(t);
+t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));t.setAttribute("border","0");t.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(t);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var A=document.createElement("input");
A.setAttribute("type","checkbox");A.setAttribute("id","geDoNotShowAgainCheckbox");A.style.marginRight="6px";if(!n){g.appendChild(A);var E=document.createElement("label");E.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(E,mxResources.get("doNotShowAgain"));g.appendChild(E);p.style.paddingBottom="30px";p.appendChild(g)}var y=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,A.checked||n)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(J){mxEvent.consume(J);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){y()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(J){var N=mxEvent.getSource(J);N!=A&&N!=E?(null!=k&&k(),y(),mxEvent.consume(J)):B()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,g,k,n){e=e.toDataURL("image/"+k);if(null!=e&&6<e.length)null!=g&&(e=Editor.writeGraphModelToPng(e,
-"tEXt","mxfile",encodeURIComponent(g))),0<n&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,g,k,n,q){var p="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+p;e=this.createImageDataUri(e,g,k,q);this.saveData(n,p,e.substring(e.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,g){e=new TextareaDialog(this,e,g,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,g,k,n,q,p){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
+mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(t,"click",mxUtils.bind(this,function(J){mxEvent.consume(J);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){y()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(J){var N=mxEvent.getSource(J);N!=A&&N!=E?(null!=k&&k(),y(),mxEvent.consume(J)):B()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);t=!0}return t};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,g,k,n){e=e.toDataURL("image/"+k);if(null!=e&&6<e.length)null!=g&&(e=Editor.writeGraphModelToPng(e,
+"tEXt","mxfile",encodeURIComponent(g))),0<n&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,g,k,n,t){var p="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+p;e=this.createImageDataUri(e,g,k,t);this.saveData(n,p,e.substring(e.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,g){e=new TextareaDialog(this,e,g,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,g,k,n,t,p){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
/(\.html)$/i.test(g)||(g=g+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=n?this.base64ToBlob(e,k):new Blob([e],{type:k}),navigator.msSaveOrOpenBlob(e,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(e,!0):(k.document.write(e),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",e):this.openInNewWindow(e,
k,n);else{var A=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(E?parseInt(E[2],10):!1)?!1:p}if(p||this.isOffline()){A.href=URL.createObjectURL(n?this.base64ToBlob(e,k):new Blob([e],{type:k}));p?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},
-2E4),A.click(),A.parentNode.removeChild(A)}catch(y){}}else this.createEchoRequest(e,g,k,n,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,g,k,n,q,p){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=k?"&mime="+k:"")+(null!=q?"&format="+q:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,g){g=g||"";e=atob(e);for(var k=e.length,n=Math.ceil(k/1024),q=Array(n),
-p=0;p<n;++p){for(var A=1024*p,E=Math.min(A+1024,k),y=Array(E-A),B=0;A<E;++B,++A)y[B]=e[A].charCodeAt(0);q[p]=new Uint8Array(y)}return new Blob(q,{type:g})};EditorUi.prototype.saveLocalFile=function(e,g,k,n,q,p,A,E){p=null!=p?p:!1;A=null!=A?A:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(p);isLocalStorage&&q++;var y=4>=q?2:6<q?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,J){try{if("_blank"==J)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(e,
+2E4),A.click(),A.parentNode.removeChild(A)}catch(y){}}else this.createEchoRequest(e,g,k,n,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,g,k,n,t,p){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,g){g=g||"";e=atob(e);for(var k=e.length,n=Math.ceil(k/1024),t=Array(n),
+p=0;p<n;++p){for(var A=1024*p,E=Math.min(A+1024,k),y=Array(E-A),B=0;A<E;++B,++A)y[B]=e[A].charCodeAt(0);t[p]=new Uint8Array(y)}return new Blob(t,{type:g})};EditorUi.prototype.saveLocalFile=function(e,g,k,n,t,p,A,E){p=null!=p?p:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);t=this.getServiceCount(p);isLocalStorage&&t++;var y=4>=t?2:6<t?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,J){try{if("_blank"==J)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(e,
k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var N=new EmbedDialog(this,e);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var v=window.open("about:blank");null==v?mxUtils.popup(e,!0):(v.document.write("<pre>"+mxUtils.htmlEntities(e,!1)+"</pre>"),v.document.close())}else J==App.MODE_DEVICE||"download"==J?this.doSaveLocalFile(e,B,k,n,null,E):null!=B&&0<B.length&&this.pickFolder(J,mxUtils.bind(this,function(u){try{this.exportFile(e,B,k,n,J,u)}catch(G){this.handleError(G)}}))}catch(u){this.handleError(u)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,A,null,1<q,y,e,k,n);p=this.isServices(q)?q>y?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(e,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(e,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(e=k?e:btoa(unescape(encodeURIComponent(e))),n.document.write('<html><img style="max-width:100%;" src="data:'+
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,A,null,1<t,y,e,k,n);p=this.isServices(t)?t>y?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(e,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(e,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(e=k?e:btoa(unescape(encodeURIComponent(e))),n.document.write('<html><img style="max-width:100%;" src="data:'+
g+";base64,"+e+'"/></html>')):n.document.write("<html>"+e+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),n.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(e){if(null!=urlParams.tags){this.tagsDialog=
this.tagsComponent=null;var g=e(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=g.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",
+80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=g.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=e(mxUtils.bind(this,
-function(n){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var p=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+function(n){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var p=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);
this.exportDialog.style.zIndex=p.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(E){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var y=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight=
-"140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",y);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(y.substring(y.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,g,k,n,q){this.isLocalFileSave()?this.saveLocalFile(k,e,n,q,g):this.saveRequest(e,g,mxUtils.bind(this,function(p,A){return this.createEchoRequest(k,p,n,q,g,A)}),k,q,n)};EditorUi.prototype.saveRequest=function(e,g,k,n,q,p,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;
+"140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",y);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(y.substring(y.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,null,null,null,null,null,null,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",t);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,g,k,n,t){this.isLocalFileSave()?this.saveLocalFile(k,e,n,t,g):this.saveRequest(e,g,mxUtils.bind(this,function(p,A){return this.createEchoRequest(k,p,n,t,g,A)}),k,t,n)};EditorUi.prototype.saveRequest=function(e,g,k,n,t,p,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;
var E=this.getServiceCount(!1);isLocalStorage&&E++;var y=4>=E?2:6<E?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(B,J){if("_blank"==J||null!=B&&0<B.length){var N=k("_blank"==J?null:B,J==App.MODE_DEVICE||"download"==J||null==J||"_blank"==J?"0":"1");null!=N&&(J==App.MODE_DEVICE||"download"==J||"_blank"==J?N.simulate(document,"_blank"):this.pickFolder(J,mxUtils.bind(this,function(v){p=null!=p?p:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,B,p,!0,J,v)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),B,p,!0,J,v)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,A,null,1<E,y,n,p,q);E=this.isServices(E)?4<E?390:280:160;this.showDialog(e.container,
-420,E,!0,!0);e.init()};EditorUi.prototype.isServices=function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,g,k,n,q,p){};EditorUi.prototype.pickFolder=function(e,g,k){g(null)};EditorUi.prototype.exportSvg=function(e,g,k,n,q,p,A,E,y,B,J,N,v,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var G=this.editor.graph.isSelectionEmpty();k=null!=k?k:G;var I=g?null:this.editor.graph.background;I==mxConstants.NONE&&
-(I=null);null==I&&0==g&&(I=J?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var M=this.editor.graph.getSvg(I,e,A,E,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!v,J,N);n&&this.editor.graph.addSvgShadow(M);var K=this.getBaseFilename()+(q?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(P)}))});var H=mxUtils.bind(this,function(P){this.spinner.stop();q&&P.setAttribute("content",this.getFileData(!0,null,null,null,k,y,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var F=mxUtils.bind(this,function(P){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,H,this.thumbImageCache)):
-H(P)});v?this.embedFonts(M,F):(this.editor.addFontCss(M),F(M))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(e,g,k,n,q,p,A){return this.addCheckbox(e,k,n,q,p,A,!0,g)};EditorUi.prototype.addCheckbox=function(e,g,k,n,q,p,A,E){p=null!=p?p:!0;var y=document.createElement("input");y.style.marginRight="8px";y.style.marginTop="16px";y.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();y.id=A;null!=E&&y.setAttribute("name",E);k&&(y.setAttribute("checked","checked"),
-y.defaultChecked=!0);n&&y.setAttribute("disabled","disabled");p&&(e.appendChild(y),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),e.appendChild(k),q||mxUtils.br(e));return y};EditorUi.prototype.addEditButton=function(e,g){var k=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),q="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var p=document.createElement("select");
+mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),B,p,!0,J,v)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,A,null,1<E,y,n,p,t);E=this.isServices(E)?4<E?390:280:160;this.showDialog(e.container,
+420,E,!0,!0);e.init()};EditorUi.prototype.isServices=function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,g,k,n,t,p){};EditorUi.prototype.pickFolder=function(e,g,k){g(null)};EditorUi.prototype.exportSvg=function(e,g,k,n,t,p,A,E,y,B,J,N,v,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var G=this.editor.graph.isSelectionEmpty();k=null!=k?k:G;var I=g?null:this.editor.graph.background;I==mxConstants.NONE&&
+(I=null);null==I&&0==g&&(I=J?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var M=this.editor.graph.getSvg(I,e,A,E,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!v,J,N);n&&this.editor.graph.addSvgShadow(M);var K=this.getBaseFilename()+(t?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(P)}))});var H=mxUtils.bind(this,function(P){this.spinner.stop();t&&P.setAttribute("content",this.getFileData(!0,null,null,null,k,y,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var F=mxUtils.bind(this,function(P){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,H,this.thumbImageCache)):
+H(P)});v?this.embedFonts(M,F):(this.editor.addFontCss(M),F(M))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(e,g,k,n,t,p,A){return this.addCheckbox(e,k,n,t,p,A,!0,g)};EditorUi.prototype.addCheckbox=function(e,g,k,n,t,p,A,E){p=null!=p?p:!0;var y=document.createElement("input");y.style.marginRight="8px";y.style.marginTop="16px";y.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();y.id=A;null!=E&&y.setAttribute("name",E);k&&(y.setAttribute("checked","checked"),
+y.defaultChecked=!0);n&&y.setAttribute("disabled","disabled");p&&(e.appendChild(y),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),e.appendChild(k),t||mxUtils.br(e));return y};EditorUi.prototype.addEditButton=function(e,g){var k=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),t="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var p=document.createElement("select");
p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");p.appendChild(n);e.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var A=new FilenameDialog(this,
-q,mxResources.get("ok"),function(E){null!=E?q=E:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(A.container,300,80,!0,!1);A.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":q:null},getEditInput:function(){return k},getEditSelect:function(){return p}}};
+t,mxResources.get("ok"),function(E){null!=E?t=E:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(A.container,300,80,!0,!1);A.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return p}}};
EditorUi.prototype.addLinkSection=function(e,g){function k(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(E.style.border="1px solid black",E.style.backgroundColor=p):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(E)}mxUtils.write(e,mxResources.get("links")+":");var n=document.createElement("select");
-n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));
-n.appendChild(q);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));e.appendChild(n);mxUtils.write(e,mxResources.get("borderColor")+":");var p="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(p||"none",function(y){p=y;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height=
-"22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";e.appendChild(A);mxUtils.br(e);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(e,g,k,n,q,p,A){A=null!=A?A:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||A.push("lightbox=1"),"auto"!=e&&A.push("target="+e),null!=
-g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=q&&0<q.length&&A.push("edit="+encodeURIComponent(q)),p&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&A.push("page-id="+this.currentPage.getId());return A};EditorUi.prototype.createLink=function(e,g,k,n,q,p,A,E,y,B){y=this.createUrlParameters(e,g,k,n,q,p,y);e=this.getCurrentFile();g=!0;null!=A?k="#U"+encodeURIComponent(A):
+n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));n.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));n.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));
+n.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));e.appendChild(n);mxUtils.write(e,mxResources.get("borderColor")+":");var p="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(p||"none",function(y){p=y;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height=
+"22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";e.appendChild(A);mxUtils.br(e);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(e,g,k,n,t,p,A){A=null!=A?A:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||A.push("lightbox=1"),"auto"!=e&&A.push("target="+e),null!=
+g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=t&&0<t.length&&A.push("edit="+encodeURIComponent(t)),p&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&A.push("page-id="+this.currentPage.getId());return A};EditorUi.prototype.createLink=function(e,g,k,n,t,p,A,E,y,B){y=this.createUrlParameters(e,g,k,n,t,p,y);e=this.getCurrentFile();g=!0;null!=A?k="#U"+encodeURIComponent(A):
(e=this.getCurrentFile(),E||null==e||e.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+e.getHash(),g=!1));g&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(e.getTitle()));B&&1<k.length&&(y.push("open="+k.substring(1)),k="");return(n&&"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("&"):"")+k};EditorUi.prototype.createHtml=function(e,g,k,n,q,p,A,E,y,B,J,N){this.getBasenames();var v={};""!=q&&q!=mxConstants.NONE&&(v.highlight=q);"auto"!==n&&(v.target=n);B||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(v.zoom=k/100);k=[];A&&(k.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages,
+!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+k};EditorUi.prototype.createHtml=function(e,g,k,n,t,p,A,E,y,B,J,N){this.getBasenames();var v={};""!=t&&t!=mxConstants.NONE&&(v.highlight=t);"auto"!==n&&(v.target=n);B||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(v.zoom=k/100);k=[];A&&(k.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages,
this.currentPage)));g&&(k.push("zoom"),v.resize=!0);E&&k.push("layers");y&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),v.toolbar=k.join(" "));null!=J&&0<J.length&&(v.edit=J);null!=e?v.url=e:v.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(v))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";N(g,'<script type="text/javascript" src="'+
-(0<e.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,g,k,n){var q=document.createElement("div");q.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(p);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");p=E.cloneNode(!0);p.setAttribute("value","copy");A.appendChild(p);var y=document.createElement("span");
+(0<e.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,g,k,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(p);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");p=E.cloneNode(!0);p.setAttribute("value","copy");A.appendChild(p);var y=document.createElement("span");
mxUtils.write(y,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(y);mxUtils.br(A);A.appendChild(E);y=document.createElement("span");mxUtils.write(y,mxResources.get("publicDiagramUrl"));A.appendChild(y);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(y=document.createElement("a"),y.style.paddingLeft="12px",y.style.color="gray",y.style.cursor="pointer",mxUtils.write(y,mxResources.get("share")),A.appendChild(y),mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");q.appendChild(A);var J=this.addLinkSection(q),N=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";q.appendChild(v);var u=this.addCheckbox(q,mxResources.get("fit"),!0);
-A=null!=this.pages&&1<this.pages.length;var G=G=this.addCheckbox(q,mxResources.get("allPages"),A,!A),I=this.addCheckbox(q,mxResources.get("layers"),!0),M=this.addCheckbox(q,mxResources.get("tags"),!0),K=this.addCheckbox(q,mxResources.get("lightbox"),!0),H=null;A=380;if(EditorUi.enableHtmlEditOption){H=this.addEditButton(q,K);var F=H.getEditInput();F.style.marginBottom="16px";A+=50;mxEvent.addListener(K,"change",function(){K.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");
-F.checked&&K.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,q,mxUtils.bind(this,function(){n(E.checked?k:null,N.checked,v.value,J.getTarget(),J.getColor(),u.checked,G.checked,I.checked,M.checked,K.checked,null!=H?H.getLink():null)}),null,e,g);this.showDialog(e.container,340,A,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,g,k,n,q,p,A,E){var y=document.createElement("div");y.style.whiteSpace=
+this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");t.appendChild(A);var J=this.addLinkSection(t),N=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";t.appendChild(v);var u=this.addCheckbox(t,mxResources.get("fit"),!0);
+A=null!=this.pages&&1<this.pages.length;var G=G=this.addCheckbox(t,mxResources.get("allPages"),A,!A),I=this.addCheckbox(t,mxResources.get("layers"),!0),M=this.addCheckbox(t,mxResources.get("tags"),!0),K=this.addCheckbox(t,mxResources.get("lightbox"),!0),H=null;A=380;if(EditorUi.enableHtmlEditOption){H=this.addEditButton(t,K);var F=H.getEditInput();F.style.marginBottom="16px";A+=50;mxEvent.addListener(K,"change",function(){K.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");
+F.checked&&K.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,t,mxUtils.bind(this,function(){n(E.checked?k:null,N.checked,v.value,J.getTarget(),J.getColor(),u.checked,G.checked,I.checked,M.checked,K.checked,null!=H?H.getLink():null)}),null,e,g);this.showDialog(e.container,340,A,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,g,k,n,t,p,A,E){var y=document.createElement("div");y.style.whiteSpace=
"nowrap";var B=document.createElement("h3");mxUtils.write(B,e||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(B);var J=this.getCurrentFile();e=0;if(null==J||J.constructor!=window.DriveFile||g)A=null!=A?A:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;A=null!=A?A:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var N=document.createElement("div");N.style.whiteSpace="normal";mxUtils.write(N,mxResources.get("linkAccountRequired"));B.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(J.getId())}));N.style.marginTop="12px";N.className="geBtn";B.appendChild(N);y.appendChild(B);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));B.appendChild(N);
mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(U){this.spinner.stop();U=new ErrorDialog(this,null,mxResources.get(null!=U?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(U.container,300,80,!0,!1);U.init()}))}))}var v=null,u=null;if(null!=k||null!=n)e+=30,mxUtils.write(y,mxResources.get("width")+":"),v=document.createElement("input"),
v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",y.appendChild(v),mxUtils.write(y,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=n+"px",y.appendChild(u),mxUtils.br(y);var G=this.addLinkSection(y,p);k=null!=this.pages&&1<this.pages.length;var I=null;
if(null==J||J.constructor!=window.DriveFile||g)I=this.addCheckbox(y,mxResources.get("allPages"),k,!k);var M=this.addCheckbox(y,mxResources.get("lightbox"),!0,null,null,!p),K=this.addEditButton(y,M),H=K.getEditInput();p&&(H.style.marginLeft=M.style.marginLeft,M.style.display="none",e-=20);var F=this.addCheckbox(y,mxResources.get("layers"),!0);F.style.marginLeft=H.style.marginLeft;F.style.marginTop="8px";var P=this.addCheckbox(y,mxResources.get("tags"),!0);P.style.marginLeft=H.style.marginLeft;P.style.marginBottom=
-"16px";P.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(F.removeAttribute("disabled"),H.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&M.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,y,mxUtils.bind(this,function(){q(G.getTarget(),G.getColor(),null==I?!0:I.checked,M.checked,K.getLink(),F.checked,null!=v?v.value:null,
-null!=u?u.value:null,P.checked)}),null,mxResources.get("create"),A,E);this.showDialog(g.container,340,300+e,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):G.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(q?"10":"4")+"px";p.appendChild(A);if(q){mxUtils.write(p,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";p.appendChild(E);mxUtils.write(p,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=
+"16px";P.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(F.removeAttribute("disabled"),H.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&M.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,y,mxUtils.bind(this,function(){t(G.getTarget(),G.getColor(),null==I?!0:I.checked,M.checked,K.getLink(),F.checked,null!=v?v.value:null,
+null!=u?u.value:null,P.checked)}),null,mxResources.get("create"),A,E);this.showDialog(g.container,340,300+e,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):G.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,g,k,n,t){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(t?"10":"4")+"px";p.appendChild(A);if(t){mxUtils.write(p,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";p.appendChild(E);mxUtils.write(p,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=
this.lastExportBorder||"0";p.appendChild(y);mxUtils.br(p)}var B=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),J=n?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var N=n?null:this.addCheckbox(p,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=N&&(N.style.marginBottom="16px");e=new CustomDialog(this,p,mxUtils.bind(this,function(){var v=
-parseInt(E.value)/100||1,u=parseInt(y.value)||0;k(!B.checked,null!=J?J.checked:!1,null!=N?N.checked:!1,v,u)}),null,e,g);this.showDialog(e.container,300,(q?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,g,k,n,q,p,A,E,y){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var J=this.editor.graph,N="jpeg"==E?220:300,v=document.createElement("h3");mxUtils.write(v,e);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+parseInt(E.value)/100||1,u=parseInt(y.value)||0;k(!B.checked,null!=J?J.checked:!1,null!=N?N.checked:!1,v,u)}),null,e,g);this.showDialog(e.container,300,(t?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,g,k,n,t,p,A,E,y){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var J=this.editor.graph,N="jpeg"==E?220:300,v=document.createElement("h3");mxUtils.write(v,e);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
B.appendChild(v);mxUtils.write(B,mxResources.get("zoom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";B.appendChild(u);mxUtils.write(B,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder||
"0";B.appendChild(G);mxUtils.br(B);var I=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,J.isSelectionEmpty()),M=document.createElement("input");M.style.marginTop="16px";M.style.marginRight="8px";M.style.marginLeft="24px";M.setAttribute("disabled","disabled");M.setAttribute("type","checkbox");var K=document.createElement("select");K.style.marginTop="16px";K.style.marginLeft="8px";e=["selectionOnly","diagram","page"];var H={};for(v=0;v<e.length;v++)if(!J.isSelectionEmpty()||"selectionOnly"!=
e[v]){var F=document.createElement("option");mxUtils.write(F,mxResources.get(e[v]));F.setAttribute("value",e[v]);K.appendChild(F);H[e[v]]=F}y?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(K),mxUtils.br(B),N+=26,mxEvent.addListener(K,"change",function(){"selectionOnly"==K.value&&(I.checked=!0)})):p&&(B.appendChild(M),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),N+=30,mxEvent.addListener(I,"change",function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled",
"disabled")}));J.isSelectionEmpty()?y&&(I.style.display="none",I.nextSibling.style.display="none",I.nextSibling.nextSibling.style.display="none",N-=30):(K.value="diagram",M.setAttribute("checked","checked"),M.defaultChecked=!0,mxEvent.addListener(I,"change",function(){K.value=I.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E),U=null;Editor.isDarkMode()&&(U=this.addCheckbox(B,mxResources.get("dark"),!0),N+=26);var T=this.addCheckbox(B,
-mxResources.get("shadow"),J.shadowVisible),V=null;if("png"==E||"jpeg"==E)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),A,null,null,"jpeg"!=E);W.style.marginBottom="16px";var t=document.createElement("input");t.style.marginBottom="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||t.setAttribute("disabled","disabled");var D=
+mxResources.get("shadow"),J.shadowVisible),V=null;if("png"==E||"jpeg"==E)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),A,null,null,"jpeg"!=E);W.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var D=
document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginRight="10px";D.style.marginBottom="16px";D.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,
-mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||D.appendChild(p);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){"lblToSvg"==D.value?(t.checked=!0,t.setAttribute("disabled","disabled"),H.page.style.display="none","page"==K.value&&(K.value="diagram"),T.checked=!1,T.setAttribute("disabled","disabled"),R.style.display="inline-block",L.style.display="none"):"disabled"==t.getAttribute("disabled")&&(t.checked=!1,t.removeAttribute("disabled"),T.removeAttribute("disabled"),
-H.page.style.display="",R.style.display="none",L.style.display="")}));g&&(B.appendChild(t),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(D),mxUtils.br(B),N+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));L.appendChild(g);
+mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||D.appendChild(p);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){"lblToSvg"==D.value?(q.checked=!0,q.setAttribute("disabled","disabled"),H.page.style.display="none","page"==K.value&&(K.value="diagram"),T.checked=!1,T.setAttribute("disabled","disabled"),R.style.display="inline-block",L.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),T.removeAttribute("disabled"),
+H.page.style.display="",R.style.display="none",L.style.display="")}));g&&(B.appendChild(q),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(D),mxUtils.br(B),N+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));L.appendChild(g);
g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));L.appendChild(g);var R=document.createElement("div");mxUtils.write(R,mxResources.get("LinksLost"));R.style.margin="7px";R.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(L),B.appendChild(R),mxUtils.br(B),
-mxUtils.br(B),N+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=G.value;this.lastExportZoom=u.value;q(u.value,P.checked,!I.checked,T.checked,W.checked,t.checked,G.value,M.checked,!1,L.value,null!=V?V.checked:null,null!=U?U.checked:null,K.value,"embedFonts"==D.value,"lblToSvg"==D.value)}),null,k,n);this.showDialog(k.container,340,N,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var E=document.createElement("h3");mxUtils.write(E,g);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(E)}var y=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),A.shadowVisible&&n,!n),J=this.addCheckbox(p,k),N=this.addCheckbox(p,mxResources.get("lightbox"),
+mxUtils.br(B),N+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=G.value;this.lastExportZoom=u.value;t(u.value,P.checked,!I.checked,T.checked,W.checked,q.checked,G.value,M.checked,!1,L.value,null!=V?V.checked:null,null!=U?U.checked:null,K.value,"embedFonts"==D.value,"lblToSvg"==D.value)}),null,k,n);this.showDialog(k.container,340,N,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,g,k,n,t){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var E=document.createElement("h3");mxUtils.write(E,g);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(E)}var y=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),A.shadowVisible&&n,!n),J=this.addCheckbox(p,k),N=this.addCheckbox(p,mxResources.get("lightbox"),
!0),v=this.addEditButton(p,N),u=v.getEditInput(),G=1<A.model.getChildCount(A.model.getRoot()),I=this.addCheckbox(p,mxResources.get("layers"),G,!G);I.style.marginLeft=u.style.marginLeft;I.style.marginBottom="12px";I.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(G&&I.removeAttribute("disabled"),u.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&N.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled",
-"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){e(y.checked,B.checked,J.checked,N.checked,v.getLink(),I.checked)}),null,mxResources.get("embed"),q);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,g,k,n,q,p,A,E){function y(u){var G=" ",I="";n&&(G=" 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!=J?"&page="+J:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",I+="cursor:pointer;");e&&(I+="max-width:100%;");var M="";k&&(M=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+u+'"'+M+(""!=I?' style="'+I+'"':"")+G+"/>")}var B=this.editor.graph.getGraphBounds(),J=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var G=n?this.getFileData(!0):null;u=
+"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){e(y.checked,B.checked,J.checked,N.checked,v.getLink(),I.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,g,k,n,t,p,A,E){function y(u){var G=" ",I="";n&&(G=" 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!=J?"&page="+J:"")+(t?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",I+="cursor:pointer;");e&&(I+="max-width:100%;");var M="";k&&(M=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+u+'"'+M+(""!=I?' style="'+I+'"':"")+G+"/>")}var B=this.editor.graph.getGraphBounds(),J=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var G=n?this.getFileData(!0):null;u=
this.createImageDataUri(u,G,"png");y(u)}),null,null,null,mxUtils.bind(this,function(u){E({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var N="";k&&(N="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var v=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+N+"&xml="+encodeURIComponent(g));v.send(mxUtils.bind(this,function(){200<=v.getStatus()&&
-299>=v.getStatus()?y("data:image/png;base64,"+v.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(e,g,k,n,q,p,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),y=E.getElementsByTagName("a");if(null!=y)for(var B=0;B<y.length;B++){var J=y[B].getAttribute("href");null!=J&&"#"==J.charAt(0)&&"_blank"==y[B].getAttribute("target")&&y[B].removeAttribute("target")}n&&
-E.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(E);if(k){var N=" ",v="";n&&(N="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"+(q?"&edit=_blank":"")+(p?"&layers=1":
+299>=v.getStatus()?y("data:image/png;base64,"+v.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(e,g,k,n,t,p,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),y=E.getElementsByTagName("a");if(null!=y)for(var B=0;B<y.length;B++){var J=y[B].getAttribute("href");null!=J&&"#"==J.charAt(0)&&"_blank"==y[B].getAttribute("target")&&y[B].removeAttribute("target")}n&&
+E.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(E);if(k){var N=" ",v="";n&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(p?"&layers=1":
"")+"');}})(this);\"",v+="cursor:pointer;");e&&(v+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(u){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=v?' style="'+v+'"':"")+N+"/>")}))}else v="",n&&(g=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),e&&(e=parseInt(E.getAttribute("width")),q=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+e+" "+q),v+="max-width:100%;max-height:"+q+"px;",E.removeAttribute("height")),""!=v&&E.setAttribute("style",v),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(e){e=
+EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),e&&(e=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+e+" "+t),v+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=v&&E.setAttribute("style",v),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(e){e=
Math.floor((new Date-e)/1E3);var g=Math.floor(e/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(e/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(e/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(e/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(e/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,g){if(null!=e){var k=null;if("diagram"==e.nodeName)k=
-e;else if("mxfile"==e.nodeName){var n=e.getElementsByTagName("diagram");if(0<n.length){k=n[0];var q=g.getGlobalVariable;g.getGlobalVariable=function(p){return"page"==p?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:q.apply(this,arguments)}}}null!=k&&(e=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(e)}catch(p){}finally{this.editor.graph=n}return e};EditorUi.prototype.getPngFileProperties=function(e){var g=1,k=0;if(null!=
-e){if(e.hasAttribute("scale")){var n=parseFloat(e.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}e.hasAttribute("border")&&(n=parseInt(e.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(e,g,k,n,q){try{var p=this.editor.graph,A=null!=p.themes&&"darkTheme"==p.defaultThemeName,E=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+e;else if("mxfile"==e.nodeName){var n=e.getElementsByTagName("diagram");if(0<n.length){k=n[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(p){return"page"==p?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:t.apply(this,arguments)}}}null!=k&&(e=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(e)}catch(p){}finally{this.editor.graph=n}return e};EditorUi.prototype.getPngFileProperties=function(e){var g=1,k=0;if(null!=
+e){if(e.hasAttribute("scale")){var n=parseFloat(e.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}e.hasAttribute("border")&&(n=parseInt(e.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(e,g,k,n,t){try{var p=this.editor.graph,A=null!=p.themes&&"darkTheme"==p.defaultThemeName,E=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
!0),p),E=k;else if(A||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet());var y=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&p.setBackgroundImage(B.viewState.backgroundImage);p.getGlobalVariable=function(J){return"page"==J?B.getName():"pagenumber"==J?1:y.apply(this,
arguments)};document.body.appendChild(p.container);p.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==E&&(E=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=J.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(E));e(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(v){null!=g&&g(v)}}),null,null,null,mxUtils.bind(this,function(J){null!=g&&
-g(J)}),null,null,n,null,p.shadowVisible,null,p,q,null,null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(e,g,k,n,q,p,A,E,y,B,J,N,v){E=null!=E?E:!0;J=null!=J?J:0;A=null!=y?y:g.background;A==mxConstants.NONE&&(A=null);p=g.getSvg(A,B,J,null,null,p,null,null,null,g.shadowVisible||N,null,v,"diagram");(g.shadowVisible||N)&&g.addSvgShadow(p,null,null,0==J);null!=e&&p.setAttribute("content",e);null!=k&&p.setAttribute("resource",k);var u=mxUtils.bind(this,function(G){G=
-(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(G);null!=q&&q(G);return G});g.mathEnabled&&this.editor.addMathCss(p);if(null!=q)this.embedFonts(p,mxUtils.bind(this,function(G){E?this.editor.convertImages(G,mxUtils.bind(this,function(I){u(I)})):u(G)}));else return u(p)};EditorUi.prototype.embedFonts=function(e,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(e,k),g(e)}catch(n){g(e)}}))}catch(k){g(e)}}))};EditorUi.prototype.exportImage=function(e,g,k,n,q,p,A,E,y,B,J,N,v){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(G){this.spinner.stop();try{this.saveCanvas(G,
-q?this.getFileData(!0,null,null,null,k,E):null,y,null==this.pages||0==this.pages.length,J)}catch(I){this.handleError(I)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}),null,k,e||1,g,n,null,null,p,A,B,N,v)}catch(G){this.spinner.stop(),this.handleError(G)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,g,k,n,q,p,A){g=null!=g?g:0;k=null!=k?k:0;var E=[];try{var y=
+g(J)}),null,null,n,null,p.shadowVisible,null,p,t,null,null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(e,g,k,n,t,p,A,E,y,B,J,N,v){E=null!=E?E:!0;J=null!=J?J:0;A=null!=y?y:g.background;A==mxConstants.NONE&&(A=null);p=g.getSvg(A,B,J,null,null,p,null,null,null,g.shadowVisible||N,null,v,"diagram");(g.shadowVisible||N)&&g.addSvgShadow(p,null,null,0==J);null!=e&&p.setAttribute("content",e);null!=k&&p.setAttribute("resource",k);var u=mxUtils.bind(this,function(G){G=
+(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(G);null!=t&&t(G);return G});g.mathEnabled&&this.editor.addMathCss(p);if(null!=t)this.embedFonts(p,mxUtils.bind(this,function(G){E?this.editor.convertImages(G,mxUtils.bind(this,function(I){u(I)})):u(G)}));else return u(p)};EditorUi.prototype.embedFonts=function(e,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(e,k),g(e)}catch(n){g(e)}}))}catch(k){g(e)}}))};EditorUi.prototype.exportImage=function(e,g,k,n,t,p,A,E,y,B,J,N,v){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(G){this.spinner.stop();try{this.saveCanvas(G,
+t?this.getFileData(!0,null,null,null,k,E):null,y,null==this.pages||0==this.pages.length,J)}catch(I){this.handleError(I)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}),null,k,e||1,g,n,null,null,p,A,B,N,v)}catch(G){this.spinner.stop(),this.handleError(G)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,g,k,n,t,p,A){g=null!=g?g:0;k=null!=k?k:0;var E=[];try{var y=
this.editor.graph;if(null!=e&&0<e.length){y.model.beginUpdate();try{var B=mxUtils.parseXml(e);e={};var J=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=J&&"mxfile"==J.nodeName&&null!=this.pages){var N=J.getElementsByTagName("diagram");if(1==N.length&&!p){if(J=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(e[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var v=N[0].getAttribute("name");null!=v&&""!=v&&this.editor.graph.model.execute(new RenamePage(this,
this.currentPage,v))}}else if(0<N.length){p=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[N[0].getAttribute("id")]=this.pages[0].getId(),J=Editor.parseDiagramNode(N[0]),n=!1,u=1);for(;u<N.length;u++){var G=N[u].getAttribute("id");N[u].removeAttribute("id");var I=this.updatePageRoot(new DiagramPage(N[u]));e[G]=N[u].getAttribute("id");var M=this.pages.length;null==I.getName()&&I.setName(mxResources.get("pageWithNumber",[M+1]));y.model.execute(new ChangePage(this,I,I,M,
-!0));p.push(I)}this.updatePageLinks(e,p)}}if(null!=J&&"mxGraphModel"===J.nodeName){E=y.importGraphModel(J,g,k,n);if(null!=E)for(u=0;u<E.length;u++)this.updatePageLinksForCell(e,E[u]);var K=y.parseBackgroundImage(J.getAttribute("backgroundImage"));if(null!=K&&null!=K.originalSrc){this.updateBackgroundPageLink(e,K);var H=new ChangePageSetup(this,null,K);H.ignoreColor=!0;y.model.execute(H)}}A&&this.insertHandler(E,null,null,y.defaultVertexStyle,y.defaultEdgeStyle,!1,!0)}finally{y.model.endUpdate()}}}catch(F){if(q)throw F;
+!0));p.push(I)}this.updatePageLinks(e,p)}}if(null!=J&&"mxGraphModel"===J.nodeName){E=y.importGraphModel(J,g,k,n);if(null!=E)for(u=0;u<E.length;u++)this.updatePageLinksForCell(e,E[u]);var K=y.parseBackgroundImage(J.getAttribute("backgroundImage"));if(null!=K&&null!=K.originalSrc){this.updateBackgroundPageLink(e,K);var H=new ChangePageSetup(this,null,K);H.ignoreColor=!0;y.model.execute(H)}}A&&this.insertHandler(E,null,null,y.defaultVertexStyle,y.defaultEdgeStyle,!1,!0)}finally{y.model.endUpdate()}}}catch(F){if(t)throw F;
this.handleError(F)}return E};EditorUi.prototype.updatePageLinks=function(e,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(e,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(e,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=e[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(e,g){var k=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(g);null!=q&&n.setLinkForCell(g,this.updatePageLink(e,q));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),A=!1,E=0;E<p.length;E++)q=p[E].getAttribute("href"),null!=q&&(p[E].setAttribute("href",this.updatePageLink(e,q)),A=!0);A&&n.labelChanged(g,k.innerHTML)}for(E=0;E<n.model.getChildCount(g);E++)this.updatePageLinksForCell(e,n.model.getChildAt(g,E))};EditorUi.prototype.updatePageLink=
-function(e,g){if(Graph.isPageLink(g)){var k=e[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var q=0;q<n.actions.length;q++){var p=n.actions[q];if(null!=p.open&&Graph.isPageLink(p.open)){var A=p.open.substring(p.open.indexOf(",")+1);k=e[A];null!=k?p.open="data:page/id,"+k:null==this.getPageById(A)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(E){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,g,k,n,q){n=null!=n?n:e.name;k=null!=k?k:mxUtils.bind(this,function(A){this.handleError(A)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(n);try{var E="UNKNOWN-VISIO",y=n.lastIndexOf(".");if(0<=y&&y<n.length)E=n.substring(y+1).toUpperCase();else{var B=n.lastIndexOf("/");0<=
+function(e,g){var k=document.createElement("div"),n=this.editor.graph,t=n.getLinkForCell(g);null!=t&&n.setLinkForCell(g,this.updatePageLink(e,t));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),A=!1,E=0;E<p.length;E++)t=p[E].getAttribute("href"),null!=t&&(p[E].setAttribute("href",this.updatePageLink(e,t)),A=!0);A&&n.labelChanged(g,k.innerHTML)}for(E=0;E<n.model.getChildCount(g);E++)this.updatePageLinksForCell(e,n.model.getChildAt(g,E))};EditorUi.prototype.updatePageLink=
+function(e,g){if(Graph.isPageLink(g)){var k=e[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var t=0;t<n.actions.length;t++){var p=n.actions[t];if(null!=p.open&&Graph.isPageLink(p.open)){var A=p.open.substring(p.open.indexOf(",")+1);k=e[A];null!=k?p.open="data:page/id,"+k:null==this.getPageById(A)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(E){}return g};
+EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,g,k,n,t){n=null!=n?n:e.name;k=null!=k?k:mxUtils.bind(this,function(A){this.handleError(A)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(n);try{var E="UNKNOWN-VISIO",y=n.lastIndexOf(".");if(0<=y&&y<n.length)E=n.substring(y+1).toUpperCase();else{var B=n.lastIndexOf("/");0<=
B&&B<n.length&&(n=n.substring(B+1))}EditorUi.logEvent({category:E+"-MS-IMPORT-FILE",action:"filename_"+n,label:A?"remote":"local"})}catch(N){}if(A)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",e,n);var J=new XMLHttpRequest;J.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));J.responseType="blob";this.addRemoteServiceSecurityCheck(J);
-null!=q&&J.setRequestHeader("x-convert-custom",q);J.onreadystatechange=mxUtils.bind(this,function(){if(4==J.readyState)if(200<=J.status&&299>=J.status)try{var N=J.response;if("text/xml"==N.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(G){k({message:mxResources.get("errorLoadingFile")})}});v.readAsText(N)}else this.doImportVisio(N,g,k,n)}catch(u){k(u)}else try{""==J.responseType||"text"==J.responseType?k({message:J.responseText}):(v=new FileReader,v.onload=
-function(){k({message:JSON.parse(v.result).Message})},v.readAsText(J.response))}catch(u){k({})}});J.send(A)}else try{this.doImportVisio(e,g,k,n)}catch(N){k(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(e,g,k){k=null!=k?k:mxUtils.bind(this,function(q){this.handleError(q)});
-var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,g,k)}catch(q){k(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||
-this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(e,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
-JSON.parse(e);g(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&p.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var A=0;A<q.svgThumbs.length;A++)p.push(Editor.createSvgDataUri(q.svgThumbs[A]));null!=q.thumb&&p.push(q.thumb);console.log.apply(console,p)}}catch(E){}}catch(E){null!=window.console&&console.error(E),k(E)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
+null!=t&&J.setRequestHeader("x-convert-custom",t);J.onreadystatechange=mxUtils.bind(this,function(){if(4==J.readyState)if(200<=J.status&&299>=J.status)try{var N=J.response;if("text/xml"==N.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(G){k({message:mxResources.get("errorLoadingFile")})}});v.readAsText(N)}else this.doImportVisio(N,g,k,n)}catch(u){k(u)}else try{""==J.responseType||"text"==J.responseType?k({message:J.responseText}):(v=new FileReader,v.onload=
+function(){k({message:JSON.parse(v.result).Message})},v.readAsText(J.response))}catch(u){k({})}});J.send(A)}else try{this.doImportVisio(e,g,k,n)}catch(N){k(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(e,g,k){k=null!=k?k:mxUtils.bind(this,function(t){this.handleError(t)});
+var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,g,k)}catch(t){k(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||
+this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(e,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var t=
+JSON.parse(e);g(LucidImporter.importState(t));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",t];null!=t.state&&p.push(JSON.parse(t.state));if(null!=t.svgThumbs)for(var A=0;A<t.svgThumbs.length;A++)p.push(Editor.createSvgDataUri(t.svgThumbs[A]));null!=t.thumb&&p.push(t.thumb);console.log.apply(console,p)}}catch(E){}}catch(E){null!=window.console&&console.error(E),k(E)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,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",n)})})})}):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generateMermaidImage=function(e,
-g,k,n){var q=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,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 E=mxUtils.parseXml(A).getElementsByTagName("svg");
-if(0<E.length){var y=parseFloat(E[0].getAttribute("width")),B=parseFloat(E[0].getAttribute("height"));if(isNaN(y)||isNaN(B))try{var J=E[0].getAttribute("viewBox").split(/\s+/);y=parseFloat(J[2]);B=parseFloat(J[3])}catch(N){y=y||100,B=B||100}k(q.convertDataUri(Editor.createSvgDataUri(A)),y,B)}else n({message:mxResources.get("invalidInput")})}catch(N){n(N)}})}catch(A){n(A)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(e,g,k,n){function q(E,y,B){c1=E>>2;c2=(E&3)<<4|y>>4;c3=(y&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+q(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+q(E.charCodeAt(i),0,0):r+q(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var y=new FileReader;y.readAsDataURL(this.response);y.onloadend=function(B){var J=new Image;J.onload=
-function(){try{var N=J.width,v=J.height;if(0==N&&0==v){var u=y.result,G=u.indexOf(","),I=decodeURIComponent(escape(atob(u.substring(G+1)))),M=mxUtils.parseXml(I).getElementsByTagName("svg");0<M.length&&(N=parseFloat(M[0].getAttribute("width")),v=parseFloat(M[0].getAttribute("height")))}k(y.result,N,v)}catch(K){n(K)}};J.src=y.result};y.onerror=function(B){n(B)}}else n(E)};A.onerror=function(E){n(E)};A.send()};EditorUi.prototype.insertAsPreText=function(e,g,k){var n=this.editor.graph,q=null;n.getModel().beginUpdate();
-try{q=n.insertVertex(null,null,"<pre>"+e+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(q,!0)}finally{n.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(e,g,k,n,q,p,A,E){p=null!=p?p:!0;A=null!=A?A:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(v){4==
-v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,k,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var y=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var B=Editor.extractGraphModelFromPdf(e);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,E)}if(Editor.isPngDataUrl(e)&&(B=Editor.extractGraphModelFromPng(e),null!=B&&0<B.length))return this.importXml(B,
+g,k,n){var t=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,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 E=mxUtils.parseXml(A).getElementsByTagName("svg");
+if(0<E.length){var y=parseFloat(E[0].getAttribute("width")),B=parseFloat(E[0].getAttribute("height"));if(isNaN(y)||isNaN(B))try{var J=E[0].getAttribute("viewBox").split(/\s+/);y=parseFloat(J[2]);B=parseFloat(J[3])}catch(N){y=y||100,B=B||100}k(t.convertDataUri(Editor.createSvgDataUri(A)),y,B)}else n({message:mxResources.get("invalidInput")})}catch(N){n(N)}})}catch(A){n(A)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(e,g,k,n){function t(E,y,B){c1=E>>2;c2=(E&3)<<4|y>>4;c3=(y&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+t(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+t(E.charCodeAt(i),0,0):r+t(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var y=new FileReader;y.readAsDataURL(this.response);y.onloadend=function(B){var J=new Image;J.onload=
+function(){try{var N=J.width,v=J.height;if(0==N&&0==v){var u=y.result,G=u.indexOf(","),I=decodeURIComponent(escape(atob(u.substring(G+1)))),M=mxUtils.parseXml(I).getElementsByTagName("svg");0<M.length&&(N=parseFloat(M[0].getAttribute("width")),v=parseFloat(M[0].getAttribute("height")))}k(y.result,N,v)}catch(K){n(K)}};J.src=y.result};y.onerror=function(B){n(B)}}else n(E)};A.onerror=function(E){n(E)};A.send()};EditorUi.prototype.insertAsPreText=function(e,g,k){var n=this.editor.graph,t=null;n.getModel().beginUpdate();
+try{t=n.insertVertex(null,null,"<pre>"+e+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(t,!0)}finally{n.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(e,g,k,n,t,p,A,E){p=null!=p?p:!0;A=null!=A?A:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(v){4==
+v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,k,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var y=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var B=Editor.extractGraphModelFromPdf(e);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,E)}if(Editor.isPngDataUrl(e)&&(B=Editor.extractGraphModelFromPng(e),null!=B&&0<B.length))return this.importXml(B,
g,k,p,!0,E);if("data:image/svg+xml;"==e.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(B=e.substring(e.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(e.substring(e.indexOf(",")+1));var J=this.importXml(B,g,k,p,!0,E);if(0<J.length)return J}catch(v){}this.loadImage(e,mxUtils.bind(this,function(v){if("data:"==e.substring(0,5))this.resizeImage(v,e,mxUtils.bind(this,function(I,M,K){y.setSelectionCell(y.insertVertex(null,null,
"",y.snap(g),y.snap(k),M,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(I)+";"))}),A,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/v.width,this.maxImageSize/v.height)),G=Math.round(v.width*u);v=Math.round(v.height*u);y.setSelectionCell(y.insertVertex(null,null,"",y.snap(g),y.snap(k),G,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
e+";"))}}),mxUtils.bind(this,function(){var v=null;y.getModel().beginUpdate();try{v=y.insertVertex(y.getDefaultParent(),null,e,y.snap(g),y.snap(k),1,1,"text;"+(n?"html=1;":"")),y.updateCellSize(v),y.fireEvent(new mxEventObject("textInserted","cells",[v]))}finally{y.getModel().endUpdate()}y.setSelectionCell(v)}))}else{e=Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,g,k,p,null,E);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,
-function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,k,p,null,E))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{y=this.editor.graph;q=null;y.getModel().beginUpdate();try{q=y.insertVertex(y.getDefaultParent(),null,"",y.snap(g),y.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));y.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+
-"...");q.value=e;y.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var N=y.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=N.width;q.geometry.height=N.height}Graph.isLink(q.value)&&y.setLinkForCell(q,q.value);q.geometry.width+=y.gridSize;q.geometry.height+=y.gridSize}finally{y.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(e){var g=-1;do e/=1024,g++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
+function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,k,p,null,E))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{y=this.editor.graph;t=null;y.getModel().beginUpdate();try{t=y.insertVertex(y.getDefaultParent(),null,"",y.snap(g),y.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));y.fireEvent(new mxEventObject("textInserted","cells",[t]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+
+"...");t.value=e;y.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var N=y.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=N.width;t.geometry.height=N.height}Graph.isLink(t.value)&&y.setLinkForCell(t,t.value);t.geometry.width+=y.gridSize;t.geometry.height+=y.gridSize}finally{y.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(e){var g=-1;do e/=1024,g++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var g=e.indexOf(";");0<g&&(e=e.substring(0,g)+e.substring(e.indexOf(",",g+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,g){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,g){if(e&&Graph.fileSupport){if(null==
this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,E){StorageFile.listFiles(this,
"F",A,E)});window.openBrowserFile=mxUtils.bind(this,function(A,E,y){StorageFile.getFileContent(this,A,E,y)});window.deleteBrowserFile=mxUtils.bind(this,function(A,E,y){StorageFile.deleteFile(this,A,E,y)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(A=new Blob([A],{type:"application/octet-stream"}),
-this.importVisio(A,mxUtils.bind(this,function(y){this.importXml(y,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var q=this.dialog,p=q.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=n;p.apply(q,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(e,g,k){var n=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var A=0,E,y=!1;p.forEach(function(B,J){B=J.name.toLowerCase();"diagram/diagram.xml"==B?(y=!0,J.async("string").then(function(N){0==N.indexOf("<mxfile ")?g(N):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=J))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&&
-n.isRemoteFileFormat(B,e.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?g(J.responseText):k())}),e.name):k()}):y||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(e,g,k,n,q,p,A,E,y,B,J,N){B=null!=
+this.importVisio(A,mxUtils.bind(this,function(y){this.importXml(y,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,p=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=n;p.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(e,g,k){var n=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var A=0,E,y=!1;p.forEach(function(B,J){B=J.name.toLowerCase();"diagram/diagram.xml"==B?(y=!0,J.async("string").then(function(N){0==N.indexOf("<mxfile ")?g(N):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=J))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&&
+n.isRemoteFileFormat(B,e.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?g(J.responseText):k())}),e.name):k()}):y||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importFile=function(e,g,k,n,t,p,A,E,y,B,J,N){B=null!=
B?B:!0;var v=!1,u=null,G=mxUtils.bind(this,function(I){var M=null;null!=I&&"<mxlibrary"==I.substring(0,10)?this.loadLibrary(new LocalLibrary(this,I,A)):M=this.importXml(I,k,n,B,null,null!=N?mxEvent.isControlDown(N):null);null!=E&&E(M)});"image"==g.substring(0,5)?(y=!1,"image/png"==g.substring(0,9)&&(g=J?null:this.extractGraphModelFromPng(e),null!=g&&0<g.length&&(u=this.importXml(g,k,n,B,null,null!=N?mxEvent.isControlDown(N):null),y=!0)),y||(g=this.editor.graph,y=e.indexOf(";"),0<y&&(e=e.substring(0,
-y)+e.substring(e.indexOf(",",y+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),u=[g.insertVertex(null,null,"",k,n,q,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";")])):/(\.*<graphml )/.test(e)?(v=!0,this.importGraphML(e,G)):null!=y&&null!=A&&(/(\.v(dx|sdx?))($|\?)/i.test(A)||/(\.vs(x|sx?))($|\?)/i.test(A))?(v=!0,this.importVisio(y,G)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,A)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,q=mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?G(I.responseText):null!=E&&E(null))}),null!=e?this.parseFileData(e,q,A):this.parseFile(y,q,A)):0==e.indexOf("PK")&&null!=y?(v=!0,this.importZipFile(y,G,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(e),k,n,!0,null,B);E(u)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(u=this.insertTextAt(this.validateFileData(e),
-k,n,!0,null,B,null,null!=N?mxEvent.isControlDown(N):null));v||null==E||E(u);return u};EditorUi.prototype.importFiles=function(e,g,k,n,q,p,A,E,y,B,J,N,v){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var u=null!=g&&null!=k,G=!0;g=null!=g?g:0;k=null!=k?k:0;var I=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var M=J||this.resampleThreshold,K=0;K<e.length;K++)if("image/svg"!==e[K].type.substring(0,9)&&"image/"===e[K].type.substring(0,6)&&e[K].size>M){I=!0;break}var H=mxUtils.bind(this,function(){var F=
-this.editor.graph,P=F.gridSize;q=null!=q?q:mxUtils.bind(this,function(D,L,R,O,Q,S,X,aa,Y){try{return null!=D&&"<mxlibrary"==D.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,D,X)),null):this.importFile(D,L,R,O,Q,S,X,aa,Y,u,N,v)}catch(Z){return this.handleError(Z),null}});p=null!=p?p:mxUtils.bind(this,function(D){F.setSelectionCells(D)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=e.length,T=U,V=[],W=mxUtils.bind(this,function(D,L){V[D]=L;if(0==
---T){this.spinner.stop();if(null!=E)E(V);else{var R=[];F.getModel().beginUpdate();try{for(D=0;D<V.length;D++){var O=V[D]();null!=O&&(R=R.concat(O))}}finally{F.getModel().endUpdate()}}p(R)}}),t=0;t<U;t++)mxUtils.bind(this,function(D){var L=e[D];if(null!=L){var R=new FileReader;R.onload=mxUtils.bind(this,function(O){if(null==A||A(L))if("image/"==L.type.substring(0,6))if("image/svg"==L.type.substring(0,9)){var Q=Graph.clipSvgDataUri(O.target.result),S=Q.indexOf(",");S=decodeURIComponent(escape(atob(Q.substring(S+
-1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?W(D,mxUtils.bind(this,function(){try{if(null!=X){var ca=X.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],ka=fa.getAttribute("width"),
-ha=fa.getAttribute("height");ka=null!=ka&&"%"!=ka.charAt(ka.length-1)?parseFloat(ka):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var ra=fa.getAttribute("viewBox");if(null==ra||0==ra.length)fa.setAttribute("viewBox","0 0 "+ka+" "+ha);else if(isNaN(ka)||isNaN(ha)){var la=ra.split(" ");3<la.length&&(ka=parseFloat(la[2]),ha=parseFloat(la[3]))}Q=Editor.createSvgDataUri(mxUtils.getXml(fa));var Fa=Math.min(1,Math.min(n/Math.max(1,ka)),n/Math.max(1,ha)),Ga=q(Q,L.type,g+D*P,k+D*P,Math.max(1,
+y)+e.substring(e.indexOf(",",y+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),u=[g.insertVertex(null,null,"",k,n,t,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";")])):/(\.*<graphml )/.test(e)?(v=!0,this.importGraphML(e,G)):null!=y&&null!=A&&(/(\.v(dx|sdx?))($|\?)/i.test(A)||/(\.vs(x|sx?))($|\?)/i.test(A))?(v=!0,this.importVisio(y,G)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,A)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,t=mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?G(I.responseText):null!=E&&E(null))}),null!=e?this.parseFileData(e,t,A):this.parseFile(y,t,A)):0==e.indexOf("PK")&&null!=y?(v=!0,this.importZipFile(y,G,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(e),k,n,!0,null,B);E(u)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(u=this.insertTextAt(this.validateFileData(e),
+k,n,!0,null,B,null,null!=N?mxEvent.isControlDown(N):null));v||null==E||E(u);return u};EditorUi.prototype.importFiles=function(e,g,k,n,t,p,A,E,y,B,J,N,v){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var u=null!=g&&null!=k,G=!0;g=null!=g?g:0;k=null!=k?k:0;var I=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var M=J||this.resampleThreshold,K=0;K<e.length;K++)if("image/svg"!==e[K].type.substring(0,9)&&"image/"===e[K].type.substring(0,6)&&e[K].size>M){I=!0;break}var H=mxUtils.bind(this,function(){var F=
+this.editor.graph,P=F.gridSize;t=null!=t?t:mxUtils.bind(this,function(D,L,R,O,Q,S,X,aa,Y){try{return null!=D&&"<mxlibrary"==D.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,D,X)),null):this.importFile(D,L,R,O,Q,S,X,aa,Y,u,N,v)}catch(Z){return this.handleError(Z),null}});p=null!=p?p:mxUtils.bind(this,function(D){F.setSelectionCells(D)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=e.length,T=U,V=[],W=mxUtils.bind(this,function(D,L){V[D]=L;if(0==
+--T){this.spinner.stop();if(null!=E)E(V);else{var R=[];F.getModel().beginUpdate();try{for(D=0;D<V.length;D++){var O=V[D]();null!=O&&(R=R.concat(O))}}finally{F.getModel().endUpdate()}}p(R)}}),q=0;q<U;q++)mxUtils.bind(this,function(D){var L=e[D];if(null!=L){var R=new FileReader;R.onload=mxUtils.bind(this,function(O){if(null==A||A(L))if("image/"==L.type.substring(0,6))if("image/svg"==L.type.substring(0,9)){var Q=Graph.clipSvgDataUri(O.target.result),S=Q.indexOf(",");S=decodeURIComponent(escape(atob(Q.substring(S+
+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?W(D,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var fa=ba[0],ka=fa.getAttribute("width"),
+ha=fa.getAttribute("height");ka=null!=ka&&"%"!=ka.charAt(ka.length-1)?parseFloat(ka):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var ra=fa.getAttribute("viewBox");if(null==ra||0==ra.length)fa.setAttribute("viewBox","0 0 "+ka+" "+ha);else if(isNaN(ka)||isNaN(ha)){var la=ra.split(" ");3<la.length&&(ka=parseFloat(la[2]),ha=parseFloat(la[3]))}Q=Editor.createSvgDataUri(mxUtils.getXml(fa));var Fa=Math.min(1,Math.min(n/Math.max(1,ka)),n/Math.max(1,ha)),Ga=t(Q,L.type,g+D*P,k+D*P,Math.max(1,
Math.round(ka*Fa)),Math.max(1,Math.round(ha*Fa)),L.name);if(isNaN(ka)||isNaN(ha)){var Aa=new Image;Aa.onload=mxUtils.bind(this,function(){ka=Math.max(1,Aa.width);ha=Math.max(1,Aa.height);Ga[0].geometry.width=ka;Ga[0].geometry.height=ha;fa.setAttribute("viewBox","0 0 "+ka+" "+ha);Q=Editor.createSvgDataUri(mxUtils.getXml(fa));var Ma=Q.indexOf(";");0<Ma&&(Q=Q.substring(0,Ma)+Q.substring(Q.indexOf(",",Ma+1)));F.setCellStyles("image",Q,[Ga[0]])});Aa.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return Ga}}}catch(Ma){}return null})):
-W(D,mxUtils.bind(this,function(){return q(aa,"text/xml",g+D*P,k+D*P,0,0,L.name)}))}else W(D,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==L.type){var Y=N?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;W(D,mxUtils.bind(this,function(){return q(Y,"text/xml",g+D*P,k+D*P,Z.width,Z.height,L.name)}));S=!0}}S||(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(O.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,O.target.result,mxUtils.bind(this,function(fa,ka,ha){W(D,mxUtils.bind(this,function(){if(null!=fa&&fa.length<B){var ra=G&&this.isResampleImageSize(L.size,J)?Math.min(1,Math.min(n/ka,n/ha)):1;return q(fa,L.type,g+D*P,k+D*P,Math.round(ka*ra),Math.round(ha*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),G,n,J,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Q=O.target.result,q(Q,L.type,g+D*P,k+D*P,240,160,L.name,function(ca){W(D,function(){return ca})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||/(\.vs(x|sx?))($|\?)/i.test(L.name)?q(null,L.type,g+D*P,k+D*P,240,160,L.name,function(O){W(D,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?R.readAsDataURL(L):R.readAsText(L)}})(t)});if(I){I=
+W(D,mxUtils.bind(this,function(){return t(aa,"text/xml",g+D*P,k+D*P,0,0,L.name)}))}else W(D,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==L.type){var Y=N?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;W(D,mxUtils.bind(this,function(){return t(Y,"text/xml",g+D*P,k+D*P,Z.width,Z.height,L.name)}));S=!0}}S||(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(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(fa,ka,ha){W(D,mxUtils.bind(this,function(){if(null!=fa&&fa.length<B){var ra=G&&this.isResampleImageSize(L.size,J)?Math.min(1,Math.min(n/ka,n/ha)):1;return t(fa,L.type,g+D*P,k+D*P,Math.round(ka*ra),Math.round(ha*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),G,n,J,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Q=O.target.result,t(Q,L.type,g+D*P,k+D*P,240,160,L.name,function(ba){W(D,function(){return ba})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||/(\.vs(x|sx?))($|\?)/i.test(L.name)?t(null,L.type,g+D*P,k+D*P,240,160,L.name,function(O){W(D,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?R.readAsDataURL(L):R.readAsText(L)}})(q)});if(I){I=
[];for(K=0;K<e.length;K++)I.push(e[K]);e=I;this.confirmImageResize(function(F){G=F;H()},y)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(e,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
-null,q=function(p,A){if(p||g)mxSettings.setResizeImages(p?A:null),mxSettings.save();k();e(A)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){q(p,!0)},function(p){q(p,!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):q(!1,n)};EditorUi.prototype.parseFile=function(e,g,k){k=null!=k?k:e.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(e)};EditorUi.prototype.parseFileData=function(e,g,k){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(e,g){g=null!=g?g:this.resampleThreshold;return e>g};EditorUi.prototype.resizeImage=function(e,g,k,n,q,p,A){q=null!=q?q:this.maxImageSize;var E=Math.max(1,e.width),y=Math.max(1,e.height);if(n&&this.isResampleImageSize(null!=A?A:g.length,p))try{var B=Math.max(E/q,y/q);if(1<B){var J=Math.round(E/B),N=Math.round(y/B),v=document.createElement("canvas");v.width=J;v.height=N;v.getContext("2d").drawImage(e,0,0,J,N);var u=
-v.toDataURL();if(u.length<g.length){var G=document.createElement("canvas");G.width=J;G.height=N;var I=G.toDataURL();u!==I&&(g=u,E=J,y=N)}}}catch(M){}k(g,E,y)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=e}catch(q){if(null!=k)k(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=
+null,t=function(p,A){if(p||g)mxSettings.setResizeImages(p?A:null),mxSettings.save();k();e(A)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){t(p,!0)},function(p){t(p,!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):t(!1,n)};EditorUi.prototype.parseFile=function(e,g,k){k=null!=k?k:e.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(e)};EditorUi.prototype.parseFileData=function(e,g,k){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
+action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(e,g){g=null!=g?g:this.resampleThreshold;return e>g};EditorUi.prototype.resizeImage=function(e,g,k,n,t,p,A){t=null!=t?t:this.maxImageSize;var E=Math.max(1,e.width),y=Math.max(1,e.height);if(n&&this.isResampleImageSize(null!=A?A:g.length,p))try{var B=Math.max(E/t,y/t);if(1<B){var J=Math.round(E/B),N=Math.round(y/B),v=document.createElement("canvas");v.width=J;v.height=N;v.getContext("2d").drawImage(e,0,0,J,N);var u=
+v.toDataURL();if(u.length<g.length){var G=document.createElement("canvas");G.width=J;G.height=N;var I=G.toDataURL();u!==I&&(g=u,E=J,y=N)}}}catch(M){}k(g,E,y)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=e}catch(t){if(null!=k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=
function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var e=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(M){var K=M.getEvent();return null==M.getState()&&!mxEvent.isMouseEvent(K)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(K)&&(null==M.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))});g.cellEditor.editPlantUmlData=function(M,K,H){var F=JSON.parse(H);K=new TextareaDialog(e,mxResources.get("plantUml")+":",F.data,
function(P){null!=P&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(P,F.format,function(U,T,V){e.spinner.stop();g.getModel().beginUpdate();try{if("txt"==F.format)g.labelChanged(M,"<pre>"+U+"</pre>"),g.updateCellSize(M,!0);else{g.setCellStyles("image",e.convertDataUri(U),[M]);var W=g.model.getGeometry(M);null!=W&&(W=W.clone(),W.width=T,W.height=V,g.cellsResized([M],[W],!1))}g.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:P,format:F.format}))}finally{g.getModel().endUpdate()}},
function(U){e.handleError(U)})},null,null,400,220);e.showDialog(K.container,420,300,!0,!0);K.init()};g.cellEditor.editMermaidData=function(M,K,H){var F=JSON.parse(H);K=new TextareaDialog(e,mxResources.get("mermaid")+":",F.data,function(P){null!=P&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generateMermaidImage(P,F.config,function(U,T,V){e.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[M]);var W=g.model.getGeometry(M);null!=W&&(W=W.clone(),W.width=Math.max(W.width,
T),W.height=Math.max(W.height,V),g.cellsResized([M],[W],!1));g.setAttributeForCell(M,"mermaidData",JSON.stringify({data:P,config:F.config},null,2))}finally{g.getModel().endUpdate()}},function(U){e.handleError(U)})},null,null,400,220);e.showDialog(K.container,420,300,!0,!0);K.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(M,K){try{var H=this.graph.getAttributeForCell(M,"plantUmlData");if(null!=H)this.editPlantUmlData(M,K,H);else if(H=this.graph.getAttributeForCell(M,"mermaidData"),
null!=H)this.editMermaidData(M,K,H);else{var F=g.getCellStyle(M);"1"==mxUtils.getValue(F,"metaEdit","0")?e.showDataDialog(M):k.apply(this,arguments)}}catch(P){e.handleError(P)}};g.getLinkTitle=function(M){return e.getLinkTitle(M)};g.customLinkClicked=function(M){var K=!1;try{e.handleCustomLink(M),K=!0}catch(H){e.handleError(H)}return K};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(M){var K=n.apply(this,arguments);null!=K&&null!=K.src&&Graph.isPageLink(K.src)&&(K={originalSrc:K.src});
-return K};var q=g.setBackgroundImage;g.setBackgroundImage=function(M){null!=M&&null!=M.originalSrc&&(M=e.createImageForPageLink(M.originalSrc,e.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(M,K){M=null!=g.backgroundImage?g.backgroundImage.originalSrc:
+return K};var t=g.setBackgroundImage;g.setBackgroundImage=function(M){null!=M&&null!=M.originalSrc&&(M=e.createImageForPageLink(M.originalSrc,e.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(M,K){M=null!=g.backgroundImage?g.backgroundImage.originalSrc:
null;if(null!=M){var H=M.indexOf(",");if(0<H)for(M=M.substring(H+1),K=K.getProperty("patches"),H=0;H<K.length;H++)if(null!=K[H][EditorUi.DIFF_UPDATE]&&null!=K[H][EditorUi.DIFF_UPDATE][M]||null!=K[H][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(K[H][EditorUi.DIFF_REMOVE],M)){g.refreshBackgroundImage();break}}}));var p=g.getBackgroundImageObject;g.getBackgroundImageObject=function(M,K){var H=p.apply(this,arguments);if(null!=H&&null!=H.originalSrc)if(!K)H={src:H.originalSrc};else if(K&&null!=this.themes&&
"darkTheme"==this.defaultThemeName){var F=this.stylesheet,P=this.shapeForegroundColor,U=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";H=e.createImageForPageLink(H.originalSrc);this.shapeBackgroundColor=U;this.shapeForegroundColor=P;this.stylesheet=F}return H};var A=this.clearDefaultStyle;this.clearDefaultStyle=function(){A.apply(this,arguments)};this.isOffline()||"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 E=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(M){M=null!=M?M:"";"1"==urlParams.dev&&(M+=(0<M.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var y=g.addClickHandler;g.addClickHandler=function(M,K,H){var F=K;
@@ -11990,7 +11990,7 @@ g.labelLinkClicked=function(M,K,H){var F=K.getAttribute("href");if(null==F||!g.i
!navigator.standalone);u.visible=u.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,
!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(M){var K=
g.cellEditor.text2,H=null;null!=K&&(mxEvent.addListener(K,"dragleave",function(F){null!=H&&(H.parentNode.removeChild(H),H=null);F.stopPropagation();F.preventDefault()}),mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(F){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(K));F.stopPropagation();F.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(F){null!=H&&(H.parentNode.removeChild(H),H=null);if(0<F.dataTransfer.files.length)this.importFiles(F.dataTransfer.files,
-0,0,this.maxImageSize,function(U,T,V,W,t,D){g.insertImage(U,t,D)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var T=0;T<U.length;T++)U[T]()},mxEvent.isControlDown(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var P=F.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var T=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,
+0,0,this.maxImageSize,function(U,T,V,W,q,D){g.insertImage(U,q,D)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var T=0;T<U.length;T++)U[T]()},mxEvent.isControlDown(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var P=F.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var T=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,
Math.min(V/Math.max(1,T)),V/Math.max(1,U));g.insertImage(decodeURIComponent(P),T*V,U*V)})):document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/plain"));F.stopPropagation();F.preventDefault()})))}));this.isSettingsEnabled()&&(u=
this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(M,K){mxSettings.setUnit(K.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,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(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)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
@@ -11998,17 +11998,17 @@ function(M,K){0<this.editor.graph.getSelectionCount()?(M=this.editor.graph.getSe
this.editor.editable)){var I=null;mxEvent.addListener(g.container,"dragleave",function(M){g.isEnabled()&&(null!=I&&(I.parentNode.removeChild(I),I=null),M.stopPropagation(),M.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(M){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();M.stopPropagation();M.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,
function(M){null!=I&&(I.parentNode.removeChild(I),I=null);if(g.isEnabled()){var K=mxUtils.convertPoint(g.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),H=M.dataTransfer.files,F=g.view.translate,P=g.view.scale,U=K.x/P-F.x,T=K.y/P-F.y;if(0<H.length)K=1==H.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===H[0].type.substring(0,9)||"image/"!==H[0].type.substring(0,6)||/(\.drawio.png)$/i.test(H[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(M)||K)?(!mxEvent.isShiftDown(M)&&K&&null!=
this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(H,!0)):(mxEvent.isAltDown(M)&&(T=U=null),this.importFiles(H,U,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(M),null,null,mxEvent.isShiftDown(M),M));else{mxEvent.isAltDown(M)&&(T=U=0);var V=0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")?M.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(M,null!=this.pages);if(null!=H)g.setSelectionCells(this.importXml(H,U,T,!0));else if(0<=mxUtils.indexOf(M.dataTransfer.types,
-"text/html")){var W=M.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=g.sanitizeHtml(W);var t=null;K=H.getElementsByTagName("img");null!=K&&1==K.length?(W=K[0].getAttribute("src"),null==W&&(W=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(t=!0)):(K=H.getElementsByTagName("a"),null!=K&&1==K.length?W=K[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),null!=H&&1==H.length&&(W=mxUtils.getTextContent(H[0]))));var D=!0,L=mxUtils.bind(this,
-function(){g.setSelectionCells(this.insertTextAt(W,U,T,!0,t,null,D,mxEvent.isControlDown(M)))});t&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(R){D=R;L()},mxEvent.isControlDown(M)):L()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(R){var O=Math.max(1,R.width);R=Math.max(1,R.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,O)),Q/Math.max(1,R));g.setSelectionCell(g.insertVertex(null,
+"text/html")){var W=M.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=g.sanitizeHtml(W);var q=null;K=H.getElementsByTagName("img");null!=K&&1==K.length?(W=K[0].getAttribute("src"),null==W&&(W=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(q=!0)):(K=H.getElementsByTagName("a"),null!=K&&1==K.length?W=K[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),null!=H&&1==H.length&&(W=mxUtils.getTextContent(H[0]))));var D=!0,L=mxUtils.bind(this,
+function(){g.setSelectionCells(this.insertTextAt(W,U,T,!0,q,null,D,mxEvent.isControlDown(M)))});q&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(R){D=R;L()},mxEvent.isControlDown(M)):L()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(R){var O=Math.max(1,R.width);R=Math.max(1,R.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,O)),Q/Math.max(1,R));g.setSelectionCell(g.insertVertex(null,
null,"",U,T,O*Q,R*Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(R){g.setSelectionCells(this.insertTextAt(V,U,T,!0))})):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(M.dataTransfer.getData("text/plain"),U,T,!0))}}M.stopPropagation();M.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
u=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",u);this.addListener("sketchModeChanged",u);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);
-this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,q=0;q<k.types.length;q++)if("text/"===k.types[q].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var A=p[index];if("file"===A.kind){if(e.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,
+this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var A=p[index];if("file"===A.kind){if(e.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,
function(y,B,J,N,v,u){e.insertImage(y,v,u)},function(){},function(y){return"image/"==y.type.substring(0,6)},function(y){for(var B=0;B<y.length;B++)y[B]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function e(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,
k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize=
"none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var A=mxEvent.getSource(p);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||224!=p.keyCode&&
(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var A=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=A&&17!=A&&91!=A&&93!=A||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),
k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),e()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),e()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(p){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
-(k.innerHTML="&nbsp;",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,k,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,g){mxSettings.setUi(e);this.doSetCurrentTheme(e);this.fireEvent(new mxEventObject("currentThemeChanged"));g||this.alert(mxResources.get("restartForChangeRequired"))};
+(k.innerHTML="&nbsp;",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,k,!1,!0)}),0))}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,g){mxSettings.setUi(e);this.doSetCurrentTheme(e);this.fireEvent(new mxEventObject("currentThemeChanged"));g||this.alert(mxResources.get("restartForChangeRequired"))};
EditorUi.prototype.doSetCurrentTheme=function(e){Editor.currentTheme!=e&&(Editor.currentTheme=e)};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
@@ -12025,8 +12025,8 @@ m.setAttribute("charset","UTF-8");m.setAttribute("type","text/css");EditorUi.pro
g.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=g.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=g.shapeForegroundColor;Graph.prototype.defaultThemeName=g.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==m.parentNode&&document.getElementsByTagName("head")[0].appendChild(m):null!=m.parentNode&&m.parentNode.removeChild(m)}};
EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,g){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){if(Editor.sketchMode!=e){var g=function(n,q,p){null==
-n[q]&&(n[q]=p)},k=this.editor.graph;Editor.sketchMode=e;this.menus.defaultFontSize=e?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,"jettySize","auto");
+function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){if(Editor.sketchMode!=e){var g=function(n,t,p){null==
+n[t]&&(n[t]=p)},k=this.editor.graph;Editor.sketchMode=e;this.menus.defaultFontSize=e?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,"jettySize","auto");
g(k.defaultEdgeStyle,"orthogonalLoop","1");g(k.defaultEdgeStyle,"endArrow","open");g(k.defaultEdgeStyle,"endSize","14");g(k.defaultEdgeStyle,"startSize","14");e&&(g(k.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultVertexStyle,"fontSource",Editor.sketchFontSource),g(k.defaultVertexStyle,"hachureGap","4"),g(k.defaultVertexStyle,"sketch","1"),g(k.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),g(k.defaultEdgeStyle,
"sketch","1"),g(k.defaultEdgeStyle,"hachureGap","4"),g(k.defaultEdgeStyle,"sourcePerimeterSpacing","8"),g(k.defaultEdgeStyle,"targetPerimeterSpacing","8"));k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(e){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var k=e.indexOf(",");0<k&&(g=this.getPageById(e.substring(k+1)),g=null!=g?g.getName():
mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(g=mxResources.get("action"));return g};EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var g=e.indexOf(",");if(e=this.getPageById(e.substring(g+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
@@ -12035,63 +12035,63 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito
function(e,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(e,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,g){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(e,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,q){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),A=parseInt(q.getAttribute("width")),E=parseInt(q.getAttribute("height"));this.writeImageToClipboard(p,A,E,mxUtils.bind(this,function(y){this.handleError(y)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,
-function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(e,g,k,n){var q=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+e+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](n)};
-EditorUi.prototype.copyCells=function(e,g){var k=this.editor.graph;if(k.isSelectionEmpty())e.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),q=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(e,encodeURIComponent(q));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=q,k.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;
-g.isSelectionEmpty()||(e=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(e)),navigator.clipboard.writeText(g))}return e};EditorUi.prototype.pasteXml=function(e,g,k,n){var q=this.editor.graph,p=null;q.lastPasteXml==e?q.pasteCounter++:(q.lastPasteXml=e,q.pasteCounter=0);var A=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(e))p=this.importXml(e,A,A),q.setSelectionCells(p);else if(g&&1==q.getSelectionCount()){A=q.getStartEditingCell(q.getSelectionCell(),
-n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==q.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,e,[A]);else{q.model.beginUpdate();try{q.labelChanged(A,e),Graph.isLink(e)&&q.setLinkForCell(A,e)}finally{q.model.endUpdate()}}q.setSelectionCell(A)}else p=q.getInsertPoint(),q.isMouseInsertPoint()&&(A=0,q.lastPasteXml==e&&0<q.pasteCounter&&q.pasteCounter--),p=this.insertTextAt(e,p.x+A,p.y+A,!0),q.setSelectionCells(p);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(e,g,k,n){if(!mxEvent.isConsumed(e)){var q=g,p=!1;if(k&&null!=e.clipboardData&&e.clipboardData.getData){var A=e.clipboardData.getData("text/plain"),E=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var y=decodeURIComponent(A);this.isCompatibleString(y)&&(E=!0,A=y)}catch(G){}E=E?null:e.clipboardData.getData("text/html");null!=E&&0<E.length?(q=
-this.parseHtmlData(E),p="text/plain"!=q.getAttribute("data-type")):null!=A&&0<A.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,E))}A=q.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var I=this.editor.graph;I.lastPasteXml==G?I.pasteCounter++:(I.lastPasteXml=G,I.pasteCounter=0);var M=
-I.pasteCounter*I.gridSize;I.setSelectionCells(this.importXml(G,M,M));I.scrollCellToVisible(I.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(e));else{var B=p?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),J=!1;try{var N=B.lastIndexOf("%3E");0<=N&&N<B.length-3&&(B=B.substring(0,N+3))}catch(G){}try{A=q.getElementsByTagName("span"),(y=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(B))&&
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,t){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),A=parseInt(t.getAttribute("width")),E=parseInt(t.getAttribute("height"));this.writeImageToClipboard(p,A,E,mxUtils.bind(this,function(y){this.handleError(y)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,
+function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(e,g,k,n){var t=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+e+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](n)};
+EditorUi.prototype.copyCells=function(e,g){var k=this.editor.graph;if(k.isSelectionEmpty())e.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(e,encodeURIComponent(t));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;
+g.isSelectionEmpty()||(e=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(e)),navigator.clipboard.writeText(g))}return e};EditorUi.prototype.pasteXml=function(e,g,k,n){var t=this.editor.graph,p=null;t.lastPasteXml==e?t.pasteCounter++:(t.lastPasteXml=e,t.pasteCounter=0);var A=t.pasteCounter*t.gridSize;if(k||this.isCompatibleString(e))p=this.importXml(e,A,A),t.setSelectionCells(p);else if(g&&1==t.getSelectionCount()){A=t.getStartEditingCell(t.getSelectionCell(),
+n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==t.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,e,[A]);else{t.model.beginUpdate();try{t.labelChanged(A,e),Graph.isLink(e)&&t.setLinkForCell(A,e)}finally{t.model.endUpdate()}}t.setSelectionCell(A)}else p=t.getInsertPoint(),t.isMouseInsertPoint()&&(A=0,t.lastPasteXml==e&&0<t.pasteCounter&&t.pasteCounter--),p=this.insertTextAt(e,p.x+A,p.y+A,!0),t.setSelectionCells(p);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(e,g,k,n){if(!mxEvent.isConsumed(e)){var t=g,p=!1;if(k&&null!=e.clipboardData&&e.clipboardData.getData){var A=e.clipboardData.getData("text/plain"),E=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var y=decodeURIComponent(A);this.isCompatibleString(y)&&(E=!0,A=y)}catch(G){}E=E?null:e.clipboardData.getData("text/html");null!=E&&0<E.length?(t=
+this.parseHtmlData(E),p="text/plain"!=t.getAttribute("data-type")):null!=A&&0<A.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,E))}A=t.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var I=this.editor.graph;I.lastPasteXml==G?I.pasteCounter++:(I.lastPasteXml=G,I.pasteCounter=0);var M=
+I.pasteCounter*I.gridSize;I.setSelectionCells(this.importXml(G,M,M));I.scrollCellToVisible(I.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(e));else{var B=p?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText),J=!1;try{var N=B.lastIndexOf("%3E");0<=N&&N<B.length-3&&(B=B.substring(0,N+3))}catch(G){}try{A=t.getElementsByTagName("span"),(y=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(B))&&
(this.isCompatibleString(y)||0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,B=y)}catch(G){}try{if(null!=B&&0<B.length){if(0==B.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var v=mxUtils.bind(this,function(){try{B=(new MiroImporter).importMiroJson(JSON.parse(B)),this.pasteXml(B,n,J,e)}catch(G){console.log("Miro import error:",G)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",v):v()}else this.pasteXml(B,n,J,e);try{mxEvent.consume(e)}catch(G){}}else if(!k){var u=
this.editor.graph;u.lastPasteXml=null;u.pasteCounter=0}}catch(G){this.handleError(G)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var g=null,k=0;k<e.length;k++)mxEvent.addListener(e[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(e[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<
document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(e[k],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,
-!0);else{var q=this.extractGraphModelFromEvent(n);if(null==q){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?q=p.getData("Text"):(q=null,q=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=q&&0<q.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(q),p=p.getElementsByTagName("img"),0<p.length&&
-(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&this.openLocalFile(A.getText(),
-null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var g=0,k=0;if(null==e){var n=document.body;var q=document.documentElement;var p=(n.clientWidth||q.clientWidth)-3;n=
-Math.max(n.clientHeight||0,q.clientHeight)-3}else g=e.offsetTop,k=e.offsetLeft,p=e.clientWidth,n=e.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=g+"px";q.style.left=k+"px";q.style.width=Math.max(0,p-3)+"px";q.style.height=Math.max(0,n-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);
-return q};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);var g=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)e.push(n.getChildAt(g,k))}return e};EditorUi.prototype.openFileHandle=function(e,g,k,n,q){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=
+!0);else{var t=this.extractGraphModelFromEvent(n);if(null==t){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?t=p.getData("Text"):(t=null,t=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=t&&0<t.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(t),p=p.getElementsByTagName("img"),0<p.length&&
+(t=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(t=p.getData("text/plain"))),null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&this.openLocalFile(A.getText(),
+null,!0)})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var g=0,k=0;if(null==e){var n=document.body;var t=document.documentElement;var p=(n.clientWidth||t.clientWidth)-3;n=
+Math.max(n.clientHeight||0,t.clientHeight)-3}else g=e.offsetTop,k=e.offsetLeft,p=e.clientWidth,n=e.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=k+"px";t.style.width=Math.max(0,p-3)+"px";t.style.height=Math.max(0,n-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);
+return t};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);var g=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)e.push(n.getChildAt(g,k))}return e};EditorUi.prototype.openFileHandle=function(e,g,k,n,t){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=
g.substring(0,g.length-4)+".drawio");var p=mxUtils.bind(this,function(E){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==E.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,E,g))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(E,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,
mxUtils.bind(this,function(E){this.spinner.stop();p(E)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(E){4==E.readyState&&(this.spinner.stop(),200<=E.status&&299>=E.status?p(E.responseText):this.handleError({message:mxResources.get(413==
E.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(E){this.spinner.stop();this.openLocalFile(E,g,n)}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,e,k.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,g,n)}));else{if("image/png"==k.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==k.type){var A=Editor.extractGraphModelFromPdf(e);null!=A&&(q=null,n=!0,
-e=A)}this.spinner.stop();this.openLocalFile(e,g,n,q,null!=q?k:null)}}};EditorUi.prototype.openFiles=function(e,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<e.length;k++)mxUtils.bind(this,function(n){var q=new FileReader;q.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(A){this.handleError(A)}});q.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0,
-5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?q.readAsText(n):q.readAsDataURL(n)})(e[k])};EditorUi.prototype.openLocalFile=function(e,g,k,n,q){var p=this.getCurrentFile(),A=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var E=mxUtils.parseXml(e);null!=E&&(this.editor.setGraphXml(E.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,g||this.defaultFilename,k,n,q))});if(null!=
+this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,e,k.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,g,n)}));else{if("image/png"==k.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==k.type){var A=Editor.extractGraphModelFromPdf(e);null!=A&&(t=null,n=!0,
+e=A)}this.spinner.stop();this.openLocalFile(e,g,n,t,null!=t?k:null)}}};EditorUi.prototype.openFiles=function(e,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<e.length;k++)mxUtils.bind(this,function(n){var t=new FileReader;t.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(A){this.handleError(A)}});t.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0,
+5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?t.readAsText(n):t.readAsDataURL(n)})(e[k])};EditorUi.prototype.openLocalFile=function(e,g,k,n,t){var p=this.getCurrentFile(),A=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var E=mxUtils.parseXml(e);null!=E&&(this.editor.setGraphXml(E.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,g||this.defaultFilename,k,n,t))});if(null!=
e&&0<e.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?A():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);g=[];for(var k in e)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(e,g){function k(A){if(null!=
-A){var E=A.lastIndexOf(".");0<E&&(A=A.substring(E+1,A.length));null==g[A]&&(g[A]=!0)}}var n=this.editor.graph,q=n.getCellStyle(e);k(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));n.model.isEdge(e)&&(k(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=n.model.getChildCount(e);for(var p=0;p<q;p++)this.addBasenamesForCell(n.model.getChildAt(e,p),g)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
+A){var E=A.lastIndexOf(".");0<E&&(A=A.substring(E+1,A.length));null==g[A]&&(g[A]=!0)}}var n=this.editor.graph,t=n.getCellStyle(e);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));n.model.isEdge(e)&&(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=n.model.getChildCount(e);for(var p=0;p<t;p++)this.addBasenamesForCell(n.model.getChildAt(e,p),g)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
-!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,q){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(q)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var A=p.model.cells,E;for(E in A){var y=A[E];null!=y&&null!=y.style&&(y.style+=";sketch=1;"+(-1==y.style.indexOf("fontFamily=")||-1<y.style.indexOf("fontFamily=Helvetica;")?
+!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,t){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var A=p.model.cells,E;for(E in A){var y=A[E];null!=y&&null!=y.style&&(y.style+=";sketch=1;"+(-1==y.style.indexOf("fontFamily=")||-1<y.style.indexOf("fontFamily=Helvetica;")?
"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(e,g){null!=e?e.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(e){var g=this.editor.graph;return{event:e,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(q){k.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else e||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(e){var g=null,k=!1,n=!1,q=null,p=mxUtils.bind(this,function(y,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(y){if(y.source==(window.opener||window.parent)){var B=y.data,J=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
+scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else e||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(e){var g=null,k=!1,n=!1,t=null,p=mxUtils.bind(this,function(y,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(y){if(y.source==(window.opener||window.parent)){var B=y.data,J=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var v=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[y],"data",[B])}catch(Y){B=null}try{if(null==B)return;
if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));return}if("prompt"==B.action){this.spinner.stop();var u=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Y){null!=
Y?A.postMessage(JSON.stringify({event:"prompt",value:Y,message:B}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==B.action){var G=N(B.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),G,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",
message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{u.init()}catch(Y){A.postMessage(JSON.stringify({event:"draft",
-error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var I=1==B.enableRecent,M=1==B.enableSearch,K=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var H=this.getCurrentUser(),F=new TemplatesDialog(this,function(Y,Z,ca){Y=Y||this.emptyDiagramXml;A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca.url,libs:ca.libs,builtIn:null!=ca.info&&null!=ca.info.custContentId,message:B}),
-"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=H?H.id:null,I?mxUtils.bind(this,function(Y,Z,ca){this.remoteInvoke("getRecentDiagrams",[ca],null,Y,Z)}):null,M?mxUtils.bind(this,function(Y,Z,ca,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ca)}):null,mxUtils.bind(this,function(Y,Z,ca){this.remoteInvoke("getFileContent",[Y.url],null,Z,ca)}),null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
-!1,!1,!0,!0);this.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,Z,ca,fa){Y=Y||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca,libs:fa,builtIn:!0,message:B}),"*"):(e(Y,y,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
-null,I?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,M?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ca){A.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ca}),"*")}),null,null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
+error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var I=1==B.enableRecent,M=1==B.enableSearch,K=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var H=this.getCurrentUser(),F=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:B}),
+"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=H?H.id:null,I?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,M?mxUtils.bind(this,function(Y,Z,ba,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
+!1,!1,!0,!0);this.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,Z,ba,fa){Y=Y||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:fa,builtIn:!0,message:B}),"*"):(e(Y,y,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
+null,I?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,M?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){A.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
B.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==B.action){var P=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:P,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message));
null!=B.modified&&(this.editor.modified=B.modified);return}if("spinner"==B.action){var U=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,U):this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){null!=B.viewport&&(this.embedViewport=B.viewport);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==B.action){if("png"==B.format||"xmlpng"==B.format){if(null==
-B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var T=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=B.format;Z.message=B;Z.data=Y;Z.xml=T;A.postMessage(JSON.stringify(Z),"*")}),t=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&&
-(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(T)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),D=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=D){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var Z,ca=0;ca<this.pages.length;ca++)if(this.pages[ca].getId()==
-D){Z=this.updatePageRoot(this.pages[ca]);break}null==Z&&(Z=this.currentPage);V.getGlobalVariable=function(ra){return"page"==ra?Z.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(Z.root)}if(null!=B.layerIds){var fa=V.model,ka=fa.getChildCells(fa.getRoot()),ha={};for(ca=0;ca<B.layerIds.length;ca++)ha[B.layerIds[ca]]=!0;for(ca=0;ca<ka.length;ca++)fa.setVisible(ka[ca],ha[ka[ca].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){t(ra.toDataURL("image/png"))}),
-B.width,null,B.background,mxUtils.bind(this,function(){t(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(T),k=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=D?"&pageId="+D:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this,
-function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=B.format}else if("html"==B.format)Z=this.editor.getGraphXml(),
-Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=B.background?B.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ca=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(fa);A.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==B.spin&&
-null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ca,null,null,B.embedImages,Z,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,B.keepTheme),
-(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(fa){B.embedImages||null==B.embedImages?this.editor.convertImages(fa,mxUtils.bind(this,function(ka){ca(mxUtils.getXml(ka))})):ca(mxUtils.getXml(fa))}));return}A.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var R=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){R.apply(this,arguments);L()}}k=!0;this.setFileData(B.xml);
+B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var T=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=B.format;Z.message=B;Z.data=Y;Z.xml=T;A.postMessage(JSON.stringify(Z),"*")}),q=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&&
+(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(T)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),D=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=D){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
+D){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);V.getGlobalVariable=function(ra){return"page"==ra?Z.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(Z.root)}if(null!=B.layerIds){var fa=V.model,ka=fa.getChildCells(fa.getRoot()),ha={};for(ba=0;ba<B.layerIds.length;ba++)ha[B.layerIds[ba]]=!0;for(ba=0;ba<ka.length;ba++)fa.setVisible(ka[ba],ha[ka[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){q(ra.toDataURL("image/png"))}),
+B.width,null,B.background,mxUtils.bind(this,function(){q(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(T),k=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=D?"&pageId="+D:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this,
+function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=B.format}else if("html"==B.format)Z=this.editor.getGraphXml(),
+Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=B.background?B.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(fa);A.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==B.spin&&
+null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,B.embedImages,Z,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,B.keepTheme),
+(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(fa){B.embedImages||null==B.embedImages?this.editor.convertImages(fa,mxUtils.bind(this,function(ka){ba(mxUtils.getXml(ka))})):ba(mxUtils.getXml(fa))}));return}A.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var R=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){R.apply(this,arguments);L()}}k=!0;this.setFileData(B.xml);
k=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==B.action){v=B.toSketch;n=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var O=Editor.sketchMode;this.doSetSketchMode(B.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
B.dark&&(O=Editor.darkMode,this.doSetDarkMode(B.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var Q=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+
"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";J=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=B.maxFitScale;Y.fit(2*Q);Y.maxFitScale=Z;Y.container.scrollTop-=2*Q;Y.container.scrollLeft-=2*Q;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);
null!=B.title&&null!=this.buttonContainer&&(G=document.createElement("span"),mxUtils.write(G,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(G),this.embedFilenameSpan=G);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Y){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var S=this.getCurrentFile();null!=S&&(G=N(B.xml),null!=G&&""!=
G&&S.mergeFile(new LocalFile(this,G),function(){A.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Y){A.postMessage(JSON.stringify({event:"merge",message:B,error:Y}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,y.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Y){this.handleError(Y)}}var X=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){k=!0;try{e(Y,Z,null,v)}catch(ca){this.handleError(ca)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");q=X();n&&null==g&&(g=mxUtils.bind(this,function(ca,fa){ca=X();ca==q||k||(fa=this.createLoadMessage("autosave"),fa.xml=ca,(window.opener||window.parent).postMessage(JSON.stringify(fa),"*"));q=ca}),
+mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){k=!0;try{e(Y,Z,null,v)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=X();n&&null==g&&(g=mxUtils.bind(this,function(ba,fa){ba=X();ba==t||k||(fa=this.createLoadMessage("autosave"),fa.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(fa),"*"));t=ba}),
this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",
g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,A.postMessage(JSON.stringify(Z),"*");null!=J&&J()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(N="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Y){aa(Y,y)},mxUtils.bind(this,function(Y){this.handleError(Y)}),N)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,y)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==B||"object"!==typeof B||
@@ -12102,25 +12102,25 @@ mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndE
g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),e.appendChild(g),k=g);k.style.marginRight="20px";this.toolbar.container.appendChild(e);this.toolbar.staticElements.push(e);e.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,
function(e){this.importCsv(e)}),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.loadOrgChartLayouts=function(e){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,
mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(e,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,g)}))};EditorUi.prototype.doImportCsv=function(e,
-g){try{var k=e.split("\n"),n=[],q=[],p=[],A={};if(0<k.length){var E={},y=this.editor.graph,B=null,J=null,N=null,v=null,u=null,G=null,I=null,M="whiteSpace=wrap;html=1;",K=null,H=null,F="",P="auto",U="auto",T=!1,V=null,W=null,t=40,D=40,L=100,R=0,O=function(){null!=g?g(va):(y.setSelectionCells(va),y.scrollCellToVisible(y.getSelectionCell()))},Q=y.getFreeInsertPoint(),S=Q.x,X=Q.y;Q=X;var aa=null,Y="auto";H=null;for(var Z=[],ca=null,fa=null,ka=0;ka<k.length&&"#"==k[ka].charAt(0);){e=k[ka].replace(/\r$/,
+g){try{var k=e.split("\n"),n=[],t=[],p=[],A={};if(0<k.length){var E={},y=this.editor.graph,B=null,J=null,N=null,v=null,u=null,G=null,I=null,M="whiteSpace=wrap;html=1;",K=null,H=null,F="",P="auto",U="auto",T=!1,V=null,W=null,q=40,D=40,L=100,R=0,O=function(){null!=g?g(va):(y.setSelectionCells(va),y.scrollCellToVisible(y.getSelectionCell()))},Q=y.getFreeInsertPoint(),S=Q.x,X=Q.y;Q=X;var aa=null,Y="auto";H=null;for(var Z=[],ba=null,fa=null,ka=0;ka<k.length&&"#"==k[ka].charAt(0);){e=k[ka].replace(/\r$/,
"");for(ka++;ka<k.length&&"\\"==e.charAt(e.length-1)&&"#"==k[ka].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(k[ka].substring(1)),ka++;if("#"!=e.charAt(1)){var ha=e.indexOf(":");if(0<ha){var ra=mxUtils.trim(e.substring(1,ha)),la=mxUtils.trim(e.substring(ha+1));"label"==ra?aa=y.sanitizeHtml(la):"labelname"==ra&&0<la.length&&"-"!=la?u=la:"labels"==ra&&0<la.length&&"-"!=la?I=JSON.parse(la):"style"==ra?J=la:"parentstyle"==ra?M=la:"unknownStyle"==ra&&"-"!=la?G=la:"stylename"==ra&&0<la.length&&"-"!=
-la?v=la:"styles"==ra&&0<la.length&&"-"!=la?N=JSON.parse(la):"vars"==ra&&0<la.length&&"-"!=la?B=JSON.parse(la):"identity"==ra&&0<la.length&&"-"!=la?K=la:"parent"==ra&&0<la.length&&"-"!=la?H=la:"namespace"==ra&&0<la.length&&"-"!=la?F=la:"width"==ra?P=la:"height"==ra?U=la:"collapsed"==ra&&"-"!=la?T="true"==la:"left"==ra&&0<la.length?V=la:"top"==ra&&0<la.length?W=la:"ignore"==ra?fa=la.split(","):"connect"==ra?Z.push(JSON.parse(la)):"link"==ra?ca=la:"padding"==ra?R=parseFloat(la):"edgespacing"==ra?t=parseFloat(la):
+la?v=la:"styles"==ra&&0<la.length&&"-"!=la?N=JSON.parse(la):"vars"==ra&&0<la.length&&"-"!=la?B=JSON.parse(la):"identity"==ra&&0<la.length&&"-"!=la?K=la:"parent"==ra&&0<la.length&&"-"!=la?H=la:"namespace"==ra&&0<la.length&&"-"!=la?F=la:"width"==ra?P=la:"height"==ra?U=la:"collapsed"==ra&&"-"!=la?T="true"==la:"left"==ra&&0<la.length?V=la:"top"==ra&&0<la.length?W=la:"ignore"==ra?fa=la.split(","):"connect"==ra?Z.push(JSON.parse(la)):"link"==ra?ba=la:"padding"==ra?R=parseFloat(la):"edgespacing"==ra?q=parseFloat(la):
"nodespacing"==ra?D=parseFloat(la):"levelspacing"==ra?L=parseFloat(la):"layout"==ra&&(Y=la)}}}if(null==k[ka])throw Error(mxResources.get("invalidOrMissingFile"));var Fa=this.editor.csvToArray(k[ka].replace(/\r$/,""));ha=e=null;ra=[];for(la=0;la<Fa.length;la++)K==Fa[la]&&(e=la),H==Fa[la]&&(ha=la),ra.push(mxUtils.trim(Fa[la]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==aa&&(aa="%"+ra[0]+"%");if(null!=Z)for(var Ga=0;Ga<Z.length;Ga++)null==E[Z[Ga].to]&&(E[Z[Ga].to]={});K=[];
for(la=ka+1;la<k.length;la++){var Aa=this.editor.csvToArray(k[la].replace(/\r$/,""));if(null==Aa){var Ma=40<k[la].length?k[la].substring(0,40)+"...":k[la];throw Error(Ma+" ("+la+"):\n"+mxResources.get("containsValidationErrors"));}0<Aa.length&&K.push(Aa)}y.model.beginUpdate();try{for(la=0;la<K.length;la++){Aa=K[la];var za=null,Da=null!=e?F+Aa[e]:null;k=!1;null!=Da&&(za=y.model.getCell(Da),k=null==za||0<=mxUtils.indexOf(n,za));var Ca=new mxCell(aa,new mxGeometry(S,Q,0,0),J||"whiteSpace=wrap;html=1;");
Ca.collapsed=T;Ca.vertex=!0;Ca.id=Da;null==za||k||y.model.setCollapsed(za,T);for(var pa=0;pa<Aa.length;pa++)y.setAttributeForCell(Ca,ra[pa],Aa[pa]),null==za||k||y.setAttributeForCell(za,ra[pa],Aa[pa]);if(null!=u&&null!=I){var qa=I[Ca.getAttribute(u)];null!=qa&&(y.labelChanged(Ca,qa),null==za||k||y.cellLabelChanged(za,qa))}if(null!=v&&null!=N){var wa=N[Ca.getAttribute(v)];null!=wa&&(Ca.style=wa)}y.setAttributeForCell(Ca,"placeholders","1");Ca.style=y.replacePlaceholders(Ca,Ca.style,B);null==za||k?
-y.fireEvent(new mxEventObject("cellsInserted","cells",[Ca])):(y.model.setStyle(za,Ca.style),0>mxUtils.indexOf(p,za)&&p.push(za),y.fireEvent(new mxEventObject("cellsInserted","cells",[za])));k=null!=za;za=Ca;if(!k)for(Ga=0;Ga<Z.length;Ga++)E[Z[Ga].to][za.getAttribute(Z[Ga].to)]=za;null!=ca&&"link"!=ca&&(y.setLinkForCell(za,za.getAttribute(ca)),y.setAttributeForCell(za,ca,null));var Ha=this.editor.graph.getPreferredSizeForCell(za);H=null!=ha?y.model.getCell(F+Aa[ha]):null;if(za.vertex){Ma=null!=H?0:
+y.fireEvent(new mxEventObject("cellsInserted","cells",[Ca])):(y.model.setStyle(za,Ca.style),0>mxUtils.indexOf(p,za)&&p.push(za),y.fireEvent(new mxEventObject("cellsInserted","cells",[za])));k=null!=za;za=Ca;if(!k)for(Ga=0;Ga<Z.length;Ga++)E[Z[Ga].to][za.getAttribute(Z[Ga].to)]=za;null!=ba&&"link"!=ba&&(y.setLinkForCell(za,za.getAttribute(ba)),y.setAttributeForCell(za,ba,null));var Ha=this.editor.graph.getPreferredSizeForCell(za);H=null!=ha?y.model.getCell(F+Aa[ha]):null;if(za.vertex){Ma=null!=H?0:
S;ka=null!=H?0:X;null!=V&&null!=za.getAttribute(V)&&(za.geometry.x=Ma+parseFloat(za.getAttribute(V)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=ka+parseFloat(za.getAttribute(W)));var ya="@"==P.charAt(0)?za.getAttribute(P.substring(1)):null;za.geometry.width=null!=ya&&"auto"!=ya?parseFloat(za.getAttribute(P.substring(1))):"auto"==P||"auto"==ya?Ha.width+R:parseFloat(P);var Ia="@"==U.charAt(0)?za.getAttribute(U.substring(1)):null;za.geometry.height=null!=Ia&&"auto"!=Ia?parseFloat(Ia):"auto"==
-U||"auto"==Ia?Ha.height+R:parseFloat(U);Q+=za.geometry.height+D}k?(null==A[Da]&&(A[Da]=[]),A[Da].push(za)):(n.push(za),null!=H?(H.style=y.replacePlaceholders(H,M,B),y.addCell(za,H),q.push(H)):p.push(y.addCell(za)))}for(la=0;la<q.length;la++)ya="@"==P.charAt(0)?q[la].getAttribute(P.substring(1)):null,Ia="@"==U.charAt(0)?q[la].getAttribute(U.substring(1)):null,"auto"!=P&&"auto"!=ya||"auto"!=U&&"auto"!=Ia||y.updateGroupBounds([q[la]],R,!0);var ja=p.slice(),va=p.slice();for(Ga=0;Ga<Z.length;Ga++){var ta=
+U||"auto"==Ia?Ha.height+R:parseFloat(U);Q+=za.geometry.height+D}k?(null==A[Da]&&(A[Da]=[]),A[Da].push(za)):(n.push(za),null!=H?(H.style=y.replacePlaceholders(H,M,B),y.addCell(za,H),t.push(H)):p.push(y.addCell(za)))}for(la=0;la<t.length;la++)ya="@"==P.charAt(0)?t[la].getAttribute(P.substring(1)):null,Ia="@"==U.charAt(0)?t[la].getAttribute(U.substring(1)):null,"auto"!=P&&"auto"!=ya||"auto"!=U&&"auto"!=Ia||y.updateGroupBounds([t[la]],R,!0);var ja=p.slice(),va=p.slice();for(Ga=0;Ga<Z.length;Ga++){var ta=
Z[Ga];for(la=0;la<n.length;la++){za=n[la];var da=mxUtils.bind(this,function(Ja,Na,Ra){var Ka=Na.getAttribute(Ra.from);if(null!=Ka&&""!=Ka){Ka=Ka.split(",");for(var Pa=0;Pa<Ka.length;Pa++){var Qa=E[Ra.to][Ka[Pa]];if(null==Qa&&null!=G){Qa=new mxCell(Ka[Pa],new mxGeometry(S,X,0,0),G);Qa.style=y.replacePlaceholders(Na,Qa.style,B);var Oa=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Oa.width+R;Qa.geometry.height=Oa.height+R;E[Ra.to][Ka[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ka[Pa];p.push(y.addCell(Qa))}if(null!=
Qa){Oa=Ra.label;null!=Ra.fromlabel&&(Oa=(Na.getAttribute(Ra.fromlabel)||"")+(Oa||""));null!=Ra.sourcelabel&&(Oa=y.replacePlaceholders(Na,Ra.sourcelabel,B)+(Oa||""));null!=Ra.tolabel&&(Oa=(Oa||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Oa=(Oa||"")+y.replacePlaceholders(Qa,Ra.targetlabel,B));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ja;Sa=null!=Ra.style?y.replacePlaceholders(Sa,Ra.style,B):y.createCurrentEdgeStyle();Oa=y.insertEdge(null,null,Oa||"",Ra.invert?Qa:Ja,Ra.invert?
Ja:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],La=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Ua.placeholders&&(La.value=y.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ja,La.value,B));if(null!=Ua.dx||null!=Ua.dy)La.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=Ua.dy?Ua.dy:0);Oa.insert(La)}va.push(Oa);mxUtils.remove(Ra.invert?
-Ja:Qa,ja)}}}});da(za,za,ta);if(null!=A[za.id])for(pa=0;pa<A[za.id].length;pa++)da(za,A[za.id][pa],ta)}}if(null!=fa)for(la=0;la<n.length;la++)for(za=n[la],pa=0;pa<fa.length;pa++)y.setAttributeForCell(za,mxUtils.trim(fa[pa]),null);if(0<p.length){var ba=new mxParallelEdgeLayout(y);ba.spacing=t;ba.checkOverlap=!0;var na=function(){0<ba.spacing&&ba.execute(y.getDefaultParent());for(var Ja=0;Ja<p.length;Ja++){var Na=y.getCellGeometry(p[Ja]);Na.x=Math.round(y.snap(Na.x));Na.y=Math.round(y.snap(Na.y));"auto"==
+Ja:Qa,ja)}}}});da(za,za,ta);if(null!=A[za.id])for(pa=0;pa<A[za.id].length;pa++)da(za,A[za.id][pa],ta)}}if(null!=fa)for(la=0;la<n.length;la++)for(za=n[la],pa=0;pa<fa.length;pa++)y.setAttributeForCell(za,mxUtils.trim(fa[pa]),null);if(0<p.length){var ca=new mxParallelEdgeLayout(y);ca.spacing=q;ca.checkOverlap=!0;var na=function(){0<ca.spacing&&ca.execute(y.getDefaultParent());for(var Ja=0;Ja<p.length;Ja++){var Na=y.getCellGeometry(p[Ja]);Na.x=Math.round(y.snap(Na.x));Na.y=Math.round(y.snap(Na.y));"auto"==
P&&(Na.width=Math.round(y.snap(Na.width)));"auto"==U&&(Na.height=Math.round(y.snap(Na.height)))}};if("["==Y.charAt(0)){var ea=O;y.view.validate();this.executeLayouts(y.createLayouts(JSON.parse(Y)),function(){na();ea()});O=null}else if("circle"==Y){var ia=new mxCircleLayout(y);ia.disableEdgeStyle=!1;ia.resetEdges=!1;var oa=ia.isVertexIgnored;ia.isVertexIgnored=function(Ja){return oa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ia.execute(y.getDefaultParent());na()},
!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&va.length==2*p.length-1&&1==ja.length){y.view.validate();var ma=new mxCompactTreeLayout(y,"horizontaltree"==Y);ma.levelDistance=D;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(y.getDefaultParent(),0<ja.length?ja[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ja.length){y.view.validate();var xa=new mxHierarchicalLayout(y,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=D;xa.parallelEdgeSpacing=t;xa.interRankCellSpacing=L;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(y.getDefaultParent(),va);y.moveCells(va,S,X)},!0,O);O=null}else if("orgchart"==Y){y.view.validate();var Ea=new mxOrgChartLayout(y,2,L,D),Ba=Ea.isVertexIgnored;Ea.isVertexIgnored=function(Ja){return Ba.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Ea.execute(y.getDefaultParent());na()},!0,O);O=null}else if("organic"==
+mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=D;xa.parallelEdgeSpacing=q;xa.interRankCellSpacing=L;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(y.getDefaultParent(),va);y.moveCells(va,S,X)},!0,O);O=null}else if("orgchart"==Y){y.view.validate();var Ea=new mxOrgChartLayout(y,2,L,D),Ba=Ea.isVertexIgnored;Ea.isVertexIgnored=function(Ja){return Ba.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Ea.execute(y.getDefaultParent());na()},!0,O);O=null}else if("organic"==
Y||"auto"==Y&&va.length>p.length){y.view.validate();var ua=new mxFastOrganicLayout(y);ua.forceConstant=3*D;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var sa=ua.isVertexIgnored;ua.isVertexIgnored=function(Ja){return sa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ua.execute(y.getDefaultParent());na()},!0,O);O=null}}this.hideDialog()}finally{y.model.endUpdate()}null!=O&&O()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(e){var g="";if("1"!=urlParams.offline&&
"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(e,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var g=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(k,
-n)&&(e=0==g?e+"?":e+"&",null!=urlParams[n]&&(e+=n+"="+urlParams[n],g++))}return e};EditorUi.prototype.showLinkDialog=function(e,g,k,n,q){e=new LinkDialog(this,e,g,k,!0,n,q);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=
+n)&&(e=0==g?e+"?":e+"&",null!=urlParams[n]&&(e+=n+"="+urlParams[n],g++))}return e};EditorUi.prototype.showLinkDialog=function(e,g,k,n,t){e=new LinkDialog(this,e,g,k,!0,n,t);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=
this.gitLab&&g++;e&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),g=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);
this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("resetView").setEnabled(g);
this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
@@ -12129,49 +12129,49 @@ this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}))
this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=
g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==
urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"")+"...";e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=e&&null!=e.shape&&null!=e.shape.stencil)};var C=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
-function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);C.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,g,k,n,q,p,A,E){var y=e.editor.graph;if("xml"==k)e.hideDialog(),e.saveData(g,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==k)e.hideDialog(),e.saveData(g,"svg",mxUtils.getXml(y.getSvg(n,q,p)),"image/svg+xml");
-else{var B=e.getFileData(!0,null,null,null,null,!0),J=y.getGraphBounds(),N=Math.floor(J.width*q/y.view.scale),v=Math.floor(J.height*q/y.view.scale);if(B.length<=MAX_REQUEST_SIZE&&N*v<MAX_AREA)if(e.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!e.isExportToCanvas()){var u={globalVars:y.getExportVariables()};E&&(u.grid={size:y.gridSize,steps:y.view.gridSteps,color:y.view.gridColor});e.saveRequest(g,k,function(G,I){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(I||"0")+(null!=G?"&filename="+
-encodeURIComponent(G):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<A?"&dpi="+A:"")+"&bg="+(null!=n?n:"none")+"&w="+N+"&h="+v+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?e.exportImage(q,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,E,A):e.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,g="";if(null!=this.pages)for(var k=
+function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);C.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,g,k,n,t,p,A,E){var y=e.editor.graph;if("xml"==k)e.hideDialog(),e.saveData(g,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==k)e.hideDialog(),e.saveData(g,"svg",mxUtils.getXml(y.getSvg(n,t,p)),"image/svg+xml");
+else{var B=e.getFileData(!0,null,null,null,null,!0),J=y.getGraphBounds(),N=Math.floor(J.width*t/y.view.scale),v=Math.floor(J.height*t/y.view.scale);if(B.length<=MAX_REQUEST_SIZE&&N*v<MAX_AREA)if(e.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!e.isExportToCanvas()){var u={globalVars:y.getExportVariables()};E&&(u.grid={size:y.gridSize,steps:y.view.gridSteps,color:y.view.gridColor});e.saveRequest(g,k,function(G,I){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(I||"0")+(null!=G?"&filename="+
+encodeURIComponent(G):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<A?"&dpi="+A:"")+"&bg="+(null!=n?n:"none")+"&w="+N+"&h="+v+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?e.exportImage(t,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,E,A):e.exportImage(t,!1,!0,!1,!1,p,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,g="";if(null!=this.pages)for(var k=
0;k<this.pages.length;k++){var n=e;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=e.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(e));
-n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var A=mxSettings.getCustomLibraries();for(e=0;e<A.length;e++){var E=A[e];if("R"==E.substring(0,1)){var y=JSON.parse(decodeURIComponent(E.substring(1)));p[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",
-null,null,function(B){q.innerText="";if(0==B.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var J=0;J<B.length;J++){var N=B[J];p[N.id]&&(g[N.id]=N);var v=this.addCheckbox(q,N.title,p[N.id]);(function(u,G){mxEvent.addListener(G,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(N,v)}},mxUtils.bind(this,function(B){q.innerText="";var J=document.createElement("div");J.style.padding="8px";
-J.style.textAlign="center";mxUtils.write(J,mxResources.get("error")+": ");mxUtils.write(J,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));q.appendChild(J)}));k.appendChild(q);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,J;for(J in g)null==p[J]&&(B++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(v){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var A=mxSettings.getCustomLibraries();for(e=0;e<A.length;e++){var E=A[e];if("R"==E.substring(0,1)){var y=JSON.parse(decodeURIComponent(E.substring(1)));p[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",
+null,null,function(B){t.innerText="";if(0==B.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var J=0;J<B.length;J++){var N=B[J];p[N.id]&&(g[N.id]=N);var v=this.addCheckbox(t,N.title,p[N.id]);(function(u,G){mxEvent.addListener(G,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(N,v)}},mxUtils.bind(this,function(B){t.innerText="";var J=document.createElement("div");J.style.padding="8px";
+J.style.textAlign="center";mxUtils.write(J,mxResources.get("error")+": ");mxUtils.write(J,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));t.appendChild(J)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,J;for(J in g)null==p[J]&&(B++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(v){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
v,N))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[J]));for(J in p)g[J]||this.closeLibrary(new RemoteLibrary(this,null,p[J]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(e){this.remoteWin=e;for(var g=0;g<this.remoteInvokeQueue.length;g++)e.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
-function(e){var g=e.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));e.error?k.error&&k.error(e.error.errResp):k.callback&&k.callback.apply(this,e.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,g,k,n,q){var p=!0,A=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A);
-p&&n.apply(this,arguments)}),y=mxUtils.bind(this,function(){window.clearTimeout(A);p&&q.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:y});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,g){var k=mxUtils.bind(this,function(B,J){var N={event:"remoteInvokeResponse",
-msgMarkers:e.msgMarkers};null!=J?N.error={errResp:J}:null!=B&&(N.resp=B);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var n=e.funtionName,q=this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,A=0;A<q.allowedDomains.length;A++)if(g=="https://"+q.allowedDomains[A]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var E=e.functionArgs;Array.isArray(E)||(E=[]);if(q.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}),
-E.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,E);else{var y=this[n].apply(this,E);k([y])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(e,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});
-2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||
+function(e){var g=e.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));e.error?k.error&&k.error(e.error.errResp):k.callback&&k.callback.apply(this,e.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,g,k,n,t){var p=!0,A=window.setTimeout(mxUtils.bind(this,function(){p=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A);
+p&&n.apply(this,arguments)}),y=mxUtils.bind(this,function(){window.clearTimeout(A);p&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:y});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,g){var k=mxUtils.bind(this,function(B,J){var N={event:"remoteInvokeResponse",
+msgMarkers:e.msgMarkers};null!=J?N.error={errResp:J}:null!=B&&(N.resp=B);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var n=e.funtionName,t=this.remoteInvokableFns[n];if(null!=t&&"function"===typeof this[n]){if(t.allowedDomains){for(var p=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var E=e.functionArgs;Array.isArray(E)||(E=[]);if(t.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}),
+E.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,E);else{var y=this[n].apply(this,E);k([y])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(e,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=function(t){try{var p=n.result;1>t.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});
+2>t.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};n.onsuccess=mxUtils.bind(this,function(t){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||
"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var y=!0,B=!1,J,N=0,v=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){N++;G()}),G=mxUtils.bind(this,function(){try{if(N>=
J.length)v();else{var M=J[N];StorageFile.getFileContent(this,M,mxUtils.bind(this,function(K){null==K||".scratchpad"==M&&K==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[M]}),"*"):u()}),u)}}catch(K){console.log(K)}}),I=mxUtils.bind(this,function(M){try{this.setDatabaseItem(null,[{title:M.title,size:M.data.length,lastModified:Date.now(),type:M.isLib?"L":"F"},{title:M.title,data:M.data}],u,u,["filesInfo","files"])}catch(K){console.log(K)}});
A=mxUtils.bind(this,function(M){try{if(M.source==E.contentWindow){var K={};try{K=JSON.parse(M.data)}catch(H){}"init"==K.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=K.event||B||(y?null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?(J=K.resp[0],y=!1,G()):v():null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?I(K.resp[0]):u())}}catch(H){console.log(H)}});
-window.addEventListener("message",A)}})));e(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(q){null!=g&&g(q)}else null!=g&&g()}else e(this.database)};EditorUi.prototype.setDatabaseItem=function(e,g,k,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q=[q],e=[e],g=[g]);var A=p.transaction(q,"readwrite");A.oncomplete=k;A.onerror=n;for(p=0;p<q.length;p++)A.objectStore(q[p]).put(null!=e&&null!=e[p]?{key:e[p],data:g[p]}:g[p])}catch(E){null!=
-n&&n(E)}}),n)};EditorUi.prototype.removeDatabaseItem=function(e,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],e=[e]);q=q.transaction(n,"readwrite");q.oncomplete=g;q.onerror=k;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(e[p])}),k)};EditorUi.prototype.getDatabaseItem=function(e,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(e);p.onsuccess=function(){g(p.result)};
-p.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(e,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(A){null==A.target.result?e(p):(p.push(A.target.result.value),A.target.result.continue())};q.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(e,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=
-k||"objects";var q=n.transaction([k],"readonly").objectStore(k).getAllKeys();q.onsuccess=function(){e(q.result)};q.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsSaveNeeded():
+window.addEventListener("message",A)}})));e(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(t){null!=g&&g(t)}else null!=g&&g()}else e(this.database)};EditorUi.prototype.setDatabaseItem=function(e,g,k,n,t){this.openDatabase(mxUtils.bind(this,function(p){try{t=t||"objects";Array.isArray(t)||(t=[t],e=[e],g=[g]);var A=p.transaction(t,"readwrite");A.oncomplete=k;A.onerror=n;for(p=0;p<t.length;p++)A.objectStore(t[p]).put(null!=e&&null!=e[p]?{key:e[p],data:g[p]}:g[p])}catch(E){null!=
+n&&n(E)}}),n)};EditorUi.prototype.removeDatabaseItem=function(e,g,k,n){this.openDatabase(mxUtils.bind(this,function(t){n=n||"objects";Array.isArray(n)||(n=[n],e=[e]);t=t.transaction(n,"readwrite");t.oncomplete=g;t.onerror=k;for(var p=0;p<n.length;p++)t.objectStore(n[p]).delete(e[p])}),k)};EditorUi.prototype.getDatabaseItem=function(e,g,k,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";var p=t.transaction([n],"readonly").objectStore(n).get(e);p.onsuccess=function(){g(p.result)};
+p.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(e,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var t=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];t.onsuccess=function(A){null==A.target.result?e(p):(p.push(A.target.result.value),A.target.result.continue())};t.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(e,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=
+k||"objects";var t=n.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){e(t.result)};t.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsSaveNeeded():
!1};EditorUi.prototype.getComments=function(e,g){var k=this.getCurrentFile();null!=k?k.getComments(e,g):e([])};EditorUi.prototype.addComment=function(e,g,k){var n=this.getCurrentFile();null!=n?n.addComment(e,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=function(e,g){var k=this.getCurrentFile();
return null!=k?k.newComment(e,g):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(e,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();return null!=e&&(e.constructor==
-DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,g,k,n,q,p,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,g,k,n,q,p,A,E)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(e)};
-EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(e,g)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,g,k,n,q,p,A,E,y,B,J,N,v,u,G,I){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(e,g,k,n,q,p,A,E,y,B,J,N,v,u,G,I)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
-return this.editor.convertImageToDataUri(e,g)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=function(e,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,g,k,n)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};EditorUi.prototype.writeGraphModelToPng=function(e,g,k,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
-return Editor.writeGraphModelToPng(e,g,k,n,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var e=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var q="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(q||
+DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,g,k,n,t,p,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,g,k,n,t,p,A,E)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(e)};
+EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(e,g)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,g,k,n,t,p,A,E,y,B,J,N,v,u,G,I){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(e,g,k,n,t,p,A,E,y,B,J,N,v,u,G,I)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+return this.editor.convertImageToDataUri(e,g)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=function(e,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,g,k,n)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};EditorUi.prototype.writeGraphModelToPng=function(e,g,k,n,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
+return Editor.writeGraphModelToPng(e,g,k,n,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var e=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var t="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(t||
n)&&e.push(k)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(e);return{title:e,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,d,f,c,l,m){function x(){for(var M=B.getElementsByTagName("div"),K=0,H=0;H<M.length;H++)"none"!=M[H].style.display&&M[H].parentNode==B&&K++;J.style.display=0==K?"block":"none"}function z(M,K,H,F){function P(){K.removeChild(V);K.removeChild(W);T.style.display="block";U.style.display="block"}A={div:K,comment:M,saveCallback:H,deleteOnCancel:F};var U=K.querySelector(".geCommentTxt"),T=K.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=M.content;K.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){F?(K.parentNode.removeChild(K),x()):P();A=null});t.className="geCommentEditBtn";W.appendChild(t);var D=mxUtils.button(mxResources.get("save"),function(){U.innerText="";M.content=V.value;mxUtils.write(U,M.content);P();H(M);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
-function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(D.click(),mxEvent.consume(L)):27==L.keyCode&&(t.click(),mxEvent.consume(L)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);K.insertBefore(W,U);T.style.display="none";U.style.display="none";V.focus()}function C(M,K){K.innerText="";M=new Date(M.modifiedDate);var H=b.timeSince(M);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(K,mxResources.get("timeAgo",
+"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=M.content;K.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){F?(K.parentNode.removeChild(K),x()):P();A=null});q.className="geCommentEditBtn";W.appendChild(q);var D=mxUtils.button(mxResources.get("save"),function(){U.innerText="";M.content=V.value;mxUtils.write(U,M.content);P();H(M);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
+function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(D.click(),mxEvent.consume(L)):27==L.keyCode&&(q.click(),mxEvent.consume(L)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);K.insertBefore(W,U);T.style.display="none";U.style.display="none";V.focus()}function C(M,K){K.innerText="";M=new Date(M.modifiedDate);var H=b.timeSince(M);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(K,mxResources.get("timeAgo",
[H],"{1} ago"));K.setAttribute("title",M.toLocaleDateString()+" "+M.toLocaleTimeString())}function e(M){var K=document.createElement("img");K.className="geCommentBusyImg";K.src=IMAGE_PATH+"/spin.gif";M.appendChild(K);M.busyImg=K}function g(M){M.style.border="1px solid red";M.removeChild(M.busyImg)}function k(M){M.style.border="";M.removeChild(M.busyImg)}function n(M,K,H,F,P){function U(O,Q,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className=
"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){Q(Y,M);Y.preventDefault();mxEvent.consume(Y)});R.appendChild(X);S&&(X.style.display="none")}function T(){function O(X){Q.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var Q=[],S=W;O(M);return{pdiv:S,replies:Q}}function V(O,Q,S,X,aa){function Y(){e(ka);M.addReply(fa,function(ha){fa.id=ha;M.replies.push(fa);k(ka);S&&S()},function(ha){Z();g(ka);b.handleError(ha,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){z(fa,ka,function(ha){Y()},!0)}var ca=T().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=M.id;null==M.replies&&(M.replies=[]);var ka=n(fa,M.replies,ca,F+1);Q?Z():Y()}if(P||!M.isResolved){J.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",M.id);W.style.marginLeft=20*F+5+"px";M.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
-"ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=M.user.pictureUrl||Editor.userImage;t.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";t.appendChild(D);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,M.user.displayName||"");D.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
-M.id);C(M,L);D.appendChild(L);W.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,M.content||"");W.appendChild(t);M.isLocked&&(W.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";t.appendChild(R);q||M.isLocked||0!=F&&!p||U(mxResources.get("reply"),function(){V("",!0)},M.isResolved);D=b.getCurrentUser();null==D||D.id!=M.user.id||q||M.isLocked||(U(mxResources.get("edit"),
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){z(fa,ka,function(ha){Y()},!0)}var ba=T().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=M.id;null==M.replies&&(M.replies=[]);var ka=n(fa,M.replies,ba,F+1);Q?Z():Y()}if(P||!M.isResolved){J.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",M.id);W.style.marginLeft=20*F+5+"px";M.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
+"ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=M.user.pictureUrl||Editor.userImage;q.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";q.appendChild(D);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,M.user.displayName||"");D.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
+M.id);C(M,L);D.appendChild(L);W.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,M.content||"");W.appendChild(q);M.isLocked&&(W.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";q.appendChild(R);t||M.isLocked||0!=F&&!p||U(mxResources.get("reply"),function(){V("",!0)},M.isResolved);D=b.getCurrentUser();null==D||D.id!=M.user.id||t||M.isLocked||(U(mxResources.get("edit"),
function(){function O(){z(M,W,function(){e(W);M.editComment(M.content,function(){k(W)},function(Q){g(W);O();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},M.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){e(W);M.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var Q=W.querySelectorAll(".geCommentAction");for(O=
-0;O<Q.length;O++)Q[O].parentNode.removeChild(Q[O]);k(W);W.style.opacity="0.5"}else{Q=T(M).replies;for(O=0;O<Q.length;O++)B.removeChild(Q[O]);for(O=0;O<K.length;O++)if(K[O]==M){K.splice(O,1);break}J.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},M.isResolved));q||M.isLocked||0!=F||U(M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function Q(){var S=
-O.target;S.innerText="";M.isResolved=!M.isResolved;mxUtils.write(S,M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=M.isResolved?"none":"",aa=T(M).replies,Y=Editor.isDarkMode()?"transparent":M.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ca=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=S.parentNode&&(ca[fa].style.display=X);u||(aa[Z].style.display="none")}x()}M.isResolved?V(mxResources.get("reOpened")+
-": ",!0,Q,!1,!0):V(mxResources.get("markedAsResolved"),!1,Q,!0)});W.appendChild(t);null!=H?B.insertBefore(W,H.nextSibling):B.appendChild(W);for(H=0;null!=M.replies&&H<M.replies.length;H++)t=M.replies[H],t.isResolved=M.isResolved,n(t,M.replies,null,F+1,P);null!=A&&(A.comment.id==M.id?(P=M.content,M.content=A.comment.content,z(M,W,A.saveCallback,A.deleteOnCancel),M.content=P):null==A.comment.id&&A.comment.pCommentId==M.id&&(B.appendChild(A.div),z(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return W}}
-var q=!b.canComment(),p=b.canReplyToReplies(),A=null,E=document.createElement("div");E.className="geCommentsWin";E.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var y=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(y)+7+"px";E.appendChild(B);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(J,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=y;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y=document.createElement("a");y.className="geButton";if(!q){var v=y.cloneNode();v.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("create")+
+0;O<Q.length;O++)Q[O].parentNode.removeChild(Q[O]);k(W);W.style.opacity="0.5"}else{Q=T(M).replies;for(O=0;O<Q.length;O++)B.removeChild(Q[O]);for(O=0;O<K.length;O++)if(K[O]==M){K.splice(O,1);break}J.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},M.isResolved));t||M.isLocked||0!=F||U(M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function Q(){var S=
+O.target;S.innerText="";M.isResolved=!M.isResolved;mxUtils.write(S,M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=M.isResolved?"none":"",aa=T(M).replies,Y=Editor.isDarkMode()?"transparent":M.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ba.length;fa++)ba[fa]!=S.parentNode&&(ba[fa].style.display=X);u||(aa[Z].style.display="none")}x()}M.isResolved?V(mxResources.get("reOpened")+
+": ",!0,Q,!1,!0):V(mxResources.get("markedAsResolved"),!1,Q,!0)});W.appendChild(q);null!=H?B.insertBefore(W,H.nextSibling):B.appendChild(W);for(H=0;null!=M.replies&&H<M.replies.length;H++)q=M.replies[H],q.isResolved=M.isResolved,n(q,M.replies,null,F+1,P);null!=A&&(A.comment.id==M.id?(P=M.content,M.content=A.comment.content,z(M,W,A.saveCallback,A.deleteOnCancel),M.content=P):null==A.comment.id&&A.comment.pCommentId==M.id&&(B.appendChild(A.div),z(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return W}}
+var t=!b.canComment(),p=b.canReplyToReplies(),A=null,E=document.createElement("div");E.className="geCommentsWin";E.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var y=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(y)+7+"px";E.appendChild(B);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(J,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=y;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y=document.createElement("a");y.className="geButton";if(!t){var v=y.cloneNode();v.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("create")+
"...");mxEvent.addListener(v,"click",function(M){function K(){z(H,F,function(P){e(F);b.addComment(P,function(U){P.id=U;G.push(P);k(F)},function(U){g(F);K();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),F=n(H,G,null,0);K();M.preventDefault();mxEvent.consume(M)});N.appendChild(v)}v=y.cloneNode();v.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';v.setAttribute("title",mxResources.get("showResolved"));
v.className="geAdaptiveAsset";var u=!1;mxEvent.addListener(v,"click",function(M){this.className=(u=!u)?"geButton geCheckedBtn":"geButton";I();M.preventDefault();mxEvent.consume(M)});N.appendChild(v);b.commentsRefreshNeeded()&&(v=y.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',v.setAttribute("title",mxResources.get("refresh")),v.className="geAdaptiveAsset",mxEvent.addListener(v,"click",function(M){I();M.preventDefault();mxEvent.consume(M)}),N.appendChild(v));
b.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),y.className="geAdaptiveAsset",mxEvent.addListener(y,"click",function(M){m();M.preventDefault();mxEvent.consume(M)}),N.appendChild(y));E.appendChild(N);var G=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);var M=A.div.querySelector(".geCommentEditTxtArea"),K=A.div.querySelector(".geCommentEditBtns");
@@ -12179,21 +12179,21 @@ A.comment.content=M.value;M.parentNode.removeChild(M);K.parentNode.removeChild(K
H.sort(function(P,U){return new Date(P.modifiedDate)-new Date(U.modifiedDate)});B.innerText="";B.appendChild(J);J.style.display="block";G=H;for(H=0;H<G.length;H++)F(G[H].replies),n(G[H],G,null,0,u);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(B.appendChild(A.div),z(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?": "+H.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
I();this.refreshComments=I;N=mxUtils.bind(this,function(){function M(U){var T=H[U.id];if(null!=T)for(C(U,T),T=0;null!=U.replies&&T<U.replies.length;T++)M(U.replies[T])}if(this.window.isVisible()){for(var K=B.querySelectorAll(".geCommentDate"),H={},F=0;F<K.length;F++){var P=K[F];H[P.getAttribute("data-commentId")]=P}for(F=0;F<G.length;F++)M(G[F])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),E,d,f,c,l,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,d,f,c,l,m,x,z,C,e,g){var k=document.createElement("div");k.style.textAlign="center";g=null!=g?g:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=g+
-"px";n.style.lineHeight="1.2em";mxUtils.write(n,d);k.appendChild(n);null!=e&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",e),n.appendChild(d),k.appendChild(n));e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";
-null!=z&&(m.innerHTML=z+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&e.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(q.checked)});e.appendChild(p);null!=x?(p.innerHTML=x+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(m);k.appendChild(e);C?(e.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(A){q.checked=!q.checked;mxEvent.consume(A)})):e.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+"px";n.style.lineHeight="1.2em";mxUtils.write(n,d);k.appendChild(n);null!=e&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",e),n.appendChild(d),k.appendChild(n));e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(t.checked)});m.className="geBtn";
+null!=z&&(m.innerHTML=z+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&e.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(t.checked)});e.appendChild(p);null!=x?(p.innerHTML=x+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+e.appendChild(m);k.appendChild(e);C?(e.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(t),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(A){t.checked=!t.checked;mxEvent.consume(A)})):e.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,d,f,c,l){if(null!=d)for(var m=0;m<d.length;m++)null!=d[m]&&(b=this.patchPages(b,d[m],f,c,l));return b};
EditorUi.prototype.patchPages=function(b,d,f,c,l){var m={},x=[],z={},C={},e={},g={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var k in c[EditorUi.DIFF_UPDATE])m[k]=c[EditorUi.DIFF_UPDATE][k];if(null!=d[EditorUi.DIFF_REMOVE])for(c=0;c<d[EditorUi.DIFF_REMOVE].length;c++)C[d[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(c=0;c<d[EditorUi.DIFF_INSERT].length;c++)z[d[EditorUi.DIFF_INSERT][c].previous]=d[EditorUi.DIFF_INSERT][c];if(null!=d[EditorUi.DIFF_UPDATE])for(k in d[EditorUi.DIFF_UPDATE])c=
-d[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var q=b[c].getId();e[q]=b[c];null!=g[n]||C[q]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][q]&&null!=d[EditorUi.DIFF_UPDATE][q].previous||(g[n]=q);n=q}}var p={},A=mxUtils.bind(this,function(y){var B=null!=y?y.getId():"";if(null!=y&&!p[B]){p[B]=!0;x.push(y);var J=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][B]:null;null!=J&&(this.updatePageRoot(y),null!=J.name&&y.setName(J.name),
+d[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var t=b[c].getId();e[t]=b[c];null!=g[n]||C[t]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][t]&&null!=d[EditorUi.DIFF_UPDATE][t].previous||(g[n]=t);n=t}}var p={},A=mxUtils.bind(this,function(y){var B=null!=y?y.getId():"";if(null!=y&&!p[B]){p[B]=!0;x.push(y);var J=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][B]:null;null!=J&&(this.updatePageRoot(y),null!=J.name&&y.setName(J.name),
null!=J.view&&this.patchViewState(y,J.view),null!=J.cells&&this.patchPage(y,J.cells,m[y.getId()],l),!f||null==J.cells&&null==J.view||(y.needsUpdate=!0))}y=g[B];null!=y&&(delete g[B],A(e[y]));y=z[B];null!=y&&(delete z[B],E(y))}),E=mxUtils.bind(this,function(y){y=mxUtils.parseXml(y.data).documentElement;y=new DiagramPage(y);this.updatePageRoot(y);var B=e[y.getId()];null==B?A(y):(this.patchPage(B,this.diffPages([B],[y]),m[B.getId()],l),f&&(B.needsUpdate=!0))});A();for(k in g)A(e[g[k]]),delete g[k];for(k in z)E(z[k]),
delete z[k];return x};EditorUi.prototype.patchViewState=function(b,d){if(null!=b.viewState&&null!=d){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in d)try{this.patchViewStateProperty(b,d,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,d,f){b.viewState[f]=JSON.parse(d[f])};
EditorUi.prototype.createParentLookup=function(b,d){function f(e){var g=c[e];null==g&&(g={inserted:[],moved:{}},c[e]=g);return g}var c={};if(null!=d[EditorUi.DIFF_INSERT])for(var l=0;l<d[EditorUi.DIFF_INSERT].length;l++){var m=d[EditorUi.DIFF_INSERT][l],x=null!=m.parent?m.parent:"",z=null!=m.previous?m.previous:"";f(x).inserted[z]=m}if(null!=d[EditorUi.DIFF_UPDATE])for(var C in d[EditorUi.DIFF_UPDATE])m=d[EditorUi.DIFF_UPDATE][C],null!=m.previous&&(x=m.parent,null==x&&(l=b.getCell(C),null!=l&&(l=
b.getParent(l),null!=l&&(x=l.getId()))),null!=x&&(f(x).moved[m.previous]=C));return c};
EditorUi.prototype.patchPage=function(b,d,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,d);l.beginUpdate();try{var x=l.updateEdgeParent,z=new mxDictionary,C=[];l.updateEdgeParent=function(E,y){!z.get(E)&&c&&(z.put(E,!0),C.push(E))};var e=m[""],g=null!=e&&null!=e.inserted?e.inserted[""]:null,k=null;null!=g&&(k=this.getCellForJson(g));if(null==k){var n=null!=e&&null!=e.moved?e.moved[""]:null;null!=n&&(k=l.getCell(n))}null!=k&&(l.setRoot(k),
-b.root=k);this.patchCellRecursive(b,l,l.root,m,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var q=0;q<d[EditorUi.DIFF_REMOVE].length;q++){var p=l.getCell(d[EditorUi.DIFF_REMOVE][q]);null!=p&&l.remove(p)}if(null!=d[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in d[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),d[EditorUi.DIFF_UPDATE][n],null!=A?A[n]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(q=0;q<d[EditorUi.DIFF_INSERT].length;q++)g=d[EditorUi.DIFF_INSERT][q],
-p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=x;if(c&&0<C.length)for(q=0;q<C.length;q++)l.contains(C[q])&&l.updateEdgeParent(C[q])}finally{l.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,d,f,c,l){if(null!=f){var m=c[f.getId()],x=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var z=0,C=d.getChildCount(f),e="",g=0;g<C;g++){var k=d.getChildAt(f,g).getId();null==m[e]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[e]=k);e=k}C=mxUtils.bind(this,function(n,q){var p=null!=n?n.getId():"";null!=n&&q&&(q=
-d.getCell(p),null!=q&&q!=n&&(n=null));null!=n&&(d.getChildAt(f,z)!=n&&d.add(f,n,z),this.patchCellRecursive(b,d,n,c,l),z++);return p});for(e=[null];0<e.length;)if(g=e.shift(),g=C(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],e.push({child:d.getCell(k)})),k=x[g],null!=k&&(delete x[g],e.push({child:this.getCellForJson(k),insert:!0})),0==e.length){for(g in m)e.push({child:d.getCell(m[g])}),delete m[g];for(g in x)e.push({child:this.getCellForJson(x[g]),insert:!0}),delete x[g]}}};
+b.root=k);this.patchCellRecursive(b,l,l.root,m,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var t=0;t<d[EditorUi.DIFF_REMOVE].length;t++){var p=l.getCell(d[EditorUi.DIFF_REMOVE][t]);null!=p&&l.remove(p)}if(null!=d[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in d[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),d[EditorUi.DIFF_UPDATE][n],null!=A?A[n]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(t=0;t<d[EditorUi.DIFF_INSERT].length;t++)g=d[EditorUi.DIFF_INSERT][t],
+p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=x;if(c&&0<C.length)for(t=0;t<C.length;t++)l.contains(C[t])&&l.updateEdgeParent(C[t])}finally{l.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,d,f,c,l){if(null!=f){var m=c[f.getId()],x=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var z=0,C=d.getChildCount(f),e="",g=0;g<C;g++){var k=d.getChildAt(f,g).getId();null==m[e]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[e]=k);e=k}C=mxUtils.bind(this,function(n,t){var p=null!=n?n.getId():"";null!=n&&t&&(t=
+d.getCell(p),null!=t&&t!=n&&(n=null));null!=n&&(d.getChildAt(f,z)!=n&&d.add(f,n,z),this.patchCellRecursive(b,d,n,c,l),z++);return p});for(e=[null];0<e.length;)if(g=e.shift(),g=C(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],e.push({child:d.getCell(k)})),k=x[g],null!=k&&(delete x[g],e.push({child:this.getCellForJson(k),insert:!0})),0==e.length){for(g in m)e.push({child:d.getCell(m[g])}),delete m[g];for(g in x)e.push({child:this.getCellForJson(x[g]),insert:!0}),delete x[g]}}};
EditorUi.prototype.patchCell=function(b,d,f,c){if(null!=d&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(d,f.value):null!=f.xmlValue&&b.setValue(d,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(d,f.style);null!=f.visible&&b.setVisible(d,1==f.visible);null!=f.collapsed&&b.setCollapsed(d,1==f.collapsed);null!=f.vertex&&(d.vertex=1==f.vertex);null!=f.edge&&(d.edge=1==f.edge);null!=f.connectable&&(d.connectable=
1==f.connectable);null!=f.geometry&&b.setGeometry(d,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(d,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(d,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(d[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var d=null;null!=b&&(d=mxUtils.getXml(b));return d};
EditorUi.prototype.getNodeForPages=function(b){var d=null;if(null!=this.fileNode&&null!=b){d=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);d.appendChild(l)}}return d};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
@@ -12251,8 +12251,8 @@ DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=
mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))};
DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var d=this.fileChanged(mxUtils.bind(this,function(f){this.updateStatus()}),mxUtils.bind(this,function(f){this.file.handleFileError(f)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=d}),!0)};
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var d=this.clientId+"."+this.syncChangeCounter++;d={a:"change",c:b,id:d,t:Date.now()};d=encodeURIComponent(this.objectToString(this.createMessage(d)));var f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(d):"1"==urlParams.dev&&(0==this.maxSyncMessageSize||d.length<this.maxSyncMessageSize)?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+d):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
-"changes",b,d.length,"bytes",f?"(skipped)":"")}};
+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var d=this.clientId+"."+this.syncChangeCounter++,f=this.createMessage({a:"change",c:b,id:d,t:Date.now()});d=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(f):"1"==urlParams.dev?(f=encodeURIComponent(this.objectToString(f)),0==this.maxSyncMessageSize||f.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+f):d=!0):d=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+"changes",b,d?"(skipped)":"")}};
DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(l,m){return l.id<m.id?-1:l.id>m.id?1:0});for(var d=null,f=0;f<this.receivedData.length;f++){var c=JSON.stringify(this.receivedData[f].c);c!=d&&this.doReceiveRemoteChanges(this.receivedData[f].c);
d=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),this.cleanupDelay))};
DrawioFileSync.prototype.cleanup=function(b,d,f){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var c=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",c,"checkFile",f);f?this.file.getLatestVersion(mxUtils.bind(this,function(l){try{if(this.isValidState()&&
@@ -12266,14 +12266,14 @@ b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isR
DrawioFileSync.prototype.merge=function(b,d,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var x=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var z=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(z,this.ui.pages):null;var C=this.file.isRealtime()?this.ui.diffPages(z,this.file.ownPages):null;z=this.ui.applyPatches(z,b);var e=null==d?null:this.ui.getHashValueForPages(z);
this.file.setShadowPages(z);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",d,"current",e,"valid",d==e,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",x,"etag",this.file.getDescriptorEtag(f));if(null!=d&&d!=e){var g=this.ui.hashValue(x),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+d+"\nCurrent: "+e,x,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(z)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(x),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,p)}}catch(A){}}};
+null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(x),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,p)}}catch(A){}}};
DrawioFileSync.prototype.fileChanged=function(b,d,f,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=f&&f()||(this.isValidState()?this.catchup(m,b,d,f):null!=d&&d())}),d):null!=d&&d())}),c?this.cacheReadyDelay:0);return this.notifyThread=l};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,d,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=d&&d(!0);else if(this.isValidState()){var x=this.file.getDescriptorSecret(b);if(null==x||"1"==urlParams.lockdown)this.reload(d,f,c);else{var z=0,C=!1,e=mxUtils.bind(this,function(){if(null==
c||!c())if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(d,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(k);if(g&&
-(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){var q=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",z,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var A=JSON.parse(n.getText());if(null!=A&&0<A.length)for(var E=0;E<A.length;E++){var y=this.stringToObject(A[E]);if(y.v>DrawioFileSync.PROTOCOL){C=!0;p=[];break}else if(y.v===
-DrawioFileSync.PROTOCOL&&null!=y.d)q=y.d.checksum,p.push(y.d.patch);else{C=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",C,"temp",p,"checksum",q)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,q,b,d,f,c)):z<=this.maxCacheReadyRetries-1&&!C&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(z++,this.file.stats.cacheMiss++,window.setTimeout(e,(z+1)*this.cacheReadyDelay)):
+(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){var t=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",z,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var A=JSON.parse(n.getText());if(null!=A&&0<A.length)for(var E=0;E<A.length;E++){var y=this.stringToObject(A[E]);if(y.v>DrawioFileSync.PROTOCOL){C=!0;p=[];break}else if(y.v===
+DrawioFileSync.PROTOCOL&&null!=y.d)t=y.d.checksum,p.push(y.d.patch);else{C=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",C,"temp",p,"checksum",t)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,t,b,d,f,c)):z<=this.maxCacheReadyRetries-1&&!C&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(z++,this.file.stats.cacheMiss++,window.setTimeout(e,(z+1)*this.cacheReadyDelay)):
(this.file.stats.cacheFail++,this.reload(d,f,c))}catch(B){null!=f&&f(B)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(e,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,d,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(l){null!=d&&d(l)}),f,c)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
@@ -12281,11 +12281,11 @@ DrawioFileSync.prototype.createToken=function(b,d,f){var c=!0,l=window.setTimeou
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
DrawioFileSync.prototype.fileSaved=function(b,d,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),x=this.file.getDescriptorSecret(this.file.getDescriptor()),z=this.file.getDescriptorRevisionId(d),C=this.file.getCurrentRevisionId();if(null==
x||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",z,"to",C,"etag",this.file.getCurrentEtag());else{var e=this.ui.diffPages(this.file.getShadowPages(),b);d=this.file.getDescriptorSecret(d);var g=this.ui.getHashValueForPages(b),k=this.objectToString(this.createMessage({patch:e,checksum:g}));this.file.stats.bytesSent+=k.length;
-this.file.stats.msgSent++;var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(C)+"&msg="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l):
-""),mxUtils.bind(this,function(p){window.clearTimeout(q);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",e,k.length,"bytes","from",z,"to",C,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+this.file.stats.msgSent++;var n=!0,t=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(C)+"&msg="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l):
+""),mxUtils.bind(this,function(p){window.clearTimeout(t);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",e,k.length,"bytes","from",z,"to",C,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,d,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,d,f):this.fileChanged(d,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
-DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
+DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),d={a:"leave"};null!=b&&(d.name=encodeURIComponent(b.displayName),d.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(d))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
@@ -12294,7 +12294,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,d,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,d,f,c,l,m){};mxAsyncCanvas.prototype.ellipse=function(b,d,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
mxAsyncCanvas.prototype.image=function(b,d,f,c,l,m,x,z){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,d,f,c,l,m,x,z,C,e,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==C&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(q){this.htmlCanvas.subCanvas[n]=q;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.text=function(b,d,f,c,l,m,x,z,C,e,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==C&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(t){this.htmlCanvas.subCanvas[n]=t;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(d,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,d){this.state.dx+=b;this.state.dy+=d;this.ctx.translate(b,d)};
@@ -12323,8 +12323,8 @@ f.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioCl
DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.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(b){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 f=0;f<d.items.length;f++)if("anyoneWithLink"===d.items[f].id||"anyone"===d.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,d,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,d,f,c,l)}),f,c,l])};
-DriveFile.prototype.saveFile=function(b,d,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(x,z){var C=mxUtils.bind(this,function(e,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,q){try{this.savingFile=!1,0!=n?(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=n,null!=z?this.fileSaved(q,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,z):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,q){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(q,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+DriveFile.prototype.saveFile=function(b,d,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(x,z){var C=mxUtils.bind(this,function(e,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,t){try{this.savingFile=!1,0!=n?(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=n,null!=z?this.fileSaved(t,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,z):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,t){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(t,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
function(){this.updateFileData();this.setShadowModified(!1);C(e,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),l,l,e,null,x)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});C(m,d)}))):null!=f&&f()}catch(x){if(null!=c)c(x);else throw x;}};
DriveFile.prototype.copyFile=function(b,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,b,d)}catch(f){d(f)}}),d,!0)};
DriveFile.prototype.makeCopy=function(b,d,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(b,d,f){this.ui.drive.copyFile(this.getId(),b,d,f)};
@@ -12349,10 +12349,10 @@ null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedir
function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=l&&f.push(c[m].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,x){this.authorize(!1,mxUtils.bind(this,function(){null!=x&&x();f()}),mxUtils.bind(this,function(z){var C=null!=z.message?z.message:mxResources.get("cannotLogin");null!=z&&null!=z.error&&403==z.error.code&&null!=z.error.data&&0<z.error.data.length&&"domainPolicy"==z.error.data[0].reason&&(C=z.error.message);this.logout();this.ui.showError(mxResources.get("error"),
C,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,x=null,z=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var C=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=x&&window.clearTimeout(x);x=window.setTimeout(mxUtils.bind(this,
-function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})}),this.ui.timeout);var e=null,g=!1;"string"===typeof f.params?e=f.params:null!=f.params&&(e=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,e,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(q,p){if(null!=f.headers)for(var A in f.headers)q.setRequestHeader(A,f.headers[A]);else null!=f.contentType?
-q.setRequestHeader("Content-Type",f.contentType):g&&q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(q){try{if(window.clearTimeout(x),m){try{var p=JSON.parse(q.getText())}catch(y){p=null}if(200<=q.getStatus()&&299>=q.getStatus())null!=c&&c(p);else{var A=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,E=null!=A&&0<A.length?A[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&&
+function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})}),this.ui.timeout);var e=null,g=!1;"string"===typeof f.params?e=f.params:null!=f.params&&(e=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,e,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(t,p){if(null!=f.headers)for(var A in f.headers)t.setRequestHeader(A,f.headers[A]);else null!=f.contentType?
+t.setRequestHeader("Content-Type",f.contentType):g&&t.setRequestHeader("Content-Type","application/json");t.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(t){try{if(window.clearTimeout(x),m){try{var p=JSON.parse(t.getText())}catch(y){p=null}if(200<=t.getStatus()&&299>=t.getStatus())null!=c&&c(p);else{var A=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,E=null!=A&&0<A.length?A[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&&
(403!=p.error.code||"domainPolicy"!=E&&"The requested mime type change is forbidden."!=p.error.message)?null!=p&&null!=p.error&&(401==p.error.code||403==p.error.code&&"rateLimitExceeded"!=E)?403==p.error.code&&this.retryAuth||401==p.error.code&&this.retryAuth&&"authError"==E?(null!=l&&l(p),this.retryAuth=!1):(this.retryAuth=!0,this.execute(C)):null!=p&&null!=p.error&&412!=p.error.code&&404!=p.error.code&&400!=p.error.code&&this.currentRequest==f&&z<this.maxRetries?(z++,this.requestThread=window.setTimeout(C,
-Math.round(Math.pow(2,z)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(y){if(null!=l)l(y);else throw y;}}))}catch(q){if(null!=l)l(q);else throw q;}});null!=b&&this.authCalled?C():this.execute(C)}catch(e){if(null!=l)l(e);else throw e;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+Math.round(Math.pow(2,z)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(y){if(null!=l)l(y);else throw y;}}))}catch(t){if(null!=l)l(t);else throw t;}});null!=b&&this.authCalled?C():this.execute(C)}catch(e){if(null!=l)l(e);else throw e;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(f,c,l,m,x){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(z){this.updateAuthInfo(z,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()?this.authorizeStep2(z.getText(),f,c,l,m,x):null!=l&&l(z)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,x){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var z=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var C=JSON.parse(z);this.setPersistentToken(C,!c);null!=m&&m()}),x)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,x,z){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var C=
JSON.parse(this.getPersistentToken(!0));C&&null!=C.current&&(this.userId=C.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),this.updateAuthInfo(g,!0,!1,l,m)):(0!=g.getStatus()&&this.logout(),null!=m&&m(g))}),m);else{var e=
@@ -12366,24 +12366,24 @@ l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=functi
""))+"&orderBy=modifiedDate desc,title"},m,x)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,x){m=null!=m?m:!1;x=null!=x?x:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(z){z.title=z.originalFilename;z.headRevisionId=z.id;z.id=f;this.getXmlFile(z,
c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(z){try{if(null!=this.user){var C=/\.png$/i.test(z.title);/\.v(dx|sdx?)$/i.test(z.title)||/\.gliffy$/i.test(z.title)||!this.ui.useCanvasForExport&&C?this.ui.convertFile(z.downloadUrl,z.title,z.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||x||z.mimeType==this.libraryMimeType||z.mimeType==this.xmlMimeType?this.getXmlFile(z,c,l,!0,x):this.getXmlFile(z,c,l)}else l({message:mxResources.get("loggedOut")})}catch(e){if(null!=l)l(e);
else throw e;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,x){try{var z={Authorization:"Bearer "+b},C=f.downloadUrl;if(null==C)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var e=0,g=mxUtils.bind(this,function(){this.ui.editor.loadUrl(C,mxUtils.bind(this,function(k){try{if(null==k)l({message:mxResources.get("invalidOrMissingFile")});
-else if(f.mimeType==this.libraryMimeType||x)f.mimeType!=this.libraryMimeType||x?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var q=k.lastIndexOf(",");if(0<q){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(q+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),E=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==E||0<E.getElementsByTagName("parsererror").length?
+else if(f.mimeType==this.libraryMimeType||x)f.mimeType!=this.libraryMimeType||x?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var t=k.lastIndexOf(",");if(0<t){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(t+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),E=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==E||0<E.getElementsByTagName("parsererror").length?
n=!0:k=A}catch(y){n=!0}}}else/\.pdf$/i.test(f.title)?(p=Editor.extractGraphModelFromPdf(k),null!=p&&0<p.length&&(n=!0,k=p)):"data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)&&(A=k.substring(22),k=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,C)?this.ui.parseFileData(k,mxUtils.bind(this,function(y){try{4==y.readyState&&(200<=y.status&&299>=y.status?c(new LocalFile(this.ui,y.responseText,f.title+this.extension,
!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=l)l(B);else throw B;}}),f.title):c(n?new LocalFile(this.ui,k,f.title,!0):new DriveFile(this.ui,k,f))}}catch(y){if(null!=l)l(y);else throw y;}}),mxUtils.bind(this,function(k,n){if(e<this.maxRetries&&null!=n&&403==n.getStatus())e++,window.setTimeout(g,2*e*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(k);else throw k;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,z)});g()}}catch(k){if(null!=l)l(k);else throw k;}};DriveClient.prototype.saveFile=function(f,c,l,m,x,z,C,e,g){try{var k=0;f.saveLevel=1;var n=mxUtils.bind(this,function(G){if(null!=m)m(G);else throw G;try{if(!f.isConflict(G)){var I="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(G)||"unknown");null!=G&&null!=G.error&&null!=G.error.code&&(I+="-code_"+G.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:I,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(M){}}),q=mxUtils.bind(this,function(G){n(G);try{EditorUi.logError(G.message,null,null,
+f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:I,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(M){}}),t=mxUtils.bind(this,function(G){n(G);try{EditorUi.logError(G.message,null,null,
G)}catch(I){}});if(f.isEditable()&&null!=f.desc){var p=(new Date).getTime(),A=f.desc.etag,E=f.desc.modifiedDate,y=f.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());z=null!=z?z:!1;var J=null,N=!1,v={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(v.mimeType))v.mimeType=this.xmlMimeType,J=f.desc,N=c=!0;else if("application/octet-stream"==v.mimeType||"1"==urlParams["override-mime"]&&v.mimeType!=this.xmlMimeType)v.mimeType=this.xmlMimeType;
var u=mxUtils.bind(this,function(G,I,M){try{f.saveLevel=3;f.constructor==DriveFile&&(null==e&&(e=[]),null==f.getChannelId()&&e.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&e.push({key:"key",value:Editor.guid(32)}),e.push({key:"secret",value:null!=g?g:Editor.guid(32)}));M||(null!=G||z||(G=this.placeholderThumbnail,I=this.placeholderMimeType),null!=G&&null!=I&&(v.thumbnail={image:G,mimeType:I}));var K=f.getData(),H=mxUtils.bind(this,function(U){try{if(f.saveDelay=(new Date).getTime()-
p,f.saveLevel=11,null==U)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var T=(new Date(U.modifiedDate)).getTime()-(new Date(E)).getTime();if(0>=T||A==U.etag||c&&y==U.headRevisionId){f.saveLevel=12;var V=[];0>=T&&V.push("invalid modified time");A==U.etag&&V.push("stale etag");c&&y==U.headRevisionId&&V.push("stale revision");var W=V.join(", ");n({message:mxResources.get("errorSavingFile")+": "+W},U);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
-null,"from-"+y+"."+E+"-"+this.ui.hashValue(A)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,l(U,K),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+
-J.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){q(t)}}),F=mxUtils.bind(this,function(U,T){f.saveLevel=4;try{null!=e&&(v.properties=e);var V=C||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null,"from-"+y+"."+E+"-"+this.ui.hashValue(A)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(q){}}else if(f.saveLevel=null,l(U,K),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(q){q.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+
+J.headRevisionId,method:"PUT",params:q})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(q){}}}}catch(q){t(q)}}),F=mxUtils.bind(this,function(U,T){f.saveLevel=4;try{null!=e&&(v.properties=e);var V=C||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
null:f.getCurrentEtag(),W=mxUtils.bind(this,function(L){f.saveLevel=5;try{var R=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,Q=null;try{Q=window.setTimeout(mxUtils.bind(this,function(){O=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(f.getId(),v,U,c||L||R,T,L?null:V,N),mxUtils.bind(this,function(S){window.clearTimeout(Q);O&&H(S)}),mxUtils.bind(this,function(S){window.clearTimeout(Q);
-if(O){f.saveLevel=6;try{f.isConflict(S)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var aa=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,aa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",aa)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
+if(O){f.saveLevel=6;try{f.isConflict(S)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var aa=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,aa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",aa)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&X.headRevisionId==y&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,"remote",
-X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(S,X)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){n(S)})):n(S)}catch(X){q(X)}}}))}catch(S){q(S)}}),t=mxUtils.bind(this,function(L){f.saveLevel=9;if(L||null==V)W(L);else{var R=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){R=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Q){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Q){window.clearTimeout(O);
-if(R){f.saveLevel=10;try{null!=Q&&Q.headRevisionId==y?("1"==urlParams.test&&V!=Q.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",Q.etag,"rev",f.desc.headRevisionId,"response",[Q],"file",[f]),V=Q.etag,W(L)):n({error:{code:412}},Q)}catch(S){q(S)}}}),mxUtils.bind(this,function(Q){window.clearTimeout(O);R&&(f.saveLevel=11,n(Q))}))}});if(B&&null==G){f.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var L=this.thumbnailWidth/D.width,R=document.createElement("canvas");
-R.width=this.thumbnailWidth;R.height=Math.floor(D.height*L);R.getContext("2d").drawImage(D,0,0,R.width,R.height);var O=R.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:O,mimeType:"image/png"};t(!1)}catch(Q){try{t(!1)}catch(S){q(S)}}});D.src="data:image/png;base64,"+U}else t(!1)}catch(L){q(L)}});if(B){var P=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){F(U,!0)}),n,this.ui.getCurrentFile()!=f?
-K:null,P.scale,P.border)}else F(K,!1)}catch(U){q(U)}});try{f.saveLevel=2,(z||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=v.mimeType&&"application/vnd.jgraph.mxfile"!=v.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(G){try{var I=null;try{null!=G&&(I=G.toDataURL("image/png")),null!=I&&(I=I.length>this.maxThumbnailSize?null:I.substring(I.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(M){I=null}u(I,"image/png")}catch(M){q(M)}})))&&
-u(null,null,f.constructor!=DriveLibrary)}catch(G){q(G)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(G){q(G)}};DriveClient.prototype.insertFile=function(f,c,l,m,x,z,C){z=null!=z?z:this.xmlMimeType;f={mimeType:z,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,C),mxUtils.bind(this,function(e){z==this.libraryMimeType?m(new DriveLibrary(this.ui,c,e)):0==e?null!=x&&x({message:mxResources.get("errorSavingFile")}):
+X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(S,X)}catch(Y){t(Y)}}),mxUtils.bind(this,function(){n(S)})):n(S)}catch(X){t(X)}}}))}catch(S){t(S)}}),q=mxUtils.bind(this,function(L){f.saveLevel=9;if(L||null==V)W(L);else{var R=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){R=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Q){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Q){window.clearTimeout(O);
+if(R){f.saveLevel=10;try{null!=Q&&Q.headRevisionId==y?("1"==urlParams.test&&V!=Q.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",Q.etag,"rev",f.desc.headRevisionId,"response",[Q],"file",[f]),V=Q.etag,W(L)):n({error:{code:412}},Q)}catch(S){t(S)}}}),mxUtils.bind(this,function(Q){window.clearTimeout(O);R&&(f.saveLevel=11,n(Q))}))}});if(B&&null==G){f.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var L=this.thumbnailWidth/D.width,R=document.createElement("canvas");
+R.width=this.thumbnailWidth;R.height=Math.floor(D.height*L);R.getContext("2d").drawImage(D,0,0,R.width,R.height);var O=R.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:O,mimeType:"image/png"};q(!1)}catch(Q){try{q(!1)}catch(S){t(S)}}});D.src="data:image/png;base64,"+U}else q(!1)}catch(L){t(L)}});if(B){var P=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){F(U,!0)}),n,this.ui.getCurrentFile()!=f?
+K:null,P.scale,P.border)}else F(K,!1)}catch(U){t(U)}});try{f.saveLevel=2,(z||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=v.mimeType&&"application/vnd.jgraph.mxfile"!=v.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(G){try{var I=null;try{null!=G&&(I=G.toDataURL("image/png")),null!=I&&(I=I.length>this.maxThumbnailSize?null:I.substring(I.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(M){I=null}u(I,"image/png")}catch(M){t(M)}})))&&
+u(null,null,f.constructor!=DriveLibrary)}catch(G){t(G)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(G){t(G)}};DriveClient.prototype.insertFile=function(f,c,l,m,x,z,C){z=null!=z?z:this.xmlMimeType;f={mimeType:z,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,C),mxUtils.bind(this,function(e){z==this.libraryMimeType?m(new DriveLibrary(this.ui,c,e)):0==e?null!=x&&x({message:mxResources.get("errorSavingFile")}):
m(new DriveFile(this.ui,c,e))}),x)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,x,z,C){x=null!=x?x:!1;var e={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=z&&(e["If-Match"]=z);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:e,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?x?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");C&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=d.linkPicker;if(null==f||d.linkPickerToken!=b){d.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(d.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=
@@ -12420,7 +12420,7 @@ e=d();e.then(mxUtils.bind(this,function(g){window.clearTimeout(C);z&&null!=f&&f(
function(x){null==this.user?this.updateUser(function(){m(!0)},c,x):l(x)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(d,f,c){this.getFile(d,f,c,!0)};DropboxClient.prototype.getFile=function(d,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(d);if(/^https:\/\//i.test(d)||/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m){var x=mxUtils.bind(this,function(){var z=d.split("/");this.ui.convertFile(d,0<z.length?
z[z.length-1]:d,null,this.extension,f,c)});null!=b?x():this.authenticate(x,c)}else x={path:"/"+d},null!=urlParams.rev&&(x.rev=urlParams.rev),this.readFile(x,mxUtils.bind(this,function(z,C){var e=null;if(0<(m?z.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(z);null!=g&&0<g.length?z=g:e=new LocalFile(this,z,d,!0)}f(null!=e?e:l?new DropboxLibrary(this.ui,z,C):new DropboxFile(this.ui,z,C))}),c,m)};DropboxClient.prototype.readFile=function(d,f,c,l){var m=mxUtils.bind(this,function(z){var C=
!0,e=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+d.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(k){}));g["catch"](function(k){window.clearTimeout(e);C&&null!=k&&409==k.status&&(C=!1,c({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(d);g.then(mxUtils.bind(this,function(k){window.clearTimeout(e);if(C){C=!1;try{var n=new FileReader;n.onload=mxUtils.bind(this,
-function(q){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(q){c(q)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(e);C&&(C=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
+function(t){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(t){c(t)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(e);C&&(C=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
x=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){x(!0)},c,z):m(z)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};DropboxClient.prototype.checkExists=function(d,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+d.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[d]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})};
DropboxClient.prototype.renameFile=function(d,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=d&&null!=f){var m=d.stat.path_display.substring(1),x=m.lastIndexOf("/");0<x&&(f=m.substring(0,x+1)+f)}null!=d&&null!=f&&d.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(z,C,e){z?(z=mxUtils.bind(this,function(g){g=mxUtils.bind(this,function(){return this.client.filesMove({from_path:d.stat.path_display,to_path:"/"+
f,autorename:!1})});this.executePromise(g,c,l)}),C&&e.path_lower.substring(1)!==f.toLowerCase()?(C=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(C,z,l)):z()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(d,f,c,l){this.insertFile(d,f,c,l,!0)};DropboxClient.prototype.insertFile=function(d,f,c,l,m){m=null!=m?m:!1;this.checkExists(d,mxUtils.bind(this,function(x){x?this.saveFile(d,f,mxUtils.bind(this,
@@ -12454,13 +12454,13 @@ function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*d))};OneDriveCl
f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(d,f,c,l,m){c&&this.setUser(null);b=d.access_token;delete d.access_token;d.expiresOn=Date.now()+1E3*d.expires_in;this.tokenExpiresOn=d.expiresOn;d.remember=f;this.setPersistentToken(JSON.stringify(d),!f);this.resetTokenRefresh(d.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(d,f,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var x=
!0,z=JSON.parse(this.getPersistentToken(!0));null!=z?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(C){200<=C.getStatus()&&299>=C.getStatus()?this.updateAuthInfo(JSON.parse(C.getText()),z.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=C.getStatus()&&400!=C.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
!0,mxUtils.bind(this,function(C,e){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(C?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d);g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
-Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(x){window.onOneDriveCallback=null;x=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=e&&e(),this.updateAuthInfo(k,C,!0,f,c))}catch(q){c(q)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){x&&(window.onOneDriveCallback=null,x=!1,c({message:mxResources.get("accessDenied"),
+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(x){window.onOneDriveCallback=null;x=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=e&&e(),this.updateAuthInfo(k,C,!0,f,c))}catch(t){c(t)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){x&&(window.onOneDriveCallback=null,x=!1,c({message:mxResources.get("accessDenied"),
retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(d,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint,
this.setPersistentToken(JSON.stringify(m),!m.remember));d();return}}catch(x){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(d,f,c){var l=mxUtils.bind(this,function(m){var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(d,mxUtils.bind(this,function(C){window.clearTimeout(z);x&&(200<=C.getStatus()&&299>=C.getStatus()||404==C.getStatus()?(null==
this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(C)):m||401!==C.getStatus()&&400!==C.getStatus()?c(this.parseRequestText(C)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(C){window.clearTimeout(z);x&&c(C)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(d,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(d,null!=f?f:this.emptyFn):
d()};OneDriveClient.prototype.getItemRef=function(d){var f=d.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:d}};OneDriveClient.prototype.getItemURL=function(d,f){var c=d.split("/");return 1<c.length?(d=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==d?"/root":"/items/"+d)):(f?"":this.baseUrl)+"/me/drive/items/"+d};OneDriveClient.prototype.getLibrary=function(d,f,c){this.getFile(d,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(d){var f=d.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
0<f&&(d=d.substring(0,f));return d};OneDriveClient.prototype.getFile=function(d,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(d),mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus()){var z=JSON.parse(x.getText()),C=/\.png$/i.test(z.name);if(/\.v(dx|sdx?)$/i.test(z.name)||/\.gliffy$/i.test(z.name)||/\.pdf$/i.test(z.name)||!this.ui.useCanvasForExport&&C)this.ui.convertFile(z["@microsoft.graph.downloadUrl"],z.name,null!=z.file?z.file.mimeType:null,this.extension,f,c);
-else{var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(z["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),e){/\.html$/i.test(z.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(C?k.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(k);null!=q&&0<q.length?k=q:n=new LocalFile(this.ui,k,z.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p=
+else{var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(z["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),e){/\.html$/i.test(z.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(C?k.lastIndexOf(","):-1)){var t=this.ui.extractGraphModelFromPng(k);null!=t&&0<t.length?k=t:n=new LocalFile(this.ui,k,z.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p=
k.substring(22);k=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,z["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(k,mxUtils.bind(this,function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?f(new LocalFile(this.ui,A.responseText,z.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=c)c(E);else throw E;}}),z.name):null!=n?f(n):m?f(new OneDriveLibrary(this.ui,
k,z)):f(new OneDriveFile(this.ui,k,z))}}catch(A){if(null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(k){window.clearTimeout(g);e&&c(this.parseRequestText(k))}),C||null!=z.file&&null!=z.file.mimeType&&("image/"==z.file.mimeType.substring(0,6)&&"image/svg"!=z.file.mimeType.substring(0,9)||"application/pdf"==z.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(x))}),c)};OneDriveClient.prototype.renameFile=
function(d,f,c,l){null!=d&&null!=f&&(this.isValidFilename(f)?this.checkExists(d.getParentId(),f,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(d.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(d,f,c,l){f=this.getItemRef(f);var m=this.getItemRef(d);f.driveId!=m.driveId?l({message:mxResources.get("cannotMoveOneDrive",
@@ -12468,12 +12468,12 @@ null,"Moving a file between accounts is not supported yet.")}):this.writeFile(th
c(new OneDriveLibrary(this.ui,f,e)):c(new OneDriveFile(this.ui,f,e))});z=this.baseUrl+z+"/children/"+encodeURIComponent(d)+"/content";4E6<=f.length?this.writeFile(z,"","PUT",null,mxUtils.bind(this,function(e){this.writeLargeFile(this.getItemURL(e.id),f,C,l)}),l):this.writeFile(z,f,"PUT",null,C,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(d,f,
c,l){var m="/me/drive/root";null!=d&&(m=this.getItemURL(d,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(x){404==x.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(x){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(d,
f,c,l){try{var m=d.getData(),x=mxUtils.bind(this,function(C){var e=mxUtils.bind(this,function(k){f(k,m)}),g=this.getItemURL(d.getId());4E6<=C.length?this.writeLargeFile(g,C,e,c,l):this.writeFile(g+"/content/",C,"PUT",null,e,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d.meta.name)){var z=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){x(this.ui.base64ToBlob(C,"image/png"))}),c,this.ui.getCurrentFile()!=d?m:null,z.scale,z.border)}else x(m)}catch(C){c(C)}};
-OneDriveClient.prototype.writeLargeFile=function(d,f,c,l,m){try{if(null!=f){var x=mxUtils.bind(this,function(C,e,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var q=f.substr(e,4194304),p=new mxXmlRequest(C,q,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(A,E){A.setRequestHeader("Content-Length",q.length);A.setRequestHeader("Content-Range","bytes "+e+"-"+(e+q.length-1)+"/"+f.length)});p.send(mxUtils.bind(this,
-function(A){window.clearTimeout(n);if(k){var E=A.getStatus();200<=E&&299>=E?(E=e+q.length,E==f.length?c(JSON.parse(A.getText())):x(C,E,g)):500<=E&&599>=E&&2>g?(g++,x(C,e,g)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(n);k&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),z=mxUtils.bind(this,function(C){try{var e=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){e=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(d+
-"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,q){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);e&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),x(n.uploadUrl,0)):C||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){z(!0)},l,C))}),mxUtils.bind(this,function(n){window.clearTimeout(g);
-e&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){z(!0)},l):z(!1)}else l({message:mxResources.get("unknownError")})}catch(C){l(C)}};OneDriveClient.prototype.writeFile=function(d,f,c,l,m,x,z){try{if(null!=d&&null!=f){var C=mxUtils.bind(this,function(e){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;x({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var n=new mxXmlRequest(d,f,c);n.setRequestHeaders=
-mxUtils.bind(this,function(q,p){q.setRequestHeader("Content-Type",l||" ");q.setRequestHeader("Authorization","Bearer "+b);null!=z&&q.setRequestHeader("If-Match",z)});n.send(mxUtils.bind(this,function(q){window.clearTimeout(k);g&&(200<=q.getStatus()&&299>=q.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(q.getText()))):e||401!==q.getStatus()?x(this.parseRequestText(q),q):this.authenticate(function(){C(!0)},x,e))}),mxUtils.bind(this,function(q){window.clearTimeout(k);
-g&&x(this.parseRequestText(q))}))}catch(q){x(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){C(!0)},x):C(!1)}else x({message:mxResources.get("unknownError")})}catch(e){x(e)}};OneDriveClient.prototype.parseRequestText=function(d){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(d.getText()),f.status=d.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(d){this.pickFile(function(f){d(f)})};
+OneDriveClient.prototype.writeLargeFile=function(d,f,c,l,m){try{if(null!=f){var x=mxUtils.bind(this,function(C,e,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var t=f.substr(e,4194304),p=new mxXmlRequest(C,t,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(A,E){A.setRequestHeader("Content-Length",t.length);A.setRequestHeader("Content-Range","bytes "+e+"-"+(e+t.length-1)+"/"+f.length)});p.send(mxUtils.bind(this,
+function(A){window.clearTimeout(n);if(k){var E=A.getStatus();200<=E&&299>=E?(E=e+t.length,E==f.length?c(JSON.parse(A.getText())):x(C,E,g)):500<=E&&599>=E&&2>g?(g++,x(C,e,g)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(n);k&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),z=mxUtils.bind(this,function(C){try{var e=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){e=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(d+
+"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,t){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);e&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),x(n.uploadUrl,0)):C||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){z(!0)},l,C))}),mxUtils.bind(this,function(n){window.clearTimeout(g);
+e&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){z(!0)},l):z(!1)}else l({message:mxResources.get("unknownError")})}catch(C){l(C)}};OneDriveClient.prototype.writeFile=function(d,f,c,l,m,x,z){try{if(null!=d&&null!=f){var C=mxUtils.bind(this,function(e){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;x({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(t){}var n=new mxXmlRequest(d,f,c);n.setRequestHeaders=
+mxUtils.bind(this,function(t,p){t.setRequestHeader("Content-Type",l||" ");t.setRequestHeader("Authorization","Bearer "+b);null!=z&&t.setRequestHeader("If-Match",z)});n.send(mxUtils.bind(this,function(t){window.clearTimeout(k);g&&(200<=t.getStatus()&&299>=t.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(t.getText()))):e||401!==t.getStatus()?x(this.parseRequestText(t),t):this.authenticate(function(){C(!0)},x,e))}),mxUtils.bind(this,function(t){window.clearTimeout(k);
+g&&x(this.parseRequestText(t))}))}catch(t){x(t)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){C(!0)},x):C(!1)}else x({message:mxResources.get("unknownError")})}catch(e){x(e)}};OneDriveClient.prototype.parseRequestText=function(d){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(d.getText()),f.status=d.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(d){this.pickFile(function(f){d(f)})};
OneDriveClient.prototype.createInlinePicker=function(d,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var x=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var z=l.getSelectedItem();if(null!=z)if(f&&"object"==typeof z.folder)d({value:[z]});else{if(!z.folder){var C=OneDriveFile.prototype.getIdOf(z);this.executeRequest(this.getItemURL(C),mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()&&(e=JSON.parse(e.getText()),
d(C,{value:[e]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(x.container,550,500,!0,!0);m.style.width=x.container.parentNode.style.width;m.style.height=parseInt(x.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(z,C,e,g){this.executeRequest(g?z:this.baseUrl+z,function(k){C(JSON.parse(k.getText()))},e)}),mxUtils.bind(this,function(z,C,e,g){this.executeRequest(this.baseUrl+
"/drives/"+C+"/items/"+z,function(k){e(JSON.parse(k.getText()))},g)}),null,null,function(z){f?d({value:[z]}):d(OneDriveFile.prototype.getIdOf(z))},mxUtils.bind(this,function(z){this.ui.showError(mxResources.get("error"),z)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(d,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var x=this.inlinePicker?this.createInlinePicker(d,!0):mxUtils.bind(this,
@@ -12495,29 +12495,29 @@ null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getSt
x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,z){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"ghauth")?window.onGitHubCallback=
mxUtils.bind(this,function(C,e){m?(window.onGitHubCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=z&&z(),b=C.access_token,this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=e&&e.close())):null!=e&&e.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
function(d,f){try{var c=JSON.parse(d.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(d,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),d,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?
-"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(d,f,c,l,m){var x=mxUtils.bind(this,function(C){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,retry:z})}),this.ui.timeout),k=this.authToken+" "+b;d.setRequestHeaders=function(n,q){n.setRequestHeader("Authorization",k)};d.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n=
-mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();z()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(e)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())f(d);else if(401===d.getStatus())C?c({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){z(!0)},c)})}):this.authenticate(function(){x(!0)},c);else if(403===d.getStatus()){var q=
-!1;try{var p=JSON.parse(d.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(q="too_large"==p.errors[0].code),c({message:mxResources.get(q?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(q?"drawingTooLarge":"forbidden")})}}else 404===d.getStatus()?m?c({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):n():409===d.getStatus()?c({code:d.getStatus(),status:409}):c({code:d.getStatus(),
+"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(d,f,c,l,m){var x=mxUtils.bind(this,function(C){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,retry:z})}),this.ui.timeout),k=this.authToken+" "+b;d.setRequestHeaders=function(n,t){n.setRequestHeader("Authorization",k)};d.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n=
+mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();z()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(e)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())f(d);else if(401===d.getStatus())C?c({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){z(!0)},c)})}):this.authenticate(function(){x(!0)},c);else if(403===d.getStatus()){var t=
+!1;try{var p=JSON.parse(d.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(t="too_large"==p.errors[0].code),c({message:mxResources.get(t?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(t?"drawingTooLarge":"forbidden")})}}else 404===d.getStatus()?m?c({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):n():409===d.getStatus()?c({code:d.getStatus(),status:409}):c({code:d.getStatus(),
message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(n){window.clearTimeout(g);e&&c(n)}))}),z=mxUtils.bind(this,function(C){null==this.user?this.updateUser(function(){z(!0)},c,C):x(C)});null==b?this.authenticate(function(){z(!0)},c):z(!1)};GitHubClient.prototype.getLibrary=function(d,f,c){this.getFile(d,f,c,!0)};GitHubClient.prototype.getSha=function(d,f,c,l,m,x,z){var C="&t="+(new Date).getTime();d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+
f+"/contents/"+c+"?ref="+l+C,null,"HEAD");this.executeRequest(d,mxUtils.bind(this,function(e){try{m(e.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){x(g)}}),x,null,z)};GitHubClient.prototype.getFile=function(d,f,c,l,m){l=null!=l?l:!1;var x=d.split("/"),z=x[0],C=x[1],e=x[2];d=x.slice(3,x.length).join("/");x=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&x))if(null!=b){m=this.baseUrl+"/repos/"+z+"/"+C+"/contents/"+
d+"?ref="+e;var g={Authorization:"token "+b};x=d.split("/");this.ui.convertFile(m,0<x.length?x[x.length-1]:d,null,this.extension,f,c,null,g)}else c({message:mxResources.get("accessDenied")});else x="&t="+(new Date).getTime(),d=new mxXmlRequest(this.baseUrl+"/repos/"+z+"/"+C+"/contents/"+d+"?ref="+e+x,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(k){try{f(this.createGitHubFile(z,C,e,JSON.parse(k.getText()),l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(d,f,
c,l,m){d={org:d,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return m?new GitHubLibrary(this.ui,f,d):new GitHubFile(this.ui,f,d)};GitHubClient.prototype.insertLibrary=function(d,
-f,c,l,m){this.insertFile(d,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(d,f,c,l,m,x,z){m=null!=m?m:!1;x=x.split("/");var C=x[0],e=x[1],g=x[2],k=x.slice(3,x.length).join("/");0<k.length&&(k+="/");k+=d;this.checkExists(C+"/"+e+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,q){n?m?(z||(f=Base64.encode(f)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(p){this.writeFile(C,e,g,k,p,f,q,mxUtils.bind(this,function(A){try{var E=JSON.parse(A.getText());c(this.createGitHubFile(C,e,g,E.content,
-m))}catch(y){l(y)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:C,repo:e,ref:g,name:d,path:k,sha:q,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(d,f,c,l){var m=this.ui.spinner.pause();d=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[d]),mxResources.get("ok"),mxUtils.bind(this,function(x){m();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(d.container,400,80,!0,!1);d.init()};GitHubClient.prototype.writeFile=
+f,c,l,m){this.insertFile(d,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(d,f,c,l,m,x,z){m=null!=m?m:!1;x=x.split("/");var C=x[0],e=x[1],g=x[2],k=x.slice(3,x.length).join("/");0<k.length&&(k+="/");k+=d;this.checkExists(C+"/"+e+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,t){n?m?(z||(f=Base64.encode(f)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(p){this.writeFile(C,e,g,k,p,f,t,mxUtils.bind(this,function(A){try{var E=JSON.parse(A.getText());c(this.createGitHubFile(C,e,g,E.content,
+m))}catch(y){l(y)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:C,repo:e,ref:g,name:d,path:k,sha:t,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(d,f,c,l){var m=this.ui.spinner.pause();d=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[d]),mxResources.get("ok"),mxUtils.bind(this,function(x){m();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(d.container,400,80,!0,!1);d.init()};GitHubClient.prototype.writeFile=
function(d,f,c,l,m,x,z,C,e){x.length>=this.maxFileSize?e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:x},null!=z&&(c.sha=z),d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(d,mxUtils.bind(this,function(g){C(g)}),mxUtils.bind(this,function(g){404==g.code&&(g.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
g.code=null);e(g)})))};GitHubClient.prototype.checkExists=function(d,f,c){var l=d.split("/"),m=l[0],x=l[1],z=l[2];d=l.slice(3,l.length).join("/");this.getSha(m,x,d,z,mxUtils.bind(this,function(C){if(f){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){e();c(!0,C)},function(){e();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(C){c(!0)}),
-!0)};GitHubClient.prototype.saveFile=function(d,f,c,l,m){var x=d.meta.org,z=d.meta.repo,C=d.meta.ref,e=d.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(x,z,C,e,m,q,n,mxUtils.bind(this,function(p){delete d.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(d.meta.sha,
-q)}),c,this.ui.getCurrentFile()!=d?d.getData():null,n.scale,n.border)}else g(d.meta.sha,Base64.encode(d.getData()))});l?this.getSha(x,z,e,C,mxUtils.bind(this,function(n){d.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(d){this.pickFile(d)};GitHubClient.prototype.pickFolder=function(d){this.showGitHubDialog(!1,d)};GitHubClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,d)};GitHubClient.prototype.showGitHubDialog=
+!0)};GitHubClient.prototype.saveFile=function(d,f,c,l,m){var x=d.meta.org,z=d.meta.repo,C=d.meta.ref,e=d.meta.path,g=mxUtils.bind(this,function(n,t){this.writeFile(x,z,C,e,m,t,n,mxUtils.bind(this,function(p){delete d.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){g(d.meta.sha,
+t)}),c,this.ui.getCurrentFile()!=d?d.getData():null,n.scale,n.border)}else g(d.meta.sha,Base64.encode(d.getData()))});l?this.getSha(x,z,e,C,mxUtils.bind(this,function(n){d.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(d){this.pickFile(d)};GitHubClient.prototype.pickFolder=function(d){this.showGitHubDialog(!1,d)};GitHubClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,d)};GitHubClient.prototype.showGitHubDialog=
function(d,f){var c=null,l=null,m=null,x=null,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="hidden";z.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);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";z.appendChild(e);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,z,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
function(){J()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(k.container,420,370,!0,!0);d&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(N,v,u,G){var I=document.createElement("a");I.setAttribute("title",N);I.style.cursor="pointer";mxUtils.write(I,N);mxEvent.addListener(I,"click",v);
-G&&(I.style.textDecoration="underline");null!=u&&(N=g.cloneNode(),N.style.padding=u,N.appendChild(I),I=N);return I}),q=mxUtils.bind(this,function(N){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=null;J()}),null,!0));N||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(N=0;N<u.length;N++)(function(G){mxUtils.write(v,
+G&&(I.style.textDecoration="underline");null!=u&&(N=g.cloneNode(),N.style.padding=u,N.appendChild(I),I=N);return I}),t=mxUtils.bind(this,function(N){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=null;J()}),null,!0));N||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(N=0;N<u.length;N++)(function(G){mxUtils.write(v,
" / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");y()}),null,!0))})(N)}e.appendChild(v)}),p=mxUtils.bind(this,function(N){this.ui.handleError(N,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null,J()):this.ui.hideDialog()}),null,{})}),A=null,E=null,y=mxUtils.bind(this,function(N){null==N&&(e.innerText="",N=1);var v=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+x+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
-N,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){y(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==N&&(q(),
+N,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){y(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==N&&(t(),
e.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var H=x.split("/");x=H.slice(0,H.length-1).join("/");y()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(e,mxResources.get("noFiles"));else{var M=!0,K=0;G=mxUtils.bind(this,function(H){for(var F=0;F<I.length;F++)mxUtils.bind(this,function(P,U){if(H==("dir"==P.type)){U=g.cloneNode();U.style.backgroundColor=M?Editor.isDarkMode()?"#000000":"#eeeeee":"";M=!M;var T=document.createElement("img");
T.src=IMAGE_PATH+"/"+("dir"==P.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(P.name+("dir"==P.type?"/":""),mxUtils.bind(this,function(){"dir"==P.type?(x=P.path,y()):d&&"file"==P.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+P.path))})));e.appendChild(U);K++}})(I[F],F)});G(!0);d&&G(!1)}}),p,!0)}),B=mxUtils.bind(this,function(N,v){null==N&&(e.innerText="",N=1);var u=
new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+N,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(N+1)});mxEvent.addListener(A,"click",
-G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==N&&(q(!0),e.appendChild(n("../ [Up]",mxUtils.bind(this,function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",y();else{for(var M=0;M<I.length;M++)mxUtils.bind(this,function(K,H){var F=g.cloneNode();F.style.backgroundColor=0==H%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(n(K.name,mxUtils.bind(this,
+G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==N&&(t(!0),e.appendChild(n("../ [Up]",mxUtils.bind(this,function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",y();else{for(var M=0;M<I.length;M++)mxUtils.bind(this,function(K,H){var F=g.cloneNode();F.style.backgroundColor=0==H%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(n(K.name,mxUtils.bind(this,
function(){m=K.name;x="";y()})));e.appendChild(F)})(I[M],M);100==I.length&&(e.appendChild(A),E=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&G()},mxEvent.addListener(e,"scroll",E))}}),p)}),J=mxUtils.bind(this,function(N){null==N&&(e.innerText="",N=1);var v=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+N,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=E&&mxEvent.removeListener(e,"scroll",E);null!=A&&null!=
A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){J(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(e,mxResources.get("noFiles"));else{1==N&&(e.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var M=
new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(K){if(null!=K){var H=K.split("/");if(1<H.length){K=H[0];var F=H[1];3>H.length?(c=K,l=F,x=m=null,B()):this.ui.spinner.spin(e,mxResources.get("loading"))&&(H=encodeURIComponent(H.slice(2,H.length).join("/")),this.getFile(K+"/"+F+"/"+H,mxUtils.bind(this,function(P){this.ui.spinner.stop();c=P.meta.org;l=P.meta.repo;m=decodeURIComponent(P.meta.ref);x="";y()}),mxUtils.bind(this,function(P){this.ui.spinner.stop();
@@ -12528,8 +12528,8 @@ TrelloFile.prototype.saveFile=function(b,d,f,c){this.isEditable()?this.savingFil
function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,d,f){TrelloFile.call(this,b,d,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,d,f){this.saveFile(b,!1,d,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(b,d,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=l&&l();b()},error:function(){null!=l&&l();null!=d&&d(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,d,f){this.getFile(b,d,f,!1,!0)};
TrelloClient.prototype.getFile=function(b,d,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var x=b.split(this.SEPARATOR),z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(x[0]+"/attachments/"+x[1],mxUtils.bind(this,function(e){window.clearTimeout(C);if(z){var g=/\.png$/i.test(e.name),k={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(e.name)||
-/\.gliffy$/i.test(e.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(e.url),e.name,e.mimeType,this.extension,d,f,null,k):(z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(e.url),mxUtils.bind(this,function(n){window.clearTimeout(C);if(z){e.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(n);null!=q&&0<q.length&&
-(n=q)}l?d(new TrelloLibrary(this.ui,n,e)):d(new TrelloFile(this.ui,n,e))}}),mxUtils.bind(this,function(n,q){window.clearTimeout(C);z&&(401==q.status?this.authenticate(m,f,!0):f())}),g||null!=e.mimeType&&"image/"==e.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(e){window.clearTimeout(C);z&&(null!=e&&401==e.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,d,f,c,l){this.insertFile(b,d,f,c,!0,l)};
+/\.gliffy$/i.test(e.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(e.url),e.name,e.mimeType,this.extension,d,f,null,k):(z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(e.url),mxUtils.bind(this,function(n){window.clearTimeout(C);if(z){e.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var t=this.ui.extractGraphModelFromPng(n);null!=t&&0<t.length&&
+(n=t)}l?d(new TrelloLibrary(this.ui,n,e)):d(new TrelloFile(this.ui,n,e))}}),mxUtils.bind(this,function(n,t){window.clearTimeout(C);z&&(401==t.status?this.authenticate(m,f,!0):f())}),g||null!=e.mimeType&&"image/"==e.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(e){window.clearTimeout(C);z&&(null!=e&&401==e.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,d,f,c,l){this.insertFile(b,d,f,c,!0,l)};
TrelloClient.prototype.insertFile=function(b,d,f,c,l,m){l=null!=l?l:!1;var x=mxUtils.bind(this,function(){var z=mxUtils.bind(this,function(C){this.writeFile(b,C,m,mxUtils.bind(this,function(e){l?f(new TrelloLibrary(this.ui,d,e)):f(new TrelloFile(this.ui,d,e))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){z(this.ui.base64ToBlob(C,"image/png"))}),c,d):z(d)});this.authenticate(x,c)};
TrelloClient.prototype.saveFile=function(b,d,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(x){this.writeFile(b.meta.name,x,c[0],function(z){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){d(z)}),mxUtils.bind(this,function(C){null!=C&&401==C.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(this.ui.base64ToBlob(x,
"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(m,f)};
@@ -12539,10 +12539,10 @@ TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(thi
TrelloClient.prototype.showTrelloDialog=function(b,d){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var x=document.createElement("h3");mxUtils.write(x,b?mxResources.get("selectFile"):mxResources.get("selectCard"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(x);var z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="auto";z.style.height=
"194px";m.appendChild(z);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var C=mxUtils.bind(this,function(p,A,E){l++;var y=document.createElement("div");y.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var B=document.createElement("a");B.style.cursor="pointer";if(null!=E){var J=document.createElement("img");
J.src=E.url;J.width=E.width;J.height=E.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";B.appendChild(J)}mxUtils.write(B,p);mxEvent.addListener(B,"click",A);y.appendChild(B);return y}),e=mxUtils.bind(this,function(p){this.ui.handleError(p,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),g=mxUtils.bind(this,function(){l=0;z.innerText="";this.ui.spinner.spin(z,mxResources.get("loading"));var p=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();z.appendChild(C("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(z);null==A||0==A.length?mxUtils.write(z,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var E=0;E<A.length;E++)mxUtils.bind(this,function(y){z.appendChild(C(y.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(f+this.SEPARATOR+y.id)}),null!=y.previews?y.previews[0]:null))})(A[E])})()}),mxUtils.bind(this,function(A){401==
-A.status?this.authenticate(p,e,!0):null!=e&&e(A)}))});p()}),k=null,n=null,q=mxUtils.bind(this,function(p){null==p&&(l=0,z.innerText="",p=1);this.ui.spinner.spin(z,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(z,"scroll",n);q(p+1)});mxEvent.addListener(k,"click",A);var E=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(y){this.ui.spinner.stop();y=null!=y?y.cards:null;if(null==y||0==y.length)mxUtils.write(z,mxResources.get("noFiles"));else{1==p&&(z.appendChild(C(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(N){null!=N&&(c=N,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(z));for(var B=0;B<y.length;B++)mxUtils.bind(this,function(J){z.appendChild(C(J.name,mxUtils.bind(this,function(){b?(f=J.id,g()):(this.ui.hideDialog(),d(J.id))})))})(y[B]);100==y.length&&(z.appendChild(k),n=function(){z.scrollTop>=z.scrollHeight-z.offsetHeight&&A()},mxEvent.addListener(z,"scroll",n))}}),mxUtils.bind(this,function(y){401==y.status?this.authenticate(E,e,!0):null!=e&&e({message:y.responseText})}))});E()});q()};
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();z.appendChild(C("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(z);null==A||0==A.length?mxUtils.write(z,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var E=0;E<A.length;E++)mxUtils.bind(this,function(y){z.appendChild(C(y.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(f+this.SEPARATOR+y.id)}),null!=y.previews?y.previews[0]:null))})(A[E])})()}),mxUtils.bind(this,function(A){401==
+A.status?this.authenticate(p,e,!0):null!=e&&e(A)}))});p()}),k=null,n=null,t=mxUtils.bind(this,function(p){null==p&&(l=0,z.innerText="",p=1);this.ui.spinner.spin(z,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(z,"scroll",n);t(p+1)});mxEvent.addListener(k,"click",A);var E=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(y){this.ui.spinner.stop();y=null!=y?y.cards:null;if(null==y||0==y.length)mxUtils.write(z,mxResources.get("noFiles"));else{1==p&&(z.appendChild(C(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(N){null!=N&&(c=N,t())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(z));for(var B=0;B<y.length;B++)mxUtils.bind(this,function(J){z.appendChild(C(J.name,mxUtils.bind(this,function(){b?(f=J.id,g()):(this.ui.hideDialog(),d(J.id))})))})(y[B]);100==y.length&&(z.appendChild(k),n=function(){z.scrollTop>=z.scrollHeight-z.offsetHeight&&A()},mxEvent.addListener(z,"scroll",n))}}),mxUtils.bind(this,function(y){401==y.status?this.authenticate(E,e,!0):null!=e&&e({message:y.responseText})}))});E()});t()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,d,f){GitHubFile.call(this,b,d,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,d){b.last_commit_id=d};GitLabLibrary=function(b,d,f){GitLabFile.call(this,b,d,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,d,f){this.saveFile(b,!1,d,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(d){GitHubClient.call(this,d,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
@@ -12551,54 +12551,54 @@ d),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.ge
encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(C,e){m?(window.onGitLabCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=z&&z(),b=C.access_token,this.setToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=e&&e.close())):null!=e&&e.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(d,f,c,l){var m=mxUtils.bind(this,function(z){var C=!0,e=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),g=this.authToken+" "+b;d.setRequestHeaders=function(k,n){k.setRequestHeader("Authorization",
g);k.setRequestHeader("PRIVATE_TOKEN",g);k.setRequestHeader("Content-Type","application/json")};d.send(mxUtils.bind(this,function(){window.clearTimeout(e);if(C)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())f(d);else if(401===d.getStatus())z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===d.getStatus()){var k=!1;try{var n=JSON.parse(d.getText());null!=n&&
-null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?c({message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):400===d.getStatus()?c({status:400}):c({status:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(e);C&&c(k)}))}),x=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){x(!0)},
+null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(t){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?c({message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):400===d.getStatus()?c({status:400}):c({status:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(e);C&&c(k)}))}),x=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){x(!0)},
c,z):m(z)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};GitLabClient.prototype.getRefIndex=function(d,f,c,l,m,x){if(null!=m)c(d,m);else{var z=d.length-2,C=mxUtils.bind(this,function(){if(2>z)l({message:mxResources.get("fileNotFound")});else{var e=Math.max(z-1,0),g=d.slice(0,e).join("/");e=d[e];var k=d[z],n=d.slice(z+1,d.length).join("/");g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+e)+"/repository/"+(f?x?"branches?per_page=1&page=1&ref="+k:"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+
-"?ref="+k);var q=new mxXmlRequest(g,null,"HEAD");this.executeRequest(q,mxUtils.bind(this,function(){200==q.getStatus()?c(d,z):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==q.getStatus()?(z--,C()):l({message:mxResources.get("fileNotFound")})}))}});C()}};GitLabClient.prototype.getFile=function(d,f,c,l,m,x){l=null!=l?l:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(z,C){var e=Math.max(C-1,0),g=z.slice(0,e).join("/"),k=z[e],n=z[C];d=z.slice(C+1,z.length).join("/");
-z=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&z))if(null!=b){e="&t="+(new Date).getTime();var q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(d)+"?ref="+n;z=d.split("/");this.ui.convertFile(q+e,0<z.length?z[z.length-1]:d,null,this.extension,f,c,mxUtils.bind(this,function(p,A,E){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(y){try{A(this.getFileContent(JSON.parse(y.getText())))}catch(B){E(B)}}),
-E)}))}else c({message:mxResources.get("accessDenied")});else e="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(d)+"?ref="+n,z=new mxXmlRequest(q+e,null,"GET"),this.executeRequest(z,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,C))}catch(A){c(A)}}),c)}),c,x)};GitLabClient.prototype.getFileContent=function(d){var f=d.file_name,c=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(f)?
+"?ref="+k);var t=new mxXmlRequest(g,null,"HEAD");this.executeRequest(t,mxUtils.bind(this,function(){200==t.getStatus()?c(d,z):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==t.getStatus()?(z--,C()):l({message:mxResources.get("fileNotFound")})}))}});C()}};GitLabClient.prototype.getFile=function(d,f,c,l,m,x){l=null!=l?l:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(z,C){var e=Math.max(C-1,0),g=z.slice(0,e).join("/"),k=z[e],n=z[C];d=z.slice(C+1,z.length).join("/");
+z=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&z))if(null!=b){e="&t="+(new Date).getTime();var t=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(d)+"?ref="+n;z=d.split("/");this.ui.convertFile(t+e,0<z.length?z[z.length-1]:d,null,this.extension,f,c,mxUtils.bind(this,function(p,A,E){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(y){try{A(this.getFileContent(JSON.parse(y.getText())))}catch(B){E(B)}}),
+E)}))}else c({message:mxResources.get("accessDenied")});else e="&t="+(new Date).getTime(),t=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(d)+"?ref="+n,z=new mxXmlRequest(t+e,null,"GET"),this.executeRequest(z,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,C))}catch(A){c(A)}}),c)}),c,x)};GitLabClient.prototype.getFileContent=function(d){var f=d.file_name,c=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(f)?
c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(d,f,c,l,m,x){var z=DRAWIO_GITLAB_URL+"/";d={org:d,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:z+d+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:z+d+"/"+f+"/raw/"+c+"/"+l.file_path+
-"?inline=false",last_commit_id:l.last_commit_id,refPos:x};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,d):new GitLabFile(this.ui,l,d)};GitLabClient.prototype.insertFile=function(d,f,c,l,m,x,z){m=null!=m?m:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(C,e){var g=Math.max(e-1,0),k=C.slice(0,g).join("/"),n=C[g],q=C[e];path=C.slice(e+1,C.length).join("/");0<path.length&&(path+="/");path+=d;this.checkExists(k+"/"+n+"/"+q+"/"+path,!0,mxUtils.bind(this,function(p,A){p?
-m?(z||(f=Base64.encode(f)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(E){this.writeFile(k,n,q,path,E,f,A,mxUtils.bind(this,function(y){try{var B=JSON.parse(y.getText());c(this.createGitLabFile(k,n,q,null!=B.content?B.content:B,m,e))}catch(J){l(J)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:q,name:d,path:path,html_url:p+k+"/"+n+"/blob/"+q+"/"+path,download_url:p+k+"/"+n+"/raw/"+q+"/"+path+"?inline=false",refPos:e,last_commit_id:A,isNew:!0}))):l()}))}),
+"?inline=false",last_commit_id:l.last_commit_id,refPos:x};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,d):new GitLabFile(this.ui,l,d)};GitLabClient.prototype.insertFile=function(d,f,c,l,m,x,z){m=null!=m?m:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(C,e){var g=Math.max(e-1,0),k=C.slice(0,g).join("/"),n=C[g],t=C[e];path=C.slice(e+1,C.length).join("/");0<path.length&&(path+="/");path+=d;this.checkExists(k+"/"+n+"/"+t+"/"+path,!0,mxUtils.bind(this,function(p,A){p?
+m?(z||(f=Base64.encode(f)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(E){this.writeFile(k,n,t,path,E,f,A,mxUtils.bind(this,function(y){try{var B=JSON.parse(y.getText());c(this.createGitLabFile(k,n,t,null!=B.content?B.content:B,m,e))}catch(J){l(J)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:t,name:d,path:path,html_url:p+k+"/"+n+"/blob/"+t+"/"+path,download_url:p+k+"/"+n+"/raw/"+t+"/"+path+"?inline=false",refPos:e,last_commit_id:A,isNew:!0}))):l()}))}),
l,null,4>=x.length)};GitLabClient.prototype.checkExists=function(d,f,c){this.getFile(d,mxUtils.bind(this,function(l){if(f){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){m();c(!0,l.getCurrentEtag())},function(){m();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(d,
f,c,l,m,x,z,C,e){if(x.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 10 MB)"});else{var g="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:x,encoding:"base64"};null!=z&&(c.last_commit_id=z,g="PUT");d=this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+f)+"/repository/files/"+encodeURIComponent(l);g=new mxXmlRequest(d,JSON.stringify(c),g);this.executeRequest(g,mxUtils.bind(this,function(k){C(k)}),
-e)}};GitLabClient.prototype.saveFile=function(d,f,c,l,m){var x=d.meta.org,z=d.meta.repo,C=d.meta.ref,e=d.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(x,z,C,e,m,q,n,mxUtils.bind(this,function(p){delete d.meta.isNew;this.getFile(x+"/"+z+"/"+C+"/"+e,mxUtils.bind(this,function(A){A.getData()==d.getData()?f(A.getCurrentEtag()):f({content:d.getCurrentEtag()})}),c,null,null,d.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e)){var n=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(d.meta.last_commit_id,q)}),c,this.ui.getCurrentFile()!=d?d.getData():null,n.scale,n.border)}else g(d.meta.last_commit_id,Base64.encode(d.getData()))});l?this.getFile(x+"/"+z+"/"+C+"/"+e,mxUtils.bind(this,function(n){d.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(d){this.showGitLabDialog(!1,d)};GitLabClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
+e)}};GitLabClient.prototype.saveFile=function(d,f,c,l,m){var x=d.meta.org,z=d.meta.repo,C=d.meta.ref,e=d.meta.path,g=mxUtils.bind(this,function(n,t){this.writeFile(x,z,C,e,m,t,n,mxUtils.bind(this,function(p){delete d.meta.isNew;this.getFile(x+"/"+z+"/"+C+"/"+e,mxUtils.bind(this,function(A){A.getData()==d.getData()?f(A.getCurrentEtag()):f({content:d.getCurrentEtag()})}),c,null,null,d.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e)){var n=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){g(d.meta.last_commit_id,t)}),c,this.ui.getCurrentFile()!=d?d.getData():null,n.scale,n.border)}else g(d.meta.last_commit_id,Base64.encode(d.getData()))});l?this.getFile(x+"/"+z+"/"+C+"/"+e,mxUtils.bind(this,function(n){d.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(d){this.showGitLabDialog(!1,d)};GitLabClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
encodeURIComponent(f))});this.showGitLabDialog(!0,d)};GitLabClient.prototype.showGitLabDialog=function(d,f){var c=null,l=null,m=null,x=null,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="hidden";z.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);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";z.appendChild(e);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,z,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}));this.ui.showDialog(k.container,420,
-370,!0,!0);d&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(N,v,u,G){var I=document.createElement("a");I.setAttribute("title",N);I.style.cursor="pointer";mxUtils.write(I,N);mxEvent.addListener(I,"click",v);G&&(I.style.textDecoration="underline");null!=u&&(N=g.cloneNode(),N.style.padding=u,N.appendChild(I),I=N);return I}),q=mxUtils.bind(this,function(N){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=
+370,!0,!0);d&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(N,v,u,G){var I=document.createElement("a");I.setAttribute("title",N);I.style.cursor="pointer";mxUtils.write(I,N);mxEvent.addListener(I,"click",v);G&&(I.style.textDecoration="underline");null!=u&&(N=g.cloneNode(),N.style.padding=u,N.appendChild(I),I=N);return I}),t=mxUtils.bind(this,function(N){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=
null;J()}),null,!0));N||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(N=0;N<u.length;N++)(function(G){mxUtils.write(v," / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");y()}),null,!0))})(N)}e.appendChild(v)}),p=mxUtils.bind(this,function(N){this.ui.handleError(N,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null,
J()):this.ui.hideDialog()}))}),A=null,E=null,y=mxUtils.bind(this,function(N){null==N&&(e.innerText="",N=1);var v=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+x+"&ref="+m+"&per_page=100&page="+N,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display=
-"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){y(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==N&&(q(!m),e.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var H=x.split("/");x=H.slice(0,H.length-1).join("/");y()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(e,mxResources.get("noFiles"));else{var M=
+"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){y(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==N&&(t(!m),e.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var H=x.split("/");x=H.slice(0,H.length-1).join("/");y()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(e,mxResources.get("noFiles"));else{var M=
!0,K=0;G=mxUtils.bind(this,function(H){for(var F=0;F<I.length;F++)mxUtils.bind(this,function(P){if(H==("tree"==P.type)){var U=g.cloneNode();U.style.backgroundColor=M?Editor.isDarkMode()?"#000000":"#eeeeee":"";M=!M;var T=document.createElement("img");T.src=IMAGE_PATH+"/"+("tree"==P.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(P.name+("tree"==P.type?"/":""),mxUtils.bind(this,function(){"tree"==
P.type?(x=P.path,y()):d&&"blob"==P.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+P.path))})));e.appendChild(U);K++}})(I[F])});G(!0);d&&G(!1);100==K&&(e.appendChild(A),E=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&u()},mxEvent.addListener(e,"scroll",E))}}),p,!0)}),B=mxUtils.bind(this,function(N,v){null==N&&(e.innerText="",N=1);var u=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+N,null,"GET");k.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(N+1)});mxEvent.addListener(A,"click",G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==N&&(q(!0),e.appendChild(n("../ [Up]",mxUtils.bind(this,
+"disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(N+1)});mxEvent.addListener(A,"click",G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==N&&(t(!0),e.appendChild(n("../ [Up]",mxUtils.bind(this,
function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",y();else{for(var M=0;M<I.length;M++)mxUtils.bind(this,function(K,H){var F=g.cloneNode();F.style.backgroundColor=0==H%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(n(K.name,mxUtils.bind(this,function(){m=encodeURIComponent(K.name);x="";y()})));e.appendChild(F)})(I[M],M);100==I.length&&(e.appendChild(A),E=function(){e.scrollTop>=
e.scrollHeight-e.offsetHeight&&G()},mxEvent.addListener(e,"scroll",E))}}),p)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));var J=mxUtils.bind(this,function(N){var v=this.ui.spinner,u=0;this.ui.spinner.stop();var G=function(){v.spin(e,mxResources.get("loading"));u+=1},I=function(){--u;0===u&&v.stop()};null==N&&(e.innerText="",N=1);null!=E&&(mxEvent.removeListener(e,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");
A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var M=mxUtils.bind(this,function(){0===u&&J(N+1)});mxEvent.addListener(A,"click",M);var K=mxUtils.bind(this,function(F){G();var P=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(P,mxUtils.bind(this,function(U){F(JSON.parse(U.getText()));I()}),p)}),H=mxUtils.bind(this,function(F,P){G();var U=new mxXmlRequest(this.baseUrl+"/groups/"+F.id+"/projects?per_page=100",null,
"GET");this.executeRequest(U,mxUtils.bind(this,function(T){P(F,JSON.parse(T.getText()));I()}),p)});K(mxUtils.bind(this,function(F){if(null==this.user)mxUtils.write(e,mxResources.get("loggedOut"));else{G();var P=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+N,null,"GET");this.executeRequest(P,mxUtils.bind(this,function(U){U=JSON.parse(U.getText());if(null!=U&&0!=U.length||null!=F&&0!=F.length){1==N&&(e.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===u){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],l=t[1],m=x=null,2<t.length?(m=encodeURIComponent(t.slice(2,t.length).join("/")),y()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(e),mxUtils.br(e));for(var T=!0,V=0;V<U.length;V++)mxUtils.bind(this,
-function(W){var t=g.cloneNode();t.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;t.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===u&&(c=W.owner.username,l=W.path,x="",B(null,!0))})));e.appendChild(t)})(U[V]);for(V=0;V<F.length;V++)G(),H(F[V],mxUtils.bind(this,function(W,t){I();for(var D=0;D<t.length;D++){var L=g.cloneNode();L.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;mxUtils.bind(this,function(R){L.appendChild(n(R.name_with_namespace,
-mxUtils.bind(this,function(){0===u&&(c=W.full_path,l=R.path,x="",B(null,!0))})));e.appendChild(L)})(t[D])}}));I()}else I(),mxUtils.write(e,mxResources.get("noFiles"));100==U.length&&(e.appendChild(A),E=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&M()},mxEvent.addListener(e,"scroll",E))}),p)}}))});b?this.user?J():this.updateUser(function(){J()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){J()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+function(){if(0===u){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(q){null!=q&&(q=q.split("/"),1<q.length?(c=q[0],l=q[1],m=x=null,2<q.length?(m=encodeURIComponent(q.slice(2,q.length).join("/")),y()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(e),mxUtils.br(e));for(var T=!0,V=0;V<U.length;V++)mxUtils.bind(this,
+function(W){var q=g.cloneNode();q.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;q.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===u&&(c=W.owner.username,l=W.path,x="",B(null,!0))})));e.appendChild(q)})(U[V]);for(V=0;V<F.length;V++)G(),H(F[V],mxUtils.bind(this,function(W,q){I();for(var D=0;D<q.length;D++){var L=g.cloneNode();L.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;mxUtils.bind(this,function(R){L.appendChild(n(R.name_with_namespace,
+mxUtils.bind(this,function(){0===u&&(c=W.full_path,l=R.path,x="",B(null,!0))})));e.appendChild(L)})(q[D])}}));I()}else I(),mxUtils.write(e,mxResources.get("noFiles"));100==U.length&&(e.appendChild(A),E=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&M()},mxEvent.addListener(e,"scroll",E))}),p)}}))});b?this.user?J():this.updateUser(function(){J()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){J()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,d,f,c,l,m,x){this.file=b;this.id=d;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,f,c,l){d()};DrawioComment.prototype.editComment=function(b,d,f){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DriveComment=function(b,d,f,c,l,m,x,z){DrawioComment.call(this,b,d,f,c,l,m,x);this.pCommentId=z};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,d,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){d(m.replyId)}),f)};
DriveComment.prototype.editComment=function(b,d,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},d,f)};
-DriveComment.prototype.deleteComment=function(b,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"},b,d)};function mxODPicker(b,d,f,c,l,m,x,z,C,e,g,k,n,q){function p(Q,S){S=S||document;return S.querySelector(Q)}function A(Q,S,X){if(null==Q["@microsoft.graph.downloadUrl"])if(null==Q.parentReference)X();else{c(Q.id,Q.parentReference.driveId,function(Z){A(Z,S,X)},X);return}var aa=new XMLHttpRequest;aa.open("GET",Q["@microsoft.graph.downloadUrl"]);var Y=Q.file?"image/png"==Q.file.mimeType:!1;aa.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=aa.responseText;
-Y&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var ca=mxUtils.parseXml(Z),fa="mxlibrary"==ca.documentElement.nodeName?ca.documentElement:Editor.extractGraphModel(ca.documentElement);if(null!=fa){S(fa.ownerDocument);return}}catch(ka){}X()}};Y&&aa.overrideMimeType&&aa.overrideMimeType("text/plain; charset=x-user-defined");aa.send()}function E(){k&&null!=H?K.exportToCanvas(function(Q){Q=EditorUi.prototype.createImageDataUri(Q,null,"png");x(F,Q);m(F)},400,
+DriveComment.prototype.deleteComment=function(b,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"},b,d)};function mxODPicker(b,d,f,c,l,m,x,z,C,e,g,k,n,t){function p(Q,S){S=S||document;return S.querySelector(Q)}function A(Q,S,X){if(null==Q["@microsoft.graph.downloadUrl"])if(null==Q.parentReference)X();else{c(Q.id,Q.parentReference.driveId,function(Z){A(Z,S,X)},X);return}var aa=new XMLHttpRequest;aa.open("GET",Q["@microsoft.graph.downloadUrl"]);var Y=Q.file?"image/png"==Q.file.mimeType:!1;aa.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=aa.responseText;
+Y&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var ba=mxUtils.parseXml(Z),fa="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=fa){S(fa.ownerDocument);return}}catch(ka){}X()}};Y&&aa.overrideMimeType&&aa.overrideMimeType("text/plain; charset=x-user-defined");aa.send()}function E(){k&&null!=H?K.exportToCanvas(function(Q){Q=EditorUi.prototype.createImageDataUri(Q,null,"png");x(F,Q);m(F)},400,
null,null,function(Q){console.log(Q)},600,null,null,null,null,null,H):(x(F,void 0),m(F))}function y(Q){function S(X){L.style.background="transparent";L.innerText="";var aa=document.createElement("div");aa.className="odPreviewStatus";mxUtils.write(aa,X);L.appendChild(aa);M.stop()}if(null!=L)if(L.style.background="transparent",L.innerText="",null==Q||Q.folder||/\.drawiolib$/.test(Q.name))S(mxResources.get("noPreview"));else try{null!=Q.remoteItem&&(Q=Q.remoteItem),W=Q,M.spin(L),A(Q,function(X){M.stop();
if(W==Q)if("mxlibrary"==X.documentElement.nodeName)S(mxResources.get("noPreview"));else{var aa=X.getElementsByTagName("diagram");H=AspectDialog.prototype.createViewer(L,0==aa.length?X.documentElement:aa[0],null,"transparent")}},function(){F=null;S(mxResources.get("notADiagramFile"))})}catch(X){F=null,S(mxResources.get("notADiagramFile"))}}function B(){var Q=p(".odFilesBreadcrumb");if(null!=Q){Q.innerText="";for(var S=0;S<T.length-1;S++){var X=document.createElement("span");X.className="odBCFolder";
X.innerHTML=mxUtils.htmlEntities(T[S].name||mxResources.get("home"));Q.appendChild(X);(function(Y,Z){X.addEventListener("click",function(){d(null);T=T.slice(0,Z);N(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[S],S);var aa=document.createElement("span");aa.innerHTML=" &gt; ";Q.appendChild(aa)}null!=T[T.length-1]&&(S=document.createElement("span"),S.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get("officeSelDiag"):T[T.length-1].name||mxResources.get("home")),Q.appendChild(S))}}function J(){if(null!=
F&&!U)if("sharepoint"==P)N("site",null,F.id,F.displayName);else if("site"==P)N("subsite",null,F.id,F.name);else{var Q=F.folder;F=F.remoteItem?F.remoteItem:F;var S=(F.parentReference?F.parentReference.driveId:null)||P,X=F.id;Q?N(S,X,null,F.name):E()}}function N(Q,S,X,aa,Y){function Z(za){M.stop();var Da=document.createElement("table");Da.className="odFileListGrid";for(var Ca=null,pa=0,qa=0;null!=za&&qa<za.length;qa++){var wa=za[qa];if(1!=ka||!wa.webUrl||0<wa.webUrl.indexOf("sharepoint.com/sites/")||
0>wa.webUrl.indexOf("sharepoint.com/")){var Ha=wa.displayName||wa.name,ya=mxUtils.htmlEntities(wa.description||Ha);ka&&(wa.folder=2==ka?{isRoot:!0}:!0);var Ia=null!=wa.folder;if(!C||Ia){var ja=document.createElement("tr");ja.className=pa++%2?"odOddRow":"odEvenRow";var va=document.createElement("td");va.style.width="36px";var ta=document.createElement("img");ta.src="/images/"+(Ia?"folder.png":"file.png");ta.className="odFileImg";va.appendChild(ta);ja.appendChild(va);va=document.createElement("td");
-Ia=document.createElement("div");Ia.className="odFileTitle";Ia.innerHTML=mxUtils.htmlEntities(Ha);Ia.setAttribute("title",ya);va.appendChild(Ia);ja.appendChild(va);Da.appendChild(ja);null==Ca&&(Ca=ja,Ca.className+=" odRowSelected",F=wa,P=Q,q||d(F));(function(da,ba){ja.addEventListener("dblclick",J);ja.addEventListener("click",function(){Ca!=ba&&(Ca.className=Ca.className.replace("odRowSelected",""),Ca=ba,Ca.className+=" odRowSelected",F=da,P=Q,q||d(F))})})(wa,ja)}}}0==pa?(za=document.createElement("div"),
-za.className="odEmptyFolder",za.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ra.appendChild(za)):ra.appendChild(Da);B();U=!1}function ca(za){f(za?za:Aa,function(Da){if(fa){var Ca=Da.value||[];if(q||ka)Array.prototype.push.apply(Ma,Ca);else for(var pa=0;pa<Ca.length;pa++){var qa=Ca[pa],wa=qa.file?qa.file.mimeType:null;(qa.folder||"text/html"==wa||"text/xml"==wa||"application/xml"==wa||"image/png"==wa||/\.svg$/.test(qa.name)||/\.html$/.test(qa.name)||/\.xml$/.test(qa.name)||
-/\.png$/.test(qa.name)||/\.drawio$/.test(qa.name)||/\.drawiolib$/.test(qa.name))&&Ma.push(qa)}Da["@odata.nextLink"]&&1E3>Ma.length?ca(Da["@odata.nextLink"]):(clearTimeout(ha),Z(Ma))}},function(Da){if(fa){clearTimeout(ha);var Ca=null;try{Ca=JSON.parse(Da.responseText).error.message}catch(pa){}z(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));U=!1;M.stop()}},null!=za)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block";
+Ia=document.createElement("div");Ia.className="odFileTitle";Ia.innerHTML=mxUtils.htmlEntities(Ha);Ia.setAttribute("title",ya);va.appendChild(Ia);ja.appendChild(va);Da.appendChild(ja);null==Ca&&(Ca=ja,Ca.className+=" odRowSelected",F=wa,P=Q,t||d(F));(function(da,ca){ja.addEventListener("dblclick",J);ja.addEventListener("click",function(){Ca!=ca&&(Ca.className=Ca.className.replace("odRowSelected",""),Ca=ca,Ca.className+=" odRowSelected",F=da,P=Q,t||d(F))})})(wa,ja)}}}0==pa?(za=document.createElement("div"),
+za.className="odEmptyFolder",za.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ra.appendChild(za)):ra.appendChild(Da);B();U=!1}function ba(za){f(za?za:Aa,function(Da){if(fa){var Ca=Da.value||[];if(t||ka)Array.prototype.push.apply(Ma,Ca);else for(var pa=0;pa<Ca.length;pa++){var qa=Ca[pa],wa=qa.file?qa.file.mimeType:null;(qa.folder||"text/html"==wa||"text/xml"==wa||"application/xml"==wa||"image/png"==wa||/\.svg$/.test(qa.name)||/\.html$/.test(qa.name)||/\.xml$/.test(qa.name)||
+/\.png$/.test(qa.name)||/\.drawio$/.test(qa.name)||/\.drawiolib$/.test(qa.name))&&Ma.push(qa)}Da["@odata.nextLink"]&&1E3>Ma.length?ba(Da["@odata.nextLink"]):(clearTimeout(ha),Z(Ma))}},function(Da){if(fa){clearTimeout(ha);var Ca=null;try{Ca=JSON.parse(Da.responseText).error.message}catch(pa){}z(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));U=!1;M.stop()}},null!=za)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block";
null!=L&&(L.innerText="",L.style.top="50%");var fa=U=!0,ka=0;V=arguments;var ha=setTimeout(function(){U=fa=!1;M.stop();z(mxResources.get("timeout"))},2E4),ra=p(".odFilesList");ra.innerText="";M.spin(ra);switch(Q){case "recent":T=[{name:mxResources.get("recent",null,"Recent"),driveId:Q}];var la=l()||{},Fa=[],Ga;for(Ga in la)Fa.push(la[Ga]);clearTimeout(ha);Z(Fa);return;case "shared":var Aa="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:Q}];break;case "sharepoint":Aa=
"/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:Q}];ka=1;break;case "site":T.push({name:aa,driveId:Q,folderId:S,siteId:X});Aa="/sites/"+X+"/drives";ka=2;break;case "subsite":T.push({name:aa,driveId:Q,folderId:S,siteId:X});Aa="/drives/"+X+(S?"/items/"+S:"/root")+"/children";break;case "search":Q=P;T=[{driveId:Q,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));Aa=Q?"/drives/"+Q+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+
-Y+"')";break;default:null==S?T=[{driveId:Q}]:T.push({name:aa,driveId:Q,folderId:S}),Aa=(Q?"/drives/"+Q:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ka||(Aa+=(0<Aa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ca()}}function v(Q){R.className=R.className.replace("odCatSelected","");R=Q;R.className+=" odCatSelected"}function u(Q){U||(O=null,N("search",null,null,null,
+Y+"')";break;default:null==S?T=[{driveId:Q}]:T.push({name:aa,driveId:Q,folderId:S}),Aa=(Q?"/drives/"+Q:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ka||(Aa+=(0<Aa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ba()}}function v(Q){R.className=R.className.replace("odCatSelected","");R=Q;R.className+=" odCatSelected"}function u(Q){U||(O=null,N("search",null,null,null,
Q))}var G="";null==d&&(d=y,G='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var Q=null;try{Q=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(S){}return Q});null==m&&(m=function(Q){if(null!=Q){var S=l()||{};delete Q["@microsoft.graph.downloadUrl"];S[Q.id]=Q;localStorage.setItem("mxODPickerRecentList",JSON.stringify(S))}});G='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+
mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+G+(e?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(g?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(C?"save":"open"))+"</button>":"");var I=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();I=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(I?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(I?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var M=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),K=new Editor,H=null,F=null,P=null,U=!1,T=[],V=null,W=null;this.getSelectedItem=function(){null!=F&&m(F);return F};if(null==p("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");t.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(I))}b.innerHTML=
+var M=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),K=new Editor,H=null,F=null,P=null,U=!1,T=[],V=null,W=null;this.getSelectedItem=function(){null!=F&&m(F);return F};if(null==p("#mxODPickerCss")){var q=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");q.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(I))}b.innerHTML=
G;var L=p(".odPreview"),R=p("#odFiles");b=function(Q,S){S=S||document;return S.querySelectorAll(Q)}(".odCatListTitle");for(G=0;G<b.length;G++)b[G].addEventListener("click",function(){F=W=null;if(!U)switch(v(this),this.id){case "odFiles":N();break;case "odRecent":N("recent");break;case "odShared":N("shared");break;case "odSharepoint":N("sharepoint")}});var O=null;p("#odSearchBox").addEventListener("keyup",function(Q){var S=this;null!=O&&clearTimeout(O);13==Q.keyCode?u(S.value):O=setTimeout(function(){u(S.value)},
500)});p("#refreshOD").addEventListener("click",function(){null!=V&&(d(null),N.apply(this,V))});e&&p("#odBackBtn").addEventListener("click",e);g&&p("#odSubmitBtn").addEventListener("click",E);null!=n?(e=n.pop(),"sharepoint"==n[0].driveId&&v(p("#odSharepoint")),T=n,N(e.driveId,e.folderId,e.siteId,e.name)):N()};App=function(b,d,f){EditorUi.call(this,b,d,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var l={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
@@ -12621,12 +12621,12 @@ App.clearServiceWorker=function(b,d){navigator.serviceWorker.getRegistrations().
App.main=function(b,d){function f(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function n(){var J=null!=d?d():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(J);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[J,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var q=function(J){if(null!=J)for(var N=0;N<J.length;N++)if(!p[J[N]])throw Error(mxResources.get("invalidInput")+
-' "'+J[N])+'"';return!0},p={},A;for(A in App.pluginRegistry)p[App.pluginRegistry[A]]=!0;var E=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=E&&q(E.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(E));if(null!=E.merge){var y=localStorage.getItem(Editor.configurationKey);if(null!=y)try{var B=JSON.parse(y);for(A in E.merge)B[A]=E.merge[A];E=B}catch(J){window.location.hash="",alert(J)}else E=E.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(J);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[J,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=function(J){if(null!=J)for(var N=0;N<J.length;N++)if(!p[J[N]])throw Error(mxResources.get("invalidInput")+
+' "'+J[N])+'"';return!0},p={},A;for(A in App.pluginRegistry)p[App.pluginRegistry[A]]=!0;var E=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=E&&t(E.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(E));if(null!=E.merge){var y=localStorage.getItem(Editor.configurationKey);if(null!=y)try{var B=JSON.parse(y);for(A in E.merge)B[A]=E.merge[A];E=B}catch(J){window.location.hash="",alert(J)}else E=E.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
(localStorage.setItem(Editor.configurationKey,JSON.stringify(E)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(J){window.location.hash="",alert(J)}1<k.length&&(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?n():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
n))},function(k){k=document.getElementById("geStatus");null!=k&&(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:
"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var g=parseInt(mxSettings.settings.autosaveDelay);!isNaN(g)&&0<g?(DrawioFile.prototype.autosaveDelay=g,EditorUi.debug("Setting autosaveDelay",g)):EditorUi.debug("Invalid autosaveDelay",g)}null!=mxSettings.settings.defaultEdgeLength&&(g=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(g)&&0<g?(Graph.prototype.defaultEdgeLength=g,EditorUi.debug("Using defaultEdgeLength",g)):EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(n){null!=window.console&&
-console.error(n)}if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(g,k,n,q,p){EditorUi.logError("Global: "+(null!=g?g:""),k,n,q,p,null,!0)};if(window.top!=window.self||
+console.error(n)}if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(g,k,n,t,p){EditorUi.logError("Global: "+(null!=g?g:""),k,n,t,p,null,!0)};if(window.top!=window.self||
"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&
null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){l=document.getElementsByTagName("script");if(null!=l&&0<l.length){var m=mxUtils.getTextContent(l[0]);"1f536e2400baaa30261b8c3976d6fe06"!=CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=l&&1<l.length&&(m=mxUtils.getTextContent(l[l.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&&
(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(g){null!=window.console&&console.error(g)}!("ArrayBuffer"in
@@ -12680,7 +12680,7 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=d&&(b=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
App.prototype.getThumbnail=function(b,d){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(null)}),this.timeout),m=mxUtils.bind(this,function(I){window.clearTimeout(l);c&&d(I)});null==this.thumbImageCache&&(this.thumbImageCache={});var x=this.editor.graph,z=x.backgroundImage,C=null!=x.themes&&"darkTheme"==x.defaultThemeName;if(null!=this.pages&&(C||this.currentPage!=this.pages[0])){var e=x.getGlobalVariable;x=this.createTemporaryGraph(x.getStylesheet());x.setBackgroundImage=
this.editor.graph.setBackgroundImage;var g=this.pages[0];this.currentPage==g?x.setBackgroundImage(z):null!=g.viewState&&null!=g.viewState&&(z=g.viewState.backgroundImage,x.setBackgroundImage(z));x.getGlobalVariable=function(I){return"page"==I?g.getName():"pagenumber"==I?1:e.apply(this,arguments)};x.getGlobalVariable=e;document.body.appendChild(x.container);x.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{x!=this.editor.graph&&
-null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(M){I=null}m(I)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,x,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=x.getGraphBounds(),q=x.view.translate,p=x.view.scale;null!=z&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((q.x+z.x)*p,(q.y+z.y)*p,z.width*p,z.height*p)));var A=b/n.width;
+null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(M){I=null}m(I)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,x,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=x.getGraphBounds(),t=x.view.translate,p=x.view.scale;null!=z&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((t.x+z.x)*p,(t.y+z.y)*p,z.width*p,z.height*p)));var A=b/n.width;
A=Math.min(1,Math.min(3*b/(4*n.height),A));var E=Math.floor(n.x),y=Math.floor(n.y);k.setAttribute("width",Math.ceil(A*(n.width+4)));k.setAttribute("height",Math.ceil(A*(n.height+4)));var B=k.getContext("2d");B.scale(A,A);B.translate(-E,-y);var J=x.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";B.save();B.fillStyle=J;B.fillRect(E,y,Math.ceil(n.width+4),Math.ceil(n.height+4));B.restore();if(null!=z){var N=new Image;N.src=z.src;B.drawImage(N,z.x*A,z.y*A,z.width*A,z.height*A)}var v=new mxJsCanvas(k),
u=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(I,M){I.shape instanceof mxShape&&I.shape.checkBounds()&&(M.save(),M.translate(.5,.5),I.shape.paint(M),M.translate(-.5,-.5),M.restore())};G.drawText=function(I,M){};G.drawState(x.getView().getState(x.model.root),u);u.finish(mxUtils.bind(this,function(){try{G.drawState(x.getView().getState(x.model.root),v),x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(I){k=
null}m(k)}));f=!0}}catch(I){f=!1,null!=x&&x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}f||window.clearTimeout(l);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
@@ -12753,28 +12753,28 @@ App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b=
App.prototype.createFile=function(b,d,f,c,l,m,x,z,C){c=z?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var e=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(k){e();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),
this.drive.insertFile(b,d,x,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,d,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g,!1,x):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,d,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g,!1,x):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,d,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g,
!1,x):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,d,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,d,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g,!1,x):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,d,mxUtils.bind(this,function(k){e();this.fileCreated(k,f,m,l,C)}),g):!z&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(e(),this.showSaveFilePicker(mxUtils.bind(this,
-function(k,n){var q=new LocalFile(this,d,n.name,null,k,n);q.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(q,f,m,l,C)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(e(),this.fileCreated(new LocalFile(this,d,b,null==c),f,m,l,C))}catch(k){e(),this.handleError(k)}}};
+function(k,n){var t=new LocalFile(this,d,n.name,null,k,n);t.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,f,m,l,C)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(e(),this.fileCreated(new LocalFile(this,d,b,null==c),f,m,l,C))}catch(k){e(),this.handleError(k)}}};
App.prototype.fileCreated=function(b,d,f,c,l){var m=window.location.pathname;null!=d&&0<d.length&&(m+="?libs="+d);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var x=b.getData();x=0<x.length?this.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0):null;var z=window.location.protocol+"//"+window.location.hostname+m,C=x,e=null;null!=x&&/\.svg$/i.test(b.getTitle())&&
-(e=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(e.container),C=this.decodeNodeIntoGraph(C,e));b.setData(this.createFileData(x,e,b,z));null!=e&&e.container.parentNode.removeChild(e.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var q=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
-null!=d&&this.sidebar.showEntries(d);if(null!=l){for(var A=[],E=l.split(";"),y=0;y<E.length;y++)A.push(decodeURIComponent(E[y]));this.loadLibraries(A)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?q():this.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+(e=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(e.container),C=this.decodeNodeIntoGraph(C,e));b.setData(this.createFileData(x,e,b,z));null!=e&&e.container.parentNode.removeChild(e.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var t=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
+null!=d&&this.sidebar.showEntries(d);if(null!=l){for(var A=[],E=l.split(";"),y=0;y<E.length;y++)A.push(decodeURIComponent(E[y]));this.loadLibraries(A)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?t():this.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=c&&c(),window.openWindow(m,null,p))});b.constructor==LocalFile?k():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,function(n){g();null!=n&&"AbortError"==n.name||this.handleError(n)}))}};
-App.prototype.loadFile=function(b,d,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var C=mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
-window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(q){null!=q?(this.fileLoaded(new StorageFile(this,q,b)),null!=c&&c()):C({message:mxResources.get("fileNotFound")})}),C)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else if(null!=f)this.spinner.stop(),
+App.prototype.loadFile=function(b,d,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var C=mxUtils.bind(this,function(t){this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
+window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(t){null!=t?(this.fileLoaded(new StorageFile(this,t,b)),null!=c&&c()):C({message:mxResources.get("fileNotFound")})}),C)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=t?t.getHash():""}));else if(null!=f)this.spinner.stop(),
this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var e=decodeURIComponent(b.substring(1));"<"!=e.charAt(0)&&(e=Graph.decompress(e));e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);e.getHash=function(){return b};this.fileLoaded(e);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(q,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,q,p));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var q=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,d,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
-!this.editor.editable&&(A.getHash=function(){return"G"+p},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!q()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",q);return!0});this.loadTemplate(g,mxUtils.bind(this,function(q){this.spinner.stop();if(null!=q&&0<q.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=g,E=g.lastIndexOf("."),y=A.lastIndexOf("/");E>y&&0<y&&(A=A.substring(y+1,E),E=g.substring(E),
-this.useCanvasForExport||".png"!=E||(E=".drawio"),".svg"===E||".xml"===E||".html"===E||".png"===E||".drawio"===E)&&(p=A+E)}q=new LocalFile(this,q,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);q.getHash=function(){return b};this.fileLoaded(q,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+this.defaultFilename,!0);e.getHash=function(){return b};this.fileLoaded(e);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(t,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,t,p));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var t=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,d,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
+!this.editor.editable&&(A.getHash=function(){return"G"+p},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!t()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",t);return!0});this.loadTemplate(g,mxUtils.bind(this,function(t){this.spinner.stop();if(null!=t&&0<t.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=g,E=g.lastIndexOf("."),y=A.lastIndexOf("/");E>y&&0<y&&(A=A.substring(y+1,E),E=g.substring(E),
+this.useCanvasForExport||".png"!=E||(E=".drawio"),".svg"===E||".xml"===E||".html"===E||".png"===E||".drawio"===E)&&(p=A+E)}t=new LocalFile(this,t,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);t.getHash=function(){return b};this.fileLoaded(t,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){k()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(e=null,"G"==b.charAt(0)?e=this.drive:"D"==b.charAt(0)?e=this.dropbox:"W"==b.charAt(0)?e=this.oneDrive:"H"==b.charAt(0)?e=this.gitHub:"A"==b.charAt(0)?e=this.gitLab:"T"==b.charAt(0)&&(e=this.trello),null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));e.getFile(b,mxUtils.bind(this,function(q){this.spinner.stop();this.fileLoaded(q);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return n+b},window.location.hash="#"+p.getHash()):q==p&&null==q.getMode()&&
-(q=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+q+'" class="geStatusAlert">'+q+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(q){null!=window.console&&null!=q&&console.log("error in loadFile:",b,q);var p=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==q||"AbortError"!=q.name?this.handleError(q,null!=q?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}),
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=t?t.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));e.getFile(b,mxUtils.bind(this,function(t){this.spinner.stop();this.fileLoaded(t);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return n+b},window.location.hash="#"+p.getHash()):t==p&&null==t.getMode()&&
+(t=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+t+'" class="geStatusAlert">'+t+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(t){null!=window.console&&null!=t&&console.log("error in loadFile:",b,t);var p=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==t||"AbortError"!=t.name?this.handleError(t,null!=t?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}),
x=this.getCurrentFile(),z=mxUtils.bind(this,function(){l||null==x||!x.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?z():null==x||d?z():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,z)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var d=b.getTitle();b.constructor!=LocalLibrary&&(d+="\n"+b.getHash());b.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?d+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(d,f[c])&&d.push(f[c])}var d=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(d)};
App.prototype.loadLibraries=function(b,d){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(e,g){g||mxSettings.removeCustomLibrary(e);delete this.loadedLibraries[e]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var e=b.length-1;0<=e;e--)null!=l[e]&&this.loadLibrary(l[e],e<=m);null!=d&&d()}});if(null!=b)for(var z=0;z<b.length;z++){var C=encodeURIComponent(decodeURIComponent(b[z]));
-mxUtils.bind(this,function(e,g){if(null!=e&&0<e.length&&null==this.loadedLibraries[e]&&null==this.sidebar.palettes[e]){this.loadedLibraries[e]=!0;c++;var k=mxUtils.bind(this,function(y){l[g]=y;c--;x()}),n=mxUtils.bind(this,function(y){f(e,y);c--;x()}),q=e.substring(0,1);if("L"==q)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var y=decodeURIComponent(e.substring(1));StorageFile.getFileContent(this,y,mxUtils.bind(this,function(B){".scratchpad"==y&&null==
-B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,y)):n()}),n)}catch(B){n()}}),0);else if("U"==q){var p=decodeURIComponent(e.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(y){null!=y&&0<y.length?k(new UrlLibrary(this,y,p)):n()}),function(){n()},null,!0)}else if("R"==q){q=decodeURIComponent(e.substring(1));try{q=JSON.parse(q);var A={id:q[0],title:q[1],downloadUrl:q[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(y){try{k(new RemoteLibrary(this,
-y,A))}catch(B){n()}}),function(){n()})}catch(y){n()}}else if("S"==q&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(e.substring(1)),function(y){k(y)},n)}catch(y){n()}else{var E=null;"G"==q?null!=this.drive&&null!=this.drive.user&&(E=this.drive):"H"==q?null!=this.gitHub&&null!=this.gitHub.getUser()&&(E=this.gitHub):"T"==q?null!=this.trello&&this.trello.isAuthorized()&&(E=this.trello):"D"==q?null!=this.dropbox&&null!=this.dropbox.getUser()&&(E=this.dropbox):"W"==q&&null!=this.oneDrive&&
+mxUtils.bind(this,function(e,g){if(null!=e&&0<e.length&&null==this.loadedLibraries[e]&&null==this.sidebar.palettes[e]){this.loadedLibraries[e]=!0;c++;var k=mxUtils.bind(this,function(y){l[g]=y;c--;x()}),n=mxUtils.bind(this,function(y){f(e,y);c--;x()}),t=e.substring(0,1);if("L"==t)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var y=decodeURIComponent(e.substring(1));StorageFile.getFileContent(this,y,mxUtils.bind(this,function(B){".scratchpad"==y&&null==
+B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,y)):n()}),n)}catch(B){n()}}),0);else if("U"==t){var p=decodeURIComponent(e.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(y){null!=y&&0<y.length?k(new UrlLibrary(this,y,p)):n()}),function(){n()},null,!0)}else if("R"==t){t=decodeURIComponent(e.substring(1));try{t=JSON.parse(t);var A={id:t[0],title:t[1],downloadUrl:t[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(y){try{k(new RemoteLibrary(this,
+y,A))}catch(B){n()}}),function(){n()})}catch(y){n()}}else if("S"==t&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(e.substring(1)),function(y){k(y)},n)}catch(y){n()}else{var E=null;"G"==t?null!=this.drive&&null!=this.drive.user&&(E=this.drive):"H"==t?null!=this.gitHub&&null!=this.gitHub.getUser()&&(E=this.gitHub):"T"==t?null!=this.trello&&this.trello.isAuthorized()&&(E=this.trello):"D"==t?null!=this.dropbox&&null!=this.dropbox.getUser()&&(E=this.dropbox):"W"==t&&null!=this.oneDrive&&
null!=this.oneDrive.getUser()&&(E=this.oneDrive);null!=E?E.getLibrary(decodeURIComponent(e.substring(1)),mxUtils.bind(this,function(y){try{k(y)}catch(B){n()}}),function(y){n()}):n(!0)}}})(C,z)}x()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",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=
@@ -12804,9 +12804,9 @@ App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=
window.location.hash=d:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,d,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,d,mxUtils.bind(this,function(m){try{null!=f&&f(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,d,f,c,l,m,x,z){var C=d;/\.svg$/i.test(C)||(C=C.substring(0,d.lastIndexOf("."))+c);var e=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(e=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var g=new XMLHttpRequest;g.open("GET",b,!0);e||(g.responseType="blob");if(z)for(var k in z)g.setRequestHeader(k,z[k]);g.onload=mxUtils.bind(this,function(){if(200<=
-g.status&&299>=g.status){var q=null;e?(q=JSON.parse(g.responseText),q=this.base64ToBlob(q.content,"application/octet-stream")):q=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(q,mxUtils.bind(this,function(p){l(new LocalFile(this,p,C,!0))}),m,d)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(q){try{if(/\.pdf$/i.test(d)){var p=Editor.extractGraphModelFromPdf(q);null!=p&&0<p.length&&l(new LocalFile(this,
-p,C,!0))}else/\.png$/i.test(d)?(p=this.extractGraphModelFromPng(q),null!=p?l(new LocalFile(this,p,C,!0)):l(new LocalFile(this,q,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(q,b)?this.parseFileData(q,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?l(new LocalFile(this,A.responseText,C,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),d):l(new LocalFile(this,q,C,!0))}catch(A){null!=m&&m(A)}});f=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||
-/\.pdf$/i.test(d)||null!=f&&"image/"==f.substring(0,6);e?mxUtils.get(b,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus()){if(null!=l){q=JSON.parse(q.getText());var p=q.content;"base64"===q.encoding&&(p=/\.png$/i.test(d)?"data:image/png;base64,"+p:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));n(p)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+g.status&&299>=g.status){var t=null;e?(t=JSON.parse(g.responseText),t=this.base64ToBlob(t.content,"application/octet-stream")):t=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(t,mxUtils.bind(this,function(p){l(new LocalFile(this,p,C,!0))}),m,d)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(t){try{if(/\.pdf$/i.test(d)){var p=Editor.extractGraphModelFromPdf(t);null!=p&&0<p.length&&l(new LocalFile(this,
+p,C,!0))}else/\.png$/i.test(d)?(p=this.extractGraphModelFromPng(t),null!=p?l(new LocalFile(this,p,C,!0)):l(new LocalFile(this,t,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(t,b)?this.parseFileData(t,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?l(new LocalFile(this,A.responseText,C,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),d):l(new LocalFile(this,t,C,!0))}catch(A){null!=m&&m(A)}});f=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||
+/\.pdf$/i.test(d)||null!=f&&"image/"==f.substring(0,6);e?mxUtils.get(b,mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){if(null!=l){t=JSON.parse(t.getText());var p=t.content;"base64"===t.encoding&&(p=/\.png$/i.test(d)?"data:image/png;base64,"+p:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));n(p)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},z):null!=x?x(b,n,m,f):this.editor.loadUrl(b,n,m,f,null,null,null,z)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(c){this.appIconClicked(c)}));var d=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",d);d();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
@@ -12836,13 +12836,13 @@ mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.pr
else{var c=!1;this.userPanel.innerText="";f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.className="geDialogClose";f.style.top="8px";f.style.right="8px";mxEvent.addListener(f,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(f);if(null!=this.drive){var l=this.drive.getUsersList();if(0<l.length){var m=mxUtils.bind(this,
function(C,e){var g=this.getCurrentFile();null!=g&&g.constructor==DriveFile?(this.spinner.spin(document.body,e),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();C()}),2E3)):C()});f=mxUtils.bind(this,function(C){var e=document.createElement("tr");e.setAttribute("title","User ID: "+C.id);var g=document.createElement("td");g.setAttribute("valig","middle");g.style.height="59px";g.style.width="66px";var k=document.createElement("img");k.setAttribute("width","50");
k.setAttribute("height","50");k.setAttribute("border","0");k.setAttribute("src",null!=C.pictureUrl?C.pictureUrl:this.defaultUserPicture);k.style.borderRadius="50%";k.style.margin="4px 8px 0 8px";g.appendChild(k);e.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.paddingTop="4px";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,C.displayName+(C.isCurrent&&1<l.length?" ("+mxResources.get("default")+
-")":""));null!=C.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,C.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);e.appendChild(g);C.isCurrent||(e.style.cursor="pointer",e.style.opacity="0.3",mxEvent.addListener(e,"click",mxUtils.bind(this,function(q){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(q)})));return e});c=!0;var x=document.createElement("table");x.style.borderSpacing="0";x.style.fontSize="10pt";x.style.width="100%";x.style.padding="10px";for(var z=0;z<l.length;z++)x.appendChild(f(l[z]));this.userPanel.appendChild(x);f=document.createElement("div");f.style.textAlign=
+")":""));null!=C.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,C.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);e.appendChild(g);C.isCurrent||(e.style.cursor="pointer",e.style.opacity="0.3",mxEvent.addListener(e,"click",mxUtils.bind(this,function(t){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C);
+this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(t)})));return e});c=!0;var x=document.createElement("table");x.style.borderSpacing="0";x.style.fontSize="10pt";x.style.width="100%";x.style.padding="10px";for(var z=0;z<l.length;z++)x.appendChild(f(l[z]));this.userPanel.appendChild(x);f=document.createElement("div");f.style.textAlign=
"left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";x=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));x.className="geBtn";x.style.float="right";f.appendChild(x);x=mxUtils.button(mxResources.get("addAccount"),
mxUtils.bind(this,function(){var C=this.drive.createAuthWin();C.blur();window.focus();m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(e){this.handleError(e)}),!0,C)}),mxResources.get("closingFile")+"...")}));x.className="geBtn";x.style.margin="0px";f.appendChild(x);this.userPanel.appendChild(f)}}f=mxUtils.bind(this,function(C,e,g,k){if(null!=C){c&&this.userPanel.appendChild(document.createElement("hr"));
-c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var q=document.createElement("tbody"),p=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=e){var E=document.createElement("img");E.setAttribute("width","40");E.setAttribute("height","40");E.setAttribute("border","0");E.setAttribute("src",e);E.style.marginRight="6px";A.appendChild(E)}p.appendChild(A);
-A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,C.displayName);null!=C.email&&(mxUtils.br(A),e=document.createElement("small"),e.style.color="gray",mxUtils.write(e,C.email),A.appendChild(e));null!=k&&(C=document.createElement("div"),C.style.marginTop="4px",e=document.createElement("i"),mxUtils.write(e,k),C.appendChild(e),A.appendChild(C));p.appendChild(A);q.appendChild(p);
-n.appendChild(q);this.userPanel.appendChild(n);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",C.appendChild(g));this.userPanel.appendChild(C)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var e=mxUtils.bind(this,function(){this.dropbox.logout();
+c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var t=document.createElement("tbody"),p=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=e){var E=document.createElement("img");E.setAttribute("width","40");E.setAttribute("height","40");E.setAttribute("border","0");E.setAttribute("src",e);E.style.marginRight="6px";A.appendChild(E)}p.appendChild(A);
+A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,C.displayName);null!=C.email&&(mxUtils.br(A),e=document.createElement("small"),e.style.color="gray",mxUtils.write(e,C.email),A.appendChild(e));null!=k&&(C=document.createElement("div"),C.style.marginTop="4px",e=document.createElement("i"),mxUtils.write(e,k),C.appendChild(e),A.appendChild(C));p.appendChild(A);t.appendChild(p);
+n.appendChild(t);this.userPanel.appendChild(n);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",C.appendChild(g));this.userPanel.appendChild(C)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var e=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==OneDriveFile){var e=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&f(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitHubFile){var e=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&f(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitLabFile){var e=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):
@@ -12870,21 +12870,21 @@ c.showDialog(v.container,320,120,!0,!0);v.init()}).isEnabled=m;window.mxFreehand
function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var u=null==c.pages||1>=c.pages.length,G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatXml"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(G);var I=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(v,mxResources.get("compressed"),
!0),K=c.addCheckbox(v,mxResources.get("allPages"),!u,u);K.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!I.checked,u||!K.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),
!0,null,null,function(v,u,G,I,M,K,H,F,P){H=[];P&&H.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,u,G,I,M,K,null,!0,H));c.showDialog(v.container,450,240,!0,!0);v.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,v,function(u,G,I,M,K,H,F,P,U,T,V){c.createHtml(u,G,I,M,K,
-H,F,P,U,T,V,mxUtils.bind(this,function(W,t){var D=c.getBaseFilename(F);W='\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>'+W+"\n"+t+"\n</body>\n</html>";c.saveData(D+(".drawio"==D.substring(D.lenth-7)?"":".drawio")+".html","html",W,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!c.isOffline()&&!c.printPdfExport){var v=null==c.pages||1>=c.pages.length,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatPdf"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var I=function(){F!=this&&this.checked?(t.removeAttribute("disabled"),t.checked=!l.pageVisible):(t.setAttribute("disabled","disabled"),t.checked=!1)};G=200;var M=1,K=null;if(c.pdfPageExport&&
+H,F,P,U,T,V,mxUtils.bind(this,function(W,q){var D=c.getBaseFilename(F);W='\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>'+W+"\n"+q+"\n</body>\n</html>";c.saveData(D+(".drawio"==D.substring(D.lenth-7)?"":".drawio")+".html","html",W,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
+!c.isOffline()&&!c.printPdfExport){var v=null==c.pages||1>=c.pages.length,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatPdf"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var I=function(){F!=this&&this.checked?(q.removeAttribute("disabled"),q.checked=!l.pageVisible):(q.setAttribute("disabled","disabled"),q.checked=!1)};G=200;var M=1,K=null;if(c.pdfPageExport&&
!v){var H=function(){V.value=Math.max(1,Math.min(M,Math.max(parseInt(V.value),parseInt(U.value))));U.value=Math.max(1,Math.min(M,Math.min(parseInt(V.value),parseInt(U.value))))},F=c.addRadiobox(u,"pages",mxResources.get("allPages"),!0),P=c.addRadiobox(u,"pages",mxResources.get("pages")+":",!1,null,!0),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";u.appendChild(U);var T=
document.createElement("span");mxUtils.write(T,mxResources.get("to"));u.appendChild(T);var V=U.cloneNode(!0);u.appendChild(V);mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(V,"focus",function(){P.checked=!0});mxEvent.addListener(U,"change",H);mxEvent.addListener(V,"change",H);if(null!=c.pages&&(M=c.pages.length,null!=c.currentPage))for(H=0;H<c.pages.length;H++)if(c.currentPage==c.pages[H]){K=H+1;U.value=K;V.value=K;break}U.setAttribute("max",M);V.setAttribute("max",M);
-mxUtils.br(u);var W=c.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),t=c.addCheckbox(u,mxResources.get("crop"),!1,!0),D=c.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",I);mxEvent.addListener(P,"change",I);mxEvent.addListener(W,"change",I);G+=64}else W=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),t=c.addCheckbox(u,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),D=c.addCheckbox(u,mxResources.get("grid"),
+mxUtils.br(u);var W=c.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),q=c.addCheckbox(u,mxResources.get("crop"),!1,!0),D=c.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",I);mxEvent.addListener(P,"change",I);mxEvent.addListener(W,"change",I);G+=64}else W=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),q=c.addCheckbox(u,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),D=c.addCheckbox(u,mxResources.get("grid"),
!1,!1),c.pdfPageExport||mxEvent.addListener(W,"change",I);I=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var L=null,R=null;if(EditorUi.isElectronApp||I)R=c.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),G+=30;I&&(L=c.addCheckbox(u,mxResources.get("transparentBackground"),!1),G+=30);u=new CustomDialog(c,u,mxUtils.bind(this,function(){var O=null;if(!v){O=parseInt(U.value);var Q=parseInt(V.value);O=F.checked||O==K&&Q==K?null:{from:Math.max(0,
-Math.min(M-1,O-1)),to:Math.max(0,Math.min(M-1,Q-1))}}c.downloadFile("pdf",null,null,!W.checked,v?!0:!F.checked&&null==O,!t.checked,null!=L&&L.checked,null,null,D.checked,null!=R&&R.checked,O)}),null,mxResources.get("export"));c.showDialog(u.container,300,G,!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"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});
+Math.min(M-1,O-1)),to:Math.max(0,Math.min(M-1,Q-1))}}c.downloadFile("pdf",null,null,!W.checked,v?!0:!F.checked&&null==O,!q.checked,null!=L&&L.checked,null,null,D.checked,null!=R&&R.checked,O)}),null,mxResources.get("export"));c.showDialog(u.container,300,G,!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"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});
c.actions.addAction("close",function(){function v(){null!=u&&u.removeDraft();c.fileLoaded(null)}var u=c.getCurrentFile();null!=u&&u.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var v=l.getSelectionCell(),u=l.view.getState(v);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(v=new EditShapeDialog(c,v,mxResources.get("editShape")+
":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(v,u){c.spinner.stop();v=new RevisionDialog(c,v,u);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(v)})):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");g=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(g.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var v=c.getCurrentFile();null!=v&&(window.drawdata=c.getFileData(),v=null!=v.getTitle()?v.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(v),null,!0))});"undefined"!==typeof MathJax&&(g=c.actions.addAction("mathematicalTypesetting",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.mathEnabled=!c.isMathEnabled();l.model.execute(v)}),g.setToggleAction(!0),g.setSelectedCallback(function(){return c.isMathEnabled()}),g.isEnabled=m);isLocalStorage&&(g=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var k=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=l.getSelectionCells(),u=[],G=0;G<v.length;G++)l.getModel().isVertex(v[G])&&u.push(v[G]);0<u.length&&(v=new EditGeometryDialog(c,u),c.showDialog(v.container,
200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+Shift+M");var n=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(n=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=n&&l.pasteStyle(n,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var v=
-new BackgroundImageDialog(c,function(u){c.setBackgroundImage(u)});c.showDialog(v.container,400,170,!0,!0);v.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(v,u,G,I,M,K,H,F,P,U,T,V,W,t,D){P=parseInt(v);!isNaN(P)&&0<P&&(D?c.downloadFile("remoteSvg",null,null,G,null,F,u,v,H,null,M):c.exportSvg(P/100,u,G,
-I,M,K,H,!F,!1,U,V,W,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(v,u,G,I,M,K,H,F,P,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,u,G,I,M,H,!F,!1,null,T,null,V,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+new BackgroundImageDialog(c,function(u){c.setBackgroundImage(u)});c.showDialog(v.container,400,170,!0,!0);v.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(v,u,G,I,M,K,H,F,P,U,T,V,W,q,D){P=parseInt(v);!isNaN(P)&&0<P&&(D?c.downloadFile("remoteSvg",null,null,G,null,F,u,v,H,null,M):c.exportSvg(P/100,u,G,
+I,M,K,H,!F,!1,U,V,W,q))}),!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(v,u,G,I,M,K,H,F,P,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,u,G,I,M,H,!F,!1,null,T,null,V,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,I,M){c.downloadFile(u?"xmlpng":"png",null,null,v,null,null,G,I,M)}),!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(v,u,G,I,M,K,H,F,P,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,!1,
G,I,!1,H,!F,!1,"jpeg",T,null,V,W)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,I,M){c.downloadFile("jpeg",null,null,v,null,null,null,I,M)}),!0,!0)}));g=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),u=mxUtils.getXml(0==v.length?c.editor.getGraphXml():l.encodeCells(v));c.copyImage(v,u)}));g.visible=
Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;g=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return l.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/")}));
@@ -12899,12 +12899,12 @@ function(){var v=document.createElement("input");v.setAttribute("type","checkbox
null!=I&&"1"==urlParams.sketch&&u.push([mxResources.get("plugins"),I.funct]);EditorUi.isElectronApp||u.push([mxResources.get("share"),function(M,K){if(0<K.value.length)try{var H=JSON.parse(K.value),F=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(H)),P=new EmbedDialog(c,F);c.showDialog(P.container,450,240,!0);P.init()}catch(U){c.handleError(U)}else c.handleError({message:mxResources.get("invalidInput")})}]);u=new TextareaDialog(c,mxResources.get("configuration")+
":",null!=G?JSON.stringify(JSON.parse(G),null,2):"",function(M){if(null!=M)try{if(null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save()),M==G)c.hideDialog();else{if(0<M.length){var K=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(K))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(H){c.handleError(H)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
u,v.parentNode);c.showDialog(u.container,620,460,!0,!1);u.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(v,u){var G=mxUtils.bind(this,function(M){var K=""==M?mxResources.get("automatic"):mxLanguageMap[M],H=null;""!=K&&(H=v.addItem(K,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
-u),(M==mxLanguage||""==M&&null==mxLanguage)&&v.addCheckmark(H,Editor.checkmarkImage));return H});G("");v.addSeparator(u);for(var I in mxLanguageMap)G(I)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(v){var u=q.apply(this,arguments);if(null!=u&&"1"!=urlParams.noLangIcon){var G=this.get("language");if(null!=G){G=u.addMenu("",G.funct);G.setAttribute("title",mxResources.get("language"));G.className="geAdaptiveAsset";G.style.width="16px";G.style.paddingTop="2px";G.style.paddingLeft=
+u),(M==mxLanguage||""==M&&null==mxLanguage)&&v.addCheckmark(H,Editor.checkmarkImage));return H});G("");v.addSeparator(u);for(var I in mxLanguageMap)G(I)})));var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(v){var u=t.apply(this,arguments);if(null!=u&&"1"!=urlParams.noLangIcon){var G=this.get("language");if(null!=G){G=u.addMenu("",G.funct);G.setAttribute("title",mxResources.get("language"));G.className="geAdaptiveAsset";G.style.width="16px";G.style.paddingTop="2px";G.style.paddingLeft=
"4px";G.style.zIndex="1";G.style.position="absolute";G.style.display="block";G.style.cursor="pointer";G.style.right="17px";"atlas"==uiTheme?(G.style.top="6px",G.style.right="15px"):G.style.top="min"==uiTheme?"2px":"0px";var I=document.createElement("div");I.style.backgroundImage="url("+Editor.globeImage+")";I.style.backgroundPosition="center center";I.style.backgroundRepeat="no-repeat";I.style.backgroundSize="19px 19px";I.style.position="absolute";I.style.height="19px";I.style.width="19px";I.style.marginTop=
"2px";I.style.zIndex="1";G.appendChild(I);mxUtils.setOpacity(G,40);"1"==urlParams.winCtrls&&(G.style.right="95px",G.style.width="19px",G.style.height="19px",G.style.webkitAppRegion="no-drag",I.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(G.style.opacity="0.85",G.style.filter="invert(100%)");document.body.appendChild(G);u.langIcon=G}}return u}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,
parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var v=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(u){if(0<u.length)try{var G=JSON.parse(u);c.executeLayouts(l.createLayouts(G));c.customLayoutConfig=G;c.hideDialog()}catch(I){c.handleError(I)}},null,null,null,null,function(u,G){var I=mxUtils.button(mxResources.get("copy"),function(){try{var M=G.value;G.value=JSON.stringify(JSON.parse(M));G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
G.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));G.value=M}catch(K){c.handleError(K)}});I.setAttribute("title","copy");I.className="geBtn";u.appendChild(I)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(v.container,620,460,!0,!0);v.init()});g=this.get("layout");var p=g.funct;g.funct=function(v,u){p.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var G=null,I=20,
-M=20,K=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=G){var t=c.editor.graph,D=new mxOrgChartLayout(t,G,I,M),L=t.getDefaultParent();1<t.model.getChildCount(t.getSelectionCell())&&(L=t.getSelectionCell());D.execute(L)}},H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");H.appendChild(F);var P=document.createElement("select");P.style.width="200px";
+M=20,K=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=G){var q=c.editor.graph,D=new mxOrgChartLayout(q,G,I,M),L=q.getDefaultParent();1<q.model.getChildCount(q.getSelectionCell())&&(L=q.getSelectionCell());D.execute(L)}},H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");H.appendChild(F);var P=document.createElement("select");P.style.width="200px";
P.style.boxSizing="border-box";F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<F.length;U++){var T=document.createElement("option");mxUtils.write(T,F[U]);T.value=U;2==U&&T.setAttribute("selected","selected");P.appendChild(T)}mxEvent.addListener(P,"change",function(){G=P.value});H.appendChild(P);F=document.createElement("div");
F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");H.appendChild(F);var V=document.createElement("input");V.type="number";V.value=I;V.style.width="200px";V.style.boxSizing="border-box";H.appendChild(V);mxEvent.addListener(V,"change",function(){I=V.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+
": ");H.appendChild(F);var W=document.createElement("input");W.type="number";W.value=M;W.style.width="200px";W.style.boxSizing="border-box";H.appendChild(W);mxEvent.addListener(W,"change",function(){M=W.value});H=new CustomDialog(c,H,function(){null==G&&(G=2);c.loadOrgChartLayouts(K)});c.showDialog(H.container,355,140,!0,!0)},u,null,m());v.addSeparator(u);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var G=new mxParallelEdgeLayout(l);G.checkOverlap=!0;c.prompt(mxResources.get("spacing"),
@@ -12915,7 +12915,7 @@ function(){c.checkForUpdates()}),this.addMenuItems(v,"- keyboardShortcuts quickS
prompt("Language Code",Graph.diagramLanguage||"");null!=v&&(Graph.diagramLanguage=0<v.length?v:null,l.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var v=l.cloneCells(l.getSelectionCells()),u=l.getBoundingBoxFromGeometry(v);v=l.moveCells(v,-u.x,-u.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(v)))+
"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var v=l.getGraphBounds(),u=l.view.translate,G=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",v.x/G-u.x,v.y/G-u.y,v.width/G,v.height/G,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(u){if(0<u.length)try{var G=
-function(F){function P(Q){if(null==O[Q]){if(O[Q]=!0,null!=V[Q]){for(;0<V[Q].length;){var S=V[Q].pop();P(S)}delete V[Q]}}else mxLog.debug(U+": Visited: "+Q)}var U=F.parentNode.id,T=F.childNodes;F={};for(var V={},W=null,t={},D=0;D<T.length;D++){var L=T[D];if(null!=L.id&&0<L.id.length)if(null==F[L.id]){F[L.id]=L.id;var R=L.getAttribute("parent");null==R?null!=W?mxLog.debug(U+": Multiple roots: "+L.id):W=L.id:(null==V[R]&&(V[R]=[]),V[R].push(L.id))}else t[L.id]=L.id}T=Object.keys(t);0<T.length?(T=U+": "+
+function(F){function P(Q){if(null==O[Q]){if(O[Q]=!0,null!=V[Q]){for(;0<V[Q].length;){var S=V[Q].pop();P(S)}delete V[Q]}}else mxLog.debug(U+": Visited: "+Q)}var U=F.parentNode.id,T=F.childNodes;F={};for(var V={},W=null,q={},D=0;D<T.length;D++){var L=T[D];if(null!=L.id&&0<L.id.length)if(null==F[L.id]){F[L.id]=L.id;var R=L.getAttribute("parent");null==R?null!=W?mxLog.debug(U+": Multiple roots: "+L.id):W=L.id:(null==V[R]&&(V[R]=[]),V[R].push(L.id))}else q[L.id]=L.id}T=Object.keys(q);0<T.length?(T=U+": "+
T.length+" Duplicates: "+T.join(", "),mxLog.debug(T+" (see console)")):mxLog.debug(U+": Checked");var O={};null==W?mxLog.debug(U+": No root"):(P(W),Object.keys(O).length!=Object.keys(F).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",V)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var I=mxUtils.parseXml(u),M=c.getPagesForNode(I.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var K=
c.getHashValueForPages(M);mxLog.debug("Checksum: ",K)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var H=I.getElementsByTagName("root");for(u=0;u<H.length;u++)G(H[u]);mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(u){var G=c.getCurrentFile();
if(0<u.length&&null!=G)try{var I=JSON.parse(u);G.patch([I],null,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,G){A=c.getPagesForXml(c.getFileData(!0));v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(u,G){try{v.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(I){c.handleError(I)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),v.textarea.value=
@@ -12928,8 +12928,8 @@ mxUtils.bind(this,function(){var v=new mxImageExport,u=l.getGraphBounds(),G=l.vi
U,K)};v.drawState(l.getView().getState(l.model.root),I);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",K)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
u)})))}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(v){l.isEnabled()&&(v=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),v.vertex=!0,v=new EditShapeDialog(c,
v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",v,function(u,G,I,M,K,H,F,P,U,T,V){c.createHtml(u,G,I,M,K,H,F,P,U,T,V,mxUtils.bind(this,function(W,
-t){var D=new EmbedDialog(c,W+"\n"+t,null,null,function(){var L=window.open(),R=L.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(W);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&R.writeln(t);R.writeln("</body>");R.writeln("</html>");R.close();if(!O){var Q=L.document.createElement("div");
-Q.marginLeft="26px";Q.marginTop="26px";mxUtils.write(Q,mxResources.get("updatingDocument"));O=L.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";Q.appendChild(O);L.document.body.insertBefore(Q,L.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(t)[1];R.body.appendChild(S);Q.parentNode.removeChild(Q)},
+q){var D=new EmbedDialog(c,W+"\n"+q,null,null,function(){var L=window.open(),R=L.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(W);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&R.writeln(q);R.writeln("</body>");R.writeln("</html>");R.close();if(!O){var Q=L.document.createElement("div");
+Q.marginLeft="26px";Q.marginTop="26px";mxUtils.write(Q,mxResources.get("updatingDocument"));O=L.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";Q.appendChild(O);L.document.body.insertBefore(Q,L.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(q)[1];R.body.appendChild(S);Q.parentNode.removeChild(Q)},
20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(D.container,450,240,!0,!0);D.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();null!=u?(u=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(u.container,
450,240,!0,!0),u.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(v,u,G,I,M,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,u,G,I,M,K,function(H){c.spinner.stop();H=new EmbedDialog(c,H);c.showDialog(H.container,450,240,!0,!0);H.init()},function(H){c.spinner.stop();c.handleError(H)})},mxResources.get("image"),mxResources.get("retina"),
c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(v,u,G,I,M,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,u,G,I,M,K,function(H){c.spinner.stop();H=new EmbedDialog(c,H);c.showDialog(H.container,450,240,!0,!0);H.init()},function(H){c.spinner.stop();c.handleError(H)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
@@ -12944,8 +12944,8 @@ G.xml=u;v&&(G.exit=!0);u=JSON.stringify(G)}(window.opener||window.parent).postMe
c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,u){c.isExportToCanvas()?(this.addMenuItems(v,
["exportPng"],u),c.jpgSupported&&this.addMenuItems(v,["exportJpg"],u)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],u);this.addMenuItems(v,["exportSvg","-"],u);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],u):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],u);this.addMenuItems(v,["-",
"exportHtml","exportXml","exportUrl"],u);c.isOffline()||(v.addSeparator(u),this.addMenuItem(v,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,u){function G(K){K.pickFile(function(H){c.spinner.spin(document.body,mxResources.get("loading"))&&K.getFile(H,function(F){var P="data:image/"==F.getData().substring(0,11)?M(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
-P="image/svg+xml");I(F.getData(),P,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},K==c.drive)},!0)}var I=mxUtils.bind(this,function(K,H,F){var P=l.view,U=l.getGraphBounds(),T=l.snap(Math.ceil(Math.max(0,U.x/P.scale-P.translate.x)+4*l.gridSize)),V=l.snap(Math.ceil(Math.max(0,(U.y+U.height)/P.scale-P.translate.y)+4*l.gridSize));"data:image/"==K.substring(0,11)?c.loadImage(K,mxUtils.bind(this,function(W){var t=!0,D=mxUtils.bind(this,function(){c.resizeImage(W,
-K,mxUtils.bind(this,function(L,R,O){L=t?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/O)):1;c.importFile(K,H,T,V,Math.round(R*L),Math.round(O*L),F,function(Q){c.spinner.stop();l.setSelectionCells(Q);l.scrollCellToVisible(l.getSelectionCell())})}),t)});K.length>c.resampleThreshold?c.confirmImageResize(function(L){t=L;D()}):D()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(K,H,T,V,0,0,F,function(W){c.spinner.stop();l.setSelectionCells(W);
+P="image/svg+xml");I(F.getData(),P,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},K==c.drive)},!0)}var I=mxUtils.bind(this,function(K,H,F){var P=l.view,U=l.getGraphBounds(),T=l.snap(Math.ceil(Math.max(0,U.x/P.scale-P.translate.x)+4*l.gridSize)),V=l.snap(Math.ceil(Math.max(0,(U.y+U.height)/P.scale-P.translate.y)+4*l.gridSize));"data:image/"==K.substring(0,11)?c.loadImage(K,mxUtils.bind(this,function(W){var q=!0,D=mxUtils.bind(this,function(){c.resizeImage(W,
+K,mxUtils.bind(this,function(L,R,O){L=q?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/O)):1;c.importFile(K,H,T,V,Math.round(R*L),Math.round(O*L),F,function(Q){c.spinner.stop();l.setSelectionCells(Q);l.scrollCellToVisible(l.getSelectionCell())})}),q)});K.length>c.resampleThreshold?c.confirmImageResize(function(L){q=L;D()}):D()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(K,H,T,V,0,0,F,function(W){c.spinner.stop();l.setSelectionCells(W);
l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(K){var H="text/xml";/\.png$/i.test(K)?H="image/png":/\.jpe?g$/i.test(K)?H="image/jpg":/\.gif$/i.test(K)?H="image/gif":/\.pdf$/i.test(K)&&(H="application/pdf");return H});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){G(c.drive)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){G(c.oneDrive)},u):C&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){G(c.dropbox)},u):z&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){G(c.gitHub)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){G(c.gitLab)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){G(c.trello)},u):e&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&
@@ -12998,18 +12998,18 @@ v,u);isLocalStorage&&this.addSubmenu("openRecent",v,u);null!=G&&G.constructor==D
"-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==G||this.addMenuItems(v,["share","-"],u),this.addMenuItems(v,["rename"],u),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(v,["upload"],u):(this.addMenuItems(v,["makeCopy"],u),null!=G&&G.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],u)));v.addSeparator(u);this.addSubmenu("importFrom",v,u);this.addSubmenu("exportAs",v,u);
v.addSeparator(u);this.addSubmenu("embed",v,u);this.addSubmenu("publish",v,u);v.addSeparator(u);this.addSubmenu("newLibrary",v,u);this.addSubmenu("openLibraryFrom",v,u);c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],u);null!=G&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(I=null!=G.getTitle()?G.getTitle():c.defaultFilename,(G.constructor==DriveFile&&null!=G.sync&&G.sync.isConnected()||!/(\.html)$/i.test(I)&&!/(\.svg)$/i.test(I))&&this.addMenuItems(v,["-","properties"]));
this.addMenuItems(v,["-","pageSetup"],u);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],u);this.addMenuItems(v,["-","close"])}})));f.prototype.execute=function(){var v=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 u=v.extFonts,G=0;null!=u&&G<u.length;G++){var I=document.getElementById("extFont_"+
-u[G].name);null!=I&&I.parentNode.removeChild(I)}v.extFonts=[];for(G=0;null!=this.previousExtFonts&&G<this.previousExtFonts.length;G++)this.ui.editor.graph.addExtFont(this.previousExtFonts[G].name,this.previousExtFonts[G].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,u){for(var G=mxUtils.bind(this,function(V,W,t,D,L){var R=c.editor.graph;D=this.styleChange(v,D||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
+u[G].name);null!=I&&I.parentNode.removeChild(I)}v.extFonts=[];for(G=0;null!=this.previousExtFonts&&G<this.previousExtFonts.length;G++)this.ui.editor.graph.addExtFont(this.previousExtFonts[G].name,this.previousExtFonts[G].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,u){for(var G=mxUtils.bind(this,function(V,W,q,D,L){var R=c.editor.graph;D=this.styleChange(v,D||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
"1"!=urlParams["ext-fonts"]?[V,null!=W?encodeURIComponent(W):null,null]:[V],null,u,function(){"1"!=urlParams["ext-fonts"]?R.setFont(V,W):(document.execCommand("fontname",!1,V),R.addExtFont(V,W));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[V,null!=W?encodeURIComponent(W):null,null]:[V],"cells",[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),
-function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&R.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(V,W)});t&&(t=document.createElement("span"),t.className="geSprite geSprite-delete",t.style.cursor="pointer",t.style.display="inline-block",D.firstChild.nextSibling.nextSibling.appendChild(t),mxEvent.addListener(t,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()];
+function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&R.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(V,W)});q&&(q=document.createElement("span"),q.className="geSprite geSprite-delete",q.style.cursor="pointer",q.style.display="inline-block",D.firstChild.nextSibling.nextSibling.appendChild(q),mxEvent.addListener(q,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()];
for(var Q=0;Q<this.customFonts.length;Q++)if(this.customFonts[Q].name==V&&this.customFonts[Q].url==W){this.customFonts.splice(Q,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(Q=0;Q<S.length;Q++)if(S[Q].name==V){S.splice(Q,1);break}var X=mxUtils.clone(this.customFonts);for(Q=0;Q<X.length;Q++)if(X[Q].name==V){X.splice(Q,1);break}Q=new f(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(Q)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(O)})));Graph.addFont(V,W);D.firstChild.nextSibling.style.fontFamily=V;null!=L&&D.setAttribute("title",L)}),I={},M=0;M<this.defaultFonts.length;M++){var K=this.defaultFonts[M];"string"===typeof K?G(K):null!=K.fontFamily&&null!=K.fontUrl&&(I[encodeURIComponent(K.fontFamily)+"@"+encodeURIComponent(K.fontUrl)]=!0,G(K.fontFamily,K.fontUrl))}v.addSeparator(u);if("1"!=urlParams["ext-fonts"]){K=function(V){var W=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!I[W]){for(var t=
-V.name,D=0;null!=F[t.toLowerCase()];)t=V.name+" ("+ ++D+")";null==H[W]&&(P.push({name:V.name,url:V.url,label:t,title:V.url}),F[t.toLowerCase()]=V,H[W]=V)}};var H={},F={},P=[];for(M=0;M<this.customFonts.length;M++)K(this.customFonts[M]);for(var U in Graph.recentCustomFonts)K(Graph.recentCustomFonts[U]);P.sort(function(V,W){return V.label<W.label?-1:V.label>W.label?1:0});if(0<P.length){for(M=0;M<P.length;M++)G(P[M].name,P[M].url,!0,P[M].label,P[M].url);v.addSeparator(u)}v.addItem(mxResources.get("reset"),
+mxEvent.consume(O)})));Graph.addFont(V,W);D.firstChild.nextSibling.style.fontFamily=V;null!=L&&D.setAttribute("title",L)}),I={},M=0;M<this.defaultFonts.length;M++){var K=this.defaultFonts[M];"string"===typeof K?G(K):null!=K.fontFamily&&null!=K.fontUrl&&(I[encodeURIComponent(K.fontFamily)+"@"+encodeURIComponent(K.fontUrl)]=!0,G(K.fontFamily,K.fontUrl))}v.addSeparator(u);if("1"!=urlParams["ext-fonts"]){K=function(V){var W=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!I[W]){for(var q=
+V.name,D=0;null!=F[q.toLowerCase()];)q=V.name+" ("+ ++D+")";null==H[W]&&(P.push({name:V.name,url:V.url,label:q,title:V.url}),F[q.toLowerCase()]=V,H[W]=V)}};var H={},F={},P=[];for(M=0;M<this.customFonts.length;M++)K(this.customFonts[M]);for(var U in Graph.recentCustomFonts)K(Graph.recentCustomFonts[U]);P.sort(function(V,W){return V.label<W.label?-1:V.label>W.label?1:0});if(0<P.length){for(M=0;M<P.length;M++)G(P[M].name,P[M].url,!0,P[M].label,P[M].url);v.addSeparator(u)}v.addItem(mxResources.get("reset"),
null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),u);v.addSeparator(u)}else{U=this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){K={};var T=!1;for(M=0;M<this.customFonts.length;M++)K[this.customFonts[M].name]=!0;for(M=0;M<U.length;M++)K[U[M].name]||(this.customFonts.push(U[M]),T=!0);T&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=
-0;M<this.customFonts.length;M++)U=this.customFonts[M].name,K=this.customFonts[M].url,G(U,K,!0),this.editorUi.editor.graph.addExtFont(U,K,!0);v.addSeparator(u);v.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),u);v.addSeparator(u)}}v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,W=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],t=
-"s",D=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var L=V.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&(W=Graph.stripQuotes(L.fontFamily),D=Graph.getFontUrl(W,null),null!=D&&(Graph.isGoogleFontUrl(D)?(D=null,t="g"):t="w")))}else L=V.getView().getState(V.getSelectionCell()),null!=L&&(W=L.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(L=L.style.fontSource,null!=L&&(L=decodeURIComponent(L),Graph.isGoogleFontUrl(L)?t="g":(t="w",D=L))):(t=L.style.FType||
-t,"w"==t&&(D=this.editorUi.editor.graph.extFonts,L=null,null!=D&&(L=D.find(function(O){return O.name==W})),D=null!=L?L.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=D&&D.substring(0,PROXY_URL.length)==PROXY_URL&&(D=decodeURIComponent(D.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==V.cellEditor.textarea&&(R=V.cellEditor.saveSelection());t=new FontDialog(this.editorUi,W,D,t,mxUtils.bind(this,function(O,Q,S){null!=R&&(V.cellEditor.restoreSelection(R),R=null);
+0;M<this.customFonts.length;M++)U=this.customFonts[M].name,K=this.customFonts[M].url,G(U,K,!0),this.editorUi.editor.graph.addExtFont(U,K,!0);v.addSeparator(u);v.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),u);v.addSeparator(u)}}v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,W=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],q=
+"s",D=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var L=V.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&(W=Graph.stripQuotes(L.fontFamily),D=Graph.getFontUrl(W,null),null!=D&&(Graph.isGoogleFontUrl(D)?(D=null,q="g"):q="w")))}else L=V.getView().getState(V.getSelectionCell()),null!=L&&(W=L.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(L=L.style.fontSource,null!=L&&(L=decodeURIComponent(L),Graph.isGoogleFontUrl(L)?q="g":(q="w",D=L))):(q=L.style.FType||
+q,"w"==q&&(D=this.editorUi.editor.graph.extFonts,L=null,null!=D&&(L=D.find(function(O){return O.name==W})),D=null!=L?L.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=D&&D.substring(0,PROXY_URL.length)==PROXY_URL&&(D=decodeURIComponent(D.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==V.cellEditor.textarea&&(R=V.cellEditor.saveSelection());q=new FontDialog(this.editorUi,W,D,q,mxUtils.bind(this,function(O,Q,S){null!=R&&(V.cellEditor.restoreSelection(R),R=null);
if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&V.isEditing())V.setFont(O,Q);else{V.getModel().beginUpdate();try{V.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),V.setCellStyles("fontSource",null!=Q?encodeURIComponent(Q):null),V.setCellStyles("FType",null)):(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(V.setCellStyles("FType",S),0==Q.indexOf("http://")&&(Q=PROXY_URL+"?url="+encodeURIComponent(Q)),this.editorUi.editor.graph.addExtFont(O,
-Q)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:Q}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(t.container,380,Editor.enableWebFonts?250:180,!0,!0);t.init()}),u,null,!0)})))}})();function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+Q)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:Q}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(q.container,380,Editor.enableWebFonts?250:180,!0,!0);q.init()}),u,null,!0)})))}})();function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,d,f){this.ui=b;this.page=d;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,d,f){this.ui=b;this.oldIndex=d;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,d,f){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=f&&(d.viewState=f,this.neverShown=!1))}
@@ -13063,7 +13063,7 @@ EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.s
this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(f){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return d};
EditorUi.prototype.createControlTab=function(b,d,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=d;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
-var l=new mxPopupMenu(mxUtils.bind(this,function(z,C){var e=mxUtils.bind(this,function(){for(var q=0;q<this.pages.length;q++)mxUtils.bind(this,function(p){var A=z.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),C),E=this.pages[p].getId();A.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=E?" ["+E+"]":""));this.pages[p]==this.currentPage&&z.addCheckmark(A,Editor.checkmarkImage)})(q)}),g=mxUtils.bind(this,
+var l=new mxPopupMenu(mxUtils.bind(this,function(z,C){var e=mxUtils.bind(this,function(){for(var t=0;t<this.pages.length;t++)mxUtils.bind(this,function(p){var A=z.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),C),E=this.pages[p].getId();A.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=E?" ["+E+"]":""));this.pages[p]==this.currentPage&&z.addCheckmark(A,Editor.checkmarkImage)})(t)}),g=mxUtils.bind(this,
function(){z.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),C)});d||e();if(this.editor.graph.isEnabled()){d||(z.addSeparator(C),g());var k=this.currentPage;if(null!=k){z.addSeparator(C);var n=this.getShortPageName(k);z.addItem(mxResources.get("removeIt",[n]),null,mxUtils.bind(this,function(){this.removePage(k)}),C);z.addItem(mxResources.get("renameIt",[n]),null,mxUtils.bind(this,function(){this.renamePage(k,k.getName())}),C);d||z.addSeparator(C);z.addItem(mxResources.get("duplicateIt",
[n]),null,mxUtils.bind(this,function(){this.duplicatePage(k,mxResources.get("copyOf",[k.getName()]))}),C)}}d&&(z.addSeparator(C),g(),z.addSeparator(C),e())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),x=mxEvent.getClientY(c);l.popup(m,x,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
@@ -13084,39 +13084,39 @@ function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.b
l,m,x,z,C),mxUtils.bind(this,function(e){return this.isTreeEdge(e)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};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 c(F){return A.isVertex(F)&&m(F)}function l(F){var P=
!1;null!=F&&(P="1"==p.getCurrentCellStyle(F).treeMoving);return P}function m(F){var P=!1;null!=F&&(F=A.getParent(F),P=p.view.getState(F),P="tree"==(null!=P?P.style:p.getCellStyle(F)).containerType);return P}function x(F){var P=!1;null!=F&&(F=A.getParent(F),P=p.view.getState(F),p.view.getState(F),P=null!=(null!=P?P.style:p.getCellStyle(F)).childLayout);return P}function z(F){F=p.view.getState(F);if(null!=F){var P=p.getIncomingTreeEdges(F.cell);if(0<P.length&&(P=p.view.getState(P[0]),null!=P&&(P=P.absolutePoints,
null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==F.y&&Math.abs(P.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==F.y+F.height&&Math.abs(P.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>F.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function C(F,P){P=null!=P?P:!0;p.model.beginUpdate();try{var U=p.model.getParent(F),T=p.getIncomingTreeEdges(F),V=p.cloneCells([T[0],F]);p.model.setTerminal(V[0],p.model.getTerminal(T[0],
-!0),!0);var W=z(F),t=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=P?F.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=P?F.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=t.x,V[1].geometry.y-=t.y);var D=p.view.getState(F),L=p.view.scale;if(null!=D){var R=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?R.x+=(P?F.geometry.width+10:-V[1].geometry.width-10)*L:R.y+=(P?
-F.geometry.height+10:-V[1].geometry.height-10)*L;var O=p.getOutgoingTreeEdges(p.model.getTerminal(T[0],!0));if(null!=O){for(var Q=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=t=T=0;S<O.length;S++){var X=p.model.getTerminal(O[S],!1);if(W==z(X)){var aa=p.view.getState(X);X!=F&&null!=aa&&(Q&&P!=aa.getCenterX()<D.getCenterX()||!Q&&P!=aa.getCenterY()<D.getCenterY())&&mxUtils.intersects(R,aa)&&(T=10+Math.max(T,(Math.min(R.x+R.width,aa.x+aa.width)-Math.max(R.x,aa.x))/L),t=10+Math.max(t,
-(Math.min(R.y+R.height,aa.y+aa.height)-Math.max(R.y,aa.y))/L))}}Q?t=0:T=0;for(S=0;S<O.length;S++)if(X=p.model.getTerminal(O[S],!1),W==z(X)&&(aa=p.view.getState(X),X!=F&&null!=aa&&(Q&&P!=aa.getCenterX()<D.getCenterX()||!Q&&P!=aa.getCenterY()<D.getCenterY()))){var Y=[];p.traverse(aa.cell,!0,function(Z,ca){var fa=null!=ca&&p.isTreeEdge(ca);fa&&Y.push(ca);(null==ca||fa)&&Y.push(Z);return null==ca||fa});p.moveCells(Y,(P?1:-1)*T,(P?1:-1)*t)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function e(F){p.model.beginUpdate();
-try{var P=z(F),U=p.getIncomingTreeEdges(F),T=p.cloneCells([U[0],F]);p.model.setTerminal(U[0],T[1],!1);p.model.setTerminal(T[0],T[1],!0);p.model.setTerminal(T[0],F,!1);var V=p.model.getParent(F),W=V.geometry,t=[];p.view.currentRoot!=V&&(T[1].geometry.x-=W.x,T[1].geometry.y-=W.y);p.traverse(F,!0,function(R,O){var Q=null!=O&&p.isTreeEdge(O);Q&&t.push(O);(null==O||Q)&&t.push(R);return null==O||Q});var D=F.geometry.width+40,L=F.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?D=0:P==mxConstants.DIRECTION_NORTH?
-(D=0,L=-L):P==mxConstants.DIRECTION_WEST?(D=-D,L=0):P==mxConstants.DIRECTION_EAST&&(L=0);p.moveCells(t,D,L);return p.addCells(T,V)}finally{p.model.endUpdate()}}function g(F,P){p.model.beginUpdate();try{var U=p.model.getParent(F),T=p.getIncomingTreeEdges(F),V=z(F);0==T.length&&(T=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=P);var W=p.cloneCells([T[0],F]);p.model.setTerminal(W[0],F,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var t=p.getCellStyle(W[1]).newEdgeStyle;
-if(null!=t)try{var D=JSON.parse(t),L;for(L in D)p.setCellStyles(L,D[L],[W[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==D[L]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(aa){}}T=p.getOutgoingTreeEdges(F);var R=U.geometry;P=[];p.view.currentRoot==U&&(R=new mxRectangle);for(t=0;t<T.length;t++){var O=p.model.getTerminal(T[t],!1);null!=O&&P.push(O)}var Q=p.view.getBounds(P),S=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH?
+!0),!0);var W=z(F),q=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=P?F.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=P?F.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=q.x,V[1].geometry.y-=q.y);var D=p.view.getState(F),L=p.view.scale;if(null!=D){var R=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?R.x+=(P?F.geometry.width+10:-V[1].geometry.width-10)*L:R.y+=(P?
+F.geometry.height+10:-V[1].geometry.height-10)*L;var O=p.getOutgoingTreeEdges(p.model.getTerminal(T[0],!0));if(null!=O){for(var Q=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=q=T=0;S<O.length;S++){var X=p.model.getTerminal(O[S],!1);if(W==z(X)){var aa=p.view.getState(X);X!=F&&null!=aa&&(Q&&P!=aa.getCenterX()<D.getCenterX()||!Q&&P!=aa.getCenterY()<D.getCenterY())&&mxUtils.intersects(R,aa)&&(T=10+Math.max(T,(Math.min(R.x+R.width,aa.x+aa.width)-Math.max(R.x,aa.x))/L),q=10+Math.max(q,
+(Math.min(R.y+R.height,aa.y+aa.height)-Math.max(R.y,aa.y))/L))}}Q?q=0:T=0;for(S=0;S<O.length;S++)if(X=p.model.getTerminal(O[S],!1),W==z(X)&&(aa=p.view.getState(X),X!=F&&null!=aa&&(Q&&P!=aa.getCenterX()<D.getCenterX()||!Q&&P!=aa.getCenterY()<D.getCenterY()))){var Y=[];p.traverse(aa.cell,!0,function(Z,ba){var fa=null!=ba&&p.isTreeEdge(ba);fa&&Y.push(ba);(null==ba||fa)&&Y.push(Z);return null==ba||fa});p.moveCells(Y,(P?1:-1)*T,(P?1:-1)*q)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function e(F){p.model.beginUpdate();
+try{var P=z(F),U=p.getIncomingTreeEdges(F),T=p.cloneCells([U[0],F]);p.model.setTerminal(U[0],T[1],!1);p.model.setTerminal(T[0],T[1],!0);p.model.setTerminal(T[0],F,!1);var V=p.model.getParent(F),W=V.geometry,q=[];p.view.currentRoot!=V&&(T[1].geometry.x-=W.x,T[1].geometry.y-=W.y);p.traverse(F,!0,function(R,O){var Q=null!=O&&p.isTreeEdge(O);Q&&q.push(O);(null==O||Q)&&q.push(R);return null==O||Q});var D=F.geometry.width+40,L=F.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?D=0:P==mxConstants.DIRECTION_NORTH?
+(D=0,L=-L):P==mxConstants.DIRECTION_WEST?(D=-D,L=0):P==mxConstants.DIRECTION_EAST&&(L=0);p.moveCells(q,D,L);return p.addCells(T,V)}finally{p.model.endUpdate()}}function g(F,P){p.model.beginUpdate();try{var U=p.model.getParent(F),T=p.getIncomingTreeEdges(F),V=z(F);0==T.length&&(T=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=P);var W=p.cloneCells([T[0],F]);p.model.setTerminal(W[0],F,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var q=p.getCellStyle(W[1]).newEdgeStyle;
+if(null!=q)try{var D=JSON.parse(q),L;for(L in D)p.setCellStyles(L,D[L],[W[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==D[L]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(aa){}}T=p.getOutgoingTreeEdges(F);var R=U.geometry;P=[];p.view.currentRoot==U&&(R=new mxRectangle);for(q=0;q<T.length;q++){var O=p.model.getTerminal(T[q],!1);null!=O&&P.push(O)}var Q=p.view.getBounds(P),S=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH?
(W[1].geometry.x=null==Q?F.geometry.x+(F.geometry.width-W[1].geometry.width)/2:(Q.x+Q.width)/X-S.x-R.x+10,W[1].geometry.y+=W[1].geometry.height-R.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==Q?F.geometry.x+(F.geometry.width-W[1].geometry.width)/2:(Q.x+Q.width)/X-S.x+-R.x+10,W[1].geometry.y-=W[1].geometry.height+R.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+R.x+40):W[1].geometry.x+(W[1].geometry.width-R.x+40),W[1].geometry.y=null==Q?F.geometry.y+
-(F.geometry.height-W[1].geometry.height)/2:(Q.y+Q.height)/X-S.y+-R.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(F,P,U){F=p.getOutgoingTreeEdges(F);U=p.view.getState(U);var T=[];if(null!=U&&null!=F){for(var V=0;V<F.length;V++){var W=p.view.getState(p.model.getTerminal(F[V],!1));null!=W&&(!P&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||P&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&T.push(W)}T.sort(function(t,D){return P?t.x+t.width-D.x-D.width:t.y+t.height-
-D.y-D.height})}return T}function n(F,P){var U=z(F),T=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==T&&U!=P?q.actions.get("selectParent").funct():U==P?(P=p.getOutgoingTreeEdges(F),null!=P&&0<P.length&&p.setSelectionCell(p.model.getTerminal(P[0],!1))):(U=p.getIncomingTreeEdges(F),null!=U&&0<U.length&&(T=k(p.model.getTerminal(U[0],!0),T,F),F=p.view.getState(F),null!=F&&(F=mxUtils.indexOf(T,F),0<=F&&(F+=P==mxConstants.DIRECTION_NORTH||
-P==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=T.length-1&&p.setSelectionCell(T[F].cell)))))}var q=this,p=q.editor.graph,A=p.getModel(),E=q.menus.createPopupMenu;q.menus.createPopupMenu=function(F,P,U){E.apply(this,arguments);if(1==p.getSelectionCount()){P=p.getSelectionCell();var T=p.getOutgoingTreeEdges(P);F.addSeparator();0<T.length&&(c(p.getSelectionCell())&&this.addMenuItems(F,["selectChildren"],null,U),this.addMenuItems(F,["selectDescendants"],null,U));c(p.getSelectionCell())?(F.addSeparator(),
-0<p.getIncomingTreeEdges(P).length&&this.addMenuItems(F,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(P)&&this.addMenuItems(F,["selectConnections"],null,U)}};q.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getOutgoingTreeEdges(F);if(null!=F){for(var P=[],U=0;U<F.length;U++)P.push(p.model.getTerminal(F[U],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&
-1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getIncomingTreeEdges(F);if(null!=F&&0<F.length&&(F=p.getOutgoingTreeEdges(p.model.getTerminal(F[0],!0)),null!=F)){for(var P=[],U=0;U<F.length;U++)P.push(p.model.getTerminal(F[U],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getIncomingTreeEdges(F);null!=F&&0<F.length&&p.setSelectionCell(p.model.getTerminal(F[0],
-!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(F,P){F=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(F)){if(null!=P&&mxEvent.isAltDown(P))p.setSelectionCells(p.model.getTreeEdges(F,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var U=[];p.traverse(F,!0,function(T,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=P&&mxEvent.isShiftDown(P)||U.push(T);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D");
-var y=p.removeCells;p.removeCells=function(F,P){P=null!=P?P:!0;null==F&&(F=this.getDeletableCells(this.getSelectionCells()));P&&(F=this.getDeletableCells(this.addAllEdges(F)));for(var U=[],T=0;T<F.length;T++){var V=F[T];A.isEdge(V)&&m(V)&&(U.push(V),V=A.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(t,D){var L=null!=D&&p.isTreeEdge(D);L&&W.push(D);(null==D||L)&&W.push(t);return null==D||L});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(F[T]),F=F.concat(V))}else null!=V&&U.push(F[T])}F=
-U;return y.apply(this,arguments)};q.hoverIcons.getStateAt=function(F,P,U){return c(F.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,U))};var B=p.duplicateCells;p.duplicateCells=function(F,P){F=null!=F?F:this.getSelectionCells();for(var U=F.slice(0),T=0;T<U.length;T++){var V=p.view.getState(U[T]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],F)}}this.model.beginUpdate();try{var t=B.call(this,F,P);if(t.length==F.length)for(T=0;T<F.length;T++)if(c(F[T])){var D=
-p.getIncomingTreeEdges(t[T]);W=p.getIncomingTreeEdges(F[T]);if(0==D.length&&0<W.length){var L=this.cloneCell(W[0]);this.addEdge(L,p.getDefaultParent(),this.model.getTerminal(W[0],!0),t[T])}}}finally{this.model.endUpdate()}return t};var J=p.moveCells;p.moveCells=function(F,P,U,T,V,W,t){var D=null;this.model.beginUpdate();try{var L=V,R=this.getCurrentCellStyle(V);if(null!=F&&c(V)&&"1"==mxUtils.getValue(R,"treeFolding","0")){for(var O=0;O<F.length;O++)if(c(F[O])||p.model.isEdge(F[O])&&null==p.model.getTerminal(F[O],
+(F.geometry.height-W[1].geometry.height)/2:(Q.y+Q.height)/X-S.y+-R.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(F,P,U){F=p.getOutgoingTreeEdges(F);U=p.view.getState(U);var T=[];if(null!=U&&null!=F){for(var V=0;V<F.length;V++){var W=p.view.getState(p.model.getTerminal(F[V],!1));null!=W&&(!P&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||P&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&T.push(W)}T.sort(function(q,D){return P?q.x+q.width-D.x-D.width:q.y+q.height-
+D.y-D.height})}return T}function n(F,P){var U=z(F),T=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==T&&U!=P?t.actions.get("selectParent").funct():U==P?(P=p.getOutgoingTreeEdges(F),null!=P&&0<P.length&&p.setSelectionCell(p.model.getTerminal(P[0],!1))):(U=p.getIncomingTreeEdges(F),null!=U&&0<U.length&&(T=k(p.model.getTerminal(U[0],!0),T,F),F=p.view.getState(F),null!=F&&(F=mxUtils.indexOf(T,F),0<=F&&(F+=P==mxConstants.DIRECTION_NORTH||
+P==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=T.length-1&&p.setSelectionCell(T[F].cell)))))}var t=this,p=t.editor.graph,A=p.getModel(),E=t.menus.createPopupMenu;t.menus.createPopupMenu=function(F,P,U){E.apply(this,arguments);if(1==p.getSelectionCount()){P=p.getSelectionCell();var T=p.getOutgoingTreeEdges(P);F.addSeparator();0<T.length&&(c(p.getSelectionCell())&&this.addMenuItems(F,["selectChildren"],null,U),this.addMenuItems(F,["selectDescendants"],null,U));c(p.getSelectionCell())?(F.addSeparator(),
+0<p.getIncomingTreeEdges(P).length&&this.addMenuItems(F,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(P)&&this.addMenuItems(F,["selectConnections"],null,U)}};t.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getOutgoingTreeEdges(F);if(null!=F){for(var P=[],U=0;U<F.length;U++)P.push(p.model.getTerminal(F[U],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&
+1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getIncomingTreeEdges(F);if(null!=F&&0<F.length&&(F=p.getOutgoingTreeEdges(p.model.getTerminal(F[0],!0)),null!=F)){for(var P=[],U=0;U<F.length;U++)P.push(p.model.getTerminal(F[U],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getIncomingTreeEdges(F);null!=F&&0<F.length&&p.setSelectionCell(p.model.getTerminal(F[0],
+!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(F,P){F=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(F)){if(null!=P&&mxEvent.isAltDown(P))p.setSelectionCells(p.model.getTreeEdges(F,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var U=[];p.traverse(F,!0,function(T,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=P&&mxEvent.isShiftDown(P)||U.push(T);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D");
+var y=p.removeCells;p.removeCells=function(F,P){P=null!=P?P:!0;null==F&&(F=this.getDeletableCells(this.getSelectionCells()));P&&(F=this.getDeletableCells(this.addAllEdges(F)));for(var U=[],T=0;T<F.length;T++){var V=F[T];A.isEdge(V)&&m(V)&&(U.push(V),V=A.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(q,D){var L=null!=D&&p.isTreeEdge(D);L&&W.push(D);(null==D||L)&&W.push(q);return null==D||L});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(F[T]),F=F.concat(V))}else null!=V&&U.push(F[T])}F=
+U;return y.apply(this,arguments)};t.hoverIcons.getStateAt=function(F,P,U){return c(F.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,U))};var B=p.duplicateCells;p.duplicateCells=function(F,P){F=null!=F?F:this.getSelectionCells();for(var U=F.slice(0),T=0;T<U.length;T++){var V=p.view.getState(U[T]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],F)}}this.model.beginUpdate();try{var q=B.call(this,F,P);if(q.length==F.length)for(T=0;T<F.length;T++)if(c(F[T])){var D=
+p.getIncomingTreeEdges(q[T]);W=p.getIncomingTreeEdges(F[T]);if(0==D.length&&0<W.length){var L=this.cloneCell(W[0]);this.addEdge(L,p.getDefaultParent(),this.model.getTerminal(W[0],!0),q[T])}}}finally{this.model.endUpdate()}return q};var J=p.moveCells;p.moveCells=function(F,P,U,T,V,W,q){var D=null;this.model.beginUpdate();try{var L=V,R=this.getCurrentCellStyle(V);if(null!=F&&c(V)&&"1"==mxUtils.getValue(R,"treeFolding","0")){for(var O=0;O<F.length;O++)if(c(F[O])||p.model.isEdge(F[O])&&null==p.model.getTerminal(F[O],
!0)){V=p.model.getParent(F[O]);break}if(null!=L&&V!=L&&null!=this.view.getState(F[0])){var Q=p.getIncomingTreeEdges(F[0]);if(0<Q.length){var S=p.view.getState(p.model.getTerminal(Q[0],!0));if(null!=S){var X=p.view.getState(L);null!=X&&(P=(X.getCenterX()-S.getCenterX())/p.view.scale,U=(X.getCenterY()-S.getCenterY())/p.view.scale)}}}}D=J.apply(this,arguments);if(null!=D&&null!=F&&D.length==F.length)for(O=0;O<D.length;O++)if(this.model.isEdge(D[O]))c(L)&&0>mxUtils.indexOf(D,this.model.getTerminal(D[O],
-!0))&&this.model.setTerminal(D[O],L,!0);else if(c(F[O])&&(Q=p.getIncomingTreeEdges(F[O]),0<Q.length))if(!T)c(L)&&0>mxUtils.indexOf(F,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],L,!0);else if(0==p.getIncomingTreeEdges(D[O]).length){R=L;if(null==R||R==p.model.getParent(F[O]))R=p.model.getTerminal(Q[0],!0);T=this.cloneCell(Q[0]);this.addEdge(T,p.getDefaultParent(),R,D[O])}}finally{this.model.endUpdate()}return D};if(null!=q.sidebar){var N=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=
-function(F,P,U,T){var V=p.model,W=null;V.beginUpdate();try{if(W=N.apply(this,arguments),c(F))for(var t=0;t<W.length;t++)if(V.isEdge(W[t])&&null==V.getTerminal(W[t],!0)){V.setTerminal(W[t],F,!0);var D=p.getCellGeometry(W[t]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var v={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},u=q.onKeyDown;q.onKeyDown=function(F){try{if(p.isEnabled()&&
-!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var P=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==F.which?P=mxEvent.isShiftDown(F)?e(p.getSelectionCell()):g(p.getSelectionCell()):13==F.which&&(P=C(p.getSelectionCell(),!mxEvent.isShiftDown(F))));if(null!=P&&0<P.length)1==P.length&&p.model.isEdge(P[0])?p.setSelectionCell(p.model.getTerminal(P[0],!1)):p.setSelectionCell(P[P.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(p.view.getState(p.getSelectionCell())),
+!0))&&this.model.setTerminal(D[O],L,!0);else if(c(F[O])&&(Q=p.getIncomingTreeEdges(F[O]),0<Q.length))if(!T)c(L)&&0>mxUtils.indexOf(F,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],L,!0);else if(0==p.getIncomingTreeEdges(D[O]).length){R=L;if(null==R||R==p.model.getParent(F[O]))R=p.model.getTerminal(Q[0],!0);T=this.cloneCell(Q[0]);this.addEdge(T,p.getDefaultParent(),R,D[O])}}finally{this.model.endUpdate()}return D};if(null!=t.sidebar){var N=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=
+function(F,P,U,T){var V=p.model,W=null;V.beginUpdate();try{if(W=N.apply(this,arguments),c(F))for(var q=0;q<W.length;q++)if(V.isEdge(W[q])&&null==V.getTerminal(W[q],!0)){V.setTerminal(W[q],F,!0);var D=p.getCellGeometry(W[q]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var v={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},u=t.onKeyDown;t.onKeyDown=function(F){try{if(p.isEnabled()&&
+!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var P=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==F.which?P=mxEvent.isShiftDown(F)?e(p.getSelectionCell()):g(p.getSelectionCell()):13==F.which&&(P=C(p.getSelectionCell(),!mxEvent.isShiftDown(F))));if(null!=P&&0<P.length)1==P.length&&p.model.isEdge(P[0])?p.setSelectionCell(p.model.getTerminal(P[0],!1)):p.setSelectionCell(P[P.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(p.view.getState(p.getSelectionCell())),
p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(F);else if(mxEvent.isAltDown(F)&&mxEvent.isShiftDown(F)){var U=v[F.keyCode];null!=U&&(U.funct(F),mxEvent.consume(F))}else 37==F.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(F)):38==F.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(F)):39==F.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(F)):40==F.keyCode&&(n(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(F))}}catch(T){q.handleError(T)}mxEvent.isConsumed(F)||u.apply(this,arguments)};var G=p.connectVertex;p.connectVertex=function(F,P,U,T,V,W,t){var D=p.getIncomingTreeEdges(F);if(c(F)){var L=z(F),R=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return L==P||0==D.length?g(F,P):R==O?e(F):C(F,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};p.getSubtree=function(F){var P=
+mxEvent.consume(F))}}catch(T){t.handleError(T)}mxEvent.isConsumed(F)||u.apply(this,arguments)};var G=p.connectVertex;p.connectVertex=function(F,P,U,T,V,W,q){var D=p.getIncomingTreeEdges(F);if(c(F)){var L=z(F),R=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return L==P||0==D.length?g(F,P):R==O?e(F):C(F,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};p.getSubtree=function(F){var P=
[F];!l(F)&&!c(F)||x(F)||p.traverse(F,!0,function(U,T){var V=null!=T&&p.isTreeEdge(T);V&&0>mxUtils.indexOf(P,T)&&P.push(T);(null==T||V)&&0>mxUtils.indexOf(P,U)&&P.push(U);return null==T||V});return P};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(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(F){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(F),mxEvent.getClientY(F),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(F);
-this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(F)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){K.apply(this,
+this.graph.isMouseDown=!0;t.hoverIcons.reset();mxEvent.consume(F)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){K.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=F?"":"none")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(F,P){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container",
function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var x=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var z=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!0);z.insertEdge(C,!1);m.insert(C);m.insert(x);m.insert(z);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
m.vertex=!0;var x=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.vertex=!0;var z=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!0);z.insertEdge(C,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;x.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;x.insertEdge(n,!0);k.insertEdge(n,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-q.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;x.insertEdge(p,!0);q.insertEdge(p,!1);m.insert(C);m.insert(g);m.insert(n);m.insert(p);m.insert(x);m.insert(z);m.insert(e);m.insert(k);m.insert(q);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
+k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;x.insertEdge(n,!0);k.insertEdge(n,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+t.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;x.insertEdge(p,!0);t.insertEdge(p,!1);m.insert(C);m.insert(g);m.insert(n);m.insert(p);m.insert(x);m.insert(z);m.insert(e);m.insert(k);m.insert(t);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var m=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.setTerminalPoint(new mxPoint(-40,40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.setTerminalPoint(new mxPoint(-40,40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -13155,7 +13155,7 @@ y.smartSeparators=!0;g.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()
["editData"],null,J),y.addSeparator(),this.addSubmenu("layout",y),this.addSubmenu("insert",y),this.addMenuItems(y,["-","exitGroup"],null,J)):N.isEnabled()&&this.addMenuItems(y,["-","lockUnlock"],null,J)};var k=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(y,B,J){k.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(y,["copyAsImage"],null,J)};EditorUi.prototype.toggleFormatPanel=function(y){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=
y?y:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),
this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=
-null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);n.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(y){q.apply(this,arguments);if(y){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
+null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);n.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(y){t.apply(this,arguments);if(y){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var y=this.editorUi,B=y.editor.graph;y.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";y.actions.get("createShape").label=
mxResources.get("shape")+"...";y.actions.get("outline").label=mxResources.get("outline")+"...";y.actions.get("layers").label=mxResources.get("layers")+"...";y.actions.get("tags").label=mxResources.get("tags")+"...";y.actions.get("comments").label=mxResources.get("comments")+"...";var J=y.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(K){y.setSketchMode(!Editor.sketchMode)}));J.setToggleAction(!0);J.setSelectedCallback(function(){return Editor.sketchMode});J=y.actions.put("togglePagesVisible",
new Action(mxResources.get("pages"),function(K){y.setPagesVisible(!Editor.pagesVisible)}));J.setToggleAction(!0);J.setSelectedCallback(function(){return Editor.pagesVisible});y.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){B.popupMenuHandler.hideMenu();y.showImportCsvDialog()}));y.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var K=new ParseDialog(y,"Insert from Text");y.showDialog(K.container,620,420,!0,!1);K.init()}));y.actions.put("formatSql",
@@ -13177,117 +13177,118 @@ y.menus.addMenuItem(K,"plugins",H);K.addSeparator(H)})));this.put("insertAdvance
["insertTemplate"],P),y.menus.addMenuItems(F,["insertImage","insertLink","-"],P),y.menus.addSubmenu("insertAdvanced",F,P,mxResources.get("advanced")),y.menus.addSubmenu("layout",F,P)):(H.apply(this,arguments),y.menus.addSubmenu("table",F,P))}})();var I="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),M=function(K,H,F,P){K.addItem(F,null,mxUtils.bind(this,function(){var U=new CreateGraphDialog(y,F,P);y.showDialog(U.container,620,420,!0,!1);U.init()}),
H)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(K,H){for(var F=0;F<I.length;F++)"-"==I[F]?K.addSeparator(H):M(K,H,mxResources.get(I[F])+"...",I[F])})))};EditorUi.prototype.installFormatToolbar=function(y){var B=this.editor.graph,J=document.createElement("div");J.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(N,v){0<B.getSelectionCount()?(y.appendChild(J),J.innerHTML="Selected: "+B.getSelectionCount()):null!=J.parentNode&&J.parentNode.removeChild(J)}))};var A=!1;EditorUi.prototype.initFormatWindow=function(){if(!A&&null!=this.formatWindow){A=!0;this.formatWindow.window.setClosable(!1);var y=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){y.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",
-this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function y(da,ba,na){var ea=u.menus.get(da),
+this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function y(da,ca,na){var ea=u.menus.get(da),
ia=K.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ea.funct.apply(this,arguments)}),M);ia.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.top="6px";ia.style.marginRight="6px";ia.style.height="30px";ia.style.paddingTop="6px";ia.style.paddingBottom="6px";ia.style.cursor="pointer";ia.setAttribute("title",mxResources.get(da));u.menus.menuCreated(ea,ia,"geMenuItem");null!=na?(ia.style.backgroundImage="url("+
-na+")",ia.style.backgroundPosition="center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px",ia.innerText=""):ba||(ia.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ia.style.backgroundPosition="right 6px center",ia.style.backgroundRepeat="no-repeat",ia.style.paddingRight="22px");return ia}function B(da,ba,na,ea,ia,oa){var ma=document.createElement("a");ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display=
+na+")",ia.style.backgroundPosition="center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px",ia.innerText=""):ca||(ia.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ia.style.backgroundPosition="right 6px center",ia.style.backgroundRepeat="no-repeat",ia.style.paddingRight="22px");return ia}function B(da,ca,na,ea,ia,oa){var ma=document.createElement("a");ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display=
"inline-block";ma.style.boxSizing="border-box";ma.style.height="30px";ma.style.padding="6px";ma.style.position="relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=u.statusContainer?I.insertBefore(ma,u.statusContainer):I.appendChild(ma);null!=oa?(ma.style.backgroundImage="url("+oa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",
-ma.style.backgroundSize="24px 24px",ma.style.width="34px"):mxUtils.write(ma,da);mxEvent.addListener(ma,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(xa){xa.preventDefault()}));mxEvent.addListener(ma,"click",function(xa){"disabled"!=ma.getAttribute("disabled")&&ba(xa);mxEvent.consume(xa)});null==na&&(ma.style.marginRight="4px");null!=ea&&ma.setAttribute("title",ea);null!=ia&&(da=function(){ia.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled",
-"disabled"),ma.style.cursor="default")},ia.addListener("stateChanged",da),G.addListener("enabledChanged",da),da());return ma}function J(da,ba,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var ea=0;ea<da.length;ea++)null!=da[ea]&&("1"==urlParams.sketch&&
-(da[ea].style.padding="10px 8px",da[ea].style.width="30px"),da[ea].style.margin="0px",da[ea].style.boxShadow="none",na.appendChild(da[ea]));null!=ba&&mxUtils.setOpacity(na,ba);null!=u.statusContainer&&"1"!=urlParams.sketch?I.insertBefore(na,u.statusContainer):I.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(D.style.left=58>t.offsetTop-t.offsetHeight/2?"70px":"10px");else{for(var da=I.firstChild;null!=da;){var ba=da.nextSibling;"geMenuItem"!=da.className&&
-"geItem"!=da.className||da.parentNode.removeChild(da);da=ba}M=I.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var na=null;da||(na=y("diagram"));ba=da?y("diagram",null,Editor.menuImage):null;null!=ba&&(na=ba);J([na,B(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),da?Editor.shapesImage:null),B(mxResources.get("format"),u.actions.get("toggleFormat").funct,
-null,mxResources.get("format")+" ("+u.actions.get("formatPanel").shortcut+")",u.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ba=y("insert",!0,da?V:null);J([ba,B(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(J([Ga,Aa],60),520<=c&&J([wa,640<=c?B("",ha.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ha,Editor.zoomInImage):null,640<=c?B("",ra.funct,!0,mxResources.get("zoomOut")+
-" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&u.appIconClicked(ea)}),null,null));ba=u.menus.get("language");null!=ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==ya&&(ba=K.addMenu("",ba.funct),ba.setAttribute("title",
-mxResources.get("language")),ba.className="geToolbarButton",ba.style.backgroundImage="url("+Editor.globeImage+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.position="absolute",ba.style.height="24px",ba.style.width="24px",ba.style.zIndex="1",ba.style.right="8px",ba.style.cursor="pointer",ba.style.top="1"==urlParams.embed?"12px":"11px",I.appendChild(ba),ya=ba),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight=
+ma.style.backgroundSize="24px 24px",ma.style.width="34px"):mxUtils.write(ma,da);mxEvent.addListener(ma,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(xa){xa.preventDefault()}));mxEvent.addListener(ma,"click",function(xa){"disabled"!=ma.getAttribute("disabled")&&ca(xa);mxEvent.consume(xa)});null==na&&(ma.style.marginRight="4px");null!=ea&&ma.setAttribute("title",ea);null!=ia&&(da=function(){ia.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled",
+"disabled"),ma.style.cursor="default")},ia.addListener("stateChanged",da),G.addListener("enabledChanged",da),da());return ma}function J(da,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var ea=0;ea<da.length;ea++)null!=da[ea]&&("1"==urlParams.sketch&&
+(da[ea].style.padding="10px 8px",da[ea].style.width="30px"),da[ea].style.margin="0px",da[ea].style.boxShadow="none",na.appendChild(da[ea]));null!=ca&&mxUtils.setOpacity(na,ca);null!=u.statusContainer&&"1"!=urlParams.sketch?I.insertBefore(na,u.statusContainer):I.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(D.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var da=I.firstChild;null!=da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&
+"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}M=I.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var na=null;da||(na=y("diagram"));ca=da?y("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);J([na,B(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),da?Editor.shapesImage:null),B(mxResources.get("format"),u.actions.get("toggleFormat").funct,
+null,mxResources.get("format")+" ("+u.actions.get("formatPanel").shortcut+")",u.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=y("insert",!0,da?V:null);J([ca,B(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(J([Ga,Aa],60),520<=c&&J([wa,640<=c?B("",ha.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ha,Editor.zoomInImage):null,640<=c?B("",ra.funct,!0,mxResources.get("zoomOut")+
+" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&u.appIconClicked(ea)}),null,null));ca=u.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==ya&&(ca=K.addMenu("",ca.funct),ca.setAttribute("title",
+mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",I.appendChild(ca),ya=ca),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight=
"4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}E.apply(this,arguments);var v=document.createElement("div");v.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";v.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(v);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var u=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==u.embedViewport)mxUtils.fit(this.div);
-else{var da=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),na=u.embedViewport.x+u.embedViewport.width,ea=parseInt(this.div.offsetTop),ia=parseInt(this.div.offsetHeight),oa=u.embedViewport.y+u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(da,na-ba))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(ea,oa-ia))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width,
+else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=u.embedViewport.x+u.embedViewport.width,ea=parseInt(this.div.offsetTop),ia=parseInt(this.div.offsetHeight),oa=u.embedViewport.y+u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(da,na-ca))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(ea,oa-ia))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width,
parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),v=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>v)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));u=this;var G=u.editor.graph;
u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName=mxResources.get("untitledLibrary");var I=document.createElement("div");I.className="geMenubarContainer";var M=null,K=new Menubar(u,I);u.statusContainer=u.createStatusContainer();u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.marginTop="7px";u.statusContainer.style.marginLeft="6px";u.statusContainer.style.color="gray";u.statusContainer.style.cursor="default";var H=u.hideCurrentMenu;
-u.hideCurrentMenu=function(){H.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var F=u.descriptorChanged;u.descriptorChanged=function(){F.apply(this,arguments);var da=u.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ba=da.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);I.setAttribute("title",da.getTitle()+(null!=ba?" ("+ba+")":""))}else I.removeAttribute("title")};u.setStatusText(u.editor.getStatus());
+u.hideCurrentMenu=function(){H.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var F=u.descriptorChanged;u.descriptorChanged=function(){F.apply(this,arguments);var da=u.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);I.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else I.removeAttribute("title")};u.setStatusText(u.editor.getStatus());
I.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div");u.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";I.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer";u.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
v=u.diagramContainer.parentNode;var P=document.createElement("div");P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";u.titlebar=document.createElement("div");u.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var U=document.createElement("div");
-U.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";u.titlebar.appendChild(U);v.appendChild(u.titlebar)}U=u.menus.get("viewZoom");var T=U.funct;U.funct=function(da,ba){T.apply(this,arguments);u.menus.addMenuItems(da,["outline","-","fullscreen","toggleDarkMode"],ba)};var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):
-null,t="1"==urlParams.sketch?document.createElement("div"):null,D="1"==urlParams.sketch?document.createElement("div"):null,L=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)D.style.left="10px",D.style.top="10px",t.style.left="10px",t.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+" "+u.diagramContainer.style.height),u.diagramContainer.style.top=
-"0px",u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height="";else{var da=u.diagramContainer.getAttribute("data-bounds");if(null!=da){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var ba=G.getGraphBounds();da=da.split(" ");u.diagramContainer.style.top=da[0];u.diagramContainer.style.left=da[1];u.diagramContainer.style.width=
-ba.width+50+"px";u.diagramContainer.style.height=ba.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}D.style.left=u.diagramContainer.offsetLeft+"px";D.style.top=u.diagramContainer.offsetTop-D.offsetHeight-4+"px";t.style.display="";t.style.left=u.diagramContainer.offsetLeft-t.offsetWidth-4+"px";t.style.top=u.diagramContainer.offsetTop+
+U.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";u.titlebar.appendChild(U);v.appendChild(u.titlebar)}U=u.menus.get("viewZoom");var T=U.funct;U.funct=function(da,ca){T.apply(this,arguments);u.menus.addMenuItems(da,["outline","-","fullscreen","toggleDarkMode"],ca)};var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):
+null,q="1"==urlParams.sketch?document.createElement("div"):null,D="1"==urlParams.sketch?document.createElement("div"):null,L=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)D.style.left="10px",D.style.top="10px",q.style.left="10px",q.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+" "+u.diagramContainer.style.height),u.diagramContainer.style.top=
+"0px",u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height="";else{var da=u.diagramContainer.getAttribute("data-bounds");if(null!=da){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var ca=G.getGraphBounds();da=da.split(" ");u.diagramContainer.style.top=da[0];u.diagramContainer.style.left=da[1];u.diagramContainer.style.width=
+ca.width+50+"px";u.diagramContainer.style.height=ca.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}D.style.left=u.diagramContainer.offsetLeft+"px";D.style.top=u.diagramContainer.offsetTop-D.offsetHeight-4+"px";q.style.display="";q.style.left=u.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=u.diagramContainer.offsetTop+
"px";W.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-W.offsetWidth+"px";W.style.top=D.style.top;W.style.right="";u.bottomResizer.style.left=u.diagramContainer.offsetLeft+(u.diagramContainer.offsetWidth-u.bottomResizer.offsetWidth)/2+"px";u.bottomResizer.style.top=u.diagramContainer.offsetTop+u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight/2-1+"px";u.rightResizer.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-u.rightResizer.offsetWidth/
2-1+"px";u.rightResizer.style.top=u.diagramContainer.offsetTop+(u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight)/2+"px"}u.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";u.rightResizer.style.visibility=u.bottomResizer.style.visibility;I.style.display="none";D.style.visibility="";W.style.visibility=""}),R=u.actions.get("fullscreen"),O=B("",R.funct,null,mxResources.get(""),R,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?
Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";L()});R=mxUtils.bind(this,function(){b(u,!0);u.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);Q()});u.addListener("inlineFullscreenChanged",Q);u.addListener("editInlineStart",R);"1"==urlParams.embedInline&&u.addListener("darkModeChanged",
-R);u.addListener("editInlineStop",mxUtils.bind(this,function(da){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";D.style.visibility="hidden";W.style.visibility="hidden";t.style.display="none"}));if(null!=u.hoverIcons){var S=u.hoverIcons.update;u.hoverIcons.update=function(){G.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=G.freehand){var X=G.freehand.createStyle;
-G.freehand.createStyle=function(da){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){t.className="geToolbarContainer";W.className="geToolbarContainer";D.className="geToolbarContainer";I.className="geToolbarContainer";u.picker=t;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=u.getServiceName()&&(mxEvent.addListener(I,"mouseenter",function(){u.statusContainer.style.display="inline-block"}),mxEvent.addListener(I,"mouseleave",function(){aa||(u.statusContainer.style.display="none")}));
+R);u.addListener("editInlineStop",mxUtils.bind(this,function(da){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";D.style.visibility="hidden";W.style.visibility="hidden";q.style.display="none"}));if(null!=u.hoverIcons){var S=u.hoverIcons.update;u.hoverIcons.update=function(){G.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=G.freehand){var X=G.freehand.createStyle;
+G.freehand.createStyle=function(da){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";W.className="geToolbarContainer";D.className="geToolbarContainer";I.className="geToolbarContainer";u.picker=q;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=u.getServiceName()&&(mxEvent.addListener(I,"mouseenter",function(){u.statusContainer.style.display="inline-block"}),mxEvent.addListener(I,"mouseleave",function(){aa||(u.statusContainer.style.display="none")}));
var Y=mxUtils.bind(this,function(da){null!=u.notificationBtn&&(null!=da?u.notificationBtn.setAttribute("title",da):u.notificationBtn.removeAttribute("title"))});I.style.visibility=20>I.clientWidth?"hidden":"";u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=u.getServiceName())if(u.statusContainer.style.display="inline-block",aa=!0,1==u.statusContainer.children.length&&""==u.editor.getStatus())I.style.visibility=
-"hidden";else{if(0==u.statusContainer.children.length||1==u.statusContainer.children.length&&"function"===typeof u.statusContainer.firstChild.getAttribute&&null==u.statusContainer.firstChild.getAttribute("class")){var da=null!=u.statusContainer.firstChild&&"function"===typeof u.statusContainer.firstChild.getAttribute?u.statusContainer.firstChild.getAttribute("title"):u.editor.getStatus();Y(da);var ba=u.getCurrentFile();ba=null!=ba?ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ba)+
-"..."?(u.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ba))+'..."src="'+Editor.tailSpin+'">',u.statusContainer.style.display="inline-block",aa=!0):6<u.buttonContainer.clientWidth&&(u.statusContainer.style.display="none",aa=!1)}else u.statusContainer.style.display="inline-block",Y(null),aa=!0;I.style.visibility=20>I.clientWidth&&!aa?"hidden":""}}));qa=y("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";D.appendChild(qa);
+"hidden";else{if(0==u.statusContainer.children.length||1==u.statusContainer.children.length&&"function"===typeof u.statusContainer.firstChild.getAttribute&&null==u.statusContainer.firstChild.getAttribute("class")){var da=null!=u.statusContainer.firstChild&&"function"===typeof u.statusContainer.firstChild.getAttribute?u.statusContainer.firstChild.getAttribute("title"):u.editor.getStatus();Y(da);var ca=u.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+
+"..."?(u.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',u.statusContainer.style.display="inline-block",aa=!0):6<u.buttonContainer.clientWidth&&(u.statusContainer.style.display="none",aa=!1)}else u.statusContainer.style.display="inline-block",Y(null),aa=!0;I.style.visibility=20>I.clientWidth&&!aa?"hidden":""}}));qa=y("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";D.appendChild(qa);
mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),null,null);u.statusContainer.style.position="";u.statusContainer.style.display="none";u.statusContainer.style.margin="0px";u.statusContainer.style.padding="6px 0px";u.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";u.statusContainer.style.display=
"inline-block";u.statusContainer.style.textOverflow="ellipsis";u.buttonContainer.style.position="";u.buttonContainer.style.paddingRight="0px";u.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";
-Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var ca=!1,fa=mxUtils.bind(this,function(){t.innerText="";if(!ca){var da=function(ba,na,ea,ia){null!=na&&ba.setAttribute("title",na);ba.style.cursor=null!=ea?ea:"default";ba.style.margin="2px 0px";t.appendChild(ba);mxUtils.br(t);null!=ia&&(ba.style.position="relative",ba.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,
-ia),ba.appendChild(na));return ba};da(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ba=new mxCell("",new mxGeometry(0,0,G.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ba.geometry.setTerminalPoint(new mxPoint(0,0),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,0),!1);ba.geometry.points=[];ba.geometry.relative=!0;ba.edge=!0;da(u.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,ba.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ba=ba.clone();ba.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ba.geometry.width=G.defaultEdgeLength+20;ba.geometry.setTerminalPoint(new mxPoint(0,20),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,20),!1);da(u.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ba,na,ea,ia){ba=B("",ba.funct,null,na,ba,ea);ba.style.width="40px";ba.style.height="34px";ba.style.opacity="0.7";return da(ba,null,"pointer",ia)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");qa=y("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.height="34px";qa.style.width="37px";da(qa,null,"pointer")}"1"!=urlParams.embedInline&&t.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(t.style,"transform","translate(0, -50%)"),t.style.padding="8px 6px 4px",t.style.top="50%",t.style.bottom="",t.style.height="",Z.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ca=!1,fa()):(t.innerText="",t.appendChild(Z),mxUtils.setPrefixedStyle(t.style,"transform","translate(0, 0)"),t.style.top="",t.style.bottom="12px",t.style.padding="0px",t.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ca=!0)}));fa();u.addListener("darkModeChanged",
+Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var ba=!1,fa=mxUtils.bind(this,function(){q.innerText="";if(!ba){var da=function(ca,na,ea,ia){null!=na&&ca.setAttribute("title",na);ca.style.cursor=null!=ea?ea:"default";ca.style.margin="2px 0px";q.appendChild(ca);mxUtils.br(q);null!=ia&&(ca.style.position="relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,
+ia),ca.appendChild(na));return ca};da(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,G.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,0),!1);ca.geometry.points=[];ca.geometry.relative=!0;ca.edge=!0;da(u.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+ca.geometry.width=G.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,20),!1);da(u.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,ea,ia){ca=B("",ca.funct,null,na,ca,ea);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return da(ca,null,"pointer",ia)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+
+" (X)",Editor.freehandImage,"X");qa=y("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.height="34px";qa.style.width="37px";da(qa,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ba?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",Z.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ba=!1,fa()):(q.innerText="",q.appendChild(Z),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ba=!0)}));fa();u.addListener("darkModeChanged",
fa);u.addListener("sketchModeChanged",fa)}else u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));if(null!=U){var ka=function(da){if(mxEvent.isAltDown(da))u.hideCurrentMenu(),u.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(da)},ha=u.actions.get("zoomIn"),ra=u.actions.get("zoomOut");R=u.actions.get("resetView");
var la=u.actions.get("undo"),Fa=u.actions.get("redo"),Ga=B("",la.funct,null,mxResources.get("undo")+" ("+la.shortcut+")",la,Editor.undoImage),Aa=B("",Fa.funct,null,mxResources.get("redo")+" ("+Fa.shortcut+")",Fa,Editor.redoImage);if(null!=W){R=function(){pa.style.display=null!=u.pages&&("0"!=urlParams.pages||1<u.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Ma=function(){pa.innerText="";if(null!=u.currentPage){mxUtils.write(pa,u.currentPage.getName());var da=null!=u.pages?u.pages.length:
-1,ba=u.getPageIndex(u.currentPage);ba=null!=ba?ba+1:1;var na=u.currentPage.getId();pa.setAttribute("title",u.currentPage.getName()+" ("+ba+"/"+da+")"+(null!=na?" ["+na+"]":""))}},za=u.actions.get("delete"),Da=B("",za.funct,null,mxResources.get("delete"),za,Editor.trashImage);Da.style.opacity="0.1";D.appendChild(Da);za.addListener("stateChanged",function(){Da.style.opacity=za.enabled?"":"0.1"});var Ca=function(){Ga.style.display=0<u.editor.undoManager.history.length||G.isEditing()?"inline-block":"none";
+1,ca=u.getPageIndex(u.currentPage);ca=null!=ca?ca+1:1;var na=u.currentPage.getId();pa.setAttribute("title",u.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=na?" ["+na+"]":""))}},za=u.actions.get("delete"),Da=B("",za.funct,null,mxResources.get("delete"),za,Editor.trashImage);Da.style.opacity="0.1";D.appendChild(Da);za.addListener("stateChanged",function(){Da.style.opacity=za.enabled?"":"0.1"});var Ca=function(){Ga.style.display=0<u.editor.undoManager.history.length||G.isEditing()?"inline-block":"none";
Aa.style.display=Ga.style.display;Ga.style.opacity=la.enabled?"":"0.1";Aa.style.opacity=Fa.enabled?"":"0.1"};D.appendChild(Ga);D.appendChild(Aa);la.addListener("stateChanged",Ca);Fa.addListener("stateChanged",Ca);Ca();var pa=this.createPageMenuTab(!1,!0);pa.style.display="none";pa.style.position="";pa.style.marginLeft="";pa.style.top="";pa.style.left="";pa.style.height="100%";pa.style.lineHeight="";pa.style.borderStyle="none";pa.style.padding="3px 0";pa.style.margin="0px";pa.style.background="";pa.style.border=
"";pa.style.boxShadow="none";pa.style.verticalAlign="top";pa.style.width="auto";pa.style.maxWidth="160px";pa.style.position="relative";pa.style.padding="6px";pa.style.textOverflow="ellipsis";pa.style.opacity="0.8";W.appendChild(pa);u.editor.addListener("pagesPatched",Ma);u.editor.addListener("pageSelected",Ma);u.editor.addListener("pageRenamed",Ma);u.editor.addListener("fileLoaded",Ma);Ma();u.addListener("fileDescriptorChanged",R);u.addListener("pagesVisibleChanged",R);u.editor.addListener("pagesPatched",
R);R();R=B("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ra,Editor.zoomOutImage);W.appendChild(R);var qa=K.addMenu("100%",U.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign="top";qa.style.padding="6px 0";qa.style.fontSize=
"14px";qa.style.width="40px";qa.style.opacity="0.4";W.appendChild(qa);U=B("",ha.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ha,Editor.zoomInImage);W.appendChild(U);"1"==urlParams.embedInline?(W.appendChild(O),U=u.actions.get("exit"),W.appendChild(B("",U.funct,null,mxResources.get("exit"),U,Editor.closeImage))):O.parentNode.removeChild(O);u.tabContainer.style.visibility="hidden";I.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-D.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(D);P.appendChild(W);t.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(t.style.touchAction="none");P.appendChild(t);window.setTimeout(function(){mxUtils.setPrefixedStyle(t.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var wa=B("",ka,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",R,Editor.zoomFitImage);I.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=K.addMenu("100%",
+D.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(D);P.appendChild(W);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(q.style.touchAction="none");P.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var wa=B("",ka,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",R,Editor.zoomFitImage);I.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=K.addMenu("100%",
U.funct);qa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.textDecoration="none";qa.style.overflow="hidden";qa.style.visibility="hidden";qa.style.textAlign="center";qa.style.cursor="pointer";qa.style.height=parseInt(u.tabContainerHeight)-1+"px";qa.style.lineHeight=parseInt(u.tabContainerHeight)+1+"px";qa.style.position="absolute";qa.style.display="block";qa.style.fontSize="12px";qa.style.width=
-"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";P.appendChild(qa)}(function(da){mxEvent.addListener(da,"click",ka);var ba=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ba);u.editor.addListener("resetGraphView",ba);u.editor.addListener("pageSelected",
-ba)})(qa);var Ha=u.setGraphEnabled;u.setGraphEnabled=function(){Ha.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}P.appendChild(I);P.appendChild(u.diagramContainer);v.appendChild(P);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&P.appendChild(u.tabContainer);
+"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";P.appendChild(qa)}(function(da){mxEvent.addListener(da,"click",ka);var ca=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);u.editor.addListener("resetGraphView",ca);u.editor.addListener("pageSelected",
+ca)})(qa);var Ha=u.setGraphEnabled;u.setGraphEnabled=function(){Ha.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}P.appendChild(I);P.appendChild(u.diagramContainer);v.appendChild(P);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&P.appendChild(u.tabContainer);
var ya=null;N();mxEvent.addListener(window,"resize",function(){N();null!=u.sidebarWindow&&u.sidebarWindow.window.fit();null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";t.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),u.sendEmbeddedSvgExport())});v=document.createElement("div");v.style.position="absolute";v.style.width="10px";v.style.height="10px";v.style.borderRadius="5px";v.style.border="1px solid gray";v.style.background="#ffffff";v.style.cursor=
+urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),u.sendEmbeddedSvgExport())});v=document.createElement("div");v.style.position="absolute";v.style.width="10px";v.style.height="10px";v.style.borderRadius="5px";v.style.border="1px solid gray";v.style.background="#ffffff";v.style.cursor=
"row-resize";u.diagramContainer.parentNode.appendChild(v);u.bottomResizer=v;var Ia=null,ja=null,va=null,ta=null;mxEvent.addGestureListeners(v,function(da){ta=parseInt(u.diagramContainer.style.height);ja=mxEvent.getClientY(da);G.popupMenuHandler.hideMenu();mxEvent.consume(da)});v=v.cloneNode(!1);v.style.cursor="col-resize";u.diagramContainer.parentNode.appendChild(v);u.rightResizer=v;mxEvent.addGestureListeners(v,function(da){va=parseInt(u.diagramContainer.style.width);Ia=mxEvent.getClientX(da);G.popupMenuHandler.hideMenu();
-mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ba=!1;null!=Ia&&(u.diagramContainer.style.width=Math.max(20,va+mxEvent.getClientX(da)-Ia)+"px",ba=!0);null!=ja&&(u.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(da)-ja)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),L(),u.refresh())},function(da){null==Ia&&null==
-ja||mxEvent.consume(da);ja=Ia=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";D.style.visibility="hidden";W.style.visibility="hidden";t.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,x){var z=l.y,C=l.x,e=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,q=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+C;n.y=c.y+z;n.width=c.width;n.height=c.height;for(var A=[],E=[],y=0;y<this.states.length;y++){var B=this.states[y];B instanceof mxCellState&&(x||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y>
-B.y+B.height+4||n.y+n.height+4<B.y)?A.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&E.push(B))}var J=0,N=0,v=B=0,u=0,G=0,I=0,M=0,K=5*q;if(1<A.length){A.push(n);A.sort(function(U,T){return U.y-T.y});var H=!1;y=n==A[0];q=n==A[A.length-1];if(!y&&!q)for(y=1;y<A.length-1;y++)if(n==A[y]){q=A[y-1];y=A[y+1];B=N=v=(y.y-q.y-q.height-n.height)/2;break}for(y=0;y<A.length-1;y++){q=A[y];var F=A[y+1],P=n==q||n==F;F=F.y-q.y-q.height;H|=n==q;if(0==N&&0==
-J)N=F,J=1;else if(Math.abs(N-F)<=(P||1==y&&H?p:0))J+=1;else if(1<J&&H){A=A.slice(0,y+1);break}else if(3<=A.length-y&&!H)J=0,B=N=0!=v?v:0,A.splice(0,0==y?1:y),y=-1;else break;0!=B||P||(N=B=F)}3==A.length&&A[1]==n&&(B=0)}if(1<E.length){E.push(n);E.sort(function(U,T){return U.x-T.x});H=!1;y=n==E[0];q=n==E[E.length-1];if(!y&&!q)for(y=1;y<E.length-1;y++)if(n==E[y]){q=E[y-1];y=E[y+1];I=G=M=(y.x-q.x-q.width-n.width)/2;break}for(y=0;y<E.length-1;y++){q=E[y];F=E[y+1];P=n==q||n==F;F=F.x-q.x-q.width;H|=n==q;
-if(0==G&&0==u)G=F,u=1;else if(Math.abs(G-F)<=(P||1==y&&H?p:0))u+=1;else if(1<u&&H){E=E.slice(0,y+1);break}else if(3<=E.length-y&&!H)u=0,I=G=0!=M?M:0,E.splice(0,0==y?1:y),y=-1;else break;0!=I||P||(G=I=F)}3==E.length&&E[1]==n&&(I=0)}p=function(U,T,V,W){var t=[];if(W){W=K;var D=0}else W=0,D=K;t.push(new mxPoint(U.x-W,U.y-D));t.push(new mxPoint(U.x+W,U.y+D));t.push(U);t.push(T);t.push(new mxPoint(T.x-W,T.y-D));t.push(new mxPoint(T.x+W,T.y+D));if(null!=V)return V.points=t,V;U=new mxPolyline(t,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};G=function(U,T){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(T&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<u&&u==E.length-1){u=[];M=k.guidesArrHor;e=[];C=0;y=E[0]==n?1:0;H=E[y].y+E[y].height;if(0<I)for(y=0;y<E.length-1;y++)q=
-E[y],F=E[y+1],n==q?(C=F.x-q.width-I,e.push(new mxPoint(C+q.width+K,H)),e.push(new mxPoint(F.x-K,H))):n==F?(e.push(new mxPoint(q.x+q.width+K,H)),C=q.x+q.width+I,e.push(new mxPoint(C-K,H))):(e.push(new mxPoint(q.x+q.width+K,H)),e.push(new mxPoint(F.x-K,H)));else q=E[0],y=E[2],C=q.x+q.width+(y.x-q.x-q.width-n.width)/2,e.push(new mxPoint(q.x+q.width+K,H)),e.push(new mxPoint(C-K,H)),e.push(new mxPoint(C+n.width+K,H)),e.push(new mxPoint(y.x-K,H));for(y=0;y<e.length;y+=2)E=e[y],I=e[y+1],E=p(E,I,null!=M?
-M[y/2]:null),E.node.style.visibility="visible",E.redraw(),u.push(E);for(y=e.length/2;null!=M&&y<M.length;y++)M[y].destroy();k.guidesArrHor=u;C-=c.x;e=!0}else G(!0);if(1<J&&J==A.length-1){u=[];M=k.guidesArrVer;g=[];z=0;y=A[0]==n?1:0;J=A[y].x+A[y].width;if(0<B)for(y=0;y<A.length-1;y++)q=A[y],F=A[y+1],n==q?(z=F.y-q.height-B,g.push(new mxPoint(J,z+q.height+K)),g.push(new mxPoint(J,F.y-K))):n==F?(g.push(new mxPoint(J,q.y+q.height+K)),z=q.y+q.height+B,g.push(new mxPoint(J,z-K))):(g.push(new mxPoint(J,q.y+
-q.height+K)),g.push(new mxPoint(J,F.y-K)));else q=A[0],y=A[2],z=q.y+q.height+(y.y-q.y-q.height-n.height)/2,g.push(new mxPoint(J,q.y+q.height+K)),g.push(new mxPoint(J,z-K)),g.push(new mxPoint(J,z+n.height+K)),g.push(new mxPoint(J,y.y-K));for(y=0;y<g.length;y+=2)E=g[y],I=g[y+1],E=p(E,I,null!=M?M[y/2]:null,!0),E.node.style.visibility="visible",E.redraw(),u.push(E);for(y=g.length/2;null!=M&&y<M.length;y++)M[y].destroy();k.guidesArrVer=u;z-=c.y;g=!0}else G(!1,!0)}if(e||g)return n=new mxPoint(C,z),A=b.call(this,
+mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=Ia&&(u.diagramContainer.style.width=Math.max(20,va+mxEvent.getClientX(da)-Ia)+"px",ca=!0);null!=ja&&(u.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(da)-ja)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),L(),u.refresh())},function(da){null==Ia&&null==
+ja||mxEvent.consume(da);ja=Ia=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";D.style.visibility="hidden";W.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,x){var z=l.y,C=l.x,e=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,t=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+C;n.y=c.y+z;n.width=c.width;n.height=c.height;for(var A=[],E=[],y=0;y<this.states.length;y++){var B=this.states[y];B instanceof mxCellState&&(x||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y>
+B.y+B.height+4||n.y+n.height+4<B.y)?A.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&E.push(B))}var J=0,N=0,v=B=0,u=0,G=0,I=0,M=0,K=5*t;if(1<A.length){A.push(n);A.sort(function(U,T){return U.y-T.y});var H=!1;y=n==A[0];t=n==A[A.length-1];if(!y&&!t)for(y=1;y<A.length-1;y++)if(n==A[y]){t=A[y-1];y=A[y+1];B=N=v=(y.y-t.y-t.height-n.height)/2;break}for(y=0;y<A.length-1;y++){t=A[y];var F=A[y+1],P=n==t||n==F;F=F.y-t.y-t.height;H|=n==t;if(0==N&&0==
+J)N=F,J=1;else if(Math.abs(N-F)<=(P||1==y&&H?p:0))J+=1;else if(1<J&&H){A=A.slice(0,y+1);break}else if(3<=A.length-y&&!H)J=0,B=N=0!=v?v:0,A.splice(0,0==y?1:y),y=-1;else break;0!=B||P||(N=B=F)}3==A.length&&A[1]==n&&(B=0)}if(1<E.length){E.push(n);E.sort(function(U,T){return U.x-T.x});H=!1;y=n==E[0];t=n==E[E.length-1];if(!y&&!t)for(y=1;y<E.length-1;y++)if(n==E[y]){t=E[y-1];y=E[y+1];I=G=M=(y.x-t.x-t.width-n.width)/2;break}for(y=0;y<E.length-1;y++){t=E[y];F=E[y+1];P=n==t||n==F;F=F.x-t.x-t.width;H|=n==t;
+if(0==G&&0==u)G=F,u=1;else if(Math.abs(G-F)<=(P||1==y&&H?p:0))u+=1;else if(1<u&&H){E=E.slice(0,y+1);break}else if(3<=E.length-y&&!H)u=0,I=G=0!=M?M:0,E.splice(0,0==y?1:y),y=-1;else break;0!=I||P||(G=I=F)}3==E.length&&E[1]==n&&(I=0)}p=function(U,T,V,W){var q=[];if(W){W=K;var D=0}else W=0,D=K;q.push(new mxPoint(U.x-W,U.y-D));q.push(new mxPoint(U.x+W,U.y+D));q.push(U);q.push(T);q.push(new mxPoint(T.x-W,T.y-D));q.push(new mxPoint(T.x+W,T.y+D));if(null!=V)return V.points=q,V;U=new mxPolyline(q,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};G=function(U,T){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(T&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<u&&u==E.length-1){u=[];M=k.guidesArrHor;e=[];C=0;y=E[0]==n?1:0;H=E[y].y+E[y].height;if(0<I)for(y=0;y<E.length-1;y++)t=
+E[y],F=E[y+1],n==t?(C=F.x-t.width-I,e.push(new mxPoint(C+t.width+K,H)),e.push(new mxPoint(F.x-K,H))):n==F?(e.push(new mxPoint(t.x+t.width+K,H)),C=t.x+t.width+I,e.push(new mxPoint(C-K,H))):(e.push(new mxPoint(t.x+t.width+K,H)),e.push(new mxPoint(F.x-K,H)));else t=E[0],y=E[2],C=t.x+t.width+(y.x-t.x-t.width-n.width)/2,e.push(new mxPoint(t.x+t.width+K,H)),e.push(new mxPoint(C-K,H)),e.push(new mxPoint(C+n.width+K,H)),e.push(new mxPoint(y.x-K,H));for(y=0;y<e.length;y+=2)E=e[y],I=e[y+1],E=p(E,I,null!=M?
+M[y/2]:null),E.node.style.visibility="visible",E.redraw(),u.push(E);for(y=e.length/2;null!=M&&y<M.length;y++)M[y].destroy();k.guidesArrHor=u;C-=c.x;e=!0}else G(!0);if(1<J&&J==A.length-1){u=[];M=k.guidesArrVer;g=[];z=0;y=A[0]==n?1:0;J=A[y].x+A[y].width;if(0<B)for(y=0;y<A.length-1;y++)t=A[y],F=A[y+1],n==t?(z=F.y-t.height-B,g.push(new mxPoint(J,z+t.height+K)),g.push(new mxPoint(J,F.y-K))):n==F?(g.push(new mxPoint(J,t.y+t.height+K)),z=t.y+t.height+B,g.push(new mxPoint(J,z-K))):(g.push(new mxPoint(J,t.y+
+t.height+K)),g.push(new mxPoint(J,F.y-K)));else t=A[0],y=A[2],z=t.y+t.height+(y.y-t.y-t.height-n.height)/2,g.push(new mxPoint(J,t.y+t.height+K)),g.push(new mxPoint(J,z-K)),g.push(new mxPoint(J,z+n.height+K)),g.push(new mxPoint(J,y.y-K));for(y=0;y<g.length;y+=2)E=g[y],I=g[y+1],E=p(E,I,null!=M?M[y/2]:null,!0),E.node.style.visibility="visible",E.redraw(),u.push(E);for(y=g.length/2;null!=M&&y<M.length;y++)M[y].destroy();k.guidesArrVer=u;z-=c.y;g=!0}else G(!1,!0)}if(e||g)return n=new mxPoint(C,z),A=b.call(this,
c,n,m,x),e&&!g?n.y=A.y:g&&!e&&(n.x=A.x),A.y!=n.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=n.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),n;G(!0,!0);return b.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){d.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var x=0;x<l.length;x++)l[x].node.style.visibility=c?"visible":"hidden";if(null!=
m)for(x=0;x<m.length;x++)m[x].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,d,f,c){function l(){var J=b.diagramContainer;k.style.top=J.offsetTop-C+"px";k.style.left=J.offsetLeft-C+"px";k.style.width=(f?0:J.offsetWidth)+C+"px";k.style.height=(f?J.offsetHeight:0)+C+"px"}function m(J,N,v){if(null!=x)return J;var u;return function(){var G=this,I=arguments,M=v&&!u;clearTimeout(u);u=setTimeout(function(){u=null;v||J.apply(G,I)},N);M&&J.apply(G,I)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
z=window.cancelAnimationFrame||window.mozCancelAnimationFrame,C=this.RULER_THICKNESS,e=this;this.unit=d;var g=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},k=document.createElement("div");k.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){g=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};k.style.background=g.bkgClr;k.style[f?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;k.style.borderLeft="0.5px solid "+g.strokeClr});this.updateStyle();document.body.appendChild(k);mxEvent.disableContextMenu(k);this.editorUiRefresh=b.refresh;b.refresh=
-function(J){e.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var q=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var A=function(J,N,v,u,G){J=Math.round(J);N=Math.round(N);v=Math.round(v);u=Math.round(u);q.beginPath();q.moveTo(J+.5,N+.5);q.lineTo(v+.5,u+.5);q.stroke();G&&(f?(q.save(),q.translate(J,N),
-q.rotate(-Math.PI/2),q.fillText(G,0,0),q.restore()):q.fillText(G,J,N))},E=function(){q.clearRect(0,0,n.width,n.height);q.beginPath();q.lineWidth=.7;q.strokeStyle=g.strokeClr;q.setLineDash([]);q.font="9px Arial";q.textAlign="center";var J=p.view.scale,N=p.view.getBackgroundPageBounds(),v=p.view.translate,u=p.pageVisible;v=u?C+(f?N.y-p.container.scrollTop:N.x-p.container.scrollLeft):C+(f?v.y*J-p.container.scrollTop:v.x*J-p.container.scrollLeft);var G=0;u&&(G=p.getPageLayout(),G=f?G.y*p.pageFormat.height:
+function(J){e.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var t=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var A=function(J,N,v,u,G){J=Math.round(J);N=Math.round(N);v=Math.round(v);u=Math.round(u);t.beginPath();t.moveTo(J+.5,N+.5);t.lineTo(v+.5,u+.5);t.stroke();G&&(f?(t.save(),t.translate(J,N),
+t.rotate(-Math.PI/2),t.fillText(G,0,0),t.restore()):t.fillText(G,J,N))},E=function(){t.clearRect(0,0,n.width,n.height);t.beginPath();t.lineWidth=.7;t.strokeStyle=g.strokeClr;t.setLineDash([]);t.font="9px Arial";t.textAlign="center";var J=p.view.scale,N=p.view.getBackgroundPageBounds(),v=p.view.translate,u=p.pageVisible;v=u?C+(f?N.y-p.container.scrollTop:N.x-p.container.scrollLeft):C+(f?v.y*J-p.container.scrollTop:v.x*J-p.container.scrollLeft);var G=0;u&&(G=p.getPageLayout(),G=f?G.y*p.pageFormat.height:
G.x*p.pageFormat.width);var I;switch(e.unit){case mxConstants.POINTS:var M=I=10;var K=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:I=10;M=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:I=20;M=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:I=.5>=J||4<=J?8:16,M=mxConstants.PIXELS_PER_INCH/I,K=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var H=M;2<=J?H=M/(2*Math.floor(J/2)):.5>=J&&(H=M*Math.floor(1/J/2)*(e.unit==
-mxConstants.MILLIMETERS?2:1));M=null;N=u?Math.min(v+(f?N.height:N.width),f?n.height:n.width):f?n.height:n.width;if(u)if(q.fillStyle=g.outBkgClr,f){var F=v-C;0<F&&q.fillRect(0,C,C,F);N<n.height&&q.fillRect(0,N,C,n.height)}else F=v-C,0<F&&q.fillRect(C,0,F,C),N<n.width&&q.fillRect(N,0,n.width,C);q.fillStyle=g.fontClr;for(u=u?v:v%(H*J);u<=N;u+=H*J)if(F=Math.round((u-v)/J/H),!(u<C||F==M)){M=F;var P=null;0==F%I&&(P=e.formatText(G+F*H)+"");f?A(C-K[Math.abs(F)%I],u,C,u,P):A(u,C-K[Math.abs(F)%I],u,C,P)}q.lineWidth=
-1;A(f?0:C,f?C:0,C,C);q.fillStyle=g.cornerClr;q.fillRect(0,0,C,C)},y=-1,B=function(){null!=x?(null!=z&&z(y),y=x(E)):E()};this.drawRuler=B;this.sizeListener=d=m(function(){var J=p.container;f?(J=J.offsetHeight+C,n.height!=J&&(n.height=J,k.style.height=J+"px",B())):(J=J.offsetWidth+C,n.width!=J&&(n.width=J,k.style.width=J+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var J=f?p.container.scrollTop:p.container.scrollLeft;e.lastScroll!=J&&(e.lastScroll=J,B())},10);
+mxConstants.MILLIMETERS?2:1));M=null;N=u?Math.min(v+(f?N.height:N.width),f?n.height:n.width):f?n.height:n.width;if(u)if(t.fillStyle=g.outBkgClr,f){var F=v-C;0<F&&t.fillRect(0,C,C,F);N<n.height&&t.fillRect(0,N,C,n.height)}else F=v-C,0<F&&t.fillRect(C,0,F,C),N<n.width&&t.fillRect(N,0,n.width,C);t.fillStyle=g.fontClr;for(u=u?v:v%(H*J);u<=N;u+=H*J)if(F=Math.round((u-v)/J/H),!(u<C||F==M)){M=F;var P=null;0==F%I&&(P=e.formatText(G+F*H)+"");f?A(C-K[Math.abs(F)%I],u,C,u,P):A(u,C-K[Math.abs(F)%I],u,C,P)}t.lineWidth=
+1;A(f?0:C,f?C:0,C,C);t.fillStyle=g.cornerClr;t.fillRect(0,0,C,C)},y=-1,B=function(){null!=x?(null!=z&&z(y),y=x(E)):E()};this.drawRuler=B;this.sizeListener=d=m(function(){var J=p.container;f?(J=J.offsetHeight+C,n.height!=J&&(n.height=J,k.style.height=J+"px",B())):(J=J.offsetWidth+C,n.width!=J&&(n.width=J,k.style.width=J+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var J=f?p.container.scrollTop:p.container.scrollLeft;e.lastScroll!=J&&(e.lastScroll=J,B())},10);
this.unitListener=function(J,N){e.setUnit(N.getProperty("unit"))};p.addListener(mxEvent.SIZE,d);p.container.addEventListener("scroll",c);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){g=J;k.style.background=g.bkgClr;E()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,N,v,u){if(f&&4<J.height||
-!f&&4<J.width){if(null!=e.guidePart)try{q.putImageData(e.guidePart.imgData1,e.guidePart.x1,e.guidePart.y1),q.putImageData(e.guidePart.imgData2,e.guidePart.x2,e.guidePart.y2),q.putImageData(e.guidePart.imgData3,e.guidePart.x3,e.guidePart.y3)}catch(W){}var G=e.origGuideMove.apply(this,arguments);try{q.lineWidth=.5;q.strokeStyle=g.guideClr;q.setLineDash([2]);if(f){var I=J.y+G.y+C-this.graph.container.scrollTop;var M=0;var K=I+J.height/2;var H=C/2;var F=I+J.height;var P=0;var U=q.getImageData(M,I-1,C,
-3);A(M,I,C,I);I--;var T=q.getImageData(H,K-1,C,3);A(H,K,C,K);K--;var V=q.getImageData(P,F-1,C,3);A(P,F,C,F);F--}else I=0,M=J.x+G.x+C-this.graph.container.scrollLeft,K=C/2,H=M+J.width/2,F=0,P=M+J.width,U=q.getImageData(M-1,I,3,C),A(M,I,M,C),M--,T=q.getImageData(H-1,K,3,C),A(H,K,H,C),H--,V=q.getImageData(P-1,F,3,C),A(P,F,P,C),P--;if(null==e.guidePart||e.guidePart.x1!=M||e.guidePart.y1!=I)e.guidePart={imgData1:U,x1:M,y1:I,imgData2:T,x2:H,y2:K,imgData3:V,x3:P,y3:F}}catch(W){}}else G=e.origGuideMove.apply(this,
-arguments);return G};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=e.origGuideDestroy.apply(this,arguments);if(null!=e.guidePart)try{q.putImageData(e.guidePart.imgData1,e.guidePart.x1,e.guidePart.y1),q.putImageData(e.guidePart.imgData2,e.guidePart.x2,e.guidePart.y2),q.putImageData(e.guidePart.imgData3,e.guidePart.x3,e.guidePart.y3),e.guidePart=null}catch(N){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+!f&&4<J.width){if(null!=e.guidePart)try{t.putImageData(e.guidePart.imgData1,e.guidePart.x1,e.guidePart.y1),t.putImageData(e.guidePart.imgData2,e.guidePart.x2,e.guidePart.y2),t.putImageData(e.guidePart.imgData3,e.guidePart.x3,e.guidePart.y3)}catch(W){}var G=e.origGuideMove.apply(this,arguments);try{t.lineWidth=.5;t.strokeStyle=g.guideClr;t.setLineDash([2]);if(f){var I=J.y+G.y+C-this.graph.container.scrollTop;var M=0;var K=I+J.height/2;var H=C/2;var F=I+J.height;var P=0;var U=t.getImageData(M,I-1,C,
+3);A(M,I,C,I);I--;var T=t.getImageData(H,K-1,C,3);A(H,K,C,K);K--;var V=t.getImageData(P,F-1,C,3);A(P,F,C,F);F--}else I=0,M=J.x+G.x+C-this.graph.container.scrollLeft,K=C/2,H=M+J.width/2,F=0,P=M+J.width,U=t.getImageData(M-1,I,3,C),A(M,I,M,C),M--,T=t.getImageData(H-1,K,3,C),A(H,K,H,C),H--,V=t.getImageData(P-1,F,3,C),A(P,F,P,C),P--;if(null==e.guidePart||e.guidePart.x1!=M||e.guidePart.y1!=I)e.guidePart={imgData1:U,x1:M,y1:I,imgData2:T,x2:H,y2:K,imgData3:V,x3:P,y3:F}}catch(W){}}else G=e.origGuideMove.apply(this,
+arguments);return G};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=e.origGuideDestroy.apply(this,arguments);if(null!=e.guidePart)try{t.putImageData(e.guidePart.imgData1,e.guidePart.x1,e.guidePart.y1),t.putImageData(e.guidePart.imgData2,e.guidePart.x2,e.guidePart.y2),t.putImageData(e.guidePart.imgData3,e.guidePart.x3,e.guidePart.y3),e.guidePart=null}catch(N){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,d){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,d,!0);this.hRuler=new mxRuler(b,d,!1,!0);d=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(m){l=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!l){var x=new mxPopupMenu(mxUtils.bind(this,function(e,g){b.menus.addMenuItems(e,["points","inches","millimeters","meters"],g)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=
!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var z=mxEvent.getClientX(m),C=mxEvent.getClientY(m);x.popup(z,C,null,m);b.setCurrentMenu(x,c)}mxEvent.consume(m)}}))});d(this.hRuler.container);d(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var d=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=d){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,x=[],z,C=!1,e=!0,g=!0,k=!0,n=!0,q=[],p=!1,A=!0,E=!1,y={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(K){C=K};this.setAutoClose=function(K){e=K};this.setAutoInsert=
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var d=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=d){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,x=[],z,C=!1,e=!0,g=!0,k=!0,n=!0,t=[],p=!1,A=!0,E=!1,y={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(K){C=K};this.setAutoClose=function(K){e=K};this.setAutoInsert=
function(K){g=K};this.setAutoScroll=function(K){k=K};this.setOpenFill=function(K){n=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){E=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){B=K};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(K){y.size=K};this.getBrushSize=function(){return y.size};var J=function(K){p=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);
b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){J(!0)};this.isDrawing=function(){return p};var N=mxUtils.bind(this,function(K){if(c){var H=z.length,F=A&&0<x.length&&null!=z&&2>z.length;F||x.push.apply(x,z);z=[];x.push(null);l.push(c);c=null;(F||g)&&this.stopDrawing();g&&2<=H&&this.startDrawing();mxEvent.consume(K)}}),v=new mxCell;v.edge=!0;var u=function(){var K=b.getCurrentCellStyle(v);K=mxUtils.getValue(b.currentVertexStyle,
mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var H=";fillColor=none;";B&&(H=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+H};this.stopDrawing=function(){if(0<l.length){if(B){for(var K=[],H=0;H<x.length;H++)null!=x[H]&&K.push([x[H].x,x[H].y]);K=PerfectFreehand.getStroke(K,y);x=[];for(H=0;H<K.length;H++)x.push({x:K[H][0],y:K[H][1]});x.push(null)}K=x[0].x;var F=x[0].x,P=
-x[0].y,U=x[0].y;for(H=1;H<x.length;H++)null!=x[H]&&(K=Math.max(K,x[H].x),F=Math.min(F,x[H].x),P=Math.max(P,x[H].y),U=Math.min(U,x[H].y));K-=F;P-=U;if(0<K&&0<P){var T=100/K,V=100/P;x.map(function(R){if(null==R)return R;R.x=(R.x-F)*T;R.y=(R.y-U)*V;return R});var W='<shape strokewidth="inherit"><foreground>',t=0;for(H=0;H<x.length;H++){var D=x[H];if(null==D){D=!1;t=x[t];var L=x[H-1];!C&&e&&(D=t.x-L.x,L=t.y-L.y,D=Math.sqrt(D*D+L*L)<=b.tolerance);if(C||D)W+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+
-'"/>';W+="</path>"+(n||C||D?"<fillstroke/>":"<stroke/>");t=H+1}else W=H==t?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;t=b.view.translate;H=new mxCell("",new mxGeometry(F/W-t.x,U/W-t.y,K/W,P/W),H);H.vertex=1;b.model.beginUpdate();try{H=b.addCell(H),b.fireEvent(new mxEventObject("cellsInserted",
+x[0].y,U=x[0].y;for(H=1;H<x.length;H++)null!=x[H]&&(K=Math.max(K,x[H].x),F=Math.min(F,x[H].x),P=Math.max(P,x[H].y),U=Math.min(U,x[H].y));K-=F;P-=U;if(0<K&&0<P){var T=100/K,V=100/P;x.map(function(R){if(null==R)return R;R.x=(R.x-F)*T;R.y=(R.y-U)*V;return R});var W='<shape strokewidth="inherit"><foreground>',q=0;for(H=0;H<x.length;H++){var D=x[H];if(null==D){D=!1;q=x[q];var L=x[H-1];!C&&e&&(D=q.x-L.x,L=q.y-L.y,D=Math.sqrt(D*D+L*L)<=b.tolerance);if(C||D)W+='<line x="'+q.x.toFixed(2)+'" y="'+q.y.toFixed(2)+
+'"/>';W+="</path>"+(n||C||D?"<fillstroke/>":"<stroke/>");q=H+1}else W=H==q?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;q=b.view.translate;H=new mxCell("",new mxGeometry(F/W-q.x,U/W-q.y,K/W,P/W),H);H.vertex=1;b.model.beginUpdate();try{H=b.addCell(H),b.fireEvent(new mxEventObject("cellsInserted",
"cells",[H])),b.fireEvent(new mxEventObject("freehandInserted","cell",H))}finally{b.model.endUpdate()}E&&b.setSelectionCells([H])}}for(H=0;H<l.length;H++)l[H].parentNode.removeChild(l[H]);c=null;l=[];x=[]}J(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,H){K=H.getProperty("eventName");H=H.getProperty("event");K==mxEvent.MOUSE_MOVE&&p&&(null!=H.sourceState&&H.sourceState.setCursor("crosshair"),H.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(K,H){if(b.isEnabled()&&
!b.isCellLocked(b.getDefaultParent())&&(K=H.getEvent(),p&&!mxEvent.isPopupTrigger(K)&&!mxEvent.isMultiTouchEvent(K))){var F=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);F=Math.max(1,F*b.view.scale);var P=u();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",B?P:"none");c.setAttribute("stroke",P);c.setAttribute("stroke-width",F);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-P=P.split(" ").map(function(U){return parseFloat(U)*F}).join(" "),c.setAttribute("stroke-dasharray",P));q=[];K=G(K);I(K);m="M"+K.x+" "+K.y;x.push(K);z=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[K.x,K.y]],y):m);d.appendChild(c);H.consume()}}),mouseMove:mxUtils.bind(this,function(K,H){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=H.getEvent();K=G(K);I(K);var F=M(0);if(F)if(x.push(F),B){var P=[];for(F=0;F<x.length;F++)P.push([x[F].x,x[F].y]);z=[];for(var U=2;U<q.length;U+=
-2)F=M(U),P.push([F.x,F.y]),z.push(F);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,y))}else{m+=" L"+F.x+" "+F.y;P="";z=[];for(U=2;U<q.length;U+=2)F=M(U),P+=" L"+F.x+" "+F.y,z.push(F);c.setAttribute("d",m+P)}k&&(F=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-F.x,K.y-F.y)).grow(20)));H.consume()}}),mouseUp:mxUtils.bind(this,function(K,H){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(H.getEvent()),H.consume())})});var G=function(K){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(K),mxEvent.getClientY(K))},I=function(K){for(q.push(K);q.length>f;)q.shift()},M=function(K){var H=q.length;if(1===H%2||H>=f){var F=0,P=0,U,T=0;for(U=K;U<H;U++)T++,K=q[U],F+=K.x,P+=K.y;return{x:F/T,y:P/T}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,d,f){function c(T,V){if(!M){var W=d.file.getCurrentUser();if(I&&null!=W&&null!=W.email&&(V=JSON.stringify({from:N,id:A,type:T,sessionId:d.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),K&&"cursor"!=T&&EditorUi.debug("P2PCollab: sending to socket server",[V]),A++,T=!K&&("cursor"==T||"selectionChange"==T),G&&!T&&U("message",V),T))for(p2pId in u)u[p2pId].send(V)}}function l(T){if(b.shareCursorPosition&&!g.isMouseDown){var V=
-mxUtils.getOffset(g.container),W=g.view.translate,t=g.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((T.getX()-V.x+g.container.scrollLeft)/t-W.x),y:Math.round((T.getY()-V.y+g.container.scrollTop)/t-W.y)})}}function m(T,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=T&&null!=T.cursor&&null!=T.lastCursor)if(null!=T.lastCursor.hide||!b.isShowRemoteCursors()||null!=T.lastCursor.pageId&&T.lastCursor.pageId!=W)T.cursor.style.display="none";
-else{W=function(){var Q=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-T.cursor.clientWidth,L)),S=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-T.cursor.clientHeight,R));O.style.opacity=Q!=L||S!=R?0:1;T.cursor.style.left=Q+"px";T.cursor.style.top=S+"px";T.cursor.style.display=""};var t=g.view.translate,D=g.view.scale,L=(t.x+T.lastCursor.x)*D+8,R=(t.y+T.lastCursor.y)*D-12,O=T.cursor.getElementsByTagName("img")[0];
-V?(mxUtils.setPrefixedStyle(T.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 600ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(T.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function x(T,V){function W(){if(null==p[D]){var aa=J[D];null==aa&&(aa=k%q.length,J[D]=aa,k++);var Y=q[aa];aa=11<aa?"black":"white";p[D]={cursor:document.createElement("div"),color:Y,selection:{}};y[V]=D;L=p[D].cursor;
-L.style.pointerEvents="none";L.style.position="absolute";L.style.display="none";L.style.opacity="0.9";var Z=document.createElement("img");mxUtils.setPrefixedStyle(Z.style,"transform","rotate(-45deg)translateX(-14px)");Z.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+Y+'" fill="'+Y+'"/>').src);Z.style.width="10px";L.appendChild(Z);Z=document.createElement("div");Z.style.backgroundColor=Y;Z.style.color=aa;Z.style.fontSize="9pt";Z.style.padding="3px 7px";
-Z.style.marginTop="8px";Z.style.borderRadius="10px";Z.style.maxWidth="100px";Z.style.overflow="hidden";Z.style.textOverflow="ellipsis";Z.style.whiteSpace="nowrap";mxUtils.write(Z,t);L.appendChild(Z);b.diagramContainer.appendChild(L)}else L=p[D].cursor;R=p[D].selection}if(!M){T=JSON.parse(T);K&&"cursor"!=T.type&&EditorUi.debug("P2PCollab: msg received",[T]);if(null!=V){if(T.from==N||E[T.from]>=T.id){EditorUi.debug("P2PCollab: Dropped Message",T,N,E[T.from]);return}E[T.from]=T.id}var t=T.username?T.username:
-"Anonymous",D=T.sessionId,L,R;null!=p[D]&&(clearTimeout(p[D].inactiveTO),p[D].inactiveTO=setTimeout(function(){C(null,D)},12E4));var O=T.data;switch(T.type){case "cursor":W();p[D].lastCursor=O;m(p[D],!0);break;case "diff":try{T=d.stringToObject(decodeURIComponent(O.patch)),d.receiveRemoteChanges(T.d)}catch(aa){EditorUi.debug("P2PCollab: Diff msg error",aa)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Q=null!=b.currentPage?b.currentPage.getId():null;if(null==Q||null!=O.pageId&&
-O.pageId==Q){W();for(Q=0;Q<O.removed.length;Q++){var S=O.removed[Q];if(null!=S){var X=R[S];delete R[S];null!=X&&X.destroy()}}for(Q=0;Q<O.added.length;Q++)S=O.added[Q],null!=S&&(X=g.model.getCell(S),null!=X&&(R[S]=g.highlightCell(X,p[D].color,6E4,70,3)))}}}d.file.fireEvent(new mxEventObject("realtimeMessage","message",T))}}function z(T,V){if(!K&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(t){U("sendSignal",
-{to:T,from:N,signal:t})});W.on("error",function(t){delete v[T];EditorUi.debug("P2PCollab: p2p socket error",t);!M&&V&&W.destroyed&&B[T]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",T),z(T,!0))});W.on("connect",function(){delete v[T];null==u[T]||u[T].destroyed?(u[T]=W,B[T]=!0,EditorUi.debug("P2PCollab: p2p socket connected",T)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",T))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
-T),e(y[T]),delete u[T])});W.on("data",x);return v[T]=W}}function C(T,V){e(V||y[T]);null!=T&&(delete y[T],B[T]=!1)}function e(T){var V=p[T];if(null!=V){var W=V.selection,t;for(t in W)null!=W[t]&&W[t].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[T]}}var g=b.editor.graph,k=0,n=null,q="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
-p={},A=1,E={},y={},B={},J={},N,v={},u={},G=!0,I=!1,M=!1,K="0"!=urlParams["no-p2p"],H=!1,F=0,P=null,U=mxUtils.bind(this,function(T,V){if(!M)try{null!=n?(n.send(JSON.stringify({action:T,msg:V})),K||EditorUi.debug("P2PCollab: sending to socket server",[T],[V])):this.joinFile(!0)}catch(W){P=W,d.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(T){this.sendMessage("diff",{patch:T})};this.getState=
-function(){return null!=n?n.readyState:3};this.getLastError=function(){return P};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(T,V){},mouseMove:function(T,V){var W,t=-1;return function(){clearTimeout(W);var D=this,L=arguments,R=function(){W=null;t=Date.now();T.apply(D,L)};Date.now()-t>V?R():W=setTimeout(R,V)}}(function(T,V){l(V)},200),mouseUp:function(T,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
-c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(T,V){T=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,t=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:t?t.map(T):[],added:V?V.map(T):[]})};g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var T in p)m(p[T])});
-mxEvent.addListener(g.container,"scroll",this.cursorHandler);g.getView().addListener(mxEvent.SCALE,this.cursorHandler);g.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);g.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(T){if(!M)try{H&&(EditorUi.debug("P2PCollab: joinInProgress on",H),P="busy");H=++F;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",
-n.joinId),n.close(1E3),n=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(t){n=V;n.joinId=H;H=!1;d.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId);T&&d.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(t){K||EditorUi.debug("P2PCollab: msg received",[t]);var D=JSON.parse(t.data);K&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",
-[t]);switch(D.action){case "message":x(D.msg,D.from);break;case "clientsList":t=D.msg;N=t.cId;I=!0;for(D=0;D<t.list.length;D++)z(t.list[D],!0);break;case "signal":t=D.msg;K||(v[t.from]?D=v[t.from]:(D=z(t.from,!1),G=!0),D.signal(t.signal));break;case "newClient":G=!0;break;case "clientLeft":C(D.msg);break;case "sendSignalFailed":t=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete v[t.to],B[t.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",
-V.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);M||1E3==t.code||F!=V.joinId||(H==F&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),H=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",t);EditorUi.debug("P2PCollab: error socket on",
-V.joinId);M||F!=V.joinId||(H==F&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),H=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){P=t,d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!M){EditorUi.debug("P2PCollab: destroyed");M=!0;for(sessionId in p)e(sessionId);null!=
-this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(g.container,"scroll",this.cursorHandler),g.getView().removeListener(mxEvent.SCALE,this.cursorHandler),g.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),g.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,
-this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=n&&(n.close(1E3),n=null);for(var T in u)null!=u[T]&&u[T].destroy();d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
+P=P.split(" ").map(function(U){return parseFloat(U)*F}).join(" "),c.setAttribute("stroke-dasharray",P));t=[];K=G(K);I(K);m="M"+K.x+" "+K.y;x.push(K);z=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[K.x,K.y]],y):m);d.appendChild(c);H.consume()}}),mouseMove:mxUtils.bind(this,function(K,H){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=H.getEvent();K=G(K);I(K);var F=M(0);if(F)if(x.push(F),B){var P=[];for(F=0;F<x.length;F++)P.push([x[F].x,x[F].y]);z=[];for(var U=2;U<t.length;U+=
+2)F=M(U),P.push([F.x,F.y]),z.push(F);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,y))}else{m+=" L"+F.x+" "+F.y;P="";z=[];for(U=2;U<t.length;U+=2)F=M(U),P+=" L"+F.x+" "+F.y,z.push(F);c.setAttribute("d",m+P)}k&&(F=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-F.x,K.y-F.y)).grow(20)));H.consume()}}),mouseUp:mxUtils.bind(this,function(K,H){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(H.getEvent()),H.consume())})});var G=function(K){return mxUtils.convertPoint(b.container,
+mxEvent.getClientX(K),mxEvent.getClientY(K))},I=function(K){for(t.push(K);t.length>f;)t.shift()},M=function(K){var H=t.length;if(1===H%2||H>=f){var F=0,P=0,U,T=0;for(U=K;U<H;U++)T++,K=t[U],F+=K.x,P+=K.y;return{x:F/T,y:P/T}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,d,f){function c(T,V){try{if(!M){var W=d.file.getCurrentUser();if(I&&null!=W&&null!=W.email){var q={from:N,id:A,type:T,sessionId:d.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};q={bytes:d.objectToString(q),data:"aes"};q=JSON.stringify(q);K&&"cursor"!=T&&EditorUi.debug("P2PCollab: sending to socket server",[q]);A++;T=!K&&("cursor"==T||"selectionChange"==T);G&&!T&&U("message",q);if(T)for(p2pId in u)u[p2pId].send(q)}}}catch(D){null!=
+window.console&&console.log("Error:",D)}}function l(T){if(b.shareCursorPosition&&!g.isMouseDown){var V=mxUtils.getOffset(g.container),W=g.view.translate,q=g.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((T.getX()-V.x+g.container.scrollLeft)/q-W.x),y:Math.round((T.getY()-V.y+g.container.scrollTop)/q-W.y)})}}function m(T,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=T&&null!=T.cursor&&null!=T.lastCursor)if(null!=T.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=T.lastCursor.pageId&&T.lastCursor.pageId!=W)T.cursor.style.display="none";else{W=function(){var Q=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-T.cursor.clientWidth,L)),S=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-T.cursor.clientHeight,R));O.style.opacity=Q!=L||S!=R?0:1;T.cursor.style.left=Q+"px";T.cursor.style.top=S+"px";T.cursor.style.display=""};var q=g.view.translate,D=g.view.scale,L=(q.x+T.lastCursor.x)*
+D+8,R=(q.y+T.lastCursor.y)*D-12,O=T.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(T.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 600ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(T.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function x(T,V){try{var W=function(){if(null==p[D]){var Y=J[D];null==Y&&(Y=k%t.length,J[D]=Y,k++);var Z=t[Y];Y=11<Y?"black":"white";p[D]={cursor:document.createElement("div"),
+color:Z,selection:{}};y[V]=D;L=p[D].cursor;L.style.pointerEvents="none";L.style.position="absolute";L.style.display="none";L.style.opacity="0.9";var ba=document.createElement("img");mxUtils.setPrefixedStyle(ba.style,"transform","rotate(-45deg)translateX(-14px)");ba.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+Z+'" fill="'+Z+'"/>').src);ba.style.width="10px";L.appendChild(ba);ba=document.createElement("div");ba.style.backgroundColor=Z;ba.style.color=
+Y;ba.style.fontSize="9pt";ba.style.padding="3px 7px";ba.style.marginTop="8px";ba.style.borderRadius="10px";ba.style.maxWidth="100px";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.whiteSpace="nowrap";mxUtils.write(ba,q);L.appendChild(ba);b.diagramContainer.appendChild(L)}else L=p[D].cursor;R=p[D].selection};if(!M){T=JSON.parse(T);null!=T.bytes&&(T=d.stringToObject(T.bytes));K&&"cursor"!=T.type&&EditorUi.debug("P2PCollab: msg received",[T]);if(null!=V){if(T.from==N||E[T.from]>=
+T.id){EditorUi.debug("P2PCollab: Dropped Message",T,N,E[T.from]);return}E[T.from]=T.id}var q=T.username?T.username:"Anonymous",D=T.sessionId,L,R;null!=p[D]&&(clearTimeout(p[D].inactiveTO),p[D].inactiveTO=setTimeout(function(){C(null,D)},12E4));var O=T.data;switch(T.type){case "cursor":W();p[D].lastCursor=O;m(p[D],!0);break;case "diff":try{T=null!=O.patch?d.stringToObject(decodeURIComponent(O.patch)):O.diff,d.receiveRemoteChanges(T.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=
+urlParams["remote-selection"]){var Q=null!=b.currentPage?b.currentPage.getId():null;if(null==Q||null!=O.pageId&&O.pageId==Q){W();for(W=0;W<O.removed.length;W++){var S=O.removed[W];if(null!=S){var X=R[S];delete R[S];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(S=O.added[W],null!=S){var aa=g.model.getCell(S);null!=aa&&(R[S]=g.highlightCell(aa,p[D].color,6E4,70,3))}}}}d.file.fireEvent(new mxEventObject("realtimeMessage","message",T))}}catch(Y){null!=window.console&&console.log("Error:",Y)}}
+function z(T,V){if(!K&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(q){U("sendSignal",{to:T,from:N,signal:q})});W.on("error",function(q){delete v[T];EditorUi.debug("P2PCollab: p2p socket error",q);!M&&V&&W.destroyed&&B[T]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",T),z(T,!0))});W.on("connect",function(){delete v[T];null==u[T]||u[T].destroyed?(u[T]=W,B[T]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
+T)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",T))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",T),e(y[T]),delete u[T])});W.on("data",x);return v[T]=W}}function C(T,V){e(V||y[T]);null!=T&&(delete y[T],B[T]=!1)}function e(T){var V=p[T];if(null!=V){var W=V.selection,q;for(q in W)null!=W[q]&&W[q].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[T]}}
+var g=b.editor.graph,k=0,n=null,t="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),p={},A=1,E={},y={},B={},J={},N,v={},u={},G=!0,I=!1,M=!1,K="0"!=urlParams["no-p2p"],H=!1,F=0,P=null,U=mxUtils.bind(this,function(T,V){if(!M)try{null!=n?(n.send(JSON.stringify({action:T,msg:V})),K||EditorUi.debug("P2PCollab: sending to socket server",[T],[V])):this.joinFile(!0)}catch(W){P=W,d.file.fireEvent(new mxEventObject("realtimeStateChanged")),
+EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(T){this.sendMessage("diff",{diff:T})};this.getState=function(){return null!=n?n.readyState:3};this.getLastError=function(){return P};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(T,V){},mouseMove:function(T,V){var W,q=-1;return function(){clearTimeout(W);var D=this,L=arguments,R=function(){W=null;q=Date.now();T.apply(D,L)};Date.now()-q>V?R():W=setTimeout(R,V)}}(function(T,
+V){l(V)},200),mouseUp:function(T,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(T,V){T=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,q=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:q?q.map(T):[],added:V?
+V.map(T):[]})};g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var T in p)m(p[T])});mxEvent.addListener(g.container,"scroll",this.cursorHandler);g.getView().addListener(mxEvent.SCALE,this.cursorHandler);g.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);g.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",
+this.cursorHandler);this.joinFile=function(T){if(!M)try{H&&(EditorUi.debug("P2PCollab: joinInProgress on",H),P="busy");H=++F;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",n.joinId),n.close(1E3),n=null)}catch(q){EditorUi.debug("P2PCollab: closing socket error",q)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(q){n=V;n.joinId=H;H=!1;d.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId);
+T&&d.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(q){K||EditorUi.debug("P2PCollab: msg received",[q]);var D=JSON.parse(q.data);K&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[q]);switch(D.action){case "message":x(D.msg,D.from);break;case "clientsList":q=D.msg;N=q.cId;I=!0;for(D=0;D<q.list.length;D++)z(q.list[D],!0);break;case "signal":q=D.msg;K||(v[q.from]?D=v[q.from]:(D=z(q.from,!1),G=!0),D.signal(q.signal));break;case "newClient":G=!0;break;case "clientLeft":C(D.msg);
+break;case "sendSignalFailed":q=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",q),delete v[q.to],B[q.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(q){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",q.code,q.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);M||1E3==q.code||F!=V.joinId||(H==F&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),H=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
+V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",q);EditorUi.debug("P2PCollab: error socket on",V.joinId);M||F!=V.joinId||(H==F&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),H=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));
+d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(q){P=q,d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!M){EditorUi.debug("P2PCollab: destroyed");M=!0;for(sessionId in p)e(sessionId);null!=this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
+null!=this.cursorHandler&&(mxEvent.removeListener(g.container,"scroll",this.cursorHandler),g.getView().removeListener(mxEvent.SCALE,this.cursorHandler),g.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),g.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=n&&(n.close(1E3),n=null);for(var T in u)null!=u[T]&&u[T].destroy();d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+;
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index 63cfd0e6..2164a26d 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -870,21 +870,27 @@ DrawioFileSync.prototype.doSendLocalChanges = function(changes)
if (!this.file.ignorePatches(changes))
{
var changeId = this.clientId + '.' + (this.syncChangeCounter++);
- var msg = {a: 'change', c: changes, id: changeId, t: Date.now()};
- var data = encodeURIComponent(
- this.objectToString(
- this.createMessage(msg)));
+ var msg = this.createMessage({a: 'change', c: changes,
+ id: changeId, t: Date.now()});
var skipped = false;
if (this.p2pCollab != null)
{
- this.p2pCollab.sendDiff(data);
+ this.p2pCollab.sendDiff(msg);
}
- else if (urlParams['dev'] == '1' &&
- (this.maxSyncMessageSize == 0 ||
- data.length < this.maxSyncMessageSize))
+ else if (urlParams['dev'] == '1')
{
- mxUtils.post(EditorUi.cacheUrl, this.getIdParameters() + '&msg=' + data);
+ var data = encodeURIComponent(this.objectToString(msg));
+
+ if (this.maxSyncMessageSize == 0 ||
+ data.length < this.maxSyncMessageSize)
+ {
+ mxUtils.post(EditorUi.cacheUrl, this.getIdParameters() + '&msg=' + data);
+ }
+ else
+ {
+ skipped = true;
+ }
}
else
{
@@ -892,8 +898,7 @@ DrawioFileSync.prototype.doSendLocalChanges = function(changes)
}
EditorUi.debug('DrawioFileSync.doSendLocalChanges', [this],
- 'changes', changes, data.length, 'bytes',
- skipped ? '(skipped)' : '');
+ 'changes', changes, skipped ? '(skipped)' : '');
}
};
@@ -1992,6 +1997,12 @@ DrawioFileSync.prototype.stop = function()
this.pusher.disconnect();
this.pusher = null;
+
+ if (this.p2pCollab != null)
+ {
+ this.p2pCollab.destroy();
+ this.p2pCollab = null;
+ }
}
this.updateOnlineState();
@@ -2061,6 +2072,7 @@ DrawioFileSync.prototype.destroy = function()
this.collaboratorsElement = null;
}
+ // This is not needed now as stop already destroyed it
if (this.p2pCollab != null)
{
this.p2pCollab.destroy();
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index e34b330d..f9aea8f0 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -194,7 +194,7 @@
/**
* Disables fast real time collaboration while keeping slower real time collaboration enabled.
*/
- Editor.enableRealtime = false;
+ Editor.enableRealtime = true;
/**
* Specifies if XML files should be compressed. Default is true.
diff --git a/src/main/webapp/js/diagramly/P2PCollab.js b/src/main/webapp/js/diagramly/P2PCollab.js
index ba2495d9..997bd46f 100644
--- a/src/main/webapp/js/diagramly/P2PCollab.js
+++ b/src/main/webapp/js/diagramly/P2PCollab.js
@@ -1,6 +1,7 @@
function P2PCollab(ui, sync, channelId)
{
var graph = ui.editor.graph;
+ var encrypted = true; // global flag to encrypt all messages
var sessionCount = 0;
var socket = null;
var colors = [
@@ -59,49 +60,67 @@ function P2PCollab(ui, sync, channelId)
function sendMessage(type, data)
{
- if (destroyed) return;
+ try
+ {
+ if (destroyed) return;
- var user = sync.file.getCurrentUser();
+ var user = sync.file.getCurrentUser();
- if (!fileJoined || user == null || user.email == null) return;
-
- //Converting to a string such that webRTC works also
- var msg = JSON.stringify({from: myClientId, id: messageId,
- type: type, sessionId: sync.clientId, userId: user.id,
- username: user.displayName, data: data,
- protocol: DrawioFileSync.PROTOCOL,
- editor: EditorUi.VERSION});
-
- if (NO_P2P && type != 'cursor')
- {
- EditorUi.debug('P2PCollab: sending to socket server', [msg]);
- }
+ if (!fileJoined || user == null || user.email == null) return;
+
+ //Converting to a string such that webRTC works also
+ var msg = {from: myClientId, id: messageId,
+ type: type, sessionId: sync.clientId, userId: user.id,
+ username: user.displayName, data: data,
+ protocol: DrawioFileSync.PROTOCOL,
+ editor: EditorUi.VERSION};
+
+ if (encrypted)
+ {
+ // data is needed for old server to not drop messages
+ msg = {bytes: sync.objectToString(msg), data: 'aes'};
+ }
+
+ msg = JSON.stringify(msg);
+
+ if (NO_P2P && type != 'cursor')
+ {
+ EditorUi.debug('P2PCollab: sending to socket server', [msg]);
+ }
- messageId++;
- var p2pOnlyMsgs = !NO_P2P && (type == 'cursor' || type == 'selectionChange');
+ messageId++;
+ var p2pOnlyMsgs = !NO_P2P && (type == 'cursor' || type == 'selectionChange');
- if (useSocket && !p2pOnlyMsgs)
- {
- sendReply('message', msg);
+ if (useSocket && !p2pOnlyMsgs)
+ {
+ sendReply('message', msg);
+ }
+
+ //TODO Currently, we only send cursor & selection messages via P2P
+ if (p2pOnlyMsgs)
+ {
+ for (p2pId in p2pClients)
+ {
+ p2pClients[p2pId].send(msg);
+ }
+ }
}
-
- //TODO Currently, we only send cursor & selection messages via P2P
- if (p2pOnlyMsgs)
+ catch (e)
{
- for (p2pId in p2pClients)
+ if (window.console != null)
{
- p2pClients[p2pId].send(msg);
+ console.log('Error:', e);
}
}
};
this.sendMessage = sendMessage;
- this.sendDiff = function(diff)
+ this.sendDiff = function(msg)
{
- this.sendMessage('diff', {
- patch: diff
- });
+ this.sendMessage('diff', (encrypted) ?
+ {diff: msg} : {patch: encodeURIComponent(
+ sync.objectToString(msg))});
};
this.getState = function()
@@ -275,171 +294,194 @@ function P2PCollab(ui, sync, channelId)
function processMsg(msg, fromCId)
{
- if (destroyed) return;
-
- msg = JSON.parse(msg);
-
- if (NO_P2P && msg.type != 'cursor')
+ try
{
- EditorUi.debug('P2PCollab: msg received', [msg]);
- }
+ if (destroyed) return;
- //Exclude P2P messages from duplicate messages test since p2p can arrive before socket and interrupt delivery
- if (fromCId != null)
- {
- //Safeguard from duplicate messages or receiving my own messages
- if (msg.from == myClientId || clientLastMsgId[msg.from] >= msg.id)
+ msg = JSON.parse(msg);
+
+ if (msg.bytes != null)
{
- EditorUi.debug('P2PCollab: Dropped Message', msg, myClientId, clientLastMsgId[msg.from])
- return;
+ msg = sync.stringToObject(msg.bytes);
}
- clientLastMsgId[msg.from] = msg.id;
- }
-
- var username = msg.username? msg.username : 'Anonymous';
- var sessionId = msg.sessionId;
- var cursor, selection;
-
- function createCursor()
- {
- if (connectedSessions[sessionId] == null)
+ if (NO_P2P && msg.type != 'cursor')
{
- var clrIndex = sessionColors[sessionId];
+ EditorUi.debug('P2PCollab: msg received', [msg]);
+ }
- if (clrIndex == null)
+ //Exclude P2P messages from duplicate messages test since p2p can arrive before socket and interrupt delivery
+ if (fromCId != null)
+ {
+ //Safeguard from duplicate messages or receiving my own messages
+ if (msg.from == myClientId || clientLastMsgId[msg.from] >= msg.id)
{
- clrIndex = sessionCount % colors.length;
- sessionColors[sessionId] = clrIndex;
- sessionCount++;
+ EditorUi.debug('P2PCollab: Dropped Message', msg, myClientId, clientLastMsgId[msg.from])
+ return;
}
-
- var clr = colors[clrIndex];
- var lblClr = clrIndex > 11? 'black' : 'white';
-
- connectedSessions[sessionId] = {
- cursor: document.createElement('div'),
- color: clr,
- selection: {}
- };
-
- clientsToSessions[fromCId] = sessionId;
- cursor = connectedSessions[sessionId].cursor;
- cursor.style.pointerEvents = 'none';
- cursor.style.position = 'absolute';
- cursor.style.display = 'none';
- cursor.style.opacity = '0.9';
- var img = document.createElement('img');
- mxUtils.setPrefixedStyle(img.style, 'transform', 'rotate(-45deg)translateX(-14px)');
- img.setAttribute('src', createCursorImage(clr));
- img.style.width = '10px';
- cursor.appendChild(img);
-
- var name = document.createElement('div');
- name.style.backgroundColor = clr;
- name.style.color = lblClr;
- name.style.fontSize = '9pt';
- name.style.padding = '3px 7px';
- name.style.marginTop = '8px';
- name.style.borderRadius = '10px';
- name.style.maxWidth = '100px';
- name.style.overflow = 'hidden';
- name.style.textOverflow = 'ellipsis';
- name.style.whiteSpace = 'nowrap';
-
- mxUtils.write(name, username);
- cursor.appendChild(name);
-
- ui.diagramContainer.appendChild(cursor);
- selection = connectedSessions[sessionId].selection;
- }
- else
- {
- cursor = connectedSessions[sessionId].cursor;
- selection = connectedSessions[sessionId].selection;
+ clientLastMsgId[msg.from] = msg.id;
}
- };
+
+ var username = msg.username? msg.username : 'Anonymous';
+ var sessionId = msg.sessionId;
+ var cursor, selection;
- if (connectedSessions[sessionId] != null)
- {
- clearTimeout(connectedSessions[sessionId].inactiveTO);
- connectedSessions[sessionId].inactiveTO = setTimeout(function()
+ function createCursor()
{
- clientLeft(null, sessionId);
- }, INACTIVE_TIMEOUT);
- }
-
- var msgData = msg.data;
-
- switch (msg.type)
- {
- case 'cursor':
- createCursor();
- connectedSessions[sessionId].lastCursor = msgData;
- updateCursor(connectedSessions[sessionId], true);
- break;
- case 'diff':
- try
+ if (connectedSessions[sessionId] == null)
{
- var msg = sync.stringToObject(decodeURIComponent(msgData.patch));
- sync.receiveRemoteChanges(msg.d);
+ var clrIndex = sessionColors[sessionId];
+
+ if (clrIndex == null)
+ {
+ clrIndex = sessionCount % colors.length;
+ sessionColors[sessionId] = clrIndex;
+ sessionCount++;
+ }
+
+ var clr = colors[clrIndex];
+ var lblClr = clrIndex > 11? 'black' : 'white';
+
+ connectedSessions[sessionId] = {
+ cursor: document.createElement('div'),
+ color: clr,
+ selection: {}
+ };
+
+ clientsToSessions[fromCId] = sessionId;
+ cursor = connectedSessions[sessionId].cursor;
+
+ cursor.style.pointerEvents = 'none';
+ cursor.style.position = 'absolute';
+ cursor.style.display = 'none';
+ cursor.style.opacity = '0.9';
+ var img = document.createElement('img');
+ mxUtils.setPrefixedStyle(img.style, 'transform', 'rotate(-45deg)translateX(-14px)');
+ img.setAttribute('src', createCursorImage(clr));
+ img.style.width = '10px';
+ cursor.appendChild(img);
+
+ var name = document.createElement('div');
+ name.style.backgroundColor = clr;
+ name.style.color = lblClr;
+ name.style.fontSize = '9pt';
+ name.style.padding = '3px 7px';
+ name.style.marginTop = '8px';
+ name.style.borderRadius = '10px';
+ name.style.maxWidth = '100px';
+ name.style.overflow = 'hidden';
+ name.style.textOverflow = 'ellipsis';
+ name.style.whiteSpace = 'nowrap';
+
+ mxUtils.write(name, username);
+ cursor.appendChild(name);
+
+ ui.diagramContainer.appendChild(cursor);
+ selection = connectedSessions[sessionId].selection;
}
- catch (e)
+ else
{
- EditorUi.debug('P2PCollab: Diff msg error', e);
+ cursor = connectedSessions[sessionId].cursor;
+ selection = connectedSessions[sessionId].selection;
}
- break;
- case 'selectionChange':
- if (urlParams['remote-selection'] != '0')
+ };
+
+ if (connectedSessions[sessionId] != null)
+ {
+ clearTimeout(connectedSessions[sessionId].inactiveTO);
+ connectedSessions[sessionId].inactiveTO = setTimeout(function()
{
- var pageId = (ui.currentPage != null) ?
- ui.currentPage.getId() : null;
-
- if (pageId == null ||
- (msgData.pageId != null &&
- msgData.pageId == pageId))
+ clientLeft(null, sessionId);
+ }, INACTIVE_TIMEOUT);
+ }
+
+ var msgData = msg.data;
+
+ switch (msg.type)
+ {
+ case 'cursor':
+ createCursor();
+ connectedSessions[sessionId].lastCursor = msgData;
+ updateCursor(connectedSessions[sessionId], true);
+ break;
+ case 'diff':
+ try
{
- createCursor();
+ if (msgData.patch != null)
+ {
+ msg = sync.stringToObject(decodeURIComponent(msgData.patch));
+ }
+ else
+ {
+ msg = msgData.diff;
+ }
- for (var i = 0; i < msgData.removed.length; i++)
+ sync.receiveRemoteChanges(msg.d);
+ }
+ catch (e)
+ {
+ EditorUi.debug('P2PCollab: Diff msg error', e);
+ }
+ break;
+ case 'selectionChange':
+ if (urlParams['remote-selection'] != '0')
+ {
+ var pageId = (ui.currentPage != null) ?
+ ui.currentPage.getId() : null;
+
+ if (pageId == null ||
+ (msgData.pageId != null &&
+ msgData.pageId == pageId))
{
- var id = msgData.removed[i];
+ createCursor();
- if (id != null)
+ for (var i = 0; i < msgData.removed.length; i++)
{
- var handler = selection[id];
- delete selection[id];
-
- if (handler != null)
+ var id = msgData.removed[i];
+
+ if (id != null)
{
- handler.destroy();
+ var handler = selection[id];
+ delete selection[id];
+
+ if (handler != null)
+ {
+ handler.destroy();
+ }
}
}
- }
-
- for (var i = 0; i < msgData.added.length; i++)
- {
- var id = msgData.added[i];
-
- if (id != null)
+
+ for (var i = 0; i < msgData.added.length; i++)
{
- var cell = graph.model.getCell(id);
+ var id = msgData.added[i];
- if (cell != null)
- {
- selection[id] = graph.highlightCell(cell,
- connectedSessions[sessionId].color, 60000,
- SELECTION_OPACITY, 3);
+ if (id != null)
+ {
+ var cell = graph.model.getCell(id);
+
+ if (cell != null)
+ {
+ selection[id] = graph.highlightCell(cell,
+ connectedSessions[sessionId].color, 60000,
+ SELECTION_OPACITY, 3);
+ }
}
}
}
}
- }
- break;
- }
+ break;
+ }
- sync.file.fireEvent(new mxEventObject('realtimeMessage', 'message', msg));
+ sync.file.fireEvent(new mxEventObject('realtimeMessage', 'message', msg));
+ }
+ catch (e)
+ {
+ if (window.console != null)
+ {
+ console.log('Error:', e);
+ }
+ }
};
function createPeer(id, initiator)
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 06f568cb..8e6e55a3 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -470,7 +470,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"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]"!==
@@ -11475,7 +11475,7 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAY
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!1;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
+"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,A){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,
A){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",
dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?
@@ -11726,7 +11726,7 @@ A.appendChild(S);R.appendChild(A);this.container=R};var W=ChangePageSetup.protot
this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else W.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 U=document.createElement("canvas"),V=new Image;V.onload=function(){try{U.getContext("2d").drawImage(V,0,0);var l=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(A){}};V.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,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(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"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=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(c,e,g,q,n,p,z){p=null!=p?p:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -12251,8 +12251,8 @@ DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=
mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))};
DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var f=this.fileChanged(mxUtils.bind(this,function(k){this.updateStatus()}),mxUtils.bind(this,function(k){this.file.handleFileError(k)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=f}),!0)};
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++;f={a:"change",c:b,id:f,t:Date.now()};f=encodeURIComponent(this.objectToString(this.createMessage(f)));var k=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(f):"1"==urlParams.dev&&(0==this.maxSyncMessageSize||f.length<this.maxSyncMessageSize)?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+f):k=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
-"changes",b,f.length,"bytes",k?"(skipped)":"")}};
+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++,k=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(k):"1"==urlParams.dev?(k=encodeURIComponent(this.objectToString(k)),0==this.maxSyncMessageSize||k.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+k):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+"changes",b,f?"(skipped)":"")}};
DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(v,x){return v.id<x.id?-1:v.id>x.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(v){try{if(this.isValidState()&&
@@ -12285,7 +12285,7 @@ this.file.stats.msgSent++;var q=!0,n=window.setTimeout(mxUtils.bind(this,functio
""),mxUtils.bind(this,function(p){window.clearTimeout(n);q&&(200<=p.getStatus()&&299>=p.getStatus()?null!=k&&k():d({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",D,"to",K,"etag",this.file.getCurrentEtag(),"checksum",e)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
-DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
+DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),f={a:"leave"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var v={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!=
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 46194e6a..8d1c5432 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"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]"!==
@@ -3130,7 +3130,7 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAY
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!1;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
+"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
@@ -3383,7 +3383,7 @@ function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.u
this.shadowVisible)}}else da.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 ja=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ja.getContext("2d").drawImage(ka,
0,0);var q=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"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=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(d,f,g,x,z,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 1302a66f..d91a5b09 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.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/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"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]"!==
@@ -3130,7 +3130,7 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAY
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!1;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
+"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
@@ -3383,7 +3383,7 @@ function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.u
this.shadowVisible)}}else da.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 ja=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ja.getContext("2d").drawImage(ka,
0,0);var q=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"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=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(d,f,g,x,z,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index d8f66819..4d6b6dd7 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"20.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"20.2.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/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"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]"!==
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 4a9ade2b..d9c11abe 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,c)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=c(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"4e8db4e4cb472cf7d56082755723612a"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"82f8dd046bfa4d392a40949d24890062"},{url:"js/shapes-14-6-5.min.js",revision:"0e4ce222957707e50bc19057beb6fe46"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"e069fd2a50b030c69e7ac80f28771731"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"80d3c5ec6575b41d271eb6f7a6efe40b"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c36b256237fa27ea379e30f7d5add825"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"7dc22c622b238536ea550815d1364d52"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"7e198d0456c3075b4b305da188f09714"},{url:"connect/confluence/includeDiagram.html",revision:"99382f1af0419f116f056874ba17f0d7"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"resources/dia.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_am.txt",revision:"1fbc0ff1ab0631a95e0eec65eadf947f"},{url:"resources/dia_ar.txt",revision:"76295b768e3443e2b3e81c76c8674955"},{url:"resources/dia_bg.txt",revision:"cd021b810f00fcb60754a009339da093"},{url:"resources/dia_bn.txt",revision:"d004918d24ce051628beb2ddbc274221"},{url:"resources/dia_bs.txt",revision:"dac946476177b2066b4ea8d9837e9664"},{url:"resources/dia_ca.txt",revision:"7957b4a052904394c2376099791deb76"},{url:"resources/dia_cs.txt",revision:"f0624407e102c3fdeb3b2811153798c7"},{url:"resources/dia_da.txt",revision:"6232ada9ab2f58f9165fec9cfb1f8cb4"},{url:"resources/dia_de.txt",revision:"a615e99b2c6427e0b2764762e518e7be"},{url:"resources/dia_el.txt",revision:"14503792e4932953678d7389cc48e132"},{url:"resources/dia_eo.txt",revision:"6cd7a9e39559ef9ec1421bcae62f12a4"},{url:"resources/dia_es.txt",revision:"15d5c773aa67d38e9fc955da76a05fbd"},{url:"resources/dia_et.txt",revision:"ce032655cfa41725f2232096c99f0784"},{url:"resources/dia_eu.txt",revision:"67a5533475b88addfd890b00132a8533"},{url:"resources/dia_fa.txt",revision:"ed063ed259647ad569231274af2ab224"},{url:"resources/dia_fi.txt",revision:"c2eafd8b219c9a3374b6c9d93e6a25b5"},{url:"resources/dia_fil.txt",revision:"cf87e966bc995fd4805a968cf5244584"},{url:"resources/dia_fr.txt",revision:"8986b0e1dec19655c80b1c5ab2faa032"},{url:"resources/dia_gl.txt",revision:"6250d60f8511b506866f2d36e67cc1f0"},{url:"resources/dia_gu.txt",revision:"27d7cc90c01e37eeeacab0d7170b973d"},{url:"resources/dia_he.txt",revision:"084e02f4ed843df855635d4af2ef5434"},{url:"resources/dia_hi.txt",revision:"a3702cc098d0fa75fe9af6d267882e8a"},{url:"resources/dia_hr.txt",revision:"f90bbba4cbabbfe9b8b8f0af33caf557"},{url:"resources/dia_hu.txt",revision:"889365cb400b98a4a71798267ce05dd1"},{url:"resources/dia_id.txt",revision:"37a696446a15336029071bfc17265bcb"},{url:"resources/dia_it.txt",revision:"45059ae2a8eeb92fb79c93fd73e41a67"},{url:"resources/dia_ja.txt",revision:"7c4477567bffcb2a34c7c17e610b8b32"},{url:"resources/dia_kn.txt",revision:"85594b11f140a62ae5208dc8a6031537"},{url:"resources/dia_ko.txt",revision:"9afaddadfc15116def46801c3fae3902"},{url:"resources/dia_lt.txt",revision:"1fda55cf1749eb28aaa15bcd4b263ff7"},{url:"resources/dia_lv.txt",revision:"6e655c38b13ca083e3d9e989b1625b72"},{url:"resources/dia_ml.txt",revision:"634ed48d153c436fdac54422d6f25c97"},{url:"resources/dia_mr.txt",revision:"c2e5e7d6d12f4d17eb3a8b116fea807d"},{url:"resources/dia_ms.txt",revision:"ded8350e4fc8d592127a5611fea1cf52"},{url:"resources/dia_my.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_nl.txt",revision:"aa811a09d78454b81d891be16ef0849e"},{url:"resources/dia_no.txt",revision:"4df620a4f972b4ee9cf2084f77b0e055"},{url:"resources/dia_pl.txt",revision:"a148e99a59ca2aa67cfaa7374679c480"},{url:"resources/dia_pt-br.txt",revision:"cd200294760e0b37cb9c6861bde9977d"},{url:"resources/dia_pt.txt",revision:"acfc189c058ea58a50f0ea5f9ea37fd8"},{url:"resources/dia_ro.txt",revision:"320e258ccf0957f18f6cd1e499885506"},{url:"resources/dia_ru.txt",revision:"1ea33db8aa6d19e13642c3841ab90802"},{url:"resources/dia_si.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_sk.txt",revision:"ad54b43eb1cd46ad69032eb45abb3d02"},{url:"resources/dia_sl.txt",revision:"5704e95859a77900b20e225fe02f36f6"},{url:"resources/dia_sr.txt",revision:"ef0552ddce6b4dd91230c9114be2365b"},{url:"resources/dia_sv.txt",revision:"3df58a93314f87b21efb8f9fcc709c65"},{url:"resources/dia_sw.txt",revision:"cb5407bfa6e7779306f258615ea6497b"},{url:"resources/dia_ta.txt",revision:"cf6e1f9a9c18266599165d163a1225a5"},{url:"resources/dia_te.txt",revision:"17061b897a6f00a4c5beb835abaf4c31"},{url:"resources/dia_th.txt",revision:"b72ea1e62e361734ccd709ddb6935e2a"},{url:"resources/dia_tr.txt",revision:"7193eab9b177f514621b8479211f6ab4"},{url:"resources/dia_uk.txt",revision:"9d576620b92feeb088717eeb41e27c5c"},{url:"resources/dia_vi.txt",revision:"2a69b79be262348ba283d4a0611c75cc"},{url:"resources/dia_zh-tw.txt",revision:"c380c5550e86a5b263f8dec7282803b5"},{url:"resources/dia_zh.txt",revision:"851c7b377fc498df6b638300edfa3852"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,c)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=c(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"3ac6a5a58a1f967b66aa1e399b7d47f2"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"82f8dd046bfa4d392a40949d24890062"},{url:"js/shapes-14-6-5.min.js",revision:"0e4ce222957707e50bc19057beb6fe46"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"b0cefd1e352803f8f71a69f91113e745"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"80d3c5ec6575b41d271eb6f7a6efe40b"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c36b256237fa27ea379e30f7d5add825"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"7dc22c622b238536ea550815d1364d52"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"7e198d0456c3075b4b305da188f09714"},{url:"connect/confluence/includeDiagram.html",revision:"99382f1af0419f116f056874ba17f0d7"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"resources/dia.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_am.txt",revision:"1fbc0ff1ab0631a95e0eec65eadf947f"},{url:"resources/dia_ar.txt",revision:"76295b768e3443e2b3e81c76c8674955"},{url:"resources/dia_bg.txt",revision:"cd021b810f00fcb60754a009339da093"},{url:"resources/dia_bn.txt",revision:"d004918d24ce051628beb2ddbc274221"},{url:"resources/dia_bs.txt",revision:"dac946476177b2066b4ea8d9837e9664"},{url:"resources/dia_ca.txt",revision:"7957b4a052904394c2376099791deb76"},{url:"resources/dia_cs.txt",revision:"f0624407e102c3fdeb3b2811153798c7"},{url:"resources/dia_da.txt",revision:"6232ada9ab2f58f9165fec9cfb1f8cb4"},{url:"resources/dia_de.txt",revision:"a615e99b2c6427e0b2764762e518e7be"},{url:"resources/dia_el.txt",revision:"14503792e4932953678d7389cc48e132"},{url:"resources/dia_eo.txt",revision:"6cd7a9e39559ef9ec1421bcae62f12a4"},{url:"resources/dia_es.txt",revision:"15d5c773aa67d38e9fc955da76a05fbd"},{url:"resources/dia_et.txt",revision:"ce032655cfa41725f2232096c99f0784"},{url:"resources/dia_eu.txt",revision:"67a5533475b88addfd890b00132a8533"},{url:"resources/dia_fa.txt",revision:"ed063ed259647ad569231274af2ab224"},{url:"resources/dia_fi.txt",revision:"c2eafd8b219c9a3374b6c9d93e6a25b5"},{url:"resources/dia_fil.txt",revision:"cf87e966bc995fd4805a968cf5244584"},{url:"resources/dia_fr.txt",revision:"8986b0e1dec19655c80b1c5ab2faa032"},{url:"resources/dia_gl.txt",revision:"6250d60f8511b506866f2d36e67cc1f0"},{url:"resources/dia_gu.txt",revision:"27d7cc90c01e37eeeacab0d7170b973d"},{url:"resources/dia_he.txt",revision:"084e02f4ed843df855635d4af2ef5434"},{url:"resources/dia_hi.txt",revision:"a3702cc098d0fa75fe9af6d267882e8a"},{url:"resources/dia_hr.txt",revision:"f90bbba4cbabbfe9b8b8f0af33caf557"},{url:"resources/dia_hu.txt",revision:"889365cb400b98a4a71798267ce05dd1"},{url:"resources/dia_id.txt",revision:"37a696446a15336029071bfc17265bcb"},{url:"resources/dia_it.txt",revision:"45059ae2a8eeb92fb79c93fd73e41a67"},{url:"resources/dia_ja.txt",revision:"7c4477567bffcb2a34c7c17e610b8b32"},{url:"resources/dia_kn.txt",revision:"85594b11f140a62ae5208dc8a6031537"},{url:"resources/dia_ko.txt",revision:"9afaddadfc15116def46801c3fae3902"},{url:"resources/dia_lt.txt",revision:"1fda55cf1749eb28aaa15bcd4b263ff7"},{url:"resources/dia_lv.txt",revision:"6e655c38b13ca083e3d9e989b1625b72"},{url:"resources/dia_ml.txt",revision:"634ed48d153c436fdac54422d6f25c97"},{url:"resources/dia_mr.txt",revision:"c2e5e7d6d12f4d17eb3a8b116fea807d"},{url:"resources/dia_ms.txt",revision:"ded8350e4fc8d592127a5611fea1cf52"},{url:"resources/dia_my.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_nl.txt",revision:"aa811a09d78454b81d891be16ef0849e"},{url:"resources/dia_no.txt",revision:"4df620a4f972b4ee9cf2084f77b0e055"},{url:"resources/dia_pl.txt",revision:"a148e99a59ca2aa67cfaa7374679c480"},{url:"resources/dia_pt-br.txt",revision:"cd200294760e0b37cb9c6861bde9977d"},{url:"resources/dia_pt.txt",revision:"acfc189c058ea58a50f0ea5f9ea37fd8"},{url:"resources/dia_ro.txt",revision:"320e258ccf0957f18f6cd1e499885506"},{url:"resources/dia_ru.txt",revision:"1ea33db8aa6d19e13642c3841ab90802"},{url:"resources/dia_si.txt",revision:"731c4510de55994ec2d5feff88570b74"},{url:"resources/dia_sk.txt",revision:"ad54b43eb1cd46ad69032eb45abb3d02"},{url:"resources/dia_sl.txt",revision:"5704e95859a77900b20e225fe02f36f6"},{url:"resources/dia_sr.txt",revision:"ef0552ddce6b4dd91230c9114be2365b"},{url:"resources/dia_sv.txt",revision:"3df58a93314f87b21efb8f9fcc709c65"},{url:"resources/dia_sw.txt",revision:"cb5407bfa6e7779306f258615ea6497b"},{url:"resources/dia_ta.txt",revision:"cf6e1f9a9c18266599165d163a1225a5"},{url:"resources/dia_te.txt",revision:"17061b897a6f00a4c5beb835abaf4c31"},{url:"resources/dia_th.txt",revision:"b72ea1e62e361734ccd709ddb6935e2a"},{url:"resources/dia_tr.txt",revision:"7193eab9b177f514621b8479211f6ab4"},{url:"resources/dia_uk.txt",revision:"9d576620b92feeb088717eeb41e27c5c"},{url:"resources/dia_vi.txt",revision:"2a69b79be262348ba283d4a0611c75cc"},{url:"resources/dia_zh-tw.txt",revision:"c380c5550e86a5b263f8dec7282803b5"},{url:"resources/dia_zh.txt",revision:"851c7b377fc498df6b638300edfa3852"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index e1e51e8d..cddd2f95 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/75251173f8c8b8b2683d813921a2107a/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"4e8db4e4cb472cf7d56082755723612a\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"82f8dd046bfa4d392a40949d24890062\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"0e4ce222957707e50bc19057beb6fe46\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"e069fd2a50b030c69e7ac80f28771731\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"80d3c5ec6575b41d271eb6f7a6efe40b\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c36b256237fa27ea379e30f7d5add825\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"7dc22c622b238536ea550815d1364d52\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"7e198d0456c3075b4b305da188f09714\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"99382f1af0419f116f056874ba17f0d7\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"1fbc0ff1ab0631a95e0eec65eadf947f\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"76295b768e3443e2b3e81c76c8674955\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cd021b810f00fcb60754a009339da093\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d004918d24ce051628beb2ddbc274221\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"dac946476177b2066b4ea8d9837e9664\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7957b4a052904394c2376099791deb76\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"f0624407e102c3fdeb3b2811153798c7\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"6232ada9ab2f58f9165fec9cfb1f8cb4\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"a615e99b2c6427e0b2764762e518e7be\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"14503792e4932953678d7389cc48e132\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6cd7a9e39559ef9ec1421bcae62f12a4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"15d5c773aa67d38e9fc955da76a05fbd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ce032655cfa41725f2232096c99f0784\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"67a5533475b88addfd890b00132a8533\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"ed063ed259647ad569231274af2ab224\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"c2eafd8b219c9a3374b6c9d93e6a25b5\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"cf87e966bc995fd4805a968cf5244584\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"8986b0e1dec19655c80b1c5ab2faa032\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6250d60f8511b506866f2d36e67cc1f0\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"27d7cc90c01e37eeeacab0d7170b973d\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"084e02f4ed843df855635d4af2ef5434\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"a3702cc098d0fa75fe9af6d267882e8a\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"f90bbba4cbabbfe9b8b8f0af33caf557\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"889365cb400b98a4a71798267ce05dd1\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"37a696446a15336029071bfc17265bcb\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"45059ae2a8eeb92fb79c93fd73e41a67\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"7c4477567bffcb2a34c7c17e610b8b32\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"85594b11f140a62ae5208dc8a6031537\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"9afaddadfc15116def46801c3fae3902\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"1fda55cf1749eb28aaa15bcd4b263ff7\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"6e655c38b13ca083e3d9e989b1625b72\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"634ed48d153c436fdac54422d6f25c97\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"c2e5e7d6d12f4d17eb3a8b116fea807d\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ded8350e4fc8d592127a5611fea1cf52\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"aa811a09d78454b81d891be16ef0849e\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"4df620a4f972b4ee9cf2084f77b0e055\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a148e99a59ca2aa67cfaa7374679c480\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"cd200294760e0b37cb9c6861bde9977d\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"acfc189c058ea58a50f0ea5f9ea37fd8\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"320e258ccf0957f18f6cd1e499885506\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"1ea33db8aa6d19e13642c3841ab90802\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"ad54b43eb1cd46ad69032eb45abb3d02\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"5704e95859a77900b20e225fe02f36f6\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef0552ddce6b4dd91230c9114be2365b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3df58a93314f87b21efb8f9fcc709c65\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"cb5407bfa6e7779306f258615ea6497b\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cf6e1f9a9c18266599165d163a1225a5\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"17061b897a6f00a4c5beb835abaf4c31\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"b72ea1e62e361734ccd709ddb6935e2a\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"7193eab9b177f514621b8479211f6ab4\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9d576620b92feeb088717eeb41e27c5c\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2a69b79be262348ba283d4a0611c75cc\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"c380c5550e86a5b263f8dec7282803b5\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"851c7b377fc498df6b638300edfa3852\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/566cb27ce15b1b7de7d58efa1348563f/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"3ac6a5a58a1f967b66aa1e399b7d47f2\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"82f8dd046bfa4d392a40949d24890062\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"0e4ce222957707e50bc19057beb6fe46\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"b0cefd1e352803f8f71a69f91113e745\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"80d3c5ec6575b41d271eb6f7a6efe40b\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c36b256237fa27ea379e30f7d5add825\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"7dc22c622b238536ea550815d1364d52\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"7e198d0456c3075b4b305da188f09714\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"99382f1af0419f116f056874ba17f0d7\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"1fbc0ff1ab0631a95e0eec65eadf947f\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"76295b768e3443e2b3e81c76c8674955\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"cd021b810f00fcb60754a009339da093\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d004918d24ce051628beb2ddbc274221\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"dac946476177b2066b4ea8d9837e9664\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7957b4a052904394c2376099791deb76\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"f0624407e102c3fdeb3b2811153798c7\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"6232ada9ab2f58f9165fec9cfb1f8cb4\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"a615e99b2c6427e0b2764762e518e7be\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"14503792e4932953678d7389cc48e132\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6cd7a9e39559ef9ec1421bcae62f12a4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"15d5c773aa67d38e9fc955da76a05fbd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ce032655cfa41725f2232096c99f0784\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"67a5533475b88addfd890b00132a8533\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"ed063ed259647ad569231274af2ab224\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"c2eafd8b219c9a3374b6c9d93e6a25b5\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"cf87e966bc995fd4805a968cf5244584\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"8986b0e1dec19655c80b1c5ab2faa032\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6250d60f8511b506866f2d36e67cc1f0\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"27d7cc90c01e37eeeacab0d7170b973d\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"084e02f4ed843df855635d4af2ef5434\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"a3702cc098d0fa75fe9af6d267882e8a\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"f90bbba4cbabbfe9b8b8f0af33caf557\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"889365cb400b98a4a71798267ce05dd1\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"37a696446a15336029071bfc17265bcb\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"45059ae2a8eeb92fb79c93fd73e41a67\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"7c4477567bffcb2a34c7c17e610b8b32\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"85594b11f140a62ae5208dc8a6031537\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"9afaddadfc15116def46801c3fae3902\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"1fda55cf1749eb28aaa15bcd4b263ff7\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"6e655c38b13ca083e3d9e989b1625b72\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"634ed48d153c436fdac54422d6f25c97\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"c2e5e7d6d12f4d17eb3a8b116fea807d\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ded8350e4fc8d592127a5611fea1cf52\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"aa811a09d78454b81d891be16ef0849e\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"4df620a4f972b4ee9cf2084f77b0e055\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a148e99a59ca2aa67cfaa7374679c480\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"cd200294760e0b37cb9c6861bde9977d\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"acfc189c058ea58a50f0ea5f9ea37fd8\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"320e258ccf0957f18f6cd1e499885506\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"1ea33db8aa6d19e13642c3841ab90802\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"731c4510de55994ec2d5feff88570b74\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"ad54b43eb1cd46ad69032eb45abb3d02\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"5704e95859a77900b20e225fe02f36f6\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef0552ddce6b4dd91230c9114be2365b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3df58a93314f87b21efb8f9fcc709c65\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"cb5407bfa6e7779306f258615ea6497b\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cf6e1f9a9c18266599165d163a1225a5\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"17061b897a6f00a4c5beb835abaf4c31\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"b72ea1e62e361734ccd709ddb6935e2a\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"7193eab9b177f514621b8479211f6ab4\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9d576620b92feeb088717eeb41e27c5c\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2a69b79be262348ba283d4a0611c75cc\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"c380c5550e86a5b263f8dec7282803b5\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"851c7b377fc498df6b638300edfa3852\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file